From 9e5e9a17eda97a584a7be0353ee0f02ff2330c65 Mon Sep 17 00:00:00 2001 From: cassidoxa Date: Tue, 5 Jul 2022 12:49:00 -0400 Subject: [PATCH 01/90] Check submodule during goal NPC interaction to prevent it from firing when menu is open (via kan) --- elder.asm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/elder.asm b/elder.asm index 87f25a1..5c4a6a6 100644 --- a/elder.asm +++ b/elder.asm @@ -50,6 +50,8 @@ RTL RTS + SEP #$20 + LDA.b $11 + BNE .done LDA.b #$96 LDY.b #$01 From 10079a539b240ee665b5bacbc4c795ddd5e9b602 Mon Sep 17 00:00:00 2001 From: cassidoxa Date: Mon, 25 Jul 2022 22:19:06 -0400 Subject: [PATCH 02/90] Compute checksum for extended SRAM Validate SRAM on file screen load and delete if checksum incorrect --- hooks.asm | 11 ++++++++--- save.asm | 50 +++++++++++++++++++++++++++++++++++++++++--------- sram.asm | 13 +++++++------ 3 files changed, 56 insertions(+), 18 deletions(-) diff --git a/hooks.asm b/hooks.asm index 21c9b24..250201f 100755 --- a/hooks.asm +++ b/hooks.asm @@ -188,7 +188,7 @@ JSL.l AltBufferTable : NOP #8 ; Delete screen ;-------------------------------------------------------------------------------- org $0CCCCC ;<- 64CCC - Bank0C.asm : 1628 (JSL Intro_ValidateSram) / Bank02.asm : 75 (REP #$30) ; Explanation: In JP 1.0 the code for Intro_ValidateSram was inline in Bank 0C -JML.l Validate_SRAM ;(Return via RTL. Original code JML'd to Intro_LoadSpriteStats which returns with RTL, but we want to skip that) +JML.l ValidateSRAM ;(Return via RTL. Original code JML'd to Intro_LoadSpriteStats which returns with RTL, but we want to skip that) org $0CCD57 ;<- 64D57 - Bank0C.asm : RTL ;Just in case anybody ever removes the previous hook ;-------------------------------------------------------------------------------- @@ -299,12 +299,17 @@ BRA + ;================================================================================ ; Extended SRAM Save file ;-------------------------------------------------------------------------------- -org $0ccf08 ; <- Bank0C.asm : 2036 (LDA.w #$0007 : STA $7EC00D : STA $7EC013) +org $0CCF08 ; <- Bank0C.asm : 2036 (LDA.w #$0007 : STA $7EC00D : STA $7EC013) JSL CopyExtendedSaveFileToWRAM ;-------------------------------------------------------------------------------- org $008998 ; <- Bank00.asm : 1296 (LDX.w #$0000) JSL CopyExtendedWRAMSaveFileToSRAM ;-------------------------------------------------------------------------------- +org $00899C ; <- bank_00.asm : #_00899C (CLC) +JSL WriteSaveChecksum +LDA.w #$01F3 : TCS : SEP #$30 : PLB : RTL ; Get the stack and data bank correct +padbyte $FF : pad $0089C2 ; Fill adjacent free rom forward. See bank_00.asm: #_0089C2 +;-------------------------------------------------------------------------------- org $0CD7AB ; <- Bank0C.asm : 3342 (STA $700400, X) JSL.l ClearExtendedSaveFile ;-------------------------------------------------------------------------------- @@ -2807,4 +2812,4 @@ if !FEATURE_NEW_TEXT JSL RenderCharSetColorExtended_init org $0EF285 JSL RenderCharSetColorExtended_close : NOP -endif \ No newline at end of file +endif diff --git a/save.asm b/save.asm index 1aab65d..8c6f049 100644 --- a/save.asm +++ b/save.asm @@ -1,12 +1,40 @@ ;-------------------------------------------------------------------------------- -Validate_SRAM: - REP #$30 ; vanilla behavior from $0CCD45, includes prize pack reset after save and quit - LDX #$00FE : - - STZ $0D00, X - STZ $0E00, X - STZ $0F00, X - DEX #2 - BPL - +WriteSaveChecksum: + LDX.w #$0000 : TXA : - ; Checksum first $04FE bytes + CLC : ADC.l SaveDataWRAM, X + INX #2 + CPX #$04FE : BNE - + LDX.w #$0000 : - ; Checksum extended save data + CLC : ADC.l ExtendedFileNameWRAM, X + INX #2 + CPX #$0FFE : BNE - + STA.b $00 + LDA.w #$5A5A + SEC : SBC.b $00 + STA.l $7004FE +RTL +;-------------------------------------------------------------------------------- +ValidateSRAM: + REP #$30 + LDX.w #$0000 : TXA : - ; Checksum first $04FE bytes + CLC : ADC.l CartridgeSRAM,X + INX #2 + CPX.w #$04FE : BNE - + LDX.w #$0000 : - ; Checksum extended save data + CLC : ADC.l ExtendedFileNameSRAM, X + INX #2 + CPX #$0FFE : BNE - + STA.b $00 + LDA.w #$5A5A + SEC : SBC.b $00 + CMP.l InverseChecksumSRAM : BEQ + + TDC : STA.l FileValiditySRAM : + ; Delete save by way of zeroing validity marker + LDX.w #$00FE : - ; includes prize pack reset after save and quit + STZ $0D00, X + STZ $0E00, X + STZ $0F00, X + DEX #2 + BPL - SEP #$30 RTL ;-------------------------------------------------------------------------------- @@ -23,6 +51,11 @@ ClearExtendedSaveFile: STA $700D00, X STA $700E00, X STA $700F00, X + STA $701000, X + STA $701100, X + STA $701200, X + STA $701300, X + STA $701400, X RTL ;-------------------------------------------------------------------------------- ClearExtendedWRAMSaveFile: @@ -125,5 +158,4 @@ CopyExtendedWRAMSaveFileToSRAM: REP #$30 PLB PLA - LDX.w #$0000 : TXA ; what we wrote over RTL diff --git a/sram.asm b/sram.asm index 07a2283..687e6ba 100644 --- a/sram.asm +++ b/sram.asm @@ -10,6 +10,7 @@ ;-------------------------------------------------------------------------------- pushpc org 0 ; This module writes no bytes. Asar gives bank cross errors without this. +SaveDataWRAM = $7EF000 ;================================================================================ ; Room Data ($7EF000 - $7EF27F @@ -366,7 +367,7 @@ GTCollectedKeys: skip 1 ; / Ganon's Tower skip 2 ; Reserved for previous table FileMarker: skip 1 ; $FF = Active save file | $00 = Inactive save file skip 13 ; Unused -InverseChecksum: skip 2 ; Vanilla Inverse Checksum. Don't write unless computing checksum. +InverseChecksumWRAM: skip 2 ; Vanilla Inverse Checksum. Don't write unless computing checksum. ;================================================================================ ; Expanded SRAM ($7F6000 - $7F6FFF) @@ -379,8 +380,7 @@ ExtendedFileNameWRAM: skip 24 ; File name, 12 word-length characters. RoomPotData: skip 592 ; Table for expanded pot shuffle. One word per room. SpritePotData: skip 592 ; Table for expanded pot shuffle. One word per room. PurchaseCounts: skip 96 ; Keeps track of shop purchases -PrivateBlock: skip 512 ; Reserved for 3rd party developers -DummyValue: skip 1 ; $01 if you're a real dummy +PrivateBlock: skip 513 ; Reserved for 3rd party developers ;================================================================================ ; Direct SRAM Assignments ($700000 - $7080000) @@ -403,7 +403,8 @@ ProgressIndicatorSRAM: skip 1 ; skip 19 ; FileNameVanillaSRAM: skip 8 ; First four characters of file name FileValiditySRAM: skip 2 ; -skip 285 ; +skip 283 ; +InverseChecksumSRAM: skip 2 ; ExtendedFileNameSRAM: skip 24 ; We read and write the file name directly from and to SRAM (24 bytes) skip $1AE4 ; RomVersionSRAM: skip 4 ; ALTTPR ROM version. Low byte is the version, high byte writes @@ -515,7 +516,7 @@ endmacro %assertSRAM(FollowerDropped, $7EF3D3) %assertSRAM(FileNameVanillaWRAM, $7EF3D9) %assertSRAM(FileValidity, $7EF3E1) -%assertSRAM(InverseChecksum, $7EF4FE) +%assertSRAM(InverseChecksumWRAM, $7EF4FE) ;================================================================================ ; Randomizer Assertions @@ -640,7 +641,6 @@ endmacro %assertSRAM(SpritePotData, $7F6268) %assertSRAM(PurchaseCounts, $7F64B8) %assertSRAM(PrivateBlock, $7F6518) -%assertSRAM(DummyValue, $7F6718) ;================================================================================ ; Direct SRAM Assertions @@ -654,6 +654,7 @@ endmacro %assertSRAM(ProgressIndicatorSRAM, $7003C5) %assertSRAM(FileNameVanillaSRAM, $7003D9) %assertSRAM(FileValiditySRAM, $7003E1) +%assertSRAM(InverseChecksumSRAM, $7004FE) %assertSRAM(ExtendedFileNameSRAM, $700500) %assertSRAM(RomNameSRAM, $702000) %assertSRAM(RomVersionSRAM, $701FFC) From d8846a4ba9888c1ba31c32873e95bc8dec60763d Mon Sep 17 00:00:00 2001 From: cassidoxa Date: Fri, 29 Jul 2022 20:57:54 -0400 Subject: [PATCH 03/90] Add backup save that gets checked and loaded if main save is corrupt Add suffixes to instructions in save.asm Disable HDMA, NMI, and joypad during extended save DMA --- hooks.asm | 2 +- save.asm | 279 ++++++++++++++++++++++++++++++++---------------------- sram.asm | 10 +- 3 files changed, 175 insertions(+), 116 deletions(-) diff --git a/hooks.asm b/hooks.asm index 250201f..ede0106 100755 --- a/hooks.asm +++ b/hooks.asm @@ -306,7 +306,7 @@ org $008998 ; <- Bank00.asm : 1296 (LDX.w #$0000) JSL CopyExtendedWRAMSaveFileToSRAM ;-------------------------------------------------------------------------------- org $00899C ; <- bank_00.asm : #_00899C (CLC) -JSL WriteSaveChecksum +JSL WriteSaveChecksumAndBackup LDA.w #$01F3 : TCS : SEP #$30 : PLB : RTL ; Get the stack and data bank correct padbyte $FF : pad $0089C2 ; Fill adjacent free rom forward. See bank_00.asm: #_0089C2 ;-------------------------------------------------------------------------------- diff --git a/save.asm b/save.asm index 8c6f049..f2723be 100644 --- a/save.asm +++ b/save.asm @@ -1,161 +1,218 @@ ;-------------------------------------------------------------------------------- -WriteSaveChecksum: +WriteSaveChecksumAndBackup: LDX.w #$0000 : TXA : - ; Checksum first $04FE bytes CLC : ADC.l SaveDataWRAM, X INX #2 - CPX #$04FE : BNE - + CPX.w #$04FE : BNE - LDX.w #$0000 : - ; Checksum extended save data CLC : ADC.l ExtendedFileNameWRAM, X INX #2 - CPX #$0FFE : BNE - + CPX.w #$0FFE : BNE - STA.b $00 LDA.w #$5A5A SEC : SBC.b $00 - STA.l $7004FE + 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 ; / + PLB + RTL ;-------------------------------------------------------------------------------- ValidateSRAM: REP #$30 LDX.w #$0000 : TXA : - ; Checksum first $04FE bytes - CLC : ADC.l CartridgeSRAM,X + CLC : ADC.l CartridgeSRAM, X INX #2 CPX.w #$04FE : BNE - LDX.w #$0000 : - ; Checksum extended save data CLC : ADC.l ExtendedFileNameSRAM, X INX #2 - CPX #$0FFE : BNE - + CPX.w #$0FFE : BNE - STA.b $00 LDA.w #$5A5A SEC : SBC.b $00 - CMP.l InverseChecksumSRAM : BEQ + - TDC : STA.l FileValiditySRAM : + ; Delete save by way of zeroing validity marker + CMP.l InverseChecksumSRAM : BEQ .goodchecksum + LDX.w #$0000 : TXA : - ; Do the same for the backup save + CLC : ADC.l SaveBackupSRAM, X + INX #2 + CPX.w #$04FE : BNE - + LDX.w #$0000 : - + CLC : ADC.l SaveBackupSRAM+$500, X + INX #2 + CPX.w #$0FFE : BNE - + STA.b $00 + LDA.w #$5A5A + SEC : SBC.b $00 + CMP.l SaveBackupSRAM+$4FE : BEQ + + 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 ; / + PLB + + .goodchecksum LDX.w #$00FE : - ; includes prize pack reset after save and quit - STZ $0D00, X - STZ $0E00, X - STZ $0F00, X + STZ.w $0D00, X + STZ.w $0E00, X + STZ.w $0F00, X DEX #2 BPL - SEP #$30 RTL ;-------------------------------------------------------------------------------- ClearExtendedSaveFile: - STA $700400, X ; what we wrote over - STA $700500, X - STA $700600, X - STA $700700, X - STA $700800, X - STA $700900, X - STA $700A00, X - STA $700B00, X - STA $700C00, X - STA $700D00, X - STA $700E00, X - STA $700F00, X - STA $701000, X - STA $701100, X - STA $701200, X - STA $701300, X - STA $701400, X + STA.l $700400, X ; what we wrote over + STA.l $700500, X + STA.l $700600, X + STA.l $700700, X + STA.l $700800, X + STA.l $700900, X + STA.l $700A00, X + STA.l $700B00, X + STA.l $700C00, X + STA.l $700D00, X + STA.l $700E00, X + STA.l $700F00, X + STA.l $701000, X + STA.l $701100, X + STA.l $701200, X + STA.l $701300, X + STA.l $701400, X + ; Clear backup save + STA.l $704000, X + STA.l $704100, X + STA.l $704200, X + STA.l $704300, X + STA.l $704400, X + STA.l $704500, X + STA.l $704600, X + STA.l $704700, X + STA.l $704800, X + STA.l $704900, X + STA.l $704A00, X + STA.l $704B00, X + STA.l $704C00, X + STA.l $704D00, X + STA.l $704E00, X + STA.l $704F00, X + STA.l $705000, X + STA.l $705100, X + STA.l $705200, X + STA.l $705300, X + STA.l $705400, X RTL ;-------------------------------------------------------------------------------- ClearExtendedWRAMSaveFile: - STA $7EF400, X ; what we wrote over - STA $7F6000, X - STA $7F6100, X - STA $7F6200, X - STA $7F6300, X - STA $7F6400, X - STA $7F6500, X - STA $7F6600, X - STA $7F6700, X - STA $7F6800, X - STA $7F6900, X - STA $7F6A00, X - STA $7F6B00, X - STA $7F6C00, X - STA $7F6D00, X - STA $7F6E00, X - STA $7F6F00, X + STA.l $7EF400, X ; what we wrote over + STA.l $7F6000, X + STA.l $7F6100, X + STA.l $7F6200, X + STA.l $7F6300, X + STA.l $7F6400, X + STA.l $7F6500, X + STA.l $7F6600, X + STA.l $7F6700, X + STA.l $7F6800, X + STA.l $7F6900, X + STA.l $7F6A00, X + STA.l $7F6B00, X + STA.l $7F6C00, X + STA.l $7F6D00, X + STA.l $7F6E00, X + STA.l $7F6F00, X RTL ;-------------------------------------------------------------------------------- CopyExtendedSaveFileToWRAM: - PHA - SEP #$30 - LDA $4300 : PHA ; preserve DMA parameters - LDA $4301 : PHA ; preserve DMA parameters - LDA $4302 : PHA ; preserve DMA parameters - LDA $4303 : PHA ; preserve DMA parameters - LDA $4304 : PHA ; preserve DMA parameters - LDA $4305 : PHA ; preserve DMA parameters - LDA $4306 : PHA ; preserve DMA parameters - ;-------------------------------------------------------------------------------- - LDA #$00 : STA $4300 ; set DMA transfer direction A -> B, bus A auto increment, single-byte mode + PHA + SEP #$30 + LDA.w $4300 : PHA ; preserve DMA parameters + LDA.w $4301 : PHA ; preserve DMA parameters + LDA.w $4302 : PHA ; preserve DMA parameters + LDA.w $4303 : PHA ; preserve DMA parameters + LDA.w $4304 : PHA ; preserve DMA parameters + LDA.w $4305 : PHA ; preserve DMA parameters + LDA.w $4306 : PHA ; preserve DMA parameters + ;-------------------------------------------------------------------------------- + STZ.w $4200 ; Disable NMI, V/H, joypad + STZ.w $420C ; Disable HDMA + LDA.b #$00 : STA.w $4300 ; set DMA transfer direction A -> B, bus A auto increment, single-byte mode - LDA #$80 : STA $4301 ; set bus B source to WRAM register + LDA.b #$80 : STA.w $4301 ; set bus B source to WRAM register - LDA #$00 : STA $2181 ; set WRAM register source address - LDA #$60 : STA $2182 - LDA #$7F : STA $2183 + LDA.b #$00 : STA.w $2181 ; set WRAM register source address + LDA.b #$60 : STA.w $2182 + LDA.b #$7F : STA.w $2183 - STZ $4302 ; set bus A destination address to SRAM - LDA #$05 : STA $4303 - LDA #$70 : STA $4304 + STZ.w $4302 ; set bus A destination address to SRAM + LDA.b #$05 : STA.w $4303 + LDA.b #$70 : STA.w $4304 - LDA #$00 : STA $4305 ; set transfer size to 0x1000 - LDA #$10 : STA $4306 ; STZ $4307 + LDA.b #$00 : STA.w $4305 ; set transfer size to 0x1000 + LDA.b #$10 : STA.w $4306 ; STZ $4307 - LDA #$01 : STA $420B ; begin DMA transfer - ;-------------------------------------------------------------------------------- - PLA : STA $4306 ; restore DMA parameters - PLA : STA $4305 ; restore DMA parameters - PLA : STA $4304 ; restore DMA parameters - PLA : STA $4303 ; restore DMA parameters - PLA : STA $4302 ; restore DMA parameters - PLA : STA $4301 ; restore DMA parameters - PLA : STA $4300 ; restore DMA parameters - REP #$30 - PLA - STA $7EC00D ; what we wrote over + LDA.b #$01 : STA.w $420B ; begin DMA transfer + LDA.b #$81 : STA.w $4200 ; Re-enable NMI and joypad + ;-------------------------------------------------------------------------------- + PLA : STA.w $4306 ; restore DMA parameters + PLA : STA.w $4305 ; restore DMA parameters + PLA : STA.w $4304 ; restore DMA parameters + PLA : STA.w $4303 ; restore DMA parameters + PLA : STA.w $4302 ; restore DMA parameters + PLA : STA.w $4301 ; restore DMA parameters + PLA : STA.w $4300 ; restore DMA parameters + REP #$30 + PLA + STA $7EC00D ; what we wrote over RTL ;-------------------------------------------------------------------------------- CopyExtendedWRAMSaveFileToSRAM: - PHA - PHB - SEP #$30 - LDA #$00 : PHA : PLB - LDA $4300 : PHA ; preserve DMA parameters - LDA $4301 : PHA ; preserve DMA parameters - LDA $4302 : PHA ; preserve DMA parameters - LDA $4303 : PHA ; preserve DMA parameters - LDA $4304 : PHA ; preserve DMA parameters - LDA $4305 : PHA ; preserve DMA parameters - LDA $4306 : PHA ; preserve DMA parameters - ;-------------------------------------------------------------------------------- - LDA #$80 : STA $4300 ; set DMA transfer direction B -> A, bus A auto increment, single-byte mode + PHA + PHB + SEP #$30 + LDA #$00 : PHA : PLB + LDA.w $4300 : PHA ; preserve DMA parameters + LDA.w $4301 : PHA ; preserve DMA parameters + LDA.w $4302 : PHA ; preserve DMA parameters + LDA.w $4303 : PHA ; preserve DMA parameters + LDA.w $4304 : PHA ; preserve DMA parameters + LDA.w $4305 : PHA ; preserve DMA parameters + LDA.w $4306 : PHA ; preserve DMA parameters + ;-------------------------------------------------------------------------------- + STZ.w $4200 ; Disable NMI, V/H, joypad + STZ.w $420C ; Disable HDMA + LDA.b #$80 : STA.w $4300 ; set DMA transfer direction B -> A, bus A auto increment, single-byte mode - STA $4301 ; set bus B source to WRAM register + STA.w $4301 ; set bus B source to WRAM register - LDA #$00 : STA $2181 ; set WRAM register source address - LDA #$60 : STA $2182 - LDA #$7F : STA $2183 + LDA.b #$00 : STA.w $2181 ; set WRAM register source address + LDA.b #$60 : STA.w $2182 + LDA.b #$7F : STA.w $2183 - STZ $4302 ; set bus A destination address to SRAM - LDA #$05 : STA $4303 - LDA #$70 : STA $4304 + STZ.w $4302 ; set bus A destination address to SRAM + LDA.b #$05 : STA.w $4303 + LDA.b #$70 : STA.w $4304 - LDA #$10 : STA $4305 ; set transfer size to 0xB00 - LDA #$0B : STA $4306 ; STZ $4307 + LDA.b #$10 : STA.w $4305 ; set transfer size to 0xB00 + LDA.b #$0B : STA.w $4306 ; STZ $4307 - LDA #$01 : STA $420B ; begin DMA transfer - ;-------------------------------------------------------------------------------- - PLA : STA $4306 ; restore DMA parameters - PLA : STA $4305 ; restore DMA parameters - PLA : STA $4304 ; restore DMA parameters - PLA : STA $4303 ; restore DMA parameters - PLA : STA $4302 ; restore DMA parameters - PLA : STA $4301 ; restore DMA parameters - PLA : STA $4300 ; restore DMA parameters - REP #$30 - PLB - PLA + LDA.b #$01 : STA.w $420B ; begin DMA transfer + LDA.b #$81 : STA.w $4200 ; Re-enable NMI and joypad + ;-------------------------------------------------------------------------------- + PLA : STA.w $4306 ; restore DMA parameters + PLA : STA.w $4305 ; restore DMA parameters + PLA : STA.w $4304 ; restore DMA parameters + PLA : STA.w $4303 ; restore DMA parameters + PLA : STA.w $4302 ; restore DMA parameters + PLA : STA.w $4301 ; restore DMA parameters + PLA : STA.w $4300 ; restore DMA parameters + REP #$30 + PLB + PLA RTL diff --git a/sram.asm b/sram.asm index 687e6ba..54ec69f 100644 --- a/sram.asm +++ b/sram.asm @@ -411,9 +411,10 @@ RomVersionSRAM: skip 4 ; ALTTPR ROM version. Low byte is the version, h ; $01 for now (32-bits total) RomNameSRAM: skip 21 ; ROM name from $FFC0, burned in during init (21 bytes) ; If value in the ROM doesn't match SRAM, save is cleared. -skip 4075 ; PasswordSRAM: skip 16 ; Password value (16 bytes) - +skip 8155 ; +SaveBackupSRAM: ; Backup copy of save ram. Game will attempt to use this if + ; checksum on file select screen load fails. base off ;================================================================================ @@ -656,8 +657,9 @@ endmacro %assertSRAM(FileValiditySRAM, $7003E1) %assertSRAM(InverseChecksumSRAM, $7004FE) %assertSRAM(ExtendedFileNameSRAM, $700500) -%assertSRAM(RomNameSRAM, $702000) %assertSRAM(RomVersionSRAM, $701FFC) -%assertSRAM(PasswordSRAM, $703000) +%assertSRAM(RomNameSRAM, $702000) +%assertSRAM(PasswordSRAM, $702015) +%assertSRAM(SaveBackupSRAM, $704000) pullpc From 95ee31f7c9668ee2785a7b2b04887264c8258c5b Mon Sep 17 00:00:00 2001 From: cassidoxa Date: Fri, 29 Jul 2022 22:04:13 -0400 Subject: [PATCH 04/90] Remove some hard coded addresses for MVN instructions --- events.asm | 19 ++++++++++--------- initsramtable.asm | 1 + save.asm | 16 ++++++++-------- sram.asm | 9 +++++++++ 4 files changed, 28 insertions(+), 17 deletions(-) diff --git a/events.asm b/events.asm index 1a729eb..e2988ff 100644 --- a/events.asm +++ b/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 diff --git a/initsramtable.asm b/initsramtable.asm index a93d0c1..00e80d7 100644 --- a/initsramtable.asm +++ b/initsramtable.asm @@ -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 diff --git a/save.asm b/save.asm index f2723be..5dd1285 100644 --- a/save.asm +++ b/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 diff --git a/sram.asm b/sram.asm index 54ec69f..26f2171 100644 --- a/sram.asm +++ b/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 ;================================================================================ From 031e3965b29ce825381deeb4e8fd6e3412a89df9 Mon Sep 17 00:00:00 2001 From: cassidoxa Date: Mon, 8 Aug 2022 13:42:19 -0400 Subject: [PATCH 05/90] Requires frontend changes Change SRAM ammo capacity upgrades to flatly represent max capacity --- capacityupgrades.asm | 40 +++++++++++++++------------------------- initsramtable.asm | 4 ++-- inventory.asm | 4 ++-- newitems.asm | 14 ++++++-------- sram.asm | 8 ++++---- tables.asm | 16 ++++++---------- 6 files changed, 35 insertions(+), 51 deletions(-) diff --git a/capacityupgrades.asm b/capacityupgrades.asm index 73b3c26..f763b7a 100644 --- a/capacityupgrades.asm +++ b/capacityupgrades.asm @@ -2,36 +2,26 @@ ; Capacity Logic ;================================================================================ IncrementBombs: - LDA BombCapacityUpgrades ; get bomb upgrades - !ADD.l StartingMaxBombs : BEQ + ; Skip if we can't have bombs - DEC - - CMP BombsEquipment - - !BLT + - LDA BombsEquipment - CMP.b #99 : !BGE + - INC : STA BombsEquipment - + + LDA.l BombCapacity : BEQ + ; Skip if we can't have bombs + DEC + CMP.l BombsEquipment : !BLT + + LDA.l BombsEquipment + CMP.b #99 : !BGE + + INC : STA.l BombsEquipment + + RTL ;-------------------------------------------------------------------------------- IncrementArrows: - LDA ArrowCapacityUpgrades ; get arrow upgrades - !ADD.l StartingMaxArrows : DEC - - CMP CurrentArrows - - !BLT + - LDA CurrentArrows - CMP.b #99 : !BGE + - INC : STA CurrentArrows - + + LDA.l ArrowCapacity : DEC + CMP.l CurrentArrows : !BLT + + LDA.l CurrentArrows + CMP.b #99 : !BGE + + INC : STA.l CurrentArrows + + RTL ;-------------------------------------------------------------------------------- CompareBombsToMax: - LDA BombCapacityUpgrades ; get bomb upgrades - !ADD.l StartingMaxBombs - - CMP BombsEquipment + LDA.l BombCapacity + CMP.l BombsEquipment RTL ;-------------------------------------------------------------------------------- diff --git a/initsramtable.asm b/initsramtable.asm index 00e80d7..db09b08 100644 --- a/initsramtable.asm +++ b/initsramtable.asm @@ -82,8 +82,8 @@ StartingHealth: db $18 ; PC 0x18336C StartingMaximumHealth: db $18 ; PC 0x18336D StartingMagic: skip 1 ; PC 0x18336E StartingSmallKeys: db $FF ; PC 0x18336F -StartingBombCapacityUpgrade: skip 1 ; PC 0x183370 -StartingArrowCapacityUpgrade: skip 1 ; PC 0x183371 +StartingBombCapacity: db $0A ; PC 0x183370 +StartingArrowCapacity: db $1E ; PC 0x183371 InitHeartsFiller: skip 1 ; PC 0x183372 InitMagicFiller: skip 1 ; PC 0x183373 StartingPendants: skip 1 ; PC 0x183374 diff --git a/inventory.asm b/inventory.asm index eb4ac00..2c0a3ad 100644 --- a/inventory.asm +++ b/inventory.asm @@ -695,7 +695,7 @@ RTS ;-------------------------------------------------------------------------------- Link_ReceiveItem_HUDRefresh: LDA BombsEquipment : BNE + ; skip if we have bombs - LDA BombCapacityUpgrades : !ADD.l StartingMaxBombs : BEQ + ; skip if we can't have bombs + LDA BombCapacity : BEQ + ; skip if we can't have bombs LDA BombsFiller : BEQ + ; skip if we are filling no bombs DEC : STA BombsFiller ; decrease bomb fill count LDA.b #$01 : STA BombsEquipment ; increase actual bomb count @@ -712,7 +712,7 @@ RTL HandleBombAbsorbtion: STA BombsFiller ; thing we wrote over LDA $0303 : BNE + ; skip if we already have some item selected - LDA BombCapacityUpgrades : !ADD.l StartingMaxBombs : BEQ + ; skip if we can't have bombs + LDA BombCapacity : BEQ + ; skip if we can't have bombs LDA.b #$04 : STA $0202 ; set selected item to bombs LDA.b #$01 : STA $0303 ; set selected item to bombs JSL.l HUD_RebuildLong diff --git a/newitems.asm b/newitems.asm index b38ce57..4492761 100755 --- a/newitems.asm +++ b/newitems.asm @@ -208,13 +208,11 @@ AddReceivedItemExpandedGetItem: LDA BowTracking : ORA #$40 : STA BowTracking ; mark silver bow on y-toggle JMP .done + CMP.b #$4C : BNE + ; 50 bombs - ;LDA.b #$07 : STA BombCapacityUpgrades ; upgrade bombs - LDA.b #50 : !SUB.l StartingMaxBombs : STA BombCapacityUpgrades ; upgrade bombs + LDA.b #50 : STA BombCapacity ; upgrade bombs LDA.b #50 : STA BombsFiller ; fill bombs JMP .done + CMP.b #$4D : BNE + ; 70 arrows - ;LDA #$07 : STA ArrowCapacityUpgrades ; upgrade arrows - LDA.b #70 : !SUB.l StartingMaxArrows : STA ArrowCapacityUpgrades ; upgrade arrows + LDA.b #70 : STA ArrowCapacity ; upgrade arrows LDA.b #70 : STA ArrowsFiller ; fill arrows JMP .done + CMP.b #$4E : BNE + ; 1/2 magic @@ -232,19 +230,19 @@ AddReceivedItemExpandedGetItem: LDA.b #$02 : STA SwordEquipment ; set master sword JMP .done + CMP.b #$51 : BNE + ; +5 Bombs - LDA BombCapacityUpgrades : !ADD.b #$05 : STA BombCapacityUpgrades ; upgrade bombs +5 + LDA BombCapacity : !ADD.b #$05 : STA BombCapacity ; upgrade bombs +5 LDA.l Upgrade5BombsRefill : STA BombsFiller ; fill bombs JMP .done + CMP.b #$52 : BNE + ; +10 Bombs - LDA BombCapacityUpgrades : !ADD.b #$0A : STA BombCapacityUpgrades ; upgrade bombs +10 + LDA BombCapacity : !ADD.b #$0A : STA BombCapacity ; upgrade bombs +10 LDA.l Upgrade10BombsRefill : STA BombsFiller ; fill bombs JMP .done + CMP.b #$53 : BNE + ; +5 Arrows - LDA ArrowCapacityUpgrades : !ADD.b #$05 : STA ArrowCapacityUpgrades ; upgrade arrows +5 + LDA ArrowCapacity : !ADD.b #$05 : STA ArrowCapacity ; upgrade arrows +5 LDA.l Upgrade5ArrowsRefill : STA ArrowsFiller ; fill arrows JMP .done + CMP.b #$54 : BNE + ; +10 Arrows - LDA ArrowCapacityUpgrades : !ADD.b #$0A : STA ArrowCapacityUpgrades ; upgrade arrows +10 + LDA ArrowCapacity : !ADD.b #$0A : STA ArrowCapacity ; upgrade arrows +10 LDA.l Upgrade10ArrowsRefill : STA ArrowsFiller ; fill arrows JMP .done + CMP.b #$55 : BNE + ; Programmable Object 1 diff --git a/sram.asm b/sram.asm index 26f2171..9ca097e 100644 --- a/sram.asm +++ b/sram.asm @@ -126,8 +126,8 @@ MaximumHealth: skip 1 ; \ Max Health & Current Health CurrentHealth: skip 1 ; / Max value for both is $A0 | $04 = half heart | $08 = heart CurrentMagic: skip 1 ; Current magic | Max value is $80 CurrentSmallKeys: skip 1 ; Number of small keys held for current dungeon (integer) -BombCapacityUpgrades: skip 1 ; \ Bomb & Arrow Capacity Upgrades -ArrowCapacityUpgrades: skip 1 ; / Indicates flatly how many can be held above vanilla max (integers) +BombCapacity: skip 1 ; \ Bomb & Arrow Capacity Upgrades +ArrowCapacity: skip 1 ; / Indicates flatly how many can be held (integers) HeartsFiller: skip 1 ; Hearts collected yet to be filled. Write in multiples of $08 MagicFiller: skip 1 ; Magic collected yet to be filled PendantsField: skip 1 ; - - - - - g b r (bitfield) @@ -483,8 +483,8 @@ endmacro %assertSRAM(CurrentHealth, $7EF36D) %assertSRAM(CurrentMagic, $7EF36E) %assertSRAM(CurrentSmallKeys, $7EF36F) -%assertSRAM(BombCapacityUpgrades, $7EF370) -%assertSRAM(ArrowCapacityUpgrades, $7EF371) +%assertSRAM(BombCapacity, $7EF370) +%assertSRAM(ArrowCapacity, $7EF371) %assertSRAM(HeartsFiller, $7EF372) %assertSRAM(MagicFiller, $7EF373) %assertSRAM(PendantsField, $7EF374) diff --git a/tables.asm b/tables.asm index 0a6c3c2..86f4664 100644 --- a/tables.asm +++ b/tables.asm @@ -110,11 +110,7 @@ org $308033 ; PC 0x180033 HeartBeep: db #$20 ; #$00 = Off - #$20 = Normal (default) - #$40 = Half Speed - #$80 = Quarter Speed ;-------------------------------------------------------------------------------- -org $308034 ; PC 0x180034 - 0x180035 -StartingMaxBombs: -db #10 ; #10 = Default (10 decimal) -StartingMaxArrows: -db #30 ; #30 = Default (30 decimal) +; 0x180034 - 0x180035 (Unused) ;-------------------------------------------------------------------------------- org $308036 ; PC 0x180036 - 0x180037 RupoorDeduction: @@ -332,15 +328,15 @@ db $00 ; ;Warp BL : 7A ;Warp BR : 7B ;-------------------------------------------------------------------------------- -org $308080 ; PC 0x180080 - 0x180083 +org $308080 ; PC 0x180080 - 0x180083 ; Default to fill on upgrade. Can be set to 0 to not fill. Upgrade5BombsRefill: -db #$00 +db #$32 Upgrade10BombsRefill: -db #$00 +db #$32 Upgrade5ArrowsRefill: -db #$00 +db #$46 Upgrade10ArrowsRefill: -db #$00 +db #$46 ;-------------------------------------------------------------------------------- org $308084 ; PC 0x180084 - 0x180085 PotionHealthRefill: From f8d9be201a71ec239c8a0dba9d29bf294d7b5016 Mon Sep 17 00:00:00 2001 From: cassidoxa Date: Fri, 9 Sep 2022 19:30:16 -0400 Subject: [PATCH 06/90] tables.asm: Add GFX pointer to table in utilities.asm --- tables.asm | 8 +++++++- utilities.asm | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tables.asm b/tables.asm index 86f4664..02f66fd 100644 --- a/tables.asm +++ b/tables.asm @@ -1064,8 +1064,14 @@ db $00, $00, $00 org $308358 AllowAccidentalMajorGlitch: db $00 +;-------------------------------------------------------------------------------- +; GFX pointer (0x180359 - 0x18035B) +; For 3rd party sprite stuff +;-------------------------------------------------------------------------------- +org $308359 +dl GfxPalettes ;================================================================================ -; 0x180359 - 0x1814FF (unused) +; 0x18035C - 0x1814FF (unused) ;================================================================================ ; $309500 (0x181500) - $309FFF (0x181FFF) original 0x39C bytes ; Replacement Ending Sequence Text Data diff --git a/utilities.asm b/utilities.asm index 87a69e4..1611e82 100644 --- a/utilities.asm +++ b/utilities.asm @@ -175,7 +175,7 @@ GetSpritePalette: PHX PHB : PHK : PLB ;-------- - TAX : LDA.l .gfxPalettes, X ; look up item gfx + TAX : LDA.l GfxPalettes, X ; look up item gfx PLB : PLX CMP.b #$F8 : !BGE .specialHandling RTL @@ -236,7 +236,7 @@ RTL ;DATA - Loot Identifier to Sprite Palette { - .gfxPalettes +GfxPalettes: db $00, $04, $02, $08, $04, $02, $08, $02 db $04, $02, $02, $02, $04, $04, $04, $08 From 651d00d32058c8e35f0bc6f747fce531330c35a8 Mon Sep 17 00:00:00 2001 From: cassidoxa Date: Sun, 9 Oct 2022 17:09:43 -0400 Subject: [PATCH 07/90] Progressive shields, swords, and mail use highest item level to determine upgrade --- newitems.asm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/newitems.asm b/newitems.asm index 4492761..2891759 100755 --- a/newitems.asm +++ b/newitems.asm @@ -449,7 +449,7 @@ AddReceivedItemExpanded: LDA.b #$4F : STA $02D8 +++ : JMP .done ++ : CMP.b #$5E : BNE ++ ; Progressive Sword - LDA SwordEquipment : CMP.l ProgressiveSwordLimit : !BLT + + LDA HighestSword : CMP.l ProgressiveSwordLimit : !BLT + LDA.l ProgressiveSwordReplacement : STA $02D8 : JMP .done + : CMP.b #$00 : BNE + ; No Sword LDA.b #$49 : STA $02D8 : JMP .done @@ -460,7 +460,7 @@ AddReceivedItemExpanded: + ; Everything Else LDA.b #$03 : STA $02D8 : JMP .done ++ : CMP.b #$5F : BNE ++ ; Progressive Shield - LDA ShieldEquipment : CMP.l ProgressiveShieldLimit : !BLT + + LDA HighestShield : CMP.l ProgressiveShieldLimit : !BLT + LDA.l ProgressiveShieldReplacement : STA $02D8 : JMP .done + : CMP.b #$00 : BNE + ; No Shield LDA.b #$04 : STA $02D8 : JMP .done @@ -469,7 +469,7 @@ AddReceivedItemExpanded: + ; Everything Else LDA.b #$06 : STA $02D8 : JMP .done ++ : CMP.b #$60 : BNE ++ ; Progressive Armor - LDA ArmorEquipment : CMP.l ProgressiveArmorLimit : !BLT + + LDA HighestMail : CMP.l ProgressiveArmorLimit : !BLT + LDA.l ProgressiveArmorReplacement : STA $02D8 : JMP .done + : CMP.b #$00 : BNE + ; No Armor LDA.b #$22 : STA $02D8 : JMP .done From dbf674c9fd376b5fe4f6552a40ad1fcaf371f1a9 Mon Sep 17 00:00:00 2001 From: cassidoxa Date: Thu, 20 Oct 2022 14:47:04 -0400 Subject: [PATCH 08/90] darkworldspawn: Add check for old man to fix post-aga spawn bug --- darkworldspawn.asm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/darkworldspawn.asm b/darkworldspawn.asm index 637dd52..3ec0293 100644 --- a/darkworldspawn.asm +++ b/darkworldspawn.asm @@ -11,10 +11,11 @@ DoWorldFix: JMP DoWorldFix_Inverted + LDA.l Bugfix_MirrorlessSQToLW : BEQ .skip_mirror_check + LDA.l FollowerIndicator : CMP #$04 : BEQ .setLightWorld ; check if old man is following LDA MirrorEquipment : BEQ .noMirror ; check if we have the mirror .skip_mirror_check ; alt entrance point LDA ProgressIndicator : CMP.b #$03 : BCS .done ; check if agahnim 1 is alive - .aga1Alive + .setLightWorld LDA #$00 .noMirror STA CurrentWorld ; set flag to light world @@ -46,11 +47,11 @@ RTL ;================================================================================ DoWorldFix_Inverted: LDA.l Bugfix_MirrorlessSQToLW : BEQ .skip_mirror_check - LDA MirrorEquipment : BEQ .noMirror ; check if we have the mirror + LDA.l FollowerIndicator : CMP #$04 : BEQ .setDarkWorld ; check if old man is following + LDA MirrorEquipment : BEQ .setDarkWorld ; check if we have the mirror .skip_mirror_check ; alt entrance point LDA ProgressIndicator : CMP.b #$03 : BCS .done ; check if agahnim 1 is alive - .noMirror - .aga1Alive + .setDarkWorld LDA #$40 : STA CurrentWorld ; set flag to dark world LDA FollowerIndicator CMP #$07 : BEQ .clear ; clear frog From cafb0908a05fb3fc963e40e3d7be2c5b801f1364 Mon Sep 17 00:00:00 2001 From: cassidoxa Date: Sun, 23 Oct 2022 22:02:36 -0400 Subject: [PATCH 09/90] Introduce bound to QS loop to prevent infinite loop on last bomb loss Move !INFINITE_BOMB define to ram.asm, replace with labels --- darkworldspawn.asm | 5 ++--- events.asm | 2 +- newhud.asm | 3 +-- quickswap.asm | 14 ++++++++++++++ ram.asm | 2 ++ retro.asm | 45 ++++++++++++++++++--------------------------- 6 files changed, 38 insertions(+), 33 deletions(-) diff --git a/darkworldspawn.asm b/darkworldspawn.asm index 3ec0293..f83a094 100644 --- a/darkworldspawn.asm +++ b/darkworldspawn.asm @@ -131,19 +131,18 @@ RefreshRainAmmo: RTL ;-------------------------------------------------------------------------------- !INFINITE_ARROWS = "$7F50C8" -!INFINITE_BOMBS = "$7F50C9" !INFINITE_MAGIC = "$7F50CA" SetEscapeAssist: LDA ProgressIndicator : CMP.b #$01 : BNE .no_train ; check if we're in rain state .rain LDA.l EscapeAssist BIT.b #$04 : BEQ + : STA !INFINITE_MAGIC : + - BIT.b #$02 : BEQ + : STA !INFINITE_BOMBS : + + BIT.b #$02 : BEQ + : STA InfiniteBombs : + BIT.b #$01 : BEQ + : STA !INFINITE_ARROWS : + BRA ++ .no_train ; choo choo LDA.l EscapeAssist : BIT.b #$04 : BEQ + : LDA.b #$00 : STA !INFINITE_MAGIC : + - LDA.l EscapeAssist : BIT.b #$02 : BEQ + : LDA.b #$00 : STA !INFINITE_BOMBS : + + LDA.l EscapeAssist : BIT.b #$02 : BEQ + : LDA.b #$00 : STA InfiniteBombs : + LDA.l EscapeAssist : BIT.b #$01 : BEQ + : LDA.b #$00 : STA !INFINITE_ARROWS : + ++ RTL diff --git a/events.asm b/events.asm index e2988ff..7d9f6a6 100644 --- a/events.asm +++ b/events.asm @@ -60,7 +60,7 @@ OnUncleItemGet: LDA.l EscapeAssist BIT.b #$04 : BEQ + : STA !INFINITE_MAGIC : + - BIT.b #$02 : BEQ + : STA !INFINITE_BOMBS : + + BIT.b #$02 : BEQ + : STA InfiniteBombs : + BIT.b #$01 : BEQ + : STA !INFINITE_ARROWS : + PLA diff --git a/newhud.asm b/newhud.asm index 6b78fa8..db4d144 100644 --- a/newhud.asm +++ b/newhud.asm @@ -3,10 +3,9 @@ SEP #$30 ;================================================================================ ; Draw bomb count !BOMBCOUNT_DRAW_ADDRESS = "$7EC75A" -!INFINITE_BOMBS = "$7F50C9" ;================================================================================ - LDA !INFINITE_BOMBS : BNE .infinite_bombs + LDA.l InfiniteBombs : BNE .infinite_bombs .finite_bombs LDA.l BombsEquipment ; bombs JSR HudHexToDec2Digit ;requires 8 bit registers! diff --git a/quickswap.asm b/quickswap.asm index 1331614..a69f7ce 100644 --- a/quickswap.asm +++ b/quickswap.asm @@ -11,6 +11,7 @@ QuickSwap: LDA.l QuickSwapFlag : BEQ .done LDA.w $0202 : BEQ .done ; Skip everything if we don't have any items + LDY.b #$14 PHX XBA ; restore the stashed value CMP.b #$30 : BNE + @@ -58,8 +59,10 @@ RCode: - + CPX.b #$14 : BNE + : LDX.b #$00 ;will wrap around to 1 + INX + DEY : BEQ + .nextItem JSL.l IsItemAvailable : BEQ - + + RTS LCode: @@ -73,6 +76,17 @@ LCode: - + CPX.b #$01 : BNE + : LDX.b #$15 ; will wrap around to $14 + DEX + DEY : BEQ + .nextItem JSL.l IsItemAvailable : BEQ - + + RTS + +IsItemAvailable: + LDA.l InfiniteBombs : BEQ .finite + .infinite + CPX.b #$04 : BNE .finite + LDA.b #$01 : RTL + .finite + LDA.l EquipmentWRAM-1, X +RTL diff --git a/ram.asm b/ram.asm index 3510b8f..efaa68b 100644 --- a/ram.asm +++ b/ram.asm @@ -6,6 +6,7 @@ ;-------------------------------------------------------------------------------- ; Placeholder and for compass item max count allocations, still WIP ;-------------------------------------------------------------------------------- +InfiniteBombs = $7F50C9 CompassTotalsWRAM = $7F5410 ;================================================================================ @@ -15,4 +16,5 @@ macro assertRAM(label, address) assert