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