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:
@@ -32,7 +32,7 @@ ItemDowngradeFixMain:
|
||||
CPY.b #$00 : BEQ .isUncleSwordShield ; Fighter's Sword & Shield
|
||||
|
||||
.done
|
||||
STA [$00] ; thing we wrote over part 2
|
||||
STA.b [Scrap00] ; thing we wrote over part 2
|
||||
.dontWrite
|
||||
RTS
|
||||
.isPowerGloves
|
||||
@@ -41,8 +41,8 @@ RTS
|
||||
.isBlueBoomerang
|
||||
.isBow
|
||||
.isBowAndArrows
|
||||
CMP [$00] : !BGE .done ; finished if we're upgrading
|
||||
LDA [$00] ; reload old value
|
||||
CMP.b [$00] : !BGE .done ; finished if we're upgrading
|
||||
LDA.b [$00] ; reload old value
|
||||
RTS
|
||||
.isSilverArrowBow
|
||||
.isRedBoomerang
|
||||
@@ -51,31 +51,31 @@ RTS
|
||||
.isShovel
|
||||
.isMushroom
|
||||
PHA
|
||||
LDA [$00] : BNE + ; don't upgrade if we already have the toggle for it
|
||||
LDA.b [Scrap00] : BNE + ; don't upgrade if we already have the toggle for it
|
||||
PLA
|
||||
STA [$00]
|
||||
STA.b [Scrap00]
|
||||
RTS
|
||||
+
|
||||
PLA
|
||||
RTS
|
||||
.isSword
|
||||
PHA
|
||||
LDA HighestSword : STA $04
|
||||
LDA.l HighestSword : STA.b Scrap04
|
||||
TYA ; load sword item
|
||||
CMP.b #$49 : BNE + : LDA.b #$00 : + ; convert extra fighter's sword to normal one
|
||||
CMP.b #$50 : BNE + : LDA.b #$01 : + ; convert extra master sword to normal one
|
||||
INC : CMP $04 : !BGE + ; skip if highest is lower (this is an upgrade)
|
||||
LDA $04 : DEC ; convert to item id
|
||||
TAY : PLA : LDA $04 ; put sword id into the thing to write
|
||||
INC : CMP.b Scrap04 : !BGE + ; skip if highest is lower (this is an upgrade)
|
||||
LDA.b Scrap04 : DEC ; convert to item id
|
||||
TAY : PLA : LDA.b Scrap04 ; put sword id into the thing to write
|
||||
JMP .done
|
||||
+
|
||||
PLA
|
||||
JMP .done
|
||||
.isUncleSwordShield
|
||||
PHA
|
||||
LDA HighestSword : STA [$00] ; already set to 1 if we had no sword, always keep highest
|
||||
INC $00
|
||||
LDA HighestShield : STA [$00]
|
||||
LDA.l HighestSword : STA.b [Scrap00] ; already set to 1 if we had no sword, always keep highest
|
||||
INC.b Scrap00
|
||||
LDA.l HighestShield : STA.b [Scrap00]
|
||||
PLA
|
||||
RTS
|
||||
;================================================================================
|
||||
|
||||
Reference in New Issue
Block a user