mirror of
https://github.com/a2-4am/4cade.git
synced 2024-11-26 17:49:43 +00:00
reduce flicker coming out of DGR mode
This commit is contained in:
parent
3b98d48fdf
commit
0b3bd0b161
@ -6,6 +6,8 @@
|
|||||||
; Public functions
|
; Public functions
|
||||||
; - DGRActionSlideshow
|
; - DGRActionSlideshow
|
||||||
; - DGRSingle
|
; - DGRSingle
|
||||||
|
; - BlankDGR
|
||||||
|
; - LoadIndexedDGRFile
|
||||||
;
|
;
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
@ -26,7 +28,7 @@ DGRActionSlideshow
|
|||||||
jsr okvs_iter ; cycle through all listed DGR files
|
jsr okvs_iter ; cycle through all listed DGR files
|
||||||
!word gSlideshowStore
|
!word gSlideshowStore
|
||||||
!word DGRActionCallback ; address of callback (called on each file)
|
!word DGRActionCallback ; address of callback (called on each file)
|
||||||
jmp BlankHGR ; switch back to HGR mode with initial blank screen on exit
|
jmp BlankHGRNoHome ; switch back to HGR mode with initial blank screen on exit
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; DGRSingle
|
; DGRSingle
|
||||||
@ -42,7 +44,7 @@ DGRSingle
|
|||||||
jsr LoadIndexedDGRFile ; load DGR screen at $4000
|
jsr LoadIndexedDGRFile ; load DGR screen at $4000
|
||||||
jsr LoadDGRTransition ; load transition effect code at $6000
|
jsr LoadDGRTransition ; load transition effect code at $6000
|
||||||
jsr ExecuteTransitionAt6000AndWait
|
jsr ExecuteTransitionAt6000AndWait
|
||||||
jmp BlankHGR ; switch back to HGR mode with initial blank screen on exit
|
jmp BlankHGRNoHome ; switch back to HGR mode with initial blank screen on exit
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; LoadDGRTransition [private]
|
; LoadDGRTransition [private]
|
||||||
@ -84,6 +86,23 @@ DGRActionCallback
|
|||||||
jsr LoadIndexedDGRFile
|
jsr LoadIndexedDGRFile
|
||||||
jmp ExecuteTransitionAt6000AndWait
|
jmp ExecuteTransitionAt6000AndWait
|
||||||
|
|
||||||
|
BlankDGR
|
||||||
|
jsr BlankDHGR ; clear and display DHGR screen
|
||||||
|
ldy #$2C ; BIT
|
||||||
|
sty PageFrom ; now clear DGR screen
|
||||||
|
ldx #$04
|
||||||
|
stx PageTo+2
|
||||||
|
jsr ClearToBlack
|
||||||
|
sta WRITEAUXMEM
|
||||||
|
ldx #$04
|
||||||
|
stx PageTo+2
|
||||||
|
jsr ClearToBlack
|
||||||
|
sta WRITEMAINMEM
|
||||||
|
lda #1
|
||||||
|
sta OffscreenPage
|
||||||
|
bit $C056 ; display DGR screen
|
||||||
|
rts
|
||||||
|
|
||||||
LoadIndexedDGRFile
|
LoadIndexedDGRFile
|
||||||
; in: caller has set IndexedDGRFilename
|
; in: caller has set IndexedDGRFilename
|
||||||
; out: all flags & registers clobbered
|
; out: all flags & registers clobbered
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
;license:MIT
|
|
||||||
;(c) 2018-2021 by 4am & qkumba
|
;(c) 2018-2021 by 4am & qkumba
|
||||||
;
|
;
|
||||||
; Double hi-res slideshows
|
; Double hi-res slideshows
|
||||||
@ -89,6 +88,7 @@ DHGRSingle
|
|||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
BlankHGR
|
BlankHGR
|
||||||
jsr Home
|
jsr Home
|
||||||
|
BlankHGRNoHome
|
||||||
jsr ClearHGR1 ; clear hi-res screen 1
|
jsr ClearHGR1 ; clear hi-res screen 1
|
||||||
bit PAGE1 ; show hi-res screen 1 (now blank)
|
bit PAGE1 ; show hi-res screen 1 (now blank)
|
||||||
lda #1
|
lda #1
|
||||||
|
@ -54,22 +54,6 @@ Home
|
|||||||
lda TEXTMODE
|
lda TEXTMODE
|
||||||
jmp UnwaitForVBL
|
jmp UnwaitForVBL
|
||||||
|
|
||||||
BlankDGR
|
|
||||||
jsr BlankDHGR
|
|
||||||
ldy #$2C ; BIT
|
|
||||||
sty PageFrom
|
|
||||||
ldx #$04
|
|
||||||
stx PageTo+2
|
|
||||||
jsr ClearToBlack
|
|
||||||
sta WRITEAUXMEM
|
|
||||||
ldx #$04
|
|
||||||
stx PageTo+2
|
|
||||||
jsr ClearToBlack
|
|
||||||
sta WRITEMAINMEM
|
|
||||||
lda #1
|
|
||||||
sta OffscreenPage
|
|
||||||
bne DGRMode ; always branches
|
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; BlankDHGR
|
; BlankDHGR
|
||||||
; clear and show DHGR page 1 without flickering
|
; clear and show DHGR page 1 without flickering
|
||||||
@ -89,20 +73,13 @@ BlankDHGR
|
|||||||
|
|
||||||
; /!\ execution falls through here to DHGRMode
|
; /!\ execution falls through here to DHGRMode
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; DHGRMode / DGRMode
|
; DHGRMode
|
||||||
; switch to DHGR or DGR mode (HARDER THAN IT SOUNDS)
|
; switch to DHGR or DGR mode (HARDER THAN IT SOUNDS)
|
||||||
;
|
;
|
||||||
; in: none
|
; in: none
|
||||||
; out: none
|
; out: none
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
DHGRMode
|
DHGRMode
|
||||||
jsr +
|
|
||||||
jmp HGRMode
|
|
||||||
DGRMode
|
|
||||||
jsr +
|
|
||||||
bit $C056
|
|
||||||
jmp GRMode
|
|
||||||
+
|
|
||||||
; magic sequence to set colour mode on an RGB card
|
; magic sequence to set colour mode on an RGB card
|
||||||
; SET80VID clears the RGB-card shift-register
|
; SET80VID clears the RGB-card shift-register
|
||||||
; DHIRESON/OFF shifts that bit into the mode register
|
; DHIRESON/OFF shifts that bit into the mode register
|
||||||
@ -121,7 +98,8 @@ DGRMode
|
|||||||
jsr ShowOtherPage
|
jsr ShowOtherPage
|
||||||
lda #1
|
lda #1
|
||||||
sta gMachineInDHGRMode
|
sta gMachineInDHGRMode
|
||||||
jmp UnwaitForVBL
|
jsr UnwaitForVBL
|
||||||
|
jmp HGRMode
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; IsSearchKey
|
; IsSearchKey
|
||||||
|
Loading…
Reference in New Issue
Block a user