diff --git a/LTTP_RND_GeneralBugfixes.asm b/LTTP_RND_GeneralBugfixes.asm index aa17c3a..e5851e2 100644 --- a/LTTP_RND_GeneralBugfixes.asm +++ b/LTTP_RND_GeneralBugfixes.asm @@ -312,7 +312,8 @@ warnpc $B08000 ;$3B reserved for downstream use ;$3F reserved for internal debugging ;================================================================================ -;RAM +;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 ; See sram.asm for labels and assignments diff --git a/bugfixes.asm b/bugfixes.asm index 93acf97..a3ffcc7 100644 --- a/bugfixes.asm +++ b/bugfixes.asm @@ -220,3 +220,9 @@ pushpc org $09F4AC ; <- module_death.asm:331 db $08, $08, $10 pullpc +;-------------------------------------------------------------------------------- +SetOverworldTransitionFlags: + LDA #$01 + STA $0ABF ; used by witch + STA $021B ; used by race game + RTL diff --git a/entrances.asm b/entrances.asm index 1ef50c7..3aab52c 100644 --- a/entrances.asm +++ b/entrances.asm @@ -80,8 +80,8 @@ AllowStartFromSingleEntranceCave: LDA StartingEntrance : AND.w #$00FF ; What we wrote over PHA TAX - LDA.l StartingAreaExitOffset, X + AND.w #$00FF BNE + JMP .done @@ -124,10 +124,10 @@ AllowStartFromSingleEntranceCave: STZ $0699 ;zero out door overlays in case starting overworld door is not set SEP #$20 ; set 8-bit accumulator - LDX $00 + LDA $7EF3C8 : TAX LDA.l StartingAreaOverworldDoor, X : STA.l $7F5099 ;Load overworld door - REP #$20 ; reset 16-bit accumulator + JSL.l CacheDoorFrameData .done PLA diff --git a/hooks.asm b/hooks.asm index a848d7d..557e9b9 100755 --- a/hooks.asm +++ b/hooks.asm @@ -1854,12 +1854,12 @@ NOP #8 ;JSL.l OnLoadMap ;================================================================================ org $028B8F ; <- 10B8F - Bank02.asm:2236 (LDA $7EF374 : LSR A : BCS BRANCH_BETA) -LDA $7EF00F : BNE + : NOP +JSL CheckHeraBossDefeated : BNE + : NOP LDX.b #$F1 : STX $012C + ;================================================================================ org $029090 ; <- 11090 - Bank02.asm:3099 (LDA $7EF374 : LSR A : BCS BRANCH_GAMMA) -LDA $7EF00F : BNE + : NOP +JSL CheckHeraBossDefeated : BNE + : NOP STX $012C ; DON'T MOVE THIS FORWARD OR MADNESS AWAITS + ;================================================================================ @@ -2519,6 +2519,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 ;-------------------------------------------------------------------------------- diff --git a/music.asm b/music.asm index ebb5396..03d50ae 100644 --- a/music.asm +++ b/music.asm @@ -283,3 +283,10 @@ Overworld_MosaicDarkWorldChecks: .done RTL ;-------------------------------------------------------------------------------- + +;-------------------------------------------------------------------------------- +; Check if the boss in ToH has been defeated (16-bit accumulator) +CheckHeraBossDefeated: + LDA $7EF00F : AND #$00FF + RTL +;-------------------------------------------------------------------------------- diff --git a/stats.asm b/stats.asm index 7fe0826..1fef8ae 100644 --- a/stats.asm +++ b/stats.asm @@ -275,6 +275,7 @@ IncrementMagicUseCounterOne: ;-------------------------------------------------------------------------------- IncrementOWMirror: PHA + LDA #$08 : STA $021B ; fail race game LDA StatsLocked : BNE + LDA CurrentWorld : BEQ + ; only do this for DW->LW LDA OverworldMirrors : INC : STA OverworldMirrors diff --git a/stats/creditsnew.asm b/stats/creditsnew.asm index 923c687..d57270b 100644 --- a/stats/creditsnew.asm +++ b/stats/creditsnew.asm @@ -522,6 +522,10 @@ CreditsLineBlank: %blankline() +%bigcredits("PINKUS YUZUHARA") + +%blankline() + %bigcredits("SAKURATSUBASA") %blankline() @@ -562,9 +566,6 @@ CreditsLineBlank: %emptyline() %emptyline() %emptyline() -%emptyline() -%emptyline() -%emptyline() ;===================================================================================================