From 2f49fbeeaff9fccf4632aa6e55e3a8af4da2ead1 Mon Sep 17 00:00:00 2001 From: nicsure <77679714+nicsure@users.noreply.github.com> Date: Wed, 24 Jul 2024 18:09:43 +0100 Subject: [PATCH] Create hotspot_powermod.asm --- hotspot_powermod.asm | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 hotspot_powermod.asm diff --git a/hotspot_powermod.asm b/hotspot_powermod.asm new file mode 100644 index 0000000..ac09e1e --- /dev/null +++ b/hotspot_powermod.asm @@ -0,0 +1,42 @@ +.org 0x54ea + lcall hotspotPowerHook + +.org 0x7ca5 + .byte 0x00, 0x80 +.org 0x7cb8 + .byte 0x00, 0x80 ; disable scramble function +.org 0x80dc + .byte 0x00, 0x80 +.org 0x80ef + .byte 0x00, 0x80 + +.org 0x676 + .byte "ULow Power" ; change scramble menu + +.org 0x74b0 ; set U for H/L power indicator + LCALL uPowerIndicatorHook + +.ORG 0xf03b ; start of mod code + +hotspotPowerHook: + push acc + mov dptr, #0x2c2 + movx a, @dptr + jnb acc.6, noULP + pop acc + clr a + sjmp hotspotResume +noULP: + pop acc +hotspotResume: + mov 0x34, a + ljmp 0x69e9 + +uPowerIndicatorHook: + jnb acc.6, noLowPowerIndicator + mov dptr, #U + mov r2, dph + mov r1, dpl +noLowPowerIndicator: + mov 0x53, 0x4e + ret