reduce flicker coming out of DGR mode

This commit is contained in:
4am 2021-12-12 16:57:27 -05:00
parent 3b98d48fdf
commit 0b3bd0b161
3 changed files with 25 additions and 28 deletions

View File

@ -6,6 +6,8 @@
; Public functions
; - DGRActionSlideshow
; - DGRSingle
; - BlankDGR
; - LoadIndexedDGRFile
;
;------------------------------------------------------------------------------
@ -26,7 +28,7 @@ DGRActionSlideshow
jsr okvs_iter ; cycle through all listed DGR files
!word gSlideshowStore
!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
@ -42,7 +44,7 @@ DGRSingle
jsr LoadIndexedDGRFile ; load DGR screen at $4000
jsr LoadDGRTransition ; load transition effect code at $6000
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]
@ -84,6 +86,23 @@ DGRActionCallback
jsr LoadIndexedDGRFile
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
; in: caller has set IndexedDGRFilename
; out: all flags & registers clobbered

View File

@ -1,4 +1,3 @@
;license:MIT
;(c) 2018-2021 by 4am & qkumba
;
; Double hi-res slideshows
@ -89,6 +88,7 @@ DHGRSingle
;------------------------------------------------------------------------------
BlankHGR
jsr Home
BlankHGRNoHome
jsr ClearHGR1 ; clear hi-res screen 1
bit PAGE1 ; show hi-res screen 1 (now blank)
lda #1

View File

@ -54,22 +54,6 @@ Home
lda TEXTMODE
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
; clear and show DHGR page 1 without flickering
@ -89,20 +73,13 @@ BlankDHGR
; /!\ execution falls through here to DHGRMode
;------------------------------------------------------------------------------
; DHGRMode / DGRMode
; DHGRMode
; switch to DHGR or DGR mode (HARDER THAN IT SOUNDS)
;
; in: none
; out: none
;------------------------------------------------------------------------------
DHGRMode
jsr +
jmp HGRMode
DGRMode
jsr +
bit $C056
jmp GRMode
+
; magic sequence to set colour mode on an RGB card
; SET80VID clears the RGB-card shift-register
; DHIRESON/OFF shifts that bit into the mode register
@ -121,7 +98,8 @@ DGRMode
jsr ShowOtherPage
lda #1
sta gMachineInDHGRMode
jmp UnwaitForVBL
jsr UnwaitForVBL
jmp HGRMode
;------------------------------------------------------------------------------
; IsSearchKey