From 9225f836089b5c701d69c81c14d73fc68dac8850 Mon Sep 17 00:00:00 2001 From: Smallhacker Date: Sun, 11 Mar 2018 02:31:26 +0100 Subject: [PATCH 1/2] Stopped some GFX from reloading when moving from Paradox Cave 1F to B1 --- hooks.asm | 7 +++++++ shopkeeper.asm | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/hooks.asm b/hooks.asm index 525fdbd..1148e9e 100644 --- a/hooks.asm +++ b/hooks.asm @@ -2135,3 +2135,10 @@ org $1BBD55 ; <- DBD55 - Bank1B.asm: 290 (CPX.w #$0076 : BCC BRANCH_LAMBDA) JML.l SmithDoorCheck : NOP Overworld_Entrance_BRANCH_RHO: ; branch here to continue into door ;================================================================================ + +;================================================================================ +; Paradox Cave Shopkeeper Fixes +;-------------------------------------------------------------------------------- +org $008C1B ; Bank00.asm@1633 (LDA.b #$01 : STA $420B) +JSL ParadoxCaveGfxFix +NOP \ No newline at end of file diff --git a/shopkeeper.asm b/shopkeeper.asm index a7686a6..375e37e 100644 --- a/shopkeeper.asm +++ b/shopkeeper.asm @@ -818,3 +818,21 @@ RTS ;dw 64, 56 : db $30, $02, $00, $00 ;dw 72, 56 : db $31, $02, $00, $00 ;-------------------------------------------------------------------------------- + +ParadoxCaveGfxFix: + ; Always upload line unless you're moving into paradox cave (0x0FF) from above (0x0EF) + LDX $A0 : CPX #$00FF : BNE .uploadLine + LDX $A2 : CPX #$00EF : BNE .uploadLine + + ;Ignore uploading four specific lines of tiles to VRAM + LDX $0118 + CPX #$1800 : BEQ .skipLine + CPX #$1A00 : BEQ .skipLine + CPX #$1C00 : BEQ .skipLine + CPX #$1E00 : BEQ .skipLine + +.uploadLine + LDA.b #$01 : STA $420B + +.skipLine + RTL \ No newline at end of file From faa9841835c4dd20e996b952535f8a83386e9a3e Mon Sep 17 00:00:00 2001 From: Smallhacker Date: Sun, 11 Mar 2018 20:38:53 +0100 Subject: [PATCH 2/2] Holy crap this is so stupid --- shopkeeper.asm | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/shopkeeper.asm b/shopkeeper.asm index 375e37e..b7009ee 100644 --- a/shopkeeper.asm +++ b/shopkeeper.asm @@ -826,13 +826,22 @@ ParadoxCaveGfxFix: ;Ignore uploading four specific lines of tiles to VRAM LDX $0118 - CPX #$1800 : BEQ .skipLine - CPX #$1A00 : BEQ .skipLine + ; Line 1 + CPX #$1800 : BEQ .skipMostOfLine + ; Line 2 + CPX #$1A00 : BEQ .skipMostOfLine + ; Line 3 CPX #$1C00 : BEQ .skipLine + ; Line 4 CPX #$1E00 : BEQ .skipLine .uploadLine LDA.b #$01 : STA $420B .skipLine - RTL \ No newline at end of file + RTL + +.skipMostOfLine + ; Set line length to 192 bytes (the first 6 8x8 tiles in the line) + LDX.w #$00C0 : STX $4305 + BRA .uploadLine \ No newline at end of file