mirror of
https://github.com/a2-4am/pitch-dark.git
synced 2025-01-19 09:31:39 +00:00
GS to init phase
This commit is contained in:
parent
c57bfdbefa
commit
c0521157f2
@ -17,7 +17,7 @@
|
|||||||
;~7400...... - program data (approximate)
|
;~7400...... - program data (approximate)
|
||||||
;
|
;
|
||||||
|
|
||||||
kPitchDarkBinaryAddress = $3F2F
|
kPitchDarkBinaryAddress = $3F25
|
||||||
|
|
||||||
kGameInfoBuffer = $0800 ; used by LoadGameInfo
|
kGameInfoBuffer = $0800 ; used by LoadGameInfo
|
||||||
kProDOSFileBuffer = $1C00 ; 1K buffer for ProDOS MLI calls
|
kProDOSFileBuffer = $1C00 ; 1K buffer for ProDOS MLI calls
|
||||||
|
@ -57,19 +57,33 @@
|
|||||||
bne @nextslot
|
bne @nextslot
|
||||||
dey
|
dey
|
||||||
bpl @matchVidHD
|
bpl @matchVidHD
|
||||||
dec PatchVidHD1+1 ; affect branch to pretend IIGS
|
|
||||||
lda #$90
|
lda #$90
|
||||||
sta PatchVidHD2 ; affect branch to pretend IIGS
|
sta PatchVidHD
|
||||||
ldx #$c1 ; force exit via fall-through
|
bne @setSHR ; always
|
||||||
|
|
||||||
|
@kVidHDID
|
||||||
|
!byte $24, $EA, $4C
|
||||||
|
|
||||||
@nextslot
|
@nextslot
|
||||||
dex
|
dex
|
||||||
cpx #$c0
|
cpx #$c0
|
||||||
bne @findVidHD
|
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
|
; clear options script and make checksum invalid
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
|
@ -200,7 +200,7 @@ LoadSHRFile
|
|||||||
bcs close
|
bcs close
|
||||||
phx
|
phx
|
||||||
|
|
||||||
PatchVidHD2
|
PatchVidHD
|
||||||
bcs copyvidhd
|
bcs copyvidhd
|
||||||
|
|
||||||
!cpu 65816
|
!cpu 65816
|
||||||
|
@ -23,18 +23,9 @@ kArtworkGSRootDirectory ; length-prefixed pathname of SHGR graphic
|
|||||||
; out: all registers and flags clobbered
|
; out: all registers and flags clobbered
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
DisplayArtwork
|
DisplayArtwork
|
||||||
ldx #0 ; set Z flag always
|
WeCanHazSHR
|
||||||
!cpu 65816
|
ldx #0 ; SMC
|
||||||
rep #2 ; clear Z flag on 65816 only
|
jsr ResetPath
|
||||||
!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
|
|
||||||
+LDADDR kArtworkRootDirectory
|
+LDADDR kArtworkRootDirectory
|
||||||
dex
|
dex
|
||||||
bne +
|
bne +
|
||||||
@ -73,7 +64,7 @@ PatchVidHD1
|
|||||||
plx
|
plx
|
||||||
bcs -
|
bcs -
|
||||||
lda $C029
|
lda $C029
|
||||||
ora #$C1
|
ora #$81
|
||||||
sta $C029 ; set GS NEWVIDEO mode to turn on SHR mode
|
sta $C029 ; set GS NEWVIDEO mode to turn on SHR mode
|
||||||
|
|
||||||
@waitKey
|
@waitKey
|
||||||
@ -85,6 +76,6 @@ PatchVidHD1
|
|||||||
plx
|
plx
|
||||||
bne +
|
bne +
|
||||||
lda $C029
|
lda $C029
|
||||||
and #$3F
|
and #$7F
|
||||||
sta $C029 ; back to text GS-style
|
sta $C029 ; back to text GS-style
|
||||||
+ jmp ClearPendingInput
|
+ jmp ClearPendingInput
|
||||||
|
Loading…
x
Reference in New Issue
Block a user