mirror of
https://github.com/a2-4am/4cade.git
synced 2024-11-27 08:50:01 +00:00
set LC RAM bank after Reenter, fix MachineStatus confusion
This commit is contained in:
parent
23844487b8
commit
52f55fb682
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -56,7 +56,7 @@ SoftBell
|
||||
; out: $0106..$011F clobbered
|
||||
;------------------------------------------------------------------------------
|
||||
Home
|
||||
lda oldstatus
|
||||
lda MachineStatus
|
||||
and #SUPPORTS_SHR
|
||||
beq @noSHR
|
||||
lda $C035
|
||||
|
Loading…
Reference in New Issue
Block a user