Implement initial SRAM table
Data in initialsramtable.asm gets copied to SRAM on save file init Frontend will be responsible for setting this, requires frontend changes Changed some label names to disambiguate WRAM and SRAM labels Deleted open mode
This commit is contained in:
@@ -159,7 +159,6 @@ org $A48000 ; code bank - PUT NEW CODE HERE
|
|||||||
incsrc glitched.asm
|
incsrc glitched.asm
|
||||||
incsrc hardmode.asm
|
incsrc hardmode.asm
|
||||||
incsrc goalitem.asm
|
incsrc goalitem.asm
|
||||||
incsrc openmode.asm
|
|
||||||
incsrc quickswap.asm
|
incsrc quickswap.asm
|
||||||
incsrc endingsequence.asm
|
incsrc endingsequence.asm
|
||||||
incsrc cuccostorm.asm
|
incsrc cuccostorm.asm
|
||||||
@@ -446,10 +445,10 @@ org $028296
|
|||||||
.setAmbientSfx
|
.setAmbientSfx
|
||||||
|
|
||||||
org $02A0A8
|
org $02A0A8
|
||||||
Dungeon_SaveRoomData:
|
Dungeon_SaveRoomDataWRAM:
|
||||||
|
|
||||||
org $02A0BE
|
org $02A0BE
|
||||||
Dungeon_SaveRoomData_justKeys:
|
Dungeon_SaveRoomDataWRAM_justKeys:
|
||||||
|
|
||||||
org $02B861
|
org $02B861
|
||||||
Dungeon_SaveRoomQuadrantData:
|
Dungeon_SaveRoomQuadrantData:
|
||||||
@@ -584,7 +583,7 @@ org $0CD7D1
|
|||||||
NameFile_MakeScreenVisible:
|
NameFile_MakeScreenVisible:
|
||||||
org $0CDB3E
|
org $0CDB3E
|
||||||
InitializeSaveFile:
|
InitializeSaveFile:
|
||||||
org $0CDB3E
|
org $0CDBC0
|
||||||
InitializeSaveFile_build_checksum:
|
InitializeSaveFile_build_checksum:
|
||||||
|
|
||||||
org $0DBA71
|
org $0DBA71
|
||||||
|
|||||||
@@ -394,7 +394,7 @@ AgahnimAsksAboutPed:
|
|||||||
LDA.l InvincibleGanon
|
LDA.l InvincibleGanon
|
||||||
CMP.b #$06 : BNE .vanilla
|
CMP.b #$06 : BNE .vanilla
|
||||||
|
|
||||||
LDA.l OverworldEventData+$80 ; check ped flag
|
LDA.l OverworldEventDataWRAM+$80 ; check ped flag
|
||||||
AND.b #$40
|
AND.b #$40
|
||||||
BNE .vanilla
|
BNE .vanilla
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ LockAgahnimDoors:
|
|||||||
.crystalOrUnlock
|
.crystalOrUnlock
|
||||||
LDA InvertedMode : AND.w #$00FF : BEQ .unlock
|
LDA InvertedMode : AND.w #$00FF : BEQ .unlock
|
||||||
|
|
||||||
LDA OverworldEventData+$43 : AND.w #$0020 : BNE .unlock ; Check if GT overlay is already on or not
|
LDA OverworldEventDataWRAM+$43 : AND.w #$0020 : BNE .unlock ; Check if GT overlay is already on or not
|
||||||
LDA $0308 : AND.w #$0080 : BEQ ++ ;If we are holding an item
|
LDA $0308 : AND.w #$0080 : BEQ ++ ;If we are holding an item
|
||||||
|
|
||||||
.locked
|
.locked
|
||||||
@@ -44,7 +44,7 @@ RTL
|
|||||||
FlagAgahnimDoor:
|
FlagAgahnimDoor:
|
||||||
LDA.l InvertedMode : BEQ .vanilla
|
LDA.l InvertedMode : BEQ .vanilla
|
||||||
|
|
||||||
LDA OverworldEventData+$43 : ORA #$20 : STA OverworldEventData+$43 ; activate GT overlay
|
LDA OverworldEventDataWRAM+$43 : ORA #$20 : STA OverworldEventDataWRAM+$43 ; activate GT overlay
|
||||||
|
|
||||||
.vanilla
|
.vanilla
|
||||||
LDA.b #$28 : STA.b $72
|
LDA.b #$28 : STA.b $72
|
||||||
@@ -209,7 +209,7 @@ TurtleRockEntranceFix:
|
|||||||
LDA TurtleRockAutoOpenFix : BEQ .done
|
LDA TurtleRockAutoOpenFix : BEQ .done
|
||||||
LDA $8A : CMP.b #$47 : BNE .done
|
LDA $8A : CMP.b #$47 : BNE .done
|
||||||
;If exiting to turtle rock ensure the entrance is open
|
;If exiting to turtle rock ensure the entrance is open
|
||||||
LDA.l OverworldEventData+$47 : ORA.b #$20 : STA.l OverworldEventData+$47
|
LDA.l OverworldEventDataWRAM+$47 : ORA.b #$20 : STA.l OverworldEventDataWRAM+$47
|
||||||
.done
|
.done
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
|
|||||||
99
events.asm
99
events.asm
@@ -2,7 +2,7 @@
|
|||||||
; OnLoadOW
|
; OnLoadOW
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
;OnLoadMap:
|
;OnLoadMap:
|
||||||
; LDA OverworldEventData+$5B ; thing we wrote over
|
; LDA OverworldEventDataWRAM+$5B ; thing we wrote over
|
||||||
;RTL
|
;RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
OnPrepFileSelect:
|
OnPrepFileSelect:
|
||||||
@@ -64,31 +64,60 @@ OnUncleItemGet:
|
|||||||
BIT.b #$01 : BEQ + : STA !INFINITE_ARROWS : +
|
BIT.b #$01 : BEQ + : STA !INFINITE_ARROWS : +
|
||||||
|
|
||||||
PLA
|
PLA
|
||||||
JSL Link_ReceiveItem
|
JSL.l Link_ReceiveItem
|
||||||
|
|
||||||
LDA.l UncleRefill : BIT.b #$04 : BEQ + : LDA.b #$80 : STA MagicFiller : + ; refill magic
|
LDA.l UncleRefill : BIT.b #$04 : BEQ + : LDA.b #$80 : STA.l MagicFiller : + ; refill magic
|
||||||
LDA.l UncleRefill : BIT.b #$02 : BEQ + : LDA.b #50 : STA BombsFiller : + ; refill bombs
|
LDA.l UncleRefill : BIT.b #$02 : BEQ + : LDA.b #50 : STA.l BombsFiller : + ; refill bombs
|
||||||
LDA.l UncleRefill : BIT.b #$01 : BEQ + ; refill arrows
|
LDA.l UncleRefill : BIT.b #$01 : BEQ + ; refill arrows
|
||||||
LDA.b #70 : STA ArrowsFiller
|
LDA.b #70 : STA.l ArrowsFiller
|
||||||
|
|
||||||
LDA.l ArrowMode : BEQ +
|
LDA.l ArrowMode : BEQ +
|
||||||
LDA BowTracking : ORA #$80 : STA BowTracking ; enable bow toggle
|
LDA.l BowTracking : ORA.b #$80 : STA.l BowTracking ; enable bow toggle
|
||||||
REP #$20 ; set 16-bit accumulator
|
REP #$20 ; set 16-bit accumulator
|
||||||
LDA CurrentRupees : !ADD.l FreeUncleItemAmount : STA CurrentRupees ; rupee arrows, so also give the player some money to start
|
LDA.l CurrentRupees : !ADD.l FreeUncleItemAmount : STA.l CurrentRupees ; rupee arrows, so also give the player some money to start
|
||||||
SEP #$20 ; set 8-bit accumulator
|
SEP #$20 ; set 8-bit accumulator
|
||||||
+
|
+
|
||||||
|
LDA.l ProgressIndicator : BNE +
|
||||||
|
LDA.b #$01 : STA.l ProgressIndicator ; handle rain state
|
||||||
|
+
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
OnAga2Defeated:
|
OnAga2Defeated:
|
||||||
JSL.l Dungeon_SaveRoomData_justKeys ; thing we wrote over, make sure this is first
|
JSL.l Dungeon_SaveRoomDataWRAM_justKeys ; thing we wrote over, make sure this is first
|
||||||
LDA.b #$01 : STA Aga2Duck
|
LDA.b #$01 : STA.l Aga2Duck
|
||||||
JML.l IncrementAgahnim2Sword
|
JML.l IncrementAgahnim2Sword
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
OnFileCreation:
|
OnFileCreation:
|
||||||
TAX ; what we wrote over
|
; Copy initial SRAM state from ROM to cart SRAM
|
||||||
LDA StartingEquipment+$4C : STA EquipmentSRAM+$4C ; copy starting equipment swaps to file select screen
|
PHB
|
||||||
LDA StartingEquipment+$4E : STA EquipmentSRAM+$4E
|
LDA.w #$03D7 ; \
|
||||||
RTL
|
LDX.w #$B000 ; | Copies from beginning of inital sram table up to file name
|
||||||
|
LDY.w #$0000 ; | (exclusively)
|
||||||
|
MVN $70, $30 ; /
|
||||||
|
; Skip file name and validity value
|
||||||
|
LDA.w #$010C ; \
|
||||||
|
LDX.w #$B3E3 ; | Rando-Specific Assignments & Game Stats block
|
||||||
|
LDY.w #$03E3 ; |
|
||||||
|
MVN $70, $30 ; /
|
||||||
|
PLB
|
||||||
|
|
||||||
|
; resolve instant post-aga if standard
|
||||||
|
SEP #$20
|
||||||
|
LDA.l InitProgressIndicator : BIT #$80 : BEQ +
|
||||||
|
LDA.b #$00 : STA.l ProgressIndicatorSRAM ; set post-aga after zelda rescue
|
||||||
|
LDA.b #$00 : STA.l OverworldEventDataSRAM+$02 ; keep rain state vanilla
|
||||||
|
+
|
||||||
|
REP #$20
|
||||||
|
|
||||||
|
; Set validity value and do some cleanup. Jump to checksum.
|
||||||
|
LDA.w #$55AA : STA.l $7003E1
|
||||||
|
STZ $00
|
||||||
|
STZ $01
|
||||||
|
LDX.b $00
|
||||||
|
LDY.w #$0000
|
||||||
|
TYA
|
||||||
|
|
||||||
|
JML.l InitializeSaveFile_build_checksum
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
!RNG_ITEM_LOCK_IN = "$7F5090"
|
!RNG_ITEM_LOCK_IN = "$7F5090"
|
||||||
OnFileLoad:
|
OnFileLoad:
|
||||||
@@ -97,20 +126,19 @@ OnFileLoad:
|
|||||||
|
|
||||||
LDA.b #$07 : STA $210C ; Restore screen 3 to normal tile area
|
LDA.b #$07 : STA $210C ; Restore screen 3 to normal tile area
|
||||||
|
|
||||||
LDA FileMarker : BNE +
|
LDA.l FileMarker : BNE +
|
||||||
JSL.l OnNewFile
|
JSL.l OnNewFile
|
||||||
LDA.b #$FF : STA FileMarker
|
LDA.b #$FF : STA.l FileMarker
|
||||||
+
|
+
|
||||||
LDA.w $010A : BNE + ; don't adjust the worlds for "continue" or "save-continue"
|
LDA.w $010A : BNE + ; don't adjust the worlds for "continue" or "save-continue"
|
||||||
LDA.l $7EC011 : BNE + ; don't adjust worlds if mosiac is enabled (Read: mirroring in dungeon)
|
LDA.l $7EC011 : BNE + ; don't adjust worlds if mosiac is enabled (Read: mirroring in dungeon)
|
||||||
JSL.l DoWorldFix
|
JSL.l DoWorldFix
|
||||||
+
|
+
|
||||||
JSL.l MasterSwordFollowerClear
|
JSL.l MasterSwordFollowerClear
|
||||||
JSL.l InitOpenMode
|
LDA.b #$FF : STA !RNG_ITEM_LOCK_IN ; reset rng item lock-in
|
||||||
LDA #$FF : STA !RNG_ITEM_LOCK_IN ; reset rng item lock-in
|
LDA.b #$00 : STA $7F5001 ; mark fake flipper softlock as impossible
|
||||||
LDA #$00 : STA $7F5001 ; mark fake flipper softlock as impossible
|
|
||||||
LDA.l GenericKeys : BEQ +
|
LDA.l GenericKeys : BEQ +
|
||||||
LDA CurrentGenericKeys : STA CurrentSmallKeys ; copy generic keys to key counter
|
LDA.l CurrentGenericKeys : STA.l CurrentSmallKeys ; copy generic keys to key counter
|
||||||
+
|
+
|
||||||
|
|
||||||
JSL.l SetSilverBowMode
|
JSL.l SetSilverBowMode
|
||||||
@@ -126,39 +154,8 @@ RTL
|
|||||||
!RNG_ITEM_LOCK_IN = "$7F5090"
|
!RNG_ITEM_LOCK_IN = "$7F5090"
|
||||||
OnNewFile:
|
OnNewFile:
|
||||||
PHX : PHP
|
PHX : PHP
|
||||||
REP #$20 ; set 16-bit accumulator
|
|
||||||
LDA.l LinkStartingRupees : STA DisplayRupees : STA CurrentRupees
|
|
||||||
LDA.l StartingTime : STA ChallengeTimer
|
|
||||||
LDA.l StartingTime+2 : STA ChallengeTimer+2
|
|
||||||
|
|
||||||
LDX.w #$004E : - ; copy over starting equipment
|
|
||||||
LDA StartingEquipment, X : STA EquipmentWRAM, X
|
|
||||||
DEX : DEX
|
|
||||||
BPL -
|
|
||||||
|
|
||||||
LDX #$0008 : - ; copy starting keys to chest key counters in sram
|
|
||||||
LDA DungeonKeys, X : STA DungeonCollectedKeys, X
|
|
||||||
DEX : DEX
|
|
||||||
BPL -
|
|
||||||
|
|
||||||
SEP #$20 ; set 8-bit accumulator
|
|
||||||
;LDA #$FF : STA !RNG_ITEM_LOCK_IN ; reset rng item lock-in
|
|
||||||
LDA.l PreopenCurtains : BEQ +
|
|
||||||
LDA.b #$80 : STA RoomData[$30].high ; open aga tower curtain
|
|
||||||
LDA.b #$80 : STA RoomData[$49].high ; open skull woods curtain
|
|
||||||
+
|
|
||||||
|
|
||||||
LDA.l PreopenPyramid : BEQ +
|
|
||||||
LDA.b #$20 : STA OverworldEventData+$5B ; pyramid hole already open
|
|
||||||
+
|
|
||||||
|
|
||||||
LDA.l PreopenGanonsTower : BEQ +
|
|
||||||
LDA.b #$20 : STA OverworldEventData+$43 ; Ganons Tower already open
|
|
||||||
+
|
|
||||||
|
|
||||||
LDA StartingSword : STA SwordEquipment ; set starting sword type
|
|
||||||
|
|
||||||
; reset some values on new file that are otherwise only reset on hard reset
|
; reset some values on new file that are otherwise only reset on hard reset
|
||||||
|
SEP #$20 ; set 8-bit accumulator
|
||||||
STZ $03C4 ; ancilla slot index
|
STZ $03C4 ; ancilla slot index
|
||||||
STZ $047A ; EG
|
STZ $047A ; EG
|
||||||
STZ $0B08 : STZ $0B09 ; arc variable
|
STZ $0B08 : STZ $0B09 ; arc variable
|
||||||
|
|||||||
@@ -5,21 +5,21 @@ FloodGateAndMasterSwordFollowerReset:
|
|||||||
JSL.l MasterSwordFollowerClear
|
JSL.l MasterSwordFollowerClear
|
||||||
FloodGateReset:
|
FloodGateReset:
|
||||||
LDA.l PersistentFloodgate : BNE +
|
LDA.l PersistentFloodgate : BNE +
|
||||||
LDA OverworldEventData+$3B : AND.b #$DF : STA OverworldEventData+$3B ; reset water outside floodgate
|
LDA OverworldEventDataWRAM+$3B : AND.b #$DF : STA OverworldEventDataWRAM+$3B ; reset water outside floodgate
|
||||||
LDA OverworldEventData+$7B : AND.b #$DF : STA OverworldEventData+$7B ; reset water outside swamp palace
|
LDA OverworldEventDataWRAM+$7B : AND.b #$DF : STA OverworldEventDataWRAM+$7B ; reset water outside swamp palace
|
||||||
LDA RoomData[$010B].low : AND.b #$7F : STA RoomData[$010B].low ; clear water inside floodgate
|
LDA RoomDataWRAM[$010B].low : AND.b #$7F : STA RoomDataWRAM[$010B].low ; clear water inside floodgate
|
||||||
LDA RoomData[$28].high : AND.b #$FE : STA RoomData[$28].high ; clear water front room (room 40)
|
LDA RoomDataWRAM[$28].high : AND.b #$FE : STA RoomDataWRAM[$28].high ; clear water front room (room 40)
|
||||||
+
|
+
|
||||||
FloodGateResetInner:
|
FloodGateResetInner:
|
||||||
LDA.l Bugfix_SwampWaterLevel : BEQ +++
|
LDA.l Bugfix_SwampWaterLevel : BEQ +++
|
||||||
LDA RoomData[$37].low : AND.b #$04 : BEQ + ; Check if key in room 55 has been collected.
|
LDA RoomDataWRAM[$37].low : AND.b #$04 : BEQ + ; Check if key in room 55 has been collected.
|
||||||
LDA FlippersEquipment : AND.b #$01 : BNE ++ ; Check for flippers. This can otherwise softlock doors if flooded without flippers and no way to reset.
|
LDA FlippersEquipment : AND.b #$01 : BNE ++ ; Check for flippers. This can otherwise softlock doors if flooded without flippers and no way to reset.
|
||||||
+
|
+
|
||||||
LDA RoomData[$37].low : AND.b #$7F : STA RoomData[$37].low ; clear water room 55 - outer room you shouldn't be able to softlock except in major glitches
|
LDA RoomDataWRAM[$37].low : AND.b #$7F : STA RoomDataWRAM[$37].low ; clear water room 55 - outer room you shouldn't be able to softlock except in major glitches
|
||||||
++
|
++
|
||||||
LDA RoomData[$35].high : AND.b #$04 : BNE +++ ; Check if key in room 53 has been collected.
|
LDA RoomDataWRAM[$35].high : AND.b #$04 : BNE +++ ; Check if key in room 53 has been collected.
|
||||||
; no need to check for flippers on the inner room, as you can't get to the west door no matter what, without flippers.
|
; no need to check for flippers on the inner room, as you can't get to the west door no matter what, without flippers.
|
||||||
LDA RoomData[$35].low : AND.b #$7F : STA RoomData[$35].low ; clear water room 53 - inner room with the easy key flood softlock
|
LDA RoomDataWRAM[$35].low : AND.b #$7F : STA RoomDataWRAM[$35].low ; clear water room 53 - inner room with the easy key flood softlock
|
||||||
+++
|
+++
|
||||||
RTL
|
RTL
|
||||||
;================================================================================
|
;================================================================================
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ SpawnHauntedGroveItem:
|
|||||||
TYX
|
TYX
|
||||||
|
|
||||||
LDX $8A ; haunted grove (208D0A)
|
LDX $8A ; haunted grove (208D0A)
|
||||||
LDA OverworldEventData, X : AND.b #$40 : BNE +
|
LDA OverworldEventDataWRAM, X : AND.b #$40 : BNE +
|
||||||
LDA.b #$1B : JSL Sound_SetSfx3PanLong
|
LDA.b #$1B : JSL Sound_SetSfx3PanLong
|
||||||
+
|
+
|
||||||
RTL
|
RTL
|
||||||
|
|||||||
12
goalitem.asm
12
goalitem.asm
@@ -67,12 +67,12 @@ CheckGanonVulnerability:
|
|||||||
.all_dungeons_no_agahnim
|
.all_dungeons_no_agahnim
|
||||||
LDA.l PendantsField : AND.b #$07 : CMP.b #$07 : BNE .fail ; require all pendants
|
LDA.l PendantsField : AND.b #$07 : CMP.b #$07 : BNE .fail ; require all pendants
|
||||||
LDA.l CrystalsField : AND.b #$7F : CMP.b #$7F : BNE .fail ; require all crystals
|
LDA.l CrystalsField : AND.b #$7F : CMP.b #$7F : BNE .fail ; require all crystals
|
||||||
LDA.l OverworldEventData+$5B : AND.b #$20 : BEQ .fail ; require aga2 defeated (pyramid hole open)
|
LDA.l OverworldEventDataWRAM+$5B : AND.b #$20 : BEQ .fail ; require aga2 defeated (pyramid hole open)
|
||||||
BRA .success
|
BRA .success
|
||||||
|
|
||||||
; 03 = crystals and aga 2
|
; 03 = crystals and aga 2
|
||||||
.crystals_and_aga
|
.crystals_and_aga
|
||||||
LDA.l OverworldEventData+$5B : AND.b #$20 : BEQ .fail ; check aga2 first then bleed in
|
LDA.l OverworldEventDataWRAM+$5B : AND.b #$20 : BEQ .fail ; check aga2 first then bleed in
|
||||||
|
|
||||||
; 04 = crystals only
|
; 04 = crystals only
|
||||||
.crystals
|
.crystals
|
||||||
@@ -138,7 +138,7 @@ CheckAgaForPed:
|
|||||||
CMP.b #$06 : BNE .vanilla
|
CMP.b #$06 : BNE .vanilla
|
||||||
|
|
||||||
.light_speed
|
.light_speed
|
||||||
LDA.l OverworldEventData+$80 ; check ped flag
|
LDA.l OverworldEventDataWRAM+$80 ; check ped flag
|
||||||
AND.b #$40
|
AND.b #$40
|
||||||
BEQ .force_blue_ball
|
BEQ .force_blue_ball
|
||||||
|
|
||||||
@@ -162,8 +162,8 @@ KillGanon:
|
|||||||
CMP.b #$06 : BNE .exit
|
CMP.b #$06 : BNE .exit
|
||||||
|
|
||||||
.light_speed
|
.light_speed
|
||||||
LDA.l OverworldEventData+$5B : ORA.b #$20 : STA.l OverworldEventData+$5B ; pyramid hole
|
LDA.l OverworldEventDataWRAM+$5B : ORA.b #$20 : STA.l OverworldEventDataWRAM+$5B ; pyramid hole
|
||||||
LDA.b #$08 : STA.l RoomData[$00].high ; kill ganon
|
LDA.b #$08 : STA.l RoomDataWRAM[$00].high ; kill ganon
|
||||||
LDA.b #$02 : STA.l MoonPearlEquipment ; pearl but invisible in menu
|
LDA.b #$02 : STA.l MoonPearlEquipment ; pearl but invisible in menu
|
||||||
|
|
||||||
.exit
|
.exit
|
||||||
@@ -195,7 +195,7 @@ CheckForCrystalBossesDefeated:
|
|||||||
|
|
||||||
LDA.l DrawHUDDungeonItems_boss_room_ids-4,X
|
LDA.l DrawHUDDungeonItems_boss_room_ids-4,X
|
||||||
TAX
|
TAX
|
||||||
LDA.l RoomData.l,X
|
LDA.l RoomDataWRAM.l,X
|
||||||
|
|
||||||
AND.w #$0800
|
AND.w #$0800
|
||||||
BEQ ++
|
BEQ ++
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ HeartUpgradeSpawnDecision: ; this should return #$00 to make the hp spawn
|
|||||||
RTL
|
RTL
|
||||||
|
|
||||||
.normal_behavior
|
.normal_behavior
|
||||||
LDA OverworldEventData, X
|
LDA OverworldEventDataWRAM, X
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
SaveHeartCollectedStatus:
|
SaveHeartCollectedStatus:
|
||||||
@@ -140,7 +140,7 @@ SaveHeartCollectedStatus:
|
|||||||
RTL
|
RTL
|
||||||
|
|
||||||
.normal_behavior
|
.normal_behavior
|
||||||
LDA OverworldEventData, X : ORA.b #$40 : STA OverworldEventData, X
|
LDA OverworldEventDataWRAM, X : ORA.b #$40 : STA OverworldEventDataWRAM, X
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
!REDRAW = "$7F5000"
|
!REDRAW = "$7F5000"
|
||||||
|
|||||||
@@ -310,9 +310,8 @@ org $0CCE85 ; <- Bank0C.asm : 1953 (LDA $C8 : ASL A : INC #2 : STA $701FFE)
|
|||||||
NOP #4
|
NOP #4
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $0CDB4C ; <- Bank0C.asm : 3655 (LDA $C8 : ASL A : INC #2 : STA $701FFE : TAX)
|
org $0CDB4C ; <- Bank0C.asm : 3655 (LDA $C8 : ASL A : INC #2 : STA $701FFE : TAX)
|
||||||
JSL OnFileCreation
|
JML OnFileCreation
|
||||||
NOP
|
NOP
|
||||||
;Additionally, display inventory swap starting equipment on file select
|
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $09F5EA ; <- module_death.asm : 510 (LDA $701FFE : TAX : DEX #2)
|
org $09F5EA ; <- module_death.asm : 510 (LDA $701FFE : TAX : DEX #2)
|
||||||
LDA.w #$0002 : NOP
|
LDA.w #$0002 : NOP
|
||||||
@@ -536,7 +535,7 @@ JSL.l CheckGanonHammerDamage : NOP
|
|||||||
org $02B797 ; <- 13797 - Bank02.asm : 8712 (LDA.b #$19 : STA $10)
|
org $02B797 ; <- 13797 - Bank02.asm : 8712 (LDA.b #$19 : STA $10)
|
||||||
JSL.l StatsFinalPrep
|
JSL.l StatsFinalPrep
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $07A95B ; <- 3A95B - Bank07.asm : 6565 (JSL Dungeon_SaveRoomData)
|
org $07A95B ; <- 3A95B - Bank07.asm : 6565 (JSL Dungeon_SaveRoomDataWRAM)
|
||||||
JSL.l IncrementUWMirror
|
JSL.l IncrementUWMirror
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $0288D1 ; <- 108D1 - Bank02.asm : 1690 (STZ $0646)
|
org $0288D1 ; <- 108D1 - Bank02.asm : 1690 (STZ $0646)
|
||||||
@@ -710,7 +709,7 @@ JSL.l GetItemDamageValue
|
|||||||
;================================================================================
|
;================================================================================
|
||||||
; Misc Stats
|
; Misc Stats
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $029E2E ; <- 11E2E - module_ganon_emerges.asm : 59 (JSL Dungeon_SaveRoomData.justKeys)
|
org $029E2E ; <- 11E2E - module_ganon_emerges.asm : 59 (JSL Dungeon_SaveRoomDataWRAM.justKeys)
|
||||||
JSL.l OnAga2Defeated
|
JSL.l OnAga2Defeated
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $0DDBDE ; <- 6DBDE - headsup_display.asm : 105 (DEC A : BPL .subtractRupees)
|
org $0DDBDE ; <- 6DBDE - headsup_display.asm : 105 (DEC A : BPL .subtractRupees)
|
||||||
@@ -1676,7 +1675,7 @@ JSL.l FixAga2Bunny : NOP
|
|||||||
; Open Mode Fixes
|
; Open Mode Fixes
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $05DF65 ; <- 2DF65 - sprite_uncle_and_priest.asm:994 - (LDA.b #$01 : STA $7EF3C5)
|
org $05DF65 ; <- 2DF65 - sprite_uncle_and_priest.asm:994 - (LDA.b #$01 : STA $7EF3C5)
|
||||||
JSL.l SetUncleRainState : RTS
|
NOP #6
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
;org $0280DD ; <- 100DD - Bank02.asm:298 - (LDA $7EF3C5 : CMP.b #$02 : BCC .indoors)
|
;org $0280DD ; <- 100DD - Bank02.asm:298 - (LDA $7EF3C5 : CMP.b #$02 : BCC .indoors)
|
||||||
;JSL.l ForceLinksHouse
|
;JSL.l ForceLinksHouse
|
||||||
|
|||||||
174
initsramtable.asm
Normal file
174
initsramtable.asm
Normal file
@@ -0,0 +1,174 @@
|
|||||||
|
;================================================================================
|
||||||
|
; Initial SRAM table.
|
||||||
|
;--------------------------------------------------------------------------------
|
||||||
|
; The ROM copies blocks of bytes from here on save file init. This table has an
|
||||||
|
; identical layout to the first $500 bytes of SRAM, although some values such as
|
||||||
|
; the file validity value, file name, and inverse checksum are skipped.
|
||||||
|
;
|
||||||
|
; NOTE: Set InitProgressIndicator to $80 for standard mode with instant post-aga
|
||||||
|
; world state
|
||||||
|
;
|
||||||
|
; See sram.asm for further documentation on how to write to this table.
|
||||||
|
;--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
fillword $0000 ; Zero out the table
|
||||||
|
fill $500 ;
|
||||||
|
|
||||||
|
org $30B000 ; PC 0x183000
|
||||||
|
InitRoomDataWRAM:
|
||||||
|
org $30B060
|
||||||
|
InitATAltarRoom: dw $0000 ; aga curtains
|
||||||
|
org $30B092
|
||||||
|
InitSWBackEntryRoom: dw $0000 ; skull woods curtains (?)
|
||||||
|
|
||||||
|
org $30B20C
|
||||||
|
dw $F000, $F000 ; Pre-open kak bomb hut & brewery
|
||||||
|
|
||||||
|
org $30B280 ; PC 0x183280 - 0x1832FF
|
||||||
|
InitOverworldEvents:
|
||||||
|
org $30B282 ; PC 0x183282 - Lumberjacks
|
||||||
|
InitLumberjackOW: db $00
|
||||||
|
org $30B29B ; PC 0x18329B - Open castle gate
|
||||||
|
InitHyruleCastleOW: db $20
|
||||||
|
org $30B2DB ; PC 0x18329B - Pyramid hole
|
||||||
|
InitPyramidOW: db $00
|
||||||
|
org $30B2C3 ; PC 0x18329B - GT
|
||||||
|
InitDDMWestOW: db $00
|
||||||
|
|
||||||
|
|
||||||
|
org $30B340 ; PC 0x183340
|
||||||
|
StartingEquipment:
|
||||||
|
StartingBow: skip 1 ; PC 0x183340
|
||||||
|
StartingBoomerang: skip 1 ; PC 0x183341
|
||||||
|
StartingHookshot: skip 1 ; PC 0x183342
|
||||||
|
StartingBombs: skip 1 ; PC 0x183343
|
||||||
|
StartingPowder: skip 1 ; PC 0x183344
|
||||||
|
StartingFireRod: skip 1 ; PC 0x183345
|
||||||
|
StartingIceRod: skip 1 ; PC 0x183346
|
||||||
|
StartingBombos: skip 1 ; PC 0x183347
|
||||||
|
StartingEther: skip 1 ; PC 0x183348
|
||||||
|
StartingQuake: skip 1 ; PC 0x183349
|
||||||
|
StartingLamp: skip 1 ; PC 0x18334A
|
||||||
|
StartingHammer: skip 1 ; PC 0x18334B
|
||||||
|
StartingFlute: skip 1 ; PC 0x18334C
|
||||||
|
StartingBugNet: skip 1 ; PC 0x18334D
|
||||||
|
StartingBookOfMudora: skip 1 ; PC 0x18334E
|
||||||
|
StartingBottleIndex: skip 1 ; PC 0x18334F
|
||||||
|
StartingSomaria: skip 1 ; PC 0x183350
|
||||||
|
StartingByrna: skip 1 ; PC 0x183351
|
||||||
|
StartingCape: skip 1 ; PC 0x183352
|
||||||
|
StartingMirror: skip 1 ; PC 0x183353
|
||||||
|
StartingGlove: skip 1 ; PC 0x183354
|
||||||
|
StartingBoots: skip 1 ; PC 0x183355
|
||||||
|
StartingFlippers: skip 1 ; PC 0x183356
|
||||||
|
StartingMoonPearl: skip 1 ; PC 0x183357
|
||||||
|
skip 1 ; PC 0x183358
|
||||||
|
StartingSword: skip 1 ; PC 0x183359
|
||||||
|
StartingShield: skip 1 ; PC 0x18335A
|
||||||
|
StartingArmor: skip 1 ; PC 0x18335B
|
||||||
|
StartingBottleContentsOne: skip 1 ; PC 0x18335C
|
||||||
|
StartingBottleContentsTwo: skip 1 ; PC 0x18335D
|
||||||
|
StartingBottleContentsThree: skip 1 ; PC 0x18335E
|
||||||
|
StartingBottleContentsFour: skip 1 ; PC 0x18335F
|
||||||
|
StartingCurrentRupees: skip 2 ; PC 0x183360 \ Write same value to both
|
||||||
|
StartingDisplayRupees: skip 2 ; PC 0x183362 / of these
|
||||||
|
StartingCompasses: skip 2 ; PC 0x183364
|
||||||
|
StartingBigKeys: skip 2 ; PC 0x183366
|
||||||
|
StartingMaps: skip 2 ; PC 0x183368
|
||||||
|
skip 1 ; PC 0x18336A
|
||||||
|
StartingQuarterHearts: skip 1 ; PC 0x18336B
|
||||||
|
StartingHealth: db $18 ; PC 0x18336C
|
||||||
|
StartingMaximumHealth: db $18 ; PC 0x18336D
|
||||||
|
StartingMagic: skip 1 ; PC 0x18336E
|
||||||
|
StartingSmallKeys: db $FF ; PC 0x18336F
|
||||||
|
StartingBombCapacityUpgrade: skip 1 ; PC 0x183370
|
||||||
|
StartingArrowCapacityUpgrade: skip 1 ; PC 0x183371
|
||||||
|
InitHeartsFiller: skip 1 ; PC 0x183372
|
||||||
|
InitMagicFiller: skip 1 ; PC 0x183373
|
||||||
|
StartingPendants: skip 1 ; PC 0x183374
|
||||||
|
InitBombsFiller: skip 1 ; PC 0x183375
|
||||||
|
InitArrowsFiller: skip 1 ; PC 0x183376
|
||||||
|
StartingArrows: skip 1 ; PC 0x183377
|
||||||
|
skip 1 ; PC 0x183378
|
||||||
|
InitAbilityFlags: db $68 ; PC 0x183379
|
||||||
|
StartingCrystals: skip 1 ; PC 0x18337A
|
||||||
|
StartingMagicConsumption: skip 1 ; PC 0x18337B
|
||||||
|
StartingDungeonKeys: ;
|
||||||
|
StartingSewerKeys: skip 1 ; PC 0x18337C
|
||||||
|
StartingHyruleCastleKeys: skip 1 ; PC 0x18337D
|
||||||
|
StartingEasternKeys: skip 1 ; PC 0x18337E
|
||||||
|
StartingDesertKeys: skip 1 ; PC 0x18337F
|
||||||
|
StartingCastleTowerKeys: skip 1 ; PC 0x183380
|
||||||
|
StartingSwampKeys: skip 1 ; PC 0x183381
|
||||||
|
StartingPalaceOfDarknessKeys: skip 1 ; PC 0x183382
|
||||||
|
StartingMireKeys: skip 1 ; PC 0x183383
|
||||||
|
StartingSkullWoodsKeys: skip 1 ; PC 0x183384
|
||||||
|
StartingIcePalaceKeys: skip 1 ; PC 0x183385
|
||||||
|
StartingHeraKeys: skip 1 ; PC 0x183386
|
||||||
|
StartingThievesTownKeys: skip 1 ; PC 0x183387
|
||||||
|
StartingTurtleRockKeys: skip 1 ; PC 0x183388
|
||||||
|
StartingGanonsTowerKeys: skip 1 ; PC 0x183389
|
||||||
|
skip 1 ; PC 0x18338A
|
||||||
|
StartingGenericKeys: skip 1 ; PC 0x18338B
|
||||||
|
InitInventoryTracking: skip 2 ; PC 0x18338C \ Need to set bits here for silver arrows,
|
||||||
|
InitBowTracking: skip 2 ; PC 0x18338E / boomerangs, powder/mushroom, etc
|
||||||
|
InitItemLimitCounts: skip 16 ; PC 0x183390
|
||||||
|
skip 37 ;
|
||||||
|
InitProgressIndicator: db $02 ; PC 0x1833C5 - Set to $80 for instant post-aga with standard
|
||||||
|
InitProgressFlags: db $14 ; PC 0x1833C6
|
||||||
|
InitMapIcons: skip 1 ; PC 0x1833C7
|
||||||
|
InitStartingEntrance: db $01 ; PC 0x1833C8
|
||||||
|
InitNpcFlagsVanilla: skip 1 ; PC 0x1833C9
|
||||||
|
InitCurrentWorld: skip 1 ; PC 0x1833CA
|
||||||
|
skip 1 ; PC 0x1833CB
|
||||||
|
InitFollowerIndicator: skip 1 ; PC 0x1833CC
|
||||||
|
InitFollowerXCoord: skip 2 ; PC 0x1833CD
|
||||||
|
InitFollowerYCoord: skip 2 ; PC 0x1833CF
|
||||||
|
InitDroppedFollowerIndoors: skip 1 ; PC 0x1833D1
|
||||||
|
InitDroppedFollowerLayer: skip 1 ; PC 0x1833D2
|
||||||
|
InitFollowerDropped: skip 1 ; PC 0x1833D3
|
||||||
|
|
||||||
|
org $30B3D9 ; PC 0x1833D9 - 0x1833F0
|
||||||
|
StaticFileName: ; The validity value ($55AA) must be written manually on SRAM init at $7003E1
|
||||||
|
dw $0181, $0162, $0168, $018C
|
||||||
|
dw $0166, $014E, $0162, $018C
|
||||||
|
dw $0165, $0162, $0167, $018C
|
||||||
|
|
||||||
|
org $30B401 ; PC 0x183401
|
||||||
|
InitDeathCounter:
|
||||||
|
dw $FFFF
|
||||||
|
|
||||||
|
;--------------------------------------------------------------------------------
|
||||||
|
; The following labels and their addresses are provided for convenience. You
|
||||||
|
; may want to write, for example, to InitHighestSword in addition to setting
|
||||||
|
; StartingSword. But any value can be written to the whole block from
|
||||||
|
; $30B000-$30B4FF (PC 0x183000-0x18034FF) and it will be initialized
|
||||||
|
; excluding ~28 bytes (File name, validity value, and checksum.)
|
||||||
|
;--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
org $30B414 ; PC 0x183414-0x183416
|
||||||
|
InitMapOverlay: dw $0000
|
||||||
|
|
||||||
|
org $30B417 ; PC 0x183417
|
||||||
|
InitHighestSword: db $00
|
||||||
|
|
||||||
|
org $30B414 ; PC 0x183418-0x183419
|
||||||
|
InitGoalCounter: dw $0000
|
||||||
|
|
||||||
|
org $30B422 ; PC 0x183422
|
||||||
|
InitHighestShield: db $00
|
||||||
|
|
||||||
|
org $30B428 ; PC 0x183428
|
||||||
|
InitMapsCompasses: db $00
|
||||||
|
|
||||||
|
org $30B429 ; PC 0x183429
|
||||||
|
InitPendantCounter: db $00
|
||||||
|
|
||||||
|
org $30B454 ; PC 0x183454-0x183457
|
||||||
|
InitChallengeTimer: dw $0000, $0000
|
||||||
|
|
||||||
|
org $30B46E ; PC 0x18346E
|
||||||
|
InitHighestMail: db $00
|
||||||
|
|
||||||
|
org $30B471 ; PC 0x183471
|
||||||
|
InitCrystalCounter: db $00
|
||||||
@@ -71,7 +71,7 @@ Overworld_CreatePyramidHoleModified:
|
|||||||
|
|
||||||
SEP #$30
|
SEP #$30
|
||||||
|
|
||||||
LDA OverworldEventData+$5B : ORA.b #$20 : STA OverworldEventData+$5B
|
LDA OverworldEventDataWRAM+$5B : ORA.b #$20 : STA OverworldEventDataWRAM+$5B
|
||||||
|
|
||||||
LDA.b #$03 : STA $012F
|
LDA.b #$03 : STA $012F
|
||||||
|
|
||||||
@@ -131,9 +131,9 @@ db $02, $02, $02, $02, $02, $02, $02, $00, $00, $01, $01, $01, $02, $00, $08, $0
|
|||||||
|
|
||||||
Electric_Barrier:
|
Electric_Barrier:
|
||||||
LDA InvertedMode : BEQ .done
|
LDA InvertedMode : BEQ .done
|
||||||
LDA OverworldEventData, X : ORA #$40 : STA OverworldEventData, X ;set barrier dead
|
LDA OverworldEventDataWRAM, X : ORA #$40 : STA OverworldEventDataWRAM, X ;set barrier dead
|
||||||
.done
|
.done
|
||||||
LDA OverworldEventData, X ; what we wrote over
|
LDA OverworldEventDataWRAM, X ; what we wrote over
|
||||||
RTL
|
RTL
|
||||||
|
|
||||||
|
|
||||||
@@ -187,7 +187,7 @@ RTL
|
|||||||
|
|
||||||
TurtleRockPegSolved:
|
TurtleRockPegSolved:
|
||||||
LDA.l InvertedMode : AND.w #$00FF : BNE +
|
LDA.l InvertedMode : AND.w #$00FF : BNE +
|
||||||
LDA.l OverworldEventData+07 ; What we wrote over (reading flags for this screen)
|
LDA.l OverworldEventDataWRAM+07 ; What we wrote over (reading flags for this screen)
|
||||||
RTL
|
RTL
|
||||||
+
|
+
|
||||||
LDA.w #$0020 ; We always treat puzzle as pre solved (overlay flag set) for inverted mode.
|
LDA.w #$0020 ; We always treat puzzle as pre solved (overlay flag set) for inverted mode.
|
||||||
|
|||||||
@@ -26,8 +26,6 @@ RTL
|
|||||||
; Output: 0 locked, 1 open
|
; Output: 0 locked, 1 open
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
CheckForZelda:
|
CheckForZelda:
|
||||||
;LDA.l OpenMode : BEQ + ; Skip if not open mode
|
|
||||||
;LDA $FFFFFF
|
|
||||||
LDA.l ProgressIndicator : CMP.b #$02 : !BLT + ; Skip if rain is falling
|
LDA.l ProgressIndicator : CMP.b #$02 : !BLT + ; Skip if rain is falling
|
||||||
LDA.b #$01 ; pretend we have zelda anyway
|
LDA.b #$01 ; pretend we have zelda anyway
|
||||||
RTL
|
RTL
|
||||||
@@ -37,7 +35,6 @@ RTL
|
|||||||
;================================================================================
|
;================================================================================
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
SetOverlayIfLamp:
|
SetOverlayIfLamp:
|
||||||
;LDA LampEquipment ; check if lamp
|
|
||||||
JSL.l LampCheck
|
JSL.l LampCheck
|
||||||
STA $1D ; write it directly to the overlay, this isn't a terrible idea at all
|
STA $1D ; write it directly to the overlay, this isn't a terrible idea at all
|
||||||
RTL
|
RTL
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ TryOpenMire:
|
|||||||
LDA $8A : CMP.b #$70 : BNE .untriggered
|
LDA $8A : CMP.b #$70 : BNE .untriggered
|
||||||
|
|
||||||
; Checks whether the Misery Mire dungeon is already revealed.
|
; Checks whether the Misery Mire dungeon is already revealed.
|
||||||
LDA OverworldEventData+$70 : AND.b #$20 : BNE .untriggered
|
LDA OverworldEventDataWRAM+$70 : AND.b #$20 : BNE .untriggered
|
||||||
|
|
||||||
; You have to be in the trigger window.
|
; You have to be in the trigger window.
|
||||||
LDY.b #$02 : JSL.l Ancilla_CheckIfEntranceTriggered : BCC .untriggered
|
LDY.b #$02 : JSL.l Ancilla_CheckIfEntranceTriggered : BCC .untriggered
|
||||||
@@ -25,7 +25,7 @@ TryOpenTRock:
|
|||||||
LDA $8A : CMP.b #$47 : BNE .untriggered
|
LDA $8A : CMP.b #$47 : BNE .untriggered
|
||||||
|
|
||||||
; Checks whether the Turtle Rock dungeon is already revealed.
|
; Checks whether the Turtle Rock dungeon is already revealed.
|
||||||
LDA OverworldEventData+$47 : AND.b #$20 : BNE .untriggered
|
LDA OverworldEventDataWRAM+$47 : AND.b #$20 : BNE .untriggered
|
||||||
|
|
||||||
; You have to be in the trigger window.
|
; You have to be in the trigger window.
|
||||||
LDY.b #$03 : JSL.l Ancilla_CheckIfEntranceTriggered : BCC .untriggered
|
LDY.b #$03 : JSL.l Ancilla_CheckIfEntranceTriggered : BCC .untriggered
|
||||||
|
|||||||
4
msu.asm
4
msu.asm
@@ -250,7 +250,7 @@ CheckMusicLoadRequest:
|
|||||||
BRA .check_fallback-3
|
BRA .check_fallback-3
|
||||||
.lightworld
|
.lightworld
|
||||||
PHA
|
PHA
|
||||||
LDA OverworldEventData+$80 : AND.b #$40 : BEQ +
|
LDA OverworldEventDataWRAM+$80 : AND.b #$40 : BEQ +
|
||||||
PLA
|
PLA
|
||||||
LDA.b #60 : BRA .check_fallback-3
|
LDA.b #60 : BRA .check_fallback-3
|
||||||
+
|
+
|
||||||
@@ -344,7 +344,7 @@ CheckMusicLoadRequest:
|
|||||||
+
|
+
|
||||||
|
|
||||||
CMP.b #$70 : BNE + ; Misery Mire
|
CMP.b #$70 : BNE + ; Misery Mire
|
||||||
LDA OverworldEventData+$70 : AND.b #$20 : BEQ .rain
|
LDA OverworldEventDataWRAM+$70 : AND.b #$20 : BEQ .rain
|
||||||
+
|
+
|
||||||
|
|
||||||
LDA ProgressIndicator : CMP.b #$02 : BCS +
|
LDA ProgressIndicator : CMP.b #$02 : BCS +
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ PreOverworld_LoadProperties_ChooseMusic:
|
|||||||
LDX.b #$05 ; Lost woods theme
|
LDX.b #$05 ; Lost woods theme
|
||||||
|
|
||||||
; check if we've pulled from the master sword pedestal
|
; check if we've pulled from the master sword pedestal
|
||||||
LDA OverworldEventData+$80 : AND.b #$40 : BEQ +
|
LDA OverworldEventDataWRAM+$80 : AND.b #$40 : BEQ +
|
||||||
LDX.b #$02 ; Default light world theme
|
LDX.b #$02 ; Default light world theme
|
||||||
+
|
+
|
||||||
|
|
||||||
@@ -129,7 +129,7 @@ Overworld_FinishMirrorWarp:
|
|||||||
|
|
||||||
; Check if we're entering the lost woods
|
; Check if we're entering the lost woods
|
||||||
CMP.b #$00 : BNE +
|
CMP.b #$00 : BNE +
|
||||||
LDA OverworldEventData+$80 : AND.b #$40 : BNE .endOfLightWorldChecks
|
LDA OverworldEventDataWRAM+$80 : AND.b #$40 : BNE .endOfLightWorldChecks
|
||||||
LDX.b #$05 ; lost woods theme
|
LDX.b #$05 ; lost woods theme
|
||||||
BRA .endOfLightWorldChecks
|
BRA .endOfLightWorldChecks
|
||||||
+
|
+
|
||||||
@@ -196,7 +196,7 @@ BirdTravel_LoadTargetAreaMusic:
|
|||||||
;LDX.b #$05 ; Lost woods theme
|
;LDX.b #$05 ; Lost woods theme
|
||||||
|
|
||||||
; check if we've pulled from the master sword pedestal
|
; check if we've pulled from the master sword pedestal
|
||||||
;LDA OverworldEventData+$80 : AND.b #$40 : BEQ +
|
;LDA OverworldEventDataWRAM+$80 : AND.b #$40 : BEQ +
|
||||||
; LDX.b #$02 ; Default light world theme
|
; LDX.b #$02 ; Default light world theme
|
||||||
;+
|
;+
|
||||||
|
|
||||||
@@ -222,7 +222,7 @@ BirdTravel_LoadTargetAreaMusic:
|
|||||||
LDA $8A
|
LDA $8A
|
||||||
; Misery Mire rain SFX
|
; Misery Mire rain SFX
|
||||||
CMP.b #$70 : BNE ++
|
CMP.b #$70 : BNE ++
|
||||||
LDA OverworldEventData+$70 : AND.b #$20 : BNE ++
|
LDA OverworldEventDataWRAM+$70 : AND.b #$20 : BNE ++
|
||||||
LDA.b #$01 : CMP $0131 : BEQ +
|
LDA.b #$01 : CMP $0131 : BEQ +
|
||||||
STA $012D
|
STA $012D
|
||||||
+ : BRA .checkInverted
|
+ : BRA .checkInverted
|
||||||
|
|||||||
29
openmode.asm
29
openmode.asm
@@ -1,29 +0,0 @@
|
|||||||
;================================================================================
|
|
||||||
; Open Mode Uncle Rain State Check
|
|
||||||
;================================================================================
|
|
||||||
!INFINITE_ARROWS = "$7F50C8"
|
|
||||||
!INFINITE_BOMBS = "$7F50C9"
|
|
||||||
!INFINITE_MAGIC = "$7F50CA"
|
|
||||||
SetUncleRainState:
|
|
||||||
LDA.l OpenMode : BEQ + : RTL : + ; we're done if open mode is on
|
|
||||||
LDA.b #$01 : STA ProgressIndicator
|
|
||||||
RTL
|
|
||||||
;--------------------------------------------------------------------------------
|
|
||||||
InitOpenMode:
|
|
||||||
LDA.l OpenMode : BEQ + ; Skip if not open mode
|
|
||||||
LDA ProgressIndicator : CMP #$02 : !BGE + ; Skip if already past escape
|
|
||||||
LDA.b #$02 : STA ProgressIndicator ; Go to post-escape phase (pre aga1)
|
|
||||||
LDA ProgressFlags : ORA #$14 : STA ProgressFlags ; remove uncle
|
|
||||||
LDA StartingEntrance : CMP #$05 : BEQ ++ : LDA.b #$01 : ++ : STA StartingEntrance ; set spawn points to house+sanc unless already house+sanc+mountain
|
|
||||||
LDA OverworldEventData+$1B : ORA.b #$20 : STA OverworldEventData+$1B ; open castle gate
|
|
||||||
JSL MaybeSetPostAgaWorldState
|
|
||||||
+
|
|
||||||
RTL
|
|
||||||
;--------------------------------------------------------------------------------
|
|
||||||
MaybeSetPostAgaWorldState:
|
|
||||||
LDA.l InstantPostAgaWorldState : BEQ + ; Skip if not enabled
|
|
||||||
LDA.b #$03 : STA ProgressIndicator ; Go to post-aga phase
|
|
||||||
LDA OverworldEventData+$02 : ORA.b #$20 : STA OverworldEventData+$02 ; make lumberjack tree accessible
|
|
||||||
+
|
|
||||||
RTL
|
|
||||||
;--------------------------------------------------------------------------------
|
|
||||||
@@ -437,7 +437,7 @@ DrawHUDDungeonItems:
|
|||||||
|
|
||||||
.next_boss_kill
|
.next_boss_kill
|
||||||
LDX.w .boss_room_ids,Y
|
LDX.w .boss_room_ids,Y
|
||||||
LDA.l RoomData.l,X
|
LDA.l RoomDataWRAM.l,X
|
||||||
AND.w #$0800
|
AND.w #$0800
|
||||||
BEQ ..skip_boss_kill
|
BEQ ..skip_boss_kill
|
||||||
|
|
||||||
|
|||||||
26
sram.asm
26
sram.asm
@@ -21,7 +21,7 @@ org 0 ; This module writes no bytes. Asar gives bank cross errors without this.
|
|||||||
; 2 (southwest), and 1 (southeast), which is the same as they are laid out on the screen from
|
; 2 (southwest), and 1 (southeast), which is the same as they are laid out on the screen from
|
||||||
; left to right, top to bottom.
|
; left to right, top to bottom.
|
||||||
;
|
;
|
||||||
; Example: We can use RoomData[$37].high to read or write the pot key in the first
|
; Example: We can use RoomDataWRAM[$37].high to read or write the pot key in the first
|
||||||
; floodable room in Swamp Palace ($04)
|
; floodable room in Swamp Palace ($04)
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
; .high Byte: d d d d b k u r
|
; .high Byte: d d d d b k u r
|
||||||
@@ -38,7 +38,7 @@ org 0 ; This module writes no bytes. Asar gives bank cross errors without this.
|
|||||||
; c = Chest 0
|
; c = Chest 0
|
||||||
; q = Quadrant visits
|
; q = Quadrant visits
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
struct RoomData $7EF000
|
struct RoomDataWRAM $7EF000
|
||||||
.l
|
.l
|
||||||
.low: skip 1
|
.low: skip 1
|
||||||
.high: skip 1
|
.high: skip 1
|
||||||
@@ -51,7 +51,7 @@ endstruct align 2
|
|||||||
; in WRAM (16-bits.)
|
; in WRAM (16-bits.)
|
||||||
;
|
;
|
||||||
; This label can be indexed with a plus symbol (e.g. The Hyrule Castle screen would
|
; This label can be indexed with a plus symbol (e.g. The Hyrule Castle screen would
|
||||||
; be OverworldEventData+$1B or OverworldEventData+27)
|
; be OverworldEventDataWRAM+$1B or OverworldEventDataWRAM+27)
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
; - i o - - - b -
|
; - i o - - - b -
|
||||||
;
|
;
|
||||||
@@ -59,7 +59,7 @@ endstruct align 2
|
|||||||
; o = Overlay active
|
; o = Overlay active
|
||||||
; b = Bomb wall opened
|
; b = Bomb wall opened
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
OverworldEventData = $7EF280
|
OverworldEventDataWRAM = $7EF280
|
||||||
|
|
||||||
;================================================================================
|
;================================================================================
|
||||||
; Items & Equipment ($7EF340 - $7EF38B)
|
; Items & Equipment ($7EF340 - $7EF38B)
|
||||||
@@ -170,7 +170,7 @@ InventoryTracking: skip 2 ; b r m p n s k f - - - - - - o q (bitfield)
|
|||||||
; p = Magic Powder | n = Mushroom Past | s = Shovel
|
; p = Magic Powder | n = Mushroom Past | s = Shovel
|
||||||
; k = Inactive Flute | f = Active Flute | o = Any bomb acquired
|
; k = Inactive Flute | f = Active Flute | o = Any bomb acquired
|
||||||
; q = Quickswap locked
|
; q = Quickswap locked
|
||||||
BowTracking: skip 2 ; b s p - - - - - (bitfield)
|
BowTracking: skip 2 ; - - - - b s p - (bitfield)
|
||||||
; b = Bow | s = Silver Arrows Upgrade | p = Second Progressive Bow
|
; b = Bow | s = Silver Arrows Upgrade | p = Second Progressive Bow
|
||||||
; The front end writes two distinct progressive bow items. p
|
; The front end writes two distinct progressive bow items. p
|
||||||
; indicates whether the "second" has been found independent of
|
; indicates whether the "second" has been found independent of
|
||||||
@@ -389,13 +389,19 @@ DummyValue: skip 1 ; $01 if you're a real dummy
|
|||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
base $700000 ;
|
base $700000 ;
|
||||||
CartridgeSRAM: ;
|
CartridgeSRAM: ;
|
||||||
skip $0340 ;
|
RoomDataWRAMSRAM: ;
|
||||||
|
skip $280 ;
|
||||||
|
OverworldEventDataSRAM: ;
|
||||||
|
skip $C0 ;
|
||||||
EquipmentSRAM: skip 76 ;
|
EquipmentSRAM: skip 76 ;
|
||||||
InventoryTrackingSRAM: skip 2 ;
|
InventoryTrackingSRAM: skip 2 ;
|
||||||
BowTrackingSRAM: skip 2 ;
|
BowTrackingSRAM: skip 2 ;
|
||||||
skip 73 ;
|
skip 53 ;
|
||||||
|
ProgressIndicatorSRAM: skip 1 ;
|
||||||
|
skip 19 ;
|
||||||
FileNameVanillaSRAM: skip 8 ; First four characters of file name
|
FileNameVanillaSRAM: skip 8 ; First four characters of file name
|
||||||
skip 287
|
FileValiditySRAM: skip 2 ;
|
||||||
|
skip 285 ;
|
||||||
ExtendedFileNameSRAM: skip 24 ; We read and write the file name directly from and to SRAM (24 bytes)
|
ExtendedFileNameSRAM: skip 24 ; We read and write the file name directly from and to SRAM (24 bytes)
|
||||||
skip $1AE4 ;
|
skip $1AE4 ;
|
||||||
RomVersionSRAM: skip 4 ; ALTTPR ROM version. Low byte is the version, high byte writes
|
RomVersionSRAM: skip 4 ; ALTTPR ROM version. Low byte is the version, high byte writes
|
||||||
@@ -637,10 +643,14 @@ endmacro
|
|||||||
; Direct SRAM Assertions
|
; Direct SRAM Assertions
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
%assertSRAM(CartridgeSRAM, $700000)
|
%assertSRAM(CartridgeSRAM, $700000)
|
||||||
|
%assertSRAM(RoomDataWRAMSRAM, $700000)
|
||||||
|
%assertSRAM(OverworldEventDataSRAM, $700280)
|
||||||
%assertSRAM(EquipmentSRAM, $700340)
|
%assertSRAM(EquipmentSRAM, $700340)
|
||||||
%assertSRAM(InventoryTrackingSRAM, $70038C)
|
%assertSRAM(InventoryTrackingSRAM, $70038C)
|
||||||
%assertSRAM(BowTrackingSRAM, $70038E)
|
%assertSRAM(BowTrackingSRAM, $70038E)
|
||||||
|
%assertSRAM(ProgressIndicatorSRAM, $7003C5)
|
||||||
%assertSRAM(FileNameVanillaSRAM, $7003D9)
|
%assertSRAM(FileNameVanillaSRAM, $7003D9)
|
||||||
|
%assertSRAM(FileValiditySRAM, $7003E1)
|
||||||
%assertSRAM(ExtendedFileNameSRAM, $700500)
|
%assertSRAM(ExtendedFileNameSRAM, $700500)
|
||||||
%assertSRAM(RomNameSRAM, $702000)
|
%assertSRAM(RomNameSRAM, $702000)
|
||||||
%assertSRAM(RomVersionSRAM, $701FFC)
|
%assertSRAM(RomVersionSRAM, $701FFC)
|
||||||
|
|||||||
@@ -292,7 +292,7 @@ IncrementUWMirror:
|
|||||||
JSL.l StatTransitionCounter
|
JSL.l StatTransitionCounter
|
||||||
+
|
+
|
||||||
PLA
|
PLA
|
||||||
JSL.l Dungeon_SaveRoomData ; thing we wrote over
|
JSL.l Dungeon_SaveRoomDataWRAM ; thing we wrote over
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
IncrementSpentRupees:
|
IncrementSpentRupees:
|
||||||
|
|||||||
@@ -208,13 +208,13 @@ CheckMedallionSword:
|
|||||||
.outdoors
|
.outdoors
|
||||||
LDA $8A : CMP.b #$70 : BNE +
|
LDA $8A : CMP.b #$70 : BNE +
|
||||||
LDA.l MireRequiredMedallion : TAX : LDA.l .medallion_type, X : CMP $0303 : BNE .done
|
LDA.l MireRequiredMedallion : TAX : LDA.l .medallion_type, X : CMP $0303 : BNE .done
|
||||||
LDA OverworldEventData+$70 : AND.b #$20 : BNE .done
|
LDA OverworldEventDataWRAM+$70 : AND.b #$20 : BNE .done
|
||||||
LDA.b #$08 : PHA : PLB ; set data bank to $08
|
LDA.b #$08 : PHA : PLB ; set data bank to $08
|
||||||
LDY.b #$02 : JSL.l Ancilla_CheckIfEntranceTriggered : BCS .permit ; misery mire
|
LDY.b #$02 : JSL.l Ancilla_CheckIfEntranceTriggered : BCS .permit ; misery mire
|
||||||
BRA .done
|
BRA .done
|
||||||
+ : CMP.b #$47 : BNE +
|
+ : CMP.b #$47 : BNE +
|
||||||
LDA.l TRockRequiredMedallion : TAX : LDA.l .medallion_type, X : CMP $0303 : BNE .done
|
LDA.l TRockRequiredMedallion : TAX : LDA.l .medallion_type, X : CMP $0303 : BNE .done
|
||||||
LDA OverworldEventData+$47 : AND.b #$20 : BNE .done
|
LDA OverworldEventDataWRAM+$47 : AND.b #$20 : BNE .done
|
||||||
LDA.b #$08 : PHA : PLB ; set data bank to $08
|
LDA.b #$08 : PHA : PLB ; set data bank to $08
|
||||||
LDY.b #$03 : JSL.l Ancilla_CheckIfEntranceTriggered : BCS .permit ; turtle rock
|
LDY.b #$03 : JSL.l Ancilla_CheckIfEntranceTriggered : BCS .permit ; turtle rock
|
||||||
+
|
+
|
||||||
|
|||||||
56
tables.asm
56
tables.asm
@@ -104,9 +104,7 @@ org $308031 ; PC 0x180031
|
|||||||
EnableEasterEggs:
|
EnableEasterEggs:
|
||||||
db #$00 ; #$00 = Off (default) - #$01 = On
|
db #$00 ; #$00 = Off (default) - #$01 = On
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $308032 ; PC 0x180032
|
; 0x180032 (unused)
|
||||||
OpenMode:
|
|
||||||
db #$01 ; #$01 = Standard (default) - #$01 = Open
|
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $308033 ; PC 0x180033
|
org $308033 ; PC 0x180033
|
||||||
HeartBeep:
|
HeartBeep:
|
||||||
@@ -157,9 +155,7 @@ org $30803F ; PC 0x18003F
|
|||||||
HammerableGanon:
|
HammerableGanon:
|
||||||
db #$00 ; #$00 = Off (default) - #$01 = On
|
db #$00 ; #$00 = Off (default) - #$01 = On
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $308040 ; PC 0x180040
|
; 0x180040 - (unused)
|
||||||
PreopenCurtains:
|
|
||||||
db #$00 ; #$00 = Off (default) - #$01 = On
|
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $308041 ; PC 0x180041
|
org $308041 ; PC 0x180041
|
||||||
AllowSwordlessMedallionUse:
|
AllowSwordlessMedallionUse:
|
||||||
@@ -169,9 +165,7 @@ org $308042 ; PC 0x180042
|
|||||||
PermitSQFromBosses:
|
PermitSQFromBosses:
|
||||||
db #$00 ; #$00 = Off (default) - #$01 = On
|
db #$00 ; #$00 = Off (default) - #$01 = On
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $308043 ; PC 0x180043
|
; 0x180043 (unused)
|
||||||
StartingSword:
|
|
||||||
db #$00 ; #$00 = No Sword (default) - #$FF = Non-Sword
|
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $308044 ; PC 0x180044
|
org $308044 ; PC 0x180044
|
||||||
AllowHammerTablets:
|
AllowHammerTablets:
|
||||||
@@ -186,9 +180,7 @@ HUDDungeonItems:
|
|||||||
; display ---edcba a: Small Keys, b: Big Key, c: Map, d: Compass, e: Bosses
|
; display ---edcba a: Small Keys, b: Big Key, c: Map, d: Compass, e: Bosses
|
||||||
db #$00
|
db #$00
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $308046 ; PC 0x180046 Link's starting equipment
|
; 0x180046 (unused)
|
||||||
LinkStartingRupees:
|
|
||||||
dw #$0000
|
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $308048 ; PC 0x180048
|
org $308048 ; PC 0x180048
|
||||||
MenuSpeed:
|
MenuSpeed:
|
||||||
@@ -372,17 +364,7 @@ org $30808A ; PC 0x18008A
|
|||||||
BlockCastleDoorsInRain:
|
BlockCastleDoorsInRain:
|
||||||
db #$00 ; #$00 - Normal, $01 - Block them (Used by Entrance Rando in Standard Mode)
|
db #$00 ; #$00 - Normal, $01 - Block them (Used by Entrance Rando in Standard Mode)
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $30808B ; PC 0x18008B
|
; 0x18008B-0x18008D (unused)
|
||||||
PreopenPyramid:
|
|
||||||
db $00 ; #$00 = Off (default) - #$01 = On
|
|
||||||
;--------------------------------------------------------------------------------
|
|
||||||
org $30808C ; PC 0x18008C
|
|
||||||
PreopenGanonsTower:
|
|
||||||
db $00 ; #$00 = Off (default) - #$01 = On
|
|
||||||
;--------------------------------------------------------------------------------
|
|
||||||
org $30808D ; PC 0x18008D
|
|
||||||
InstantPostAgaWorldState:
|
|
||||||
db $00 ; #$00 = Off (default) - #$01 = On
|
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $30808E ; PC 0x18008E
|
org $30808E ; PC 0x18008E
|
||||||
FakeBoots:
|
FakeBoots:
|
||||||
@@ -954,15 +936,16 @@ db #$01 ; #$00 = Instant win if last goal item collected. $01 = (Default) must t
|
|||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
; 0x180195 - 0x1801FF (unused)
|
; 0x180195 - 0x1801FF (unused)
|
||||||
;================================================================================
|
;================================================================================
|
||||||
org $308200 ; PC 0x180200 - 0x18020F
|
org $308200 ; PC 0x180200 - 0x18020B
|
||||||
RedClockAmount:
|
RedClockAmount:
|
||||||
dw #$4650, #$0000 ; $00004650 = +5 minutes
|
dw #$4650, #$0000 ; $00004650 = +5 minutes
|
||||||
BlueClockAmount:
|
BlueClockAmount:
|
||||||
dw #$B9B0, #$FFFF ; $FFFFB9B0 = -5 minutes
|
dw #$B9B0, #$FFFF ; $FFFFB9B0 = -5 minutes
|
||||||
GreenClockAmount:
|
GreenClockAmount:
|
||||||
dw #$0000, #$0000
|
dw #$0000, #$0000
|
||||||
StartingTime:
|
;--------------------------------------------------------------------------------
|
||||||
dw #$0000, #$0000 ; #$A5E0, #$0001 = 30 minutes
|
; 0x18020C-0x18020F (unused)
|
||||||
|
;--------------------------------------------------------------------------------
|
||||||
;================================================================================
|
;================================================================================
|
||||||
org $09E3BB ; PC 0x4E3BB
|
org $09E3BB ; PC 0x4E3BB
|
||||||
db $E4 ; Hera Basement Key (Set to programmable HP $EB) (set to $E4 for original hookable/boomable key behavior)
|
db $E4 ; Hera Basement Key (Set to programmable HP $EB) (set to $E4 for original hookable/boomable key behavior)
|
||||||
@@ -1607,16 +1590,11 @@ dw $0000
|
|||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
; 0x182305 - 182FFF (unused)
|
; 0x182305 - 182FFF (unused)
|
||||||
;================================================================================
|
;================================================================================
|
||||||
org $30B000 ; PC 0x183000 - 0x183054
|
org $30B000 ; PC 0x183000 - 0x1834FF
|
||||||
StartingEquipment:
|
incsrc initsramtable.asm
|
||||||
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
|
|
||||||
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
|
|
||||||
dw $0000, $0000, $0000, $0000, $0000, $0000, $1818, $FF00
|
|
||||||
dw $0000, $0000, $0000, $0000, $F800, $0000, $0000, $0000
|
|
||||||
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
|
|
||||||
dw $0000, $0000
|
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
; 0x183055 - 183FFF (unused)
|
; 0x183500 - 183FFF (unused)
|
||||||
;================================================================================
|
;================================================================================
|
||||||
org $30C000 ; PC 0x184000 - 0x184040
|
org $30C000 ; PC 0x184000 - 0x184040
|
||||||
ItemSubstitutionRules:
|
ItemSubstitutionRules:
|
||||||
@@ -1626,16 +1604,10 @@ db $51, $06, $52, $FF
|
|||||||
db $53, $06, $54, $FF
|
db $53, $06, $54, $FF
|
||||||
db $FF, $FF, $FF, $FF
|
db $FF, $FF, $FF, $FF
|
||||||
|
|
||||||
|
|
||||||
org $30C041 ; PC 0x184041
|
org $30C041 ; PC 0x184041
|
||||||
ForceFileName:
|
ForceFileName:
|
||||||
db $00 ; $00 = Player picks name (default) - $01 = Use StaticFileName
|
db $00 ; $00 = Player picks name (default) - $01 = Use StaticFileName (initsramtable.asm)
|
||||||
|
|
||||||
org $30C042 ; PC 0x184042 - 0x18405A
|
|
||||||
StaticFileName:
|
|
||||||
dw $0181, $0162, $0168, $018C
|
|
||||||
dw $0166, $014E, $0162, $018C
|
|
||||||
dw $0165, $0162, $0167, $018C
|
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
; 0x18405B - 0x1847FF (unused)
|
; 0x18405B - 0x1847FF (unused)
|
||||||
;================================================================================
|
;================================================================================
|
||||||
|
|||||||
15
zelda.asm
15
zelda.asm
@@ -2,17 +2,18 @@
|
|||||||
; Spawn Zelda (or not)
|
; Spawn Zelda (or not)
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
SpawnZelda:
|
SpawnZelda:
|
||||||
LDA.l FollowerIndicator : CMP #$08 : BEQ + ; don't spawn if dwarf is present
|
LDA.l FollowerIndicator : CMP.b #$08 : BEQ + ; don't spawn if dwarf is present
|
||||||
CMP #$07 : BEQ + ; don't spawn if frog is present
|
CMP.b #$07 : BEQ + ; don't spawn if frog is present
|
||||||
CMP #$0C : BEQ + ; don't spawn if purple chest is present
|
CMP.b #$0C : BEQ + ; don't spawn if purple chest is present
|
||||||
CLC
|
CLC
|
||||||
+ RTL
|
+ RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
EndRainState:
|
EndRainState:
|
||||||
LDA ProgressIndicator : CMP.b #$02 : !BGE + ; skip if past escape already
|
LDA.l InitProgressIndicator : BIT.b #$80 : BNE + ; check for instant post-aga
|
||||||
LDA.b #$00 : STA !INFINITE_ARROWS : STA !INFINITE_BOMBS : STA !INFINITE_MAGIC
|
LDA.b #$02 : STA.l ProgressIndicator
|
||||||
LDA.b #$02 : STA ProgressIndicator ; end rain state
|
RTL
|
||||||
JSL MaybeSetPostAgaWorldState
|
|
||||||
+
|
+
|
||||||
|
LDA.b #$03 : STA.l ProgressIndicator
|
||||||
|
LDA.l InitLumberjackOW : STA.l OverworldEventDataWRAM+$02
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user