set main zp/stack on launch because some games use aux zp and some emulators don't reset it

This commit is contained in:
4am 2024-06-12 16:26:32 -04:00
parent 3a269e9362
commit 6a80e6f083
2 changed files with 13 additions and 9 deletions

View File

@ -13,3 +13,4 @@
sta STOREOFF
sta READMAINMEM
sta WRITEMAINMEM
sta SETSTDZP

View File

@ -77,16 +77,19 @@
; soft switches
KBD = $C000 ; last key pressed (if any)
CLEARKBD = $C010 ; clear last key pressed
STOREOFF = $C000 ; STA then use the following 4 flags:
READMAINMEM = $C002 ; STA to read from main mem
READAUXMEM = $C003 ; STA to read from aux mem
WRITEMAINMEM = $C004 ; STA to write to main mem
WRITEAUXMEM = $C005 ; STA to write to aux mem
STOREOFF = $C000 ; STA then use the following flags:
READMAINMEM = $C002 ; STA to read from main mem ($0200..$BFFF)
READAUXMEM = $C003 ; STA to read from aux mem ($0200..$BFFF)
WRITEMAINMEM = $C004 ; STA to write to main mem ($0200..$BFFF)
WRITEAUXMEM = $C005 ; STA to write to aux mem ($0200..$BFFF)
SETSTDZP = $C008 ; STA to r/w from main mem stack and zero page ($0000..$01FF)
CLRC3ROM = $C00A ; STA to use internal Slot 3 ROM (required to use 128K and DHGR)
SETC3ROM = $C00B ; STA to use external Slot 3 ROM (required to detect VidHD in slot 3)
CLR80VID = $C00C ; 40 columns (also used to get out of DHGR mode)
SET80VID = $C00D ; 80 columns (also used to get into DHGR mode)
PRIMARYCHARSET= $C00E ; no mousetext for you
CLR80VID = $C00C ; STA to use 40 columns (also used to get out of DHGR mode)
SET80VID = $C00D ; STA to use 80 columns (also used to get into DHGR mode)
PRIMARYCHARSET= $C00E ; STA to use no-mousetext character set
SLOT3STATUS = $C017 ; bit 7 only
MONOCOLOR = $C021 ; IIgs bit 7 switches composite mono/color modes
TBCOLOR = $C022 ; IIgs text foreground and background colors (also VidHD but write-only)
@ -162,7 +165,7 @@ gVal = $1F81 ; ""
UILine1 = $1FB0 ; used by DrawUI
UILine2 = $1FD8 ; ""
UI_ToPlay = $1FF7 ; ""
ProBootEntry = $2025 ; used by ProBoot
ProBootEntry = $2028 ; used by ProBoot
gSearchIndex = $6000
gSearchCache = $A000
gPathname = $BFD0 ; used by SetPath/AddToPath