diff --git a/src/4cade.a b/src/4cade.a index d69f4c6a4..cdcfe0e9c 100644 --- a/src/4cade.a +++ b/src/4cade.a @@ -43,7 +43,6 @@ Reenter cli +READ_RAM2_WRITE_RAM2 jsr CloseHandles ; close any open handles to restore ProRWTS - ; (also switches to LC RAM bank 1) jsr SaveOrRestoreScreenHoles ; restore original screen hole contents RestoreStackNextTime clc ; SMC @@ -61,6 +60,7 @@ RestoreStackNextTime bne - ldx $DF00 ; restore stack pointer txs + +READ_RAM1_WRITE_RAM1 rts ; and return to caller ; these routines will only be called after relocating to language card @@ -79,6 +79,8 @@ RestoreStackNextTime !source "src/parse.prefs.a" !source "src/ui.font.a" !source "src/ui.common.a" +MachineStatus + !byte 0 gGlobalPrefsStore !word $D000 ; address of first okvs store gGamesListStore diff --git a/src/4cade.init.a b/src/4cade.init.a index 846cf7bad..1be8211a5 100644 --- a/src/4cade.init.a +++ b/src/4cade.init.a @@ -18,13 +18,13 @@ bcs @no64K jsr DisableAccelerator ; set to 1 MHz (supports IIgs and many common accelerator cards) jsr IsGS ; check for IIgs (allows super hi-res artwork) - ror MachineStatus + ror zpMachineStatus jsr HasVidHDCard ; check for VidHD card (allows super hi-res artwork even on non-IIgs machines) - ror MachineStatus + ror zpMachineStatus jsr Has128K ; check for 128K (allows DHGR slideshows and 128K games) - ror MachineStatus + ror zpMachineStatus jsr HasJoystick ; check for joystick (absence is OK but we filter out some games that require a joystick) - ror MachineStatus ; now bit 4 = 1 if IIgs + ror zpMachineStatus ; now bit 4 = 1 if IIgs ; bit 5 = 1 if VidHD ; bit 6 = 1 if 128K ; bit 7 = 1 if joystick @@ -81,8 +81,8 @@ ProRWTSBuffer ; until after ProRWTS initialization OneTimeSetup - lda MachineStatus - sta oldstatus + lda zpMachineStatus + sta MachineStatus ; save machine status jsr SaveOrRestoreScreenHoles ; save initial copy of screen hole content lda #$91 sta holepatch ; enable restoring of copy from now on diff --git a/src/constants.a b/src/constants.a index 06c4249f3..0f7ec9aa7 100644 --- a/src/constants.a +++ b/src/constants.a @@ -39,10 +39,11 @@ SAVE = $08 HTAB = $24 VTAB = $25 Timeout = $ED ; 3 bytes (used by SearchMode) -MachineStatus =$F0 ; bit 7 = 1 if machine has joystick +zpMachineStatus= $F0 ; bit 7 = 1 if machine has joystick ; bit 6 = 1 if machine has 128K ; bit 5 = 1 if machine has a VidHD card ; bit 4 = 1 if machine is a IIgs + ; only used during init, then copied to MachineStatus in LC RAM ; $FE ; used by ParseGamesList ; $FF ; used by ParseGamesList diff --git a/src/glue.prorwts2.a b/src/glue.prorwts2.a index 666c1fe4a..bba176a44 100644 --- a/src/glue.prorwts2.a +++ b/src/glue.prorwts2.a @@ -388,13 +388,7 @@ holepatch ;sta->lda inc namhi dec bloklo bne -- - lda oldstatus - ldx MachineStatus - sta MachineStatus - sta oldstatus rts -oldstatus - !byte 0 holey_stuff !fill 64 diff --git a/src/parse.games.a b/src/parse.games.a index 8f5d637e4..6ff457423 100644 --- a/src/parse.games.a +++ b/src/parse.games.a @@ -61,7 +61,7 @@ ParseGamesList beq @filterOnMemory cmp #$31 ; not '0' or '1' or '[' or CR -> ignore entire line (e.g. comment) bne @skipLine - bit MachineStatus + bit zpMachineStatus bpl @skipLine ; game requires joystick but we don't have one, so ignore entire line @filterOnMemory jsr IncAndGetChar ; get second filter character ('1' if game requires 128K) @@ -69,7 +69,7 @@ ParseGamesList beq @swallowComma cmp #$31 ; not '0' or '1' -> ignore entire line bne @skipLine - bit MachineStatus + bit zpMachineStatus bvc @skipLine ; game requires 128K but we only have 64K, so ignore entire line @swallowComma jsr IncAndGetChar diff --git a/src/ui.attract.dhgr.a b/src/ui.attract.dhgr.a index d8ee44c27..964a0e485 100644 --- a/src/ui.attract.dhgr.a +++ b/src/ui.attract.dhgr.a @@ -12,7 +12,7 @@ !zone { DHGRTitleSlideshow - bit oldstatus ; only run DHGR slideshow if we have 128K + bit MachineStatus ; only run DHGR slideshow if we have 128K bvs + rts + jsr .LoadDHGRTransition ; load transition effect code at $6000 @@ -23,7 +23,7 @@ DHGRTitleSlideshow jmp BlankHGR ; switch back to HGR mode with initial blank screen on exit DHGRActionSlideshow - bit oldstatus ; only run DHGR slideshow if we have 128K + bit MachineStatus ; only run DHGR slideshow if we have 128K bvs + rts + jsr .LoadDHGRTransition ; load transition effect code at $6000 @@ -34,7 +34,7 @@ DHGRActionSlideshow jmp BlankHGR ; switch back to HGR mode with initial blank screen on exit DHGRSingle - bit oldstatus ; only show DHGR screenshots if we have 128K + bit MachineStatus ; only show DHGR screenshots if we have 128K bvs + rts + jsr SetPath ; A/Y point to path diff --git a/src/ui.attract.shr.a b/src/ui.attract.shr.a index fb7ca49aa..712e65fd8 100644 --- a/src/ui.attract.shr.a +++ b/src/ui.attract.shr.a @@ -11,7 +11,7 @@ !zone { SHRSlideshow - lda oldstatus ; only show SHR on IIgs or if we have a VidHD card + lda MachineStatus ; only show SHR on IIgs or if we have a VidHD card and #SUPPORTS_SHR bne + rts @@ -23,7 +23,7 @@ SHRSlideshow SHRSingle +STAY SAVE - lda oldstatus ; only show SHR on IIgs or if we have a VidHD card + lda MachineStatus ; only show SHR on IIgs or if we have a VidHD card and #SUPPORTS_SHR bne + rts diff --git a/src/ui.common.a b/src/ui.common.a index bf47cf512..afb6e040e 100644 --- a/src/ui.common.a +++ b/src/ui.common.a @@ -56,7 +56,7 @@ SoftBell ; out: $0106..$011F clobbered ;------------------------------------------------------------------------------ Home - lda oldstatus + lda MachineStatus and #SUPPORTS_SHR beq @noSHR lda $C035