Fix witch item bug

This commit is contained in:
Catobat
2022-01-20 01:30:21 +01:00
parent f3d1e99421
commit 78148fb4f3
4 changed files with 26 additions and 1 deletions

View File

@@ -344,6 +344,7 @@ warnpc $B08000
;$3F reserved for internal debugging
;================================================================================
;RAM
;$7E021B[0x1]: Used by race game instead of $0ABF to avoid witch item conflict
;$7EC900[0x1F00]: BIGRAM buffer
;$7EF000[0x500]: SRAM mirror First 0x500 bytes of SRAM
;$7F5000[0x800]: Rando's main free ram region

View File

@@ -214,3 +214,10 @@ FixJingleGlitch:
.exit
RTL
;--------------------------------------------------------------------------------
SetOverworldTransitionFlags:
LDA #$01
STA $0ABF ; used by witch
STA $021B ; used by race game
RTL

View File

@@ -2525,6 +2525,22 @@ JSL ParadoxCaveGfxFix
NOP
;================================================================================
;================================================================================
; Resolve conflict between race game and witch item
;--------------------------------------------------------------------------------
; Change race game to use $021B instead of $0ABF for detecting cheating
org $0DCB9D ; STZ.w $0ABF
STZ $021B
org $0DCBFE ; LDA.w $0ABF
LDA $021B
org $02BFE0 ; LDA.b #$01 : STA.w $0ABF
JSL SetOverworldTransitionFlags
NOP
; For mirroring, the new flag is set in IncrementOWMirror in stats.asm
;================================================================================
;================================================================================
; Player Sprite Fixes
;--------------------------------------------------------------------------------

View File

@@ -428,6 +428,7 @@ IncrementMagicUseCounterOne:
!OW_MIRROR_COUNTER = "$7EF43A"
IncrementOWMirror:
PHA
LDA #$08 : STA $021B ; fail race game
LDA !LOCK_STATS : BNE +
LDA $7EF3CA : BEQ + ; only do this for DW->LW
LDA !OW_MIRROR_COUNTER : INC : STA !OW_MIRROR_COUNTER