From a80d6a7ac3d4d8fcb4d07474b2361c850f1e5608 Mon Sep 17 00:00:00 2001 From: aquanight Date: Tue, 3 Feb 2026 20:46:57 -0700 Subject: [PATCH 1/8] Reserve Backward Transfer UI --- patches/ips/reserve_backward_fill.ips | Bin 114 -> 379 bytes patches/rom_map/RAM.txt | 3 +- patches/src/reserve_backward_fill.asm | 241 ++++++++++++++++++++------ scripts/build_ips.py | 3 + 4 files changed, 197 insertions(+), 50 deletions(-) diff --git a/patches/ips/reserve_backward_fill.ips b/patches/ips/reserve_backward_fill.ips index ebf5c30611f8b4137fb1af7a23e3aaa4f70b68d9..ec1f300f264fd514b0bb37644df9ecc9a21c6e28 100644 GIT binary patch literal 379 zcmWG=3~}~g6x_kUwvvHC;oDC}of-z_KMMaDb=nzNVuaVVGV1g(u*SHrYkkG2%f%qa zamZk8D0}CBh6{YJy*98aXs&JGP`JCcfmz}GT8#uo{WzemR-i8ZMj&G;kWu-KfwO=5 z*E*@*WcCEcdIbiq?sfj_+t(<#t;=RwC(Lk>V`+b91H%V}^*}|Qj0_;PT&womuWRjR zvaH+h45V4C>*j>B$8fA|^0AGv&A0Wo1v;Ts2&j*N=>s2-t@)pUlYyx>l)XW8snBa6 z?<5n$1yPVZ;|H!eq3kQo8I(LHG=NNqnY^Y6WYY(swTC#ZBr@31)83{zG>|> zPKlVL^$>YOko*Ug-b0)~VX3oMI0aaHuW>ert-Zntq*pRB0A-Za{x<=QhdK_ZK_aGg veUr3i0)qmBf`Wm8g~gvge=IBv3=|X!7$OwT7#y=;`g6p>!yrJx)!z*O0{o7F literal 114 zcmWG=3~}~g)azqlRSHf8tz={X PiY@K$Y+%TC^>+gR-lr%& diff --git a/patches/rom_map/RAM.txt b/patches/rom_map/RAM.txt index 0c10a4ad55..5b09114eb7 100644 --- a/patches/rom_map/RAM.txt +++ b/patches/rom_map/RAM.txt @@ -41,7 +41,8 @@ $7EF500: room map tile graphics pointer (into bank $E4) $7EF502-$7EF594: fix_dust_torizo.asm $7EF594-$7EF596: fix_transition_bad_tiles.asm $7EF596 - vanilla_bugfixes.asm -$7EF597 - $7EFE00: [FREE] +$7EF597 - reserve_backward_fill.asm +$7EF598 - $7EFE00: [FREE] $7EFE00: map area (copy of $1F5B to be saved to SRAM) $7EFE02: map area explored mask $7EFE04: copy of $1F5D (to be saved to SRAM for escape autosave) diff --git a/patches/src/reserve_backward_fill.asm b/patches/src/reserve_backward_fill.asm index fc8c9c8908..87708755ed 100644 --- a/patches/src/reserve_backward_fill.asm +++ b/patches/src/reserve_backward_fill.asm @@ -1,71 +1,214 @@ -!bank_85_free_space_start = $85A050 -!bank_85_free_space_end = $85A100 +!bank_85_free_space_start = $85AE13 +!bank_85_free_space_end = $85B000 -; Hook code that run when equipment screen tanks mode (Auto/Manual) is selected: -org $82AE8E - jsl hook_reserve_refill +!arrow_mode = $7EF597 + +; Hook runs when the dpad is pressed in the SUPPLY section +; (Note: disableable_etanks also hooks at a later point in this routine, at ACEF (BRANCH_UP).) +org $82AC8E + jml hook_tanks_dpad_response nop + +; Load equipment menu +org $8291B8 + lda #$0000 + jsr hook_init_arrow_mode + +org $82AD08 + ; There's a PLP / RTS here for when we need to escape hooked $82 routines that had to JML out to $85 +fake_rtl: -; update reserve refill code to set the counter value to maximum (#$FFFF) rather than -; to the current amount in reserves. This prevents the refill from abruptly stopping -; if switching back and forth between forward and reverse fill. +; Hook code that prepares the reserve tank delay sound counter org $82AF5E - lda #$FFFF - sta $0757 - bra process_reserve_counter + jml hook_reserve_delay_counter_init + +; Hook code that performs the reserve tank refill +org $82AF81 + jml hook_reserve_tank_refilling + +; Jump table for the equipment tanks category (A button handler) +org $82AC7C + jsr (hook_tanks_items, x) + +org $82AC87 + ; Having hijacked the jump table that's normally here, we can repurpose it for a little bit of code... +hook_tanks_arrow_trampoline: + jml hook_tanks_arrow + +org $82AD0A + php + rep #$30 + lda $0755 + bit #$00FF + bne .off + xba + lsr a + bcs .solid + jsr $AD29 + bra .done +.solid + jsr $ADDD + bra .done +.off + jsr $ADEF +.done + plp + rts +warnpc $82AD29 + warnpc $82AF6B org $82AF6B process_reserve_counter: + +org $82FF20 +hook_tanks_items: + dw $AE8B, $AF4F, hook_tanks_arrow_trampoline + +extern_disable_arrow_glow: + jsr $AE46 + rtl + +warnpc $82FF30 + +org $82F9F6 +hook_init_arrow_mode: + ; A = 0 + sta !arrow_mode + inc a + sta $0763 ;Hijacked (pause menu mode = equipment screen) + rts +warnpc $82FA00 + org !bank_85_free_space_start -hook_reserve_refill: - lda $09C0 - cmp #$0002 ; reserves on manual? - bne .done - lda $8B - and #$8800 - cmp #$8800 ; holding up + B? - bne .done +!ram_bg1_tilemap_arrow_top = $7E3902 +!ram_bg1_tilemap_arrow_end = $7E3B04 +!arrow_top_normal_tile = $3D4C ; Vanilla tile (upward arrowhead) +!arrow_end_normal_tile = $3D6F ; Vanilla tile (short horizontal end) +!arrow_top_reversed_tile = $3D5C ; Vanilla tile (vertical line) +!arrow_end_reversed_tile = $3D4B ; Custom tile (rightward arrowhead) - ; skip if samus energy <= 1 - lda $09C2 - cmp #$0002 - bmi .done - - ; play sound every 8 frames: - LDA $0757 - DEC A - STA $0757 - AND #$0007 - BNE .refill - LDA #$002D - JSL $80914D ;} Queue sound 2Dh, sound library 3, max queued sounds allowed = 6 (gaining/losing incremental health) - -.refill: - ; do reverse refill, where energy transfers into reserves: +hook_tanks_arrow: + php + lda $8F + bit #$0080 + beq .no + lda !arrow_mode + eor #$0001 + sta !arrow_mode + asl + tax + lda.l arrow_top_tile, x + sta !ram_bg1_tilemap_arrow_top + lda.l arrow_end_tile, x + sta !ram_bg1_tilemap_arrow_end + stz $0757 +.no + jml fake_rtl + +arrow_top_tile: + dw $3D4C, $3D5C + +arrow_end_tile: + dw $3D6F, $3D4B + +hook_tanks_dpad_response: + ; Arrived here by JML from an $82 JSR - MUST JML back to an $82 PLP/RTS! + ;Hijacked instructions + lda $0755 + sta $12 + + lda $8F + bit #$0200 ; P1 D-Pad Left + beq .not_left + + ; Move to the arrow + lda $0755 + and #$00FF + ora #$0200 + sta $0755 + bra .moved + +.not_left + + lda $12 + xba + and #$00FF + cmp #$0002 ; Arrow selected + bne .not_arrow + + lda $8F + bit #$0100 ; P1 D-Pad Right + beq .not_right + + ; Move back to the Mode select + stz $0755 +.moved + lda #$0037 + jsl $809049 ; Play sound: moved cursor + +.not_right + jml fake_rtl ; Skip the rest of the vanilla routine + +.not_arrow + jml $82AC93 ; Return to vanilla code + +hook_reserve_delay_counter_init: + lda !arrow_mode + beq .vanilla + lda $09c2 ; Reserve tank delay sound counter = [Samus health] - 1, rounded up to nearest 8 + dec a + clc + adc #$0007 + and #$fff8 + sta $0757 + jml $82AF6B ; Return to vanilla code at handling the reserve tank delay sound counter +.vanilla + lda $09d6 ; Hijacked code + clc + jml $82AF62 ; Return to vanilla code + +hook_reserve_tank_refilling: + lda !arrow_mode + beq .vanilla + + ; Samus health -= 1, unless this would be 0 lda $09C2 - dec + dec a + beq .stop_etanks_empty sta $09C2 - lda $09D6 + inc a cmp $09D4 - bpl .overfull - inc + bpl .stop_dump_etanks sta $09D6 bra .done - -.overfull: - ; reserves are being overfilled, so set regular energy to 1 - ; (mirroring vanilla quirky behavior that sets reserve energy to 0 when overfilling regular energy) + +.stop_dump_etanks + ; Reserves hit full, vent regular energy + lda $09D4 + sta $09D6 lda #$0001 sta $09C2 + jsl extern_disable_arrow_glow + stz $0755 -.done: - ; run hi-jacked code - lda $8f - bit #$0080 - rtl +.stop_etanks_empty + stz $0757 + +.done + jml fake_rtl + +.vanilla + lda $09C2 ; Hijacked code + clc + jml $82AF85 ; Return to vanilla function + +warnpc !bank_85_free_space_end -warnpc !bank_85_free_space_end \ No newline at end of file +; There's a free spot right here in the vanilla pause BG1 tiles +org $B6A960 + db $00, $20, $20, $30, $30, $38, $38, $FC, $FC, $FC, $38, $38, $30, $30, $20, $20 + db $70, $00, $58, $20, $CC, $30, $C6, $38, $02, $FC, $C4, $38, $48, $30, $50, $20 diff --git a/scripts/build_ips.py b/scripts/build_ips.py index 73f4bca2fc..b2e91f5570 100644 --- a/scripts/build_ips.py +++ b/scripts/build_ips.py @@ -148,6 +148,9 @@ def check_range(filename, other_filename, overlap_start, overlap_end): 'buffed_drops': [ ['no_drops', 0xB4F1F4, 0xB4F4B8] ], + 'reserve_backward_fill': [ + ['hud_expansion_opaque', 0xB6A960, 0xB6A980] + ], } failed = False From f00305c2003be564a019a1102cd54c55900efac2 Mon Sep 17 00:00:00 2001 From: aquanight Date: Wed, 4 Feb 2026 19:39:08 -0700 Subject: [PATCH 2/8] Reserve fill auto-resumes when switching mode --- patches/ips/reserve_backward_fill.ips | Bin 379 -> 473 bytes patches/src/reserve_backward_fill.asm | 65 +++++++++++++++++++++----- 2 files changed, 53 insertions(+), 12 deletions(-) diff --git a/patches/ips/reserve_backward_fill.ips b/patches/ips/reserve_backward_fill.ips index ec1f300f264fd514b0bb37644df9ecc9a21c6e28..7f802ce75dad240ebf992be443bbcd348cb22315 100644 GIT binary patch delta 284 zcmey(bd%XAz%j(xgHdn?1GB=npNu*+49tHN{xj;dGqA+iu4`q~>0@AxnXs<)6{F5I z1~w&OAZwzQR{b@glzt;n%{L&U@*4w(lIptFm5dAtjP(i(T;1#Z*SD`xa9fwnv`&~& zqc@a&{q(POA6VBO;32YZlm zPe!mBu2uV?s`f)wtu$w_Rq~wBur{3igIL!GHjt?e%s^u$GT9k4fBf$aXOH1n+vH;# zW1Da5ZM!yxkgwkelvoO6RDNUN?4SO%PO3MVJ%O=afq|=go&WmwH41L)vYFNiGhF0Y+TYp0 z@IhfcP?0Ai14u2`s{QusTKkzS>-IYXX%_3cIpORv9BZ3=Y-4QmZM|*RhO)N`0rfF3 zec%JKHUBekGBEXqvNwn>6?#2co6$|oaP1*Zs}Cx@hd9?> don't + cmp #$0001 + beq .not_left + lda $0755 and #$00FF ora #$0200 @@ -184,6 +222,9 @@ hook_reserve_tank_refilling: cmp $09D4 bpl .stop_dump_etanks sta $09D6 + lda $09C2 + dec a + beq .stop_etanks_empty bra .done .stop_dump_etanks @@ -193,9 +234,9 @@ hook_reserve_tank_refilling: lda #$0001 sta $09C2 jsl extern_disable_arrow_glow - stz $0755 .stop_etanks_empty + stz $0755 stz $0757 .done From 618daebc6ff05ab91fde7049cb8818cb7a881bcc Mon Sep 17 00:00:00 2001 From: aquanight Date: Thu, 5 Feb 2026 19:53:56 -0700 Subject: [PATCH 3/8] Add reserve arrow glow, remove weird ball cursor --- patches/ips/reserve_backward_fill.ips | Bin 473 -> 510 bytes patches/rom_map/Bank 82.txt | 4 +- patches/rom_map/Bank 85.txt | 4 +- patches/src/reserve_backward_fill.asm | 85 +++++++++++++++----------- 4 files changed, 54 insertions(+), 39 deletions(-) diff --git a/patches/ips/reserve_backward_fill.ips b/patches/ips/reserve_backward_fill.ips index 7f802ce75dad240ebf992be443bbcd348cb22315..2d721d9f4e6df6315e5b1f7dfe0b441bb2cc27d5 100644 GIT binary patch delta 310 zcmcb~{ExXlz%j(xgHdn?1Dlewr|GnYt2^>rNI~y22*n0@AxnXs<)6{F5I z1~w&OAnO&QE*FCw$038Yq3oUi87}a>_S(Rzpt-hzL*ee)24;o#Yc&!W_2YmBTmu@Q z-w0%U12QVVF>olUu4`S%$dJHTufV|7z0QAqJJ%Wow{_V}>x3CKCN7ZD?^xH`&tzG* zz6VINSl4B9EbZ@XVEACae)`usPez7*AjP$6KUCHJo{7KbvzxCy#A)?Geeyy^5n-VQ Zv9(t?d#`Z Date: Thu, 5 Feb 2026 20:08:43 -0700 Subject: [PATCH 4/8] Update help text --- .../generate/help/quality/reserve_backward_transfer.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rust/maprando-web/templates/generate/help/quality/reserve_backward_transfer.html b/rust/maprando-web/templates/generate/help/quality/reserve_backward_transfer.html index 59912e6d79..4813b21574 100644 --- a/rust/maprando-web/templates/generate/help/quality/reserve_backward_transfer.html +++ b/rust/maprando-web/templates/generate/help/quality/reserve_backward_transfer.html @@ -6,7 +6,8 @@

Reserve energy backward transfer

From 7bd815c1b1a60a61feacb21ec933d27621bb8f2d Mon Sep 17 00:00:00 2001 From: aquanight Date: Fri, 6 Feb 2026 10:26:43 -0700 Subject: [PATCH 5/8] Update bank 85 map --- patches/rom_map/Bank 85.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/rom_map/Bank 85.txt b/patches/rom_map/Bank 85.txt index 0e992287c6..21a085fdf8 100644 --- a/patches/rom_map/Bank 85.txt +++ b/patches/rom_map/Bank 85.txt @@ -6,7 +6,7 @@ $9980 - $9B00: stats.asm $9B00 - $9B20: fix_hyper_slowlock.asm $9B20 - $9FF0: pause_menu_objectives.asm $9FF0 - $A050: vanilla_fanfare_stop_sounds -$A050 - $A100: reserve_backward_fill.asm +$A050 - $A100: [FREE] $A100 - $A180: fix_transition_bad_tiles.asm $A180 - $A280: special_door_reveal.asm $A280 - $A880: map_area.asm From a7f096b4f6747b0f54161cba8749d873ad430e75 Mon Sep 17 00:00:00 2001 From: aquanight Date: Sat, 7 Feb 2026 12:26:57 -0700 Subject: [PATCH 6/8] Adjust reversed arrow appearance --- patches/ips/reserve_backward_fill.ips | Bin 510 -> 554 bytes patches/src/reserve_backward_fill.asm | 28 +++++++++++++++++++------- scripts/build_ips.py | 2 +- 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/patches/ips/reserve_backward_fill.ips b/patches/ips/reserve_backward_fill.ips index 2d721d9f4e6df6315e5b1f7dfe0b441bb2cc27d5..ebbd043b40a1caa7ed1c30dba906cfdd0c67287f 100644 GIT binary patch delta 105 zcmeyzyozN)6t~eN2KEm;t4{4?Vwf1I$jrdNFtK(Gqt|3D#&vEE3=Tj(5C}-XAc$wf spd$c-3=R$n2?Yf|e*7pXNJwySc)+m1VManv0n3k$f(Z!=99;d~0GWp!ng9R* delta 61 zcmV-D0K)&O1pWh%T9IZT0}ucZk%_DUT$45dt|njrAOIjBFfcec{QUelI503EAaDR! TAj~kvI0F2{I7l#1AVp6`VT%*T diff --git a/patches/src/reserve_backward_fill.asm b/patches/src/reserve_backward_fill.asm index 8e1d0ec014..dcb4c0d48c 100644 --- a/patches/src/reserve_backward_fill.asm +++ b/patches/src/reserve_backward_fill.asm @@ -52,10 +52,21 @@ org $82ACD6 nop assert pc() == $82ACDC +org $82B292 + beq escape + tax + dex + lda $0002,y +assert pc() == $82B299 + +org $82B2A0 +escape: + org $82C18E dw coord_table org !bank_82_free_space_start + hook_tanks_items: dw $AE8B, $AF4F, hook_tanks_arrow_trampoline @@ -65,7 +76,7 @@ hook_tanks_glowing_arrow_jumptable: coord_table: dw $001B, $0054 ; Tanks - mode dw $001B, $005C ; Tanks - reserve tank - dw $1000, $1000 ; Far off-screen + dw $0000, $0000 ; Far off-screen warnpc !bank_82_free_space_end @@ -75,7 +86,7 @@ org !bank_85_free_space_start !ram_bg1_tilemap_arrow_end = $7E3B04 !arrow_top_normal_tile = $3D4C ; Vanilla tile (upward arrowhead) !arrow_end_normal_tile = $3D6F ; Vanilla tile (short horizontal end) -!arrow_top_reversed_tile = $3D5C ; Vanilla tile (vertical line) +!arrow_top_reversed_tile = $3D4A ; Custom tile (short vertical end) !arrow_end_reversed_tile = $3D4B ; Custom tile (rightward arrowhead) hook_init_arrow_mode: @@ -158,10 +169,10 @@ hook_tanks_arrow: jml fake_rtl arrow_top_tile: - dw $3D4C, $3D5C + dw !arrow_top_normal_tile, !arrow_top_reversed_tile arrow_end_tile: - dw $3D6F, $3D4B + dw !arrow_end_normal_tile, !arrow_end_reversed_tile hook_tanks_dpad_response: ; Arrived here by JML from an $82 JSR - MUST JML back to an $82 PLP/RTS! @@ -265,6 +276,9 @@ hook_reserve_tank_refilling: warnpc !bank_85_free_space_end ; There's a free spot right here in the vanilla pause BG1 tiles -org $B6A960 - db $00, $20, $20, $30, $30, $38, $38, $FC, $FC, $FC, $38, $38, $30, $30, $20, $20 - db $70, $00, $58, $20, $CC, $30, $C6, $38, $02, $FC, $C4, $38, $48, $30, $50, $20 +org $B6A940 + db $00, $00, $00, $00, $00, $00, $10, $18, $10, $18, $10, $18, $10, $18, $10, $18 + db $00, $00, $00, $00, $3C, $00, $2C, $10, $2C, $10, $2C, $10, $2C, $10, $2C, $10 + + db $00, $40, $40, $60, $60, $70, $70, $F8, $F8, $F8, $70, $70, $60, $60, $40, $40 + db $E0, $00, $B0, $40, $98, $60, $8C, $70, $04, $F8, $88, $70, $90, $60, $A0, $40 diff --git a/scripts/build_ips.py b/scripts/build_ips.py index b2e91f5570..092a03ddf8 100644 --- a/scripts/build_ips.py +++ b/scripts/build_ips.py @@ -149,7 +149,7 @@ def check_range(filename, other_filename, overlap_start, overlap_end): ['no_drops', 0xB4F1F4, 0xB4F4B8] ], 'reserve_backward_fill': [ - ['hud_expansion_opaque', 0xB6A960, 0xB6A980] + ['hud_expansion_opaque', 0xB6A940, 0xB6A980] ], } From 4969acc8a9b13e777b2e44634ec8f41f07ed50aa Mon Sep 17 00:00:00 2001 From: aquanight Date: Sat, 7 Feb 2026 15:02:53 -0700 Subject: [PATCH 7/8] Adjust arrow colors --- patches/ips/reserve_backward_fill.ips | Bin 554 -> 553 bytes patches/src/reserve_backward_fill.asm | 10 ++++------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/patches/ips/reserve_backward_fill.ips b/patches/ips/reserve_backward_fill.ips index ebbd043b40a1caa7ed1c30dba906cfdd0c67287f..b71187a0b027a5a481a3865f1a143dd4ac06347e 100644 GIT binary patch delta 154 zcmZ3*vXW(joMq*@Rz{sZ2G*D}>snti>Re-BQ?doJUNP!QGcf9&FqYfj7kj+2M#=V@ZrOU2M-P$0CE@-8Vn9dJmB~s@Ic{!LxZco8vt?1KU4q! delta 155 zcmZ3snti>Re-BQ?diHUNP!QGcf diff --git a/patches/src/reserve_backward_fill.asm b/patches/src/reserve_backward_fill.asm index dcb4c0d48c..c38d2073e0 100644 --- a/patches/src/reserve_backward_fill.asm +++ b/patches/src/reserve_backward_fill.asm @@ -96,11 +96,9 @@ hook_init_arrow_mode: rtl hook_tanks_glowing_arrow_selected: - ; Copy sprite palette 3 color 1 - lda $7EC162 + lda #$318C ; Hopefully a dark grey color? sta $7EC0CC ; Palette 6 slot 6 (arrow hilight)) - ; Copy sprite palette 3 color 2 - lda $7EC164 + lda $7EC16A ; Copy sprite palette 3 color 5 sta $7EC0D6 ; Palette 6 slot B (arrow fill) jml $82AE01 ; Enable energy glow @@ -280,5 +278,5 @@ org $B6A940 db $00, $00, $00, $00, $00, $00, $10, $18, $10, $18, $10, $18, $10, $18, $10, $18 db $00, $00, $00, $00, $3C, $00, $2C, $10, $2C, $10, $2C, $10, $2C, $10, $2C, $10 - db $00, $40, $40, $60, $60, $70, $70, $F8, $F8, $F8, $70, $70, $60, $60, $40, $40 - db $E0, $00, $B0, $40, $98, $60, $8C, $70, $04, $F8, $88, $70, $90, $60, $A0, $40 + db $00, $80, $80, $C0, $C0, $E0, $E0, $F0, $F0, $F0, $E0, $E0, $C0, $C0, $80, $80 + db $C0, $00, $60, $80, $30, $C0, $18, $E0, $08, $F0, $10, $E0, $20, $C0, $40, $80 From f8b801474227937a2a8362e988b80edc29529656 Mon Sep 17 00:00:00 2001 From: aquanight Date: Sat, 7 Feb 2026 18:28:42 -0700 Subject: [PATCH 8/8] Adjust arrow colors --- patches/ips/reserve_backward_fill.ips | Bin 553 -> 627 bytes patches/src/reserve_backward_fill.asm | 20 ++++++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/patches/ips/reserve_backward_fill.ips b/patches/ips/reserve_backward_fill.ips index b71187a0b027a5a481a3865f1a143dd4ac06347e..d24a8c4effbeeabbe21015753769ab3cf1b9b73b 100644 GIT binary patch delta 240 zcmZ3<@|k6VT=4#Nt&BQ-46HFi>swzj>Re-BQ>tIr`sx*eNmq21ds|2Bted87nU^$V@Dh$WVB{Hk)ak0^>}D ziR)G}GV~_1XRq~V=UTNtab0WwnFDqEoq_bV19dTs>zaBD*P6b!4f5I=W|=;x_<#MJ zV$1ZcVL@K+ZP%Li7;-3Ts%Gn+vov(u8YYokoiCBRHO$cMoMpByNM_<{DPgYlt^G`v fb?fdhe(u6R&7;L5278t>4VfsKf{Wb$wfQ delta 167 zcmey&vXW(jTyW*ORz{sZ2G*D}>snti>Re-BQ?doJUNP!QGcfc(If`;4?L?*?POwLbnIhby7QB<@&bdz#6k%rrgaL8!3zHCRx&d5 zCbMU+>@n;=bD(a0*1@{|YX|CL7}qsT{3ykLWL;}NlV#od6F{29x^A)@qb3(rZ2yUM Jn*$k@7y-GNKM4Q; diff --git a/patches/src/reserve_backward_fill.asm b/patches/src/reserve_backward_fill.asm index c38d2073e0..ba7c2c2970 100644 --- a/patches/src/reserve_backward_fill.asm +++ b/patches/src/reserve_backward_fill.asm @@ -78,6 +78,10 @@ coord_table: dw $001B, $005C ; Tanks - reserve tank dw $0000, $0000 ; Far off-screen +extern_arrow_glow_off: + jsr $ADEF + rtl + warnpc !bank_82_free_space_end org !bank_85_free_space_start @@ -96,12 +100,23 @@ hook_init_arrow_mode: rtl hook_tanks_glowing_arrow_selected: - lda #$318C ; Hopefully a dark grey color? + lda $074F ; X = Pause palette animation frame * 2 + asl + tax + + lda.l sequence_arrow_shadow_color,x sta $7EC0CC ; Palette 6 slot 6 (arrow hilight)) - lda $7EC16A ; Copy sprite palette 3 color 5 + + lda.l sequence_arrow_fill_color,x sta $7EC0D6 ; Palette 6 slot B (arrow fill) jml $82AE01 ; Enable energy glow +sequence_arrow_fill_color: + dw $318C, $35AD, $3DEF, $4A52, $56B5, $6739, $739C, $7FFF, $739C, $6739, $56B5, $4A52, $3DEF, $35AD, $318C + +sequence_arrow_shadow_color: + dw $2108, $2529, $2D6B, $39CE, $4631, $56B5, $6318, $6F7B, $6318, $56B5, $4631, $39CE, $2D6B, $2108, $2529 + hook_tanks_dpad_move_to_reserve: sta $0755 ; Part of the hijacked ; Z = Don't move to the reserve tank, NZ = Do @@ -121,6 +136,7 @@ reset_arrow: sta !ram_bg1_tilemap_arrow_top lda.l arrow_end_tile sta !ram_bg1_tilemap_arrow_end + jsl extern_arrow_glow_off ; If this reset because you went to the map need to also reset the reserve timer lda $0757 beq .no