mirror of
https://github.com/a2-4am/4cade.git
synced 2024-11-24 03:34:02 +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
|
cli
|
||||||
+READ_RAM2_WRITE_RAM2
|
+READ_RAM2_WRITE_RAM2
|
||||||
jsr CloseHandles ; close any open handles to restore ProRWTS
|
jsr CloseHandles ; close any open handles to restore ProRWTS
|
||||||
; (also switches to LC RAM bank 1)
|
|
||||||
jsr SaveOrRestoreScreenHoles ; restore original screen hole contents
|
jsr SaveOrRestoreScreenHoles ; restore original screen hole contents
|
||||||
RestoreStackNextTime
|
RestoreStackNextTime
|
||||||
clc ; SMC
|
clc ; SMC
|
||||||
@ -61,6 +60,7 @@ RestoreStackNextTime
|
|||||||
bne -
|
bne -
|
||||||
ldx $DF00 ; restore stack pointer
|
ldx $DF00 ; restore stack pointer
|
||||||
txs
|
txs
|
||||||
|
+READ_RAM1_WRITE_RAM1
|
||||||
rts ; and return to caller
|
rts ; and return to caller
|
||||||
|
|
||||||
; these routines will only be called after relocating to language card
|
; these routines will only be called after relocating to language card
|
||||||
@ -79,6 +79,8 @@ RestoreStackNextTime
|
|||||||
!source "src/parse.prefs.a"
|
!source "src/parse.prefs.a"
|
||||||
!source "src/ui.font.a"
|
!source "src/ui.font.a"
|
||||||
!source "src/ui.common.a"
|
!source "src/ui.common.a"
|
||||||
|
MachineStatus
|
||||||
|
!byte 0
|
||||||
gGlobalPrefsStore
|
gGlobalPrefsStore
|
||||||
!word $D000 ; address of first okvs store
|
!word $D000 ; address of first okvs store
|
||||||
gGamesListStore
|
gGamesListStore
|
||||||
|
@ -18,13 +18,13 @@
|
|||||||
bcs @no64K
|
bcs @no64K
|
||||||
jsr DisableAccelerator ; set to 1 MHz (supports IIgs and many common accelerator cards)
|
jsr DisableAccelerator ; set to 1 MHz (supports IIgs and many common accelerator cards)
|
||||||
jsr IsGS ; check for IIgs (allows super hi-res artwork)
|
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)
|
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)
|
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)
|
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 5 = 1 if VidHD
|
||||||
; bit 6 = 1 if 128K
|
; bit 6 = 1 if 128K
|
||||||
; bit 7 = 1 if joystick
|
; bit 7 = 1 if joystick
|
||||||
@ -81,8 +81,8 @@ ProRWTSBuffer
|
|||||||
; until after ProRWTS initialization
|
; until after ProRWTS initialization
|
||||||
|
|
||||||
OneTimeSetup
|
OneTimeSetup
|
||||||
lda MachineStatus
|
lda zpMachineStatus
|
||||||
sta oldstatus
|
sta MachineStatus ; save machine status
|
||||||
jsr SaveOrRestoreScreenHoles ; save initial copy of screen hole content
|
jsr SaveOrRestoreScreenHoles ; save initial copy of screen hole content
|
||||||
lda #$91
|
lda #$91
|
||||||
sta holepatch ; enable restoring of copy from now on
|
sta holepatch ; enable restoring of copy from now on
|
||||||
|
@ -39,10 +39,11 @@ SAVE = $08
|
|||||||
HTAB = $24
|
HTAB = $24
|
||||||
VTAB = $25
|
VTAB = $25
|
||||||
Timeout = $ED ; 3 bytes (used by SearchMode)
|
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 6 = 1 if machine has 128K
|
||||||
; bit 5 = 1 if machine has a VidHD card
|
; bit 5 = 1 if machine has a VidHD card
|
||||||
; bit 4 = 1 if machine is a IIgs
|
; bit 4 = 1 if machine is a IIgs
|
||||||
|
; only used during init, then copied to MachineStatus in LC RAM
|
||||||
; $FE ; used by ParseGamesList
|
; $FE ; used by ParseGamesList
|
||||||
; $FF ; used by ParseGamesList
|
; $FF ; used by ParseGamesList
|
||||||
|
|
||||||
|
@ -388,13 +388,7 @@ holepatch ;sta->lda
|
|||||||
inc namhi
|
inc namhi
|
||||||
dec bloklo
|
dec bloklo
|
||||||
bne --
|
bne --
|
||||||
lda oldstatus
|
|
||||||
ldx MachineStatus
|
|
||||||
sta MachineStatus
|
|
||||||
sta oldstatus
|
|
||||||
rts
|
rts
|
||||||
oldstatus
|
|
||||||
!byte 0
|
|
||||||
holey_stuff
|
holey_stuff
|
||||||
!fill 64
|
!fill 64
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ ParseGamesList
|
|||||||
beq @filterOnMemory
|
beq @filterOnMemory
|
||||||
cmp #$31 ; not '0' or '1' or '[' or CR -> ignore entire line (e.g. comment)
|
cmp #$31 ; not '0' or '1' or '[' or CR -> ignore entire line (e.g. comment)
|
||||||
bne @skipLine
|
bne @skipLine
|
||||||
bit MachineStatus
|
bit zpMachineStatus
|
||||||
bpl @skipLine ; game requires joystick but we don't have one, so ignore entire line
|
bpl @skipLine ; game requires joystick but we don't have one, so ignore entire line
|
||||||
@filterOnMemory
|
@filterOnMemory
|
||||||
jsr IncAndGetChar ; get second filter character ('1' if game requires 128K)
|
jsr IncAndGetChar ; get second filter character ('1' if game requires 128K)
|
||||||
@ -69,7 +69,7 @@ ParseGamesList
|
|||||||
beq @swallowComma
|
beq @swallowComma
|
||||||
cmp #$31 ; not '0' or '1' -> ignore entire line
|
cmp #$31 ; not '0' or '1' -> ignore entire line
|
||||||
bne @skipLine
|
bne @skipLine
|
||||||
bit MachineStatus
|
bit zpMachineStatus
|
||||||
bvc @skipLine ; game requires 128K but we only have 64K, so ignore entire line
|
bvc @skipLine ; game requires 128K but we only have 64K, so ignore entire line
|
||||||
@swallowComma
|
@swallowComma
|
||||||
jsr IncAndGetChar
|
jsr IncAndGetChar
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
!zone {
|
!zone {
|
||||||
|
|
||||||
DHGRTitleSlideshow
|
DHGRTitleSlideshow
|
||||||
bit oldstatus ; only run DHGR slideshow if we have 128K
|
bit MachineStatus ; only run DHGR slideshow if we have 128K
|
||||||
bvs +
|
bvs +
|
||||||
rts
|
rts
|
||||||
+ jsr .LoadDHGRTransition ; load transition effect code at $6000
|
+ 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
|
jmp BlankHGR ; switch back to HGR mode with initial blank screen on exit
|
||||||
|
|
||||||
DHGRActionSlideshow
|
DHGRActionSlideshow
|
||||||
bit oldstatus ; only run DHGR slideshow if we have 128K
|
bit MachineStatus ; only run DHGR slideshow if we have 128K
|
||||||
bvs +
|
bvs +
|
||||||
rts
|
rts
|
||||||
+ jsr .LoadDHGRTransition ; load transition effect code at $6000
|
+ 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
|
jmp BlankHGR ; switch back to HGR mode with initial blank screen on exit
|
||||||
|
|
||||||
DHGRSingle
|
DHGRSingle
|
||||||
bit oldstatus ; only show DHGR screenshots if we have 128K
|
bit MachineStatus ; only show DHGR screenshots if we have 128K
|
||||||
bvs +
|
bvs +
|
||||||
rts
|
rts
|
||||||
+ jsr SetPath ; A/Y point to path
|
+ jsr SetPath ; A/Y point to path
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
!zone {
|
!zone {
|
||||||
|
|
||||||
SHRSlideshow
|
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
|
and #SUPPORTS_SHR
|
||||||
bne +
|
bne +
|
||||||
rts
|
rts
|
||||||
@ -23,7 +23,7 @@ SHRSlideshow
|
|||||||
|
|
||||||
SHRSingle
|
SHRSingle
|
||||||
+STAY SAVE
|
+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
|
and #SUPPORTS_SHR
|
||||||
bne +
|
bne +
|
||||||
rts
|
rts
|
||||||
|
@ -56,7 +56,7 @@ SoftBell
|
|||||||
; out: $0106..$011F clobbered
|
; out: $0106..$011F clobbered
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
Home
|
Home
|
||||||
lda oldstatus
|
lda MachineStatus
|
||||||
and #SUPPORTS_SHR
|
and #SUPPORTS_SHR
|
||||||
beq @noSHR
|
beq @noSHR
|
||||||
lda $C035
|
lda $C035
|
||||||
|
Loading…
Reference in New Issue
Block a user