Merge pull request #151 from cassidoxa/rom_version

Add ROM version to unused hw vector and before filename in SRAM
This commit is contained in:
Lexi Rose
2021-12-07 15:18:24 -06:00
committed by GitHub
2 changed files with 17 additions and 1 deletions

View File

@@ -27,6 +27,15 @@ db #$00 ; expand file to 2mb
org $1FFFF8 ; <- FFFF8 timestamp rom
db #$20, #$19, #$08, #$31 ; year/month/day
;================================================================================
!ROM_VERSION_LOW ?= 1 ; ROM version (two 16-bit integers)
!ROM_VERSION_HIGH ?= 1 ;
org $00FFE0 ; Unused hardware vector
RomVersion:
dw !ROM_VERSION_LOW
dw !ROM_VERSION_HIGH
;================================================================================
!ADD = "CLC : ADC"

View File

@@ -1,3 +1,5 @@
RomVersionSRAM = $701FFC
;--------------------------------------------------------------------------------
; Init_Primary
;--------------------------------------------------------------------------------
@@ -39,6 +41,11 @@ Init_Primary:
LDA $00FFC0, X : STA $702000, X
INX
CPX #$15 : !BLT -
LDX #$00
-
LDA RomVersion, X : STA RomVersionSRAM, X
INX
CPX #$04 : !BLT -
.done
REP #$20
@@ -63,4 +70,4 @@ Init_PostRAMClear:
JSL MSUInit
JSL InitRNGPointerTable
JML $00D463 ; The original target of the jump table that we hijacked
JML $00D463 ; The original target of the jump table that we hijacked