Remove some hard coded addresses for MVN instructions
This commit is contained in:
19
events.asm
19
events.asm
@@ -89,16 +89,17 @@ OnAga2Defeated:
|
||||
;--------------------------------------------------------------------------------
|
||||
OnFileCreation:
|
||||
; Copy initial SRAM state from ROM to cart SRAM
|
||||
; If the inital SRAM table is move these addresses must be changed
|
||||
PHB
|
||||
LDA.w #$03D7 ; \
|
||||
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 ; /
|
||||
LDA.w #$03D7 ; \
|
||||
LDX.w #$B000 ; | Copies from beginning of inital sram table up to file name
|
||||
LDY.w #$0000 ; | (exclusively)
|
||||
MVN SRAMBank, SRAMTableBank ; /
|
||||
; Skip file name and validity value
|
||||
LDA.w #$010C ; \
|
||||
LDX.w #$B3E3 ; | Rando-Specific Assignments & Game Stats block
|
||||
LDY.w #$03E3 ; |
|
||||
MVN SRAMBank, SRAMTableBank ; /
|
||||
PLB
|
||||
|
||||
; resolve instant post-aga if standard
|
||||
|
||||
@@ -15,6 +15,7 @@ fillword $0000 ; Zero out the table
|
||||
fill $500 ;
|
||||
|
||||
org $30B000 ; PC 0x183000
|
||||
InitSRAMTable:
|
||||
InitRoomDataWRAM:
|
||||
org $30B060 ; PC 0x183060
|
||||
InitATAltarRoom: dw $0000 ; aga curtains
|
||||
|
||||
16
save.asm
16
save.asm
@@ -14,10 +14,10 @@ WriteSaveChecksumAndBackup:
|
||||
STA.l InverseChecksumSRAM
|
||||
|
||||
PHB
|
||||
LDA.w #$14FF ; \
|
||||
LDX.w #$0000 ; | Copies $1500 bytes from beginning of cart SRAM to
|
||||
LDY.w #$4000 ; | $704000
|
||||
MVN $70, $70 ; /
|
||||
LDA.w #$14FF ; \
|
||||
LDX.w #CartridgeSRAM&$FFFF ; | Copies $1500 bytes from beginning of cart SRAM to
|
||||
LDY.w #SaveBackupSRAM&$FFFF ; | $704000
|
||||
MVN SRAMBank, SRAMBank ; /
|
||||
PLB
|
||||
|
||||
RTL
|
||||
@@ -51,10 +51,10 @@ ValidateSRAM:
|
||||
TDC : STA.l FileValiditySRAM ; Delete save by way of zeroing validity marker
|
||||
BRA .goodchecksum : +
|
||||
PHB
|
||||
LDA.w #$14FF ; \
|
||||
LDX.w #$4000 ; | Copies $1500 bytes from backup on cart SRAM to
|
||||
LDY.w #$0000 ; | main save location at $700000
|
||||
MVN $70, $70 ; /
|
||||
LDA.w #$14FF ; \
|
||||
LDX.w #SaveBackupSRAM&$FFFF ; | Copies $1500 bytes from backup on cart SRAM to
|
||||
LDY.w #CartridgeSRAM&$FFFF ; | main save location at $700000
|
||||
MVN SRAMBank, SRAMBank ; /
|
||||
PLB
|
||||
|
||||
.goodchecksum
|
||||
|
||||
9
sram.asm
9
sram.asm
@@ -417,6 +417,15 @@ SaveBackupSRAM: ; Backup copy of save ram. Game will attempt to
|
||||
; checksum on file select screen load fails.
|
||||
base off
|
||||
|
||||
;================================================================================
|
||||
; Bank Definitions
|
||||
;--------------------------------------------------------------------------------
|
||||
; If these move (most likely by placing initsramtable.asm somewhere else) these
|
||||
; bank definitions need to be changed as well.
|
||||
;================================================================================
|
||||
SRAMBank = $70
|
||||
SRAMTableBank = $30|$80
|
||||
|
||||
;================================================================================
|
||||
; Assertions
|
||||
;================================================================================
|
||||
|
||||
Reference in New Issue
Block a user