GS to init phase

This commit is contained in:
Peter Ferrie 2019-01-11 14:32:49 -08:00
parent c57bfdbefa
commit c0521157f2
4 changed files with 27 additions and 22 deletions

View File

@ -17,7 +17,7 @@
;~7400...... - program data (approximate)
;
kPitchDarkBinaryAddress = $3F2F
kPitchDarkBinaryAddress = $3F25
kGameInfoBuffer = $0800 ; used by LoadGameInfo
kProDOSFileBuffer = $1C00 ; 1K buffer for ProDOS MLI calls

View File

@ -57,19 +57,33 @@
bne @nextslot
dey
bpl @matchVidHD
dec PatchVidHD1+1 ; affect branch to pretend IIGS
lda #$90
sta PatchVidHD2 ; affect branch to pretend IIGS
ldx #$c1 ; force exit via fall-through
sta PatchVidHD
bne @setSHR ; always
@kVidHDID
!byte $24, $EA, $4C
@nextslot
dex
cpx #$c0
bne @findVidHD
beq +
@kVidHDID
!byte $24, $EA, $4C
;------------------------------------------------------------------------------
; detect IIGS by running CPU-specific magic
;------------------------------------------------------------------------------
!cpu 65816
rep #2 ; clear Z flag on 65816 only
!cpu 65c02
beq + ; skip GS-specific code on non-GS machines (required, will crash on //c, grr)
@setSHR
inc WeCanHazSHR+1
lda $C029
ora #$40
sta $C029 ; set GS NEWVIDEO mode to turn off linearize
+
;------------------------------------------------------------------------------
; clear options script and make checksum invalid
;------------------------------------------------------------------------------

View File

@ -200,7 +200,7 @@ LoadSHRFile
bcs close
phx
PatchVidHD2
PatchVidHD
bcs copyvidhd
!cpu 65816

View File

@ -23,18 +23,9 @@ kArtworkGSRootDirectory ; length-prefixed pathname of SHGR graphic
; out: all registers and flags clobbered
;------------------------------------------------------------------------------
DisplayArtwork
ldx #0 ; set Z flag always
!cpu 65816
rep #2 ; clear Z flag on 65816 only
!cpu 65c02
PatchVidHD1
beq + ; skip GS-specific code on non-GS machines (required, will crash on //c, grr)
lda $C029
ora #$40
sta $C029 ; set GS NEWVIDEO mode to turn off linearize
inx
+ jsr ResetPath
WeCanHazSHR
ldx #0 ; SMC
jsr ResetPath
+LDADDR kArtworkRootDirectory
dex
bne +
@ -73,7 +64,7 @@ PatchVidHD1
plx
bcs -
lda $C029
ora #$C1
ora #$81
sta $C029 ; set GS NEWVIDEO mode to turn on SHR mode
@waitKey
@ -85,6 +76,6 @@ PatchVidHD1
plx
bne +
lda $C029
and #$3F
and #$7F
sta $C029 ; back to text GS-style
+ jmp ClearPendingInput