Merge branch 'master' into sram

This commit is contained in:
cassidoxa
2022-01-20 11:16:31 -05:00
7 changed files with 41 additions and 9 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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
;--------------------------------------------------------------------------------

View File

@@ -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
;--------------------------------------------------------------------------------

View File

@@ -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

View File

@@ -522,6 +522,10 @@ CreditsLineBlank:
%blankline()
%bigcredits("PINKUS YUZUHARA")
%blankline()
%bigcredits("SAKURATSUBASA")
%blankline()
@@ -562,9 +566,6 @@ CreditsLineBlank:
%emptyline()
%emptyline()
%emptyline()
%emptyline()
%emptyline()
%emptyline()
;===================================================================================================