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

@@ -3,7 +3,7 @@ ShouldOverrideFileLoad:
CPY #$0A ; 0A = Ice/Mire floor file
BNE .no
LDA $040C ; Dungeon number
LDA.w $040C ; Dungeon number
CMP #$12 ; Ice Palace
BEQ .yes
.no
@@ -13,9 +13,9 @@ ShouldOverrideFileLoad:
BgGraphicsLoading:
; Instructions overwritten
STZ $00
STX $01
STA $02
STZ.b Scrap00
STX.b Scrap01
STA.b Scrap02
JSR ShouldOverrideFileLoad
BCS .useSpecialIcePalaceFile
@@ -25,24 +25,22 @@ BgGraphicsLoading:
; We're loading the floor tiles in Ice Palace. Instead of the normal file,
; load another one that replaces the bridge tiles with the Bombos medallion
;LDA $FFFFFF
LDA.b #IcePalaceFloorGfx>>16
STA $02
STA.b Scrap02
REP #$20
LDA.w #IcePalaceFloorGfx
STA $00
STA.b Scrap00
LDX.b #64*2 ; Tiles to load * 2
-
; Unrolled loop to upload half a tile
LDA [$00] : STA $2118 : INC $00 : INC $00
LDA [$00] : STA $2118 : INC $00 : INC $00
LDA [$00] : STA $2118 : INC $00 : INC $00
LDA [$00] : STA $2118 : INC $00 : INC $00
LDA [$00] : STA $2118 : INC $00 : INC $00
LDA [$00] : STA $2118 : INC $00 : INC $00
LDA [$00] : STA $2118 : INC $00 : INC $00
LDA [$00] : STA $2118 : INC $00 : INC $00
LDA.b [$00] : STA.w VMDATAL : INC.b Scrap00 : INC.b Scrap00
LDA.b [$00] : STA.w VMDATAL : INC.b Scrap00 : INC.b Scrap00
LDA.b [$00] : STA.w VMDATAL : INC.b Scrap00 : INC.b Scrap00
LDA.b [$00] : STA.w VMDATAL : INC.b Scrap00 : INC.b Scrap00
LDA.b [$00] : STA.w VMDATAL : INC.b Scrap00 : INC.b Scrap00
LDA.b [$00] : STA.w VMDATAL : INC.b Scrap00 : INC.b Scrap00
LDA.b [$00] : STA.w VMDATAL : INC.b Scrap00 : INC.b Scrap00
LDA.b [$00] : STA.w VMDATAL : INC.b Scrap00 : INC.b Scrap00
DEX
BNE -
@@ -51,7 +49,7 @@ BgGraphicsLoading:
ReloadingFloors:
SEP #$30 ; 8 AXY
LDA $7EC2F8 ; Floor file that has been decompressed
LDA.l $7EC2F8 ; Floor file that has been decompressed
TAY
JSR ShouldOverrideFileLoad
REP #$30 ; 16 AXY
@@ -76,6 +74,6 @@ ReloadingFloors:
; Pretend that we ran the original routine
LDX.w #$0800
LDA.w #$6600
STA $03
STA.b Scrap03
JML ReloadingFloorsCancel