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:
@@ -8,14 +8,14 @@ FrameHookAction:
|
||||
|
||||
SEP #$20
|
||||
|
||||
LDA StatsLocked : BNE ++
|
||||
LDA.l StatsLocked : BNE ++
|
||||
REP #$20 ; set 16-bit accumulator
|
||||
LDA LoopFrames : INC : STA LoopFrames : BNE +
|
||||
LDA LoopFrames+2 : INC : STA LoopFrames+2
|
||||
LDA.l LoopFrames : INC : STA.l LoopFrames : BNE +
|
||||
LDA.l LoopFrames+2 : INC : STA.l LoopFrames+2
|
||||
+
|
||||
LDA $10 : CMP.w #$010E : BNE + ; move this to nmi hook?
|
||||
LDA MenuFrames : INC : STA MenuFrames : BNE +
|
||||
LDA MenuFrames+2 : INC : STA MenuFrames+2
|
||||
LDA.l $10 : CMP.w #$010E : BNE + ; move this to nmi hook?
|
||||
LDA.l MenuFrames : INC : STA.l MenuFrames : BNE +
|
||||
LDA.l MenuFrames+2 : INC : STA.l MenuFrames+2
|
||||
+
|
||||
++
|
||||
REP #$30 : PLA : PLP
|
||||
@@ -24,36 +24,35 @@ RTL
|
||||
NMIHookAction:
|
||||
PHA : PHX : PHY : PHD ; thing we wrote over, push stuff
|
||||
|
||||
LDA StatsLocked : AND.w #$00FF : BNE ++
|
||||
LDA NMIFrames : INC : STA NMIFrames : BNE +
|
||||
LDA NMIFrames+2 : INC : STA NMIFrames+2
|
||||
LDA.l StatsLocked : AND.w #$00FF : BNE ++
|
||||
LDA.l NMIFrames : INC : STA.l NMIFrames : BNE +
|
||||
LDA.l NMIFrames+2 : INC : STA.l NMIFrames+2
|
||||
+
|
||||
++
|
||||
|
||||
JML.l NMIHookReturn
|
||||
;--------------------------------------------------------------------------------
|
||||
!NMI_AUX = "$7F5044"
|
||||
PostNMIHookAction:
|
||||
LDA !NMI_AUX : BEQ +
|
||||
LDA $00 : PHA ; preserve DP ram
|
||||
LDA $01 : PHA
|
||||
LDA $02 : PHA
|
||||
LDA.l NMIAux : BEQ +
|
||||
LDA.b Scrap00 : PHA ; preserve DP ram
|
||||
LDA.b Scrap01 : PHA
|
||||
LDA.b Scrap02 : PHA
|
||||
|
||||
LDA !NMI_AUX+2 : STA $02 ; set up jump pointer
|
||||
LDA !NMI_AUX+1 : STA $01
|
||||
LDA !NMI_AUX+0 : STA $00
|
||||
LDA.l NMIAux+2 : STA.b Scrap02 ; set up jump pointer
|
||||
LDA.l NMIAux+1 : STA.b Scrap01
|
||||
LDA.l NMIAux+0 : STA.b Scrap00
|
||||
|
||||
PHK : PER .return-1 ; push stack for RTL return
|
||||
JMP [$0000]
|
||||
|
||||
.return
|
||||
LDA.b #$00 : STA !NMI_AUX ; zero bank byte of NMI hook pointer
|
||||
LDA.b #$00 : STA.l NMIAux ; zero bank byte of NMI hook pointer
|
||||
|
||||
PLA : STA $02
|
||||
PLA : STA $01
|
||||
PLA : STA $00
|
||||
PLA : STA.b Scrap02
|
||||
PLA : STA.b Scrap01
|
||||
PLA : STA.b Scrap00
|
||||
+
|
||||
|
||||
LDA $13 : STA $2100 ; thing we wrote over, turn screen back on
|
||||
LDA.b $13 : STA.w INIDISP ; thing we wrote over, turn screen back on
|
||||
JML.l PostNMIHookReturn
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user