Clear //gs Shadow Page 2 (#532)

* Fix Alternate Display Mode on ROM0 and ROM1 //gs

fixes attract hanging on ROM0 and ROM1 machines

* Clear //gs Shadow Page 2

We now control the horizontal. We now control the vertical. We now control the shadow bank of //gs video memory. Improves The Goonies and Pacman demos on ROM0/1.
This commit is contained in:
frankmilliron 2022-11-29 07:54:52 -08:00 committed by GitHub
parent 0f70459cc3
commit 00707b6c0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 11 deletions

18
src/4cade.init.a Normal file → Executable file
View File

@ -75,7 +75,7 @@
; bit 7 = 1 if joystick
; and all other bits are 0 (we'll set bit 3 after copying it to LC RAM)
; accommodate uppercase-only machines (64K ][+ is supported)
; accommodate uppercase-only machines (64K ][ and ][+ are supported)
lda ROM_MACHINEID
cmp #$A0
beq + ; Spectrum ED
@ -86,6 +86,22 @@
+ lda #$FF
sta zpCharMask
; IIgs fix for Alternate Display Mode (clear shadow page 2)
lda zpMachineStatus
and #IS_IIGS
beq +
ldx #0
txa
!cpu 65816
- sta $E00800,x ; when Alternate Display Mode is turned off, the "2"s
sta $E00900,x ; displayed on the screen live at $E00800
sta $E00A00,x ; (page "2"/$0800 of IIgs bank $E0)
sta $E00B00,x ; They are initialized by the IIgs boot ROM
inx
bne -
!cpu 6502
+
; increase text window width so we can print to the edge of the screen without scrolling
inc $21
; print version or build number in lower right corner

View File

@ -9,7 +9,6 @@
!source "src/macros.a"
+GAME_REQUIRES_JOYSTICK
+TEST_TEXT_PAGE_2
+ENABLE_ACCEL_LC
+LOAD_XSINGLE title

View File

@ -352,9 +352,9 @@
+READ_ROM_NO_WRITE
}
!macro USES_TEXT_PAGE_2 {
lda ROM_MACHINEID
cmp #$06
!macro USES_TEXT_PAGE_2 { ; If we know we are going into a game one-time
lda ROM_MACHINEID ; only we can just blindly turn on TEXT2COPY, as
cmp #$06 ; Alternate Display Mode turns off on reset or reboot.
bne +
sec
jsr $FE1F ; check for IIgs
@ -364,10 +364,10 @@
+
}
!macro TEST_TEXT_PAGE_2 {
lda ROM_MACHINEID
cmp #$06
bne ++
!macro TEST_TEXT_PAGE_2 { ; On a ROM3 IIgs we can test if Alternate Display Mode
lda ROM_MACHINEID ; is already on. ROM0 and ROM1 versions of ADM use
cmp #$06 ; interrupts and can cause hangs, so safer to just
bne ++ ; leave it turned off, especially in ATTRACT/DEMO mode.
sec
jsr $FE1F ; check for IIgs
bcs ++
@ -434,7 +434,7 @@
sta $3F4
}
; for games that clobber $100-$105, the prelaunch code constructs a new reset vector
; somewhere else and sets its
; somewhere else and sets the reset vector to point at it.
!macro NEW_RESET_VECTOR .addr {
ldx #5
- lda $100,x

View File

@ -7,7 +7,6 @@
!source "src/prelaunch/common.a"
+USES_TEXT_PAGE_2
+ENABLE_ACCEL
lda #$60
sta $2034