Files
alttpr-baserom/medallions.asm
cassidoxa 43f753b517 ram.asm initial commit. Replaced all address defines with labels
Value defines styled without quotes, # moved to load/store/cmp site
Added registers.asm (copied from spannerisms JP disassembly)
Added a bunch of length annotations
Deleted old or trivial commented out code
Deleted: ganonfixes.asm, map.asm, seedtag.asm
Replaced obsolete credits.asm with creditsnew.asm
Moved scratch space at $7F5020-3F to mirrored WRAM (7E1E70-8F)
Moved clock RAM to mirrored WRAM (7E1E90-9F)
dialog.asm: FreeDungeonItemNotice preserves callee-preserved scratch RAM
Toast buffer moved to mirrored WRAM (7E1E0E-0F)
servicerequest.asm: long store to $012E converted to word length store
2022-11-05 00:50:25 -04:00

75 lines
2.2 KiB
NASM

;================================================================================
; Medallion Changes & Fixes
;--------------------------------------------------------------------------------
TryOpenMire:
; Checks if we're in the Swamp of Evil.
LDA $8A : CMP.b #$70 : BNE .untriggered
; Checks whether the Misery Mire dungeon is already revealed.
LDA OverworldEventDataWRAM+$70 : AND.b #$20 : BNE .untriggered
; You have to be in the trigger window.
LDY.b #$02 : JSL.l Ancilla_CheckIfEntranceTriggered : BCC .untriggered
; Do the 3rd animation for opening entrances
LDA.b #$03 : STA $04C6
STZ $B0 ; reset the sub-submodule index
STZ $C8 ; reset this other index.
.untriggered
RTL
;--------------------------------------------------------------------------------
TryOpenTRock:
; Checks if we're at Turtle Rock.
LDA $8A : CMP.b #$47 : BNE .untriggered
; Checks whether the Turtle Rock dungeon is already revealed.
LDA OverworldEventDataWRAM+$47 : AND.b #$20 : BNE .untriggered
; You have to be in the trigger window.
LDY.b #$03 : JSL.l Ancilla_CheckIfEntranceTriggered : BCC .untriggered
; Do the 4rd animation for opening entrances
LDA.b #$04 : STA $04C6
STZ $B0 ; reset the sub-submodule index
STZ $C8 ; reset this other index.
.untriggered
RTL
;--------------------------------------------------------------------------------
MedallionTrigger_Bombos:
STZ $50 ; stuff we wrote over
STZ $0FC1
PHA
LDA.l MireRequiredMedallion : BNE +
JSL.l TryOpenMire
+ LDA.l TRockRequiredMedallion : BNE +
JSL.l TryOpenTRock
+
PLA
RTL
;--------------------------------------------------------------------------------
MedallionTrigger_Ether:
PHA
LDA.l MireRequiredMedallion : CMP.b #$01 : BNE +
JSL.l TryOpenMire
+ LDA.l TRockRequiredMedallion : CMP.b #$01 : BNE +
JSL.l TryOpenTRock
+
PLA
RTL
;--------------------------------------------------------------------------------
MedallionTrigger_Quake:
PHA
LDA.l MireRequiredMedallion : CMP.b #$02 : BNE +
JSL.l TryOpenMire
+ LDA.l TRockRequiredMedallion : CMP.b #$02 : BNE +
JSL.l TryOpenTRock
+
PLA
RTL
;--------------------------------------------------------------------------------