mirror of
https://github.com/a2-4am/4cade.git
synced 2025-02-05 21:33:34 +00:00
reduce memory copy during launch
This commit is contained in:
parent
5a99dbcc40
commit
fd4a0cd7ba
@ -20,15 +20,15 @@
|
||||
; LC RAM BANK 2
|
||||
; D000..D5FF - ProRWTS data
|
||||
; D600..D8BD - ProRWTS code
|
||||
; D8BE..DC76 - ProRWTS glue code
|
||||
; DC77..DC7C - backup of stack (during gameplay and self-running demos)
|
||||
; DC7D..DC82 - okvs cache (attract state saved across self-running demo)
|
||||
; D8BE..DCB7 - ProRWTS glue code
|
||||
; DCB8..DCBD - backup of stack (during gameplay and self-running demos)
|
||||
; DCBE..DCC2 - okvs cache (attract state saved across self-running demo)
|
||||
; ...unused...
|
||||
; DFB4..DFFF - (de)acceleration function
|
||||
;
|
||||
; MAIN MEMORY DURING SEARCH/BROWSE MODE
|
||||
; 6000..9FFF - search index (489 games = $3AEB/$4000)
|
||||
; A000..BCFF - search cache (489 games = $1957/$1D00)
|
||||
; 6000..9FFF - search index (499 games = $3C3C/$4000)
|
||||
; A000..BCFF - search cache (499 games = $1837/$1D00)
|
||||
; BD00..BEFF - prefs buffer (used to write PREFS.CONF if cheat mode changes)
|
||||
; BF00..BFFF - ProRWTS glue (supports LoadIndexedFile)
|
||||
;
|
||||
@ -237,7 +237,7 @@ ldrhi2 = $65 ; constant
|
||||
|
||||
; Columns and Dangerous Dave also call (de)accelerator functions directly
|
||||
|
||||
PrelaunchInit = $C9
|
||||
PrelaunchInit = $EB
|
||||
|
||||
_CONSTANTS_=*
|
||||
}
|
||||
|
@ -30,10 +30,7 @@ LaunchInternal
|
||||
- sta $bf57,y
|
||||
dey
|
||||
bne -
|
||||
jmp PrelaunchInit
|
||||
|
||||
PrelaunchInitInternal
|
||||
!pseudopc PrelaunchInit {
|
||||
ldx #RNDSEED-1 ; wipe lower part of zero page
|
||||
txa
|
||||
- sta $00,x
|
||||
@ -45,20 +42,22 @@ PrelaunchInitInternal
|
||||
lda #$02 ; require these to be non-zero. Ask me
|
||||
sta RNDSEED+1 ; how long that one took to debug.
|
||||
|
||||
+READ_ROM_NO_WRITE
|
||||
sta STOREOFF
|
||||
sta READMAINMEM
|
||||
sta WRITEMAINMEM
|
||||
sta CLR80VID
|
||||
sta PRIMARYCHARSET
|
||||
bit CLEARKBD
|
||||
jmp PrelaunchInit
|
||||
|
||||
PrelaunchInitInternal
|
||||
!pseudopc PrelaunchInit {
|
||||
+READ_ROM_NO_WRITE
|
||||
jsr ROM_IN0 ; Initialize machine like a cold boot.
|
||||
jsr ROM_PR0 ; Many games assume a 'clean slate' and
|
||||
jsr ROM_NORMAL ; rely on zero page values set by these
|
||||
sta STOREOFF ; ROM routines,
|
||||
sta READMAINMEM ; e.g. Wavy Navy just prints out text via
|
||||
sta WRITEMAINMEM ; $FDED and expects it to work. Having it
|
||||
sta CLR80VID ; print all null characters is amusing, in
|
||||
sta PRIMARYCHARSET ; a quiet way, but not really helpful.
|
||||
jsr ROM_TEXT
|
||||
jsr ROM_HOME
|
||||
|
||||
bit CLEARKBD
|
||||
jsr ROM_TEXT ; ROM routines, e.g. Wavy Navy prints text
|
||||
jsr ROM_HOME ; via $FDED and expects it to work.
|
||||
sei
|
||||
bvc $106 ; unconditional jump to game-specific pre-launch code
|
||||
!if * != $100 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user