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
This commit is contained in:
cassidoxa
2022-11-05 00:50:25 -04:00
parent cafb0908a0
commit 43f753b517
72 changed files with 7706 additions and 7305 deletions

View File

@@ -4,22 +4,21 @@
; Output: 0 for darkness, 1 for lamp cone
;--------------------------------------------------------------------------------
LampCheck:
LDA $7F50C4 : CMP.b #$01 : BNE + : RTL : +
LDA.l LightConeModifier : CMP.b #$01 : BNE + : RTL : +
CMP.b #$FF : BNE + : INC : RTL : +
LDA LampEquipment : BNE .done ; skip if we already have lantern
LDA.l LampEquipment : BNE .done ; skip if we already have lantern
LDA CurrentWorld : BNE +
LDA.l CurrentWorld : BNE +
.lightWorld
LDA $040C : BNE ++ ; check if we're in sewers
LDA LampConeSewers : BRA .done
LDA.w $040C : BNE ++ ; check if we're in sewers
LDA.l LampConeSewers : BRA .done
++
LDA LampConeLightWorld : BRA .done
LDA.l LampConeLightWorld : BRA .done
+
.darkWorld
LDA LampConeDarkWorld
.done
;BNE + : STZ $1D : + ; remember to turn cone off after a torch
RTL
;================================================================================
;--------------------------------------------------------------------------------
@@ -30,13 +29,12 @@ CheckForZelda:
LDA.b #$01 ; pretend we have zelda anyway
RTL
+
LDA FollowerIndicator
LDA.l FollowerIndicator
RTL
;================================================================================
;--------------------------------------------------------------------------------
SetOverlayIfLamp:
JSL.l LampCheck
STA $1D ; write it directly to the overlay, this isn't a terrible idea at all
STA.b $1D ; write it directly to the overlay, this isn't a terrible idea at all
RTL
;================================================================================
;LDA CurrentWorld : EOR #$40 : LSR #6 : AND #$01 ; return the same result as having the lantern in the light world