diff --git a/src/ui.attract.dgr.a b/src/ui.attract.dgr.a index 0d1886977..e9b5c6e1f 100644 --- a/src/ui.attract.dgr.a +++ b/src/ui.attract.dgr.a @@ -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 diff --git a/src/ui.attract.dhgr.a b/src/ui.attract.dhgr.a index c7c3f2ba8..40770bfcd 100644 --- a/src/ui.attract.dhgr.a +++ b/src/ui.attract.dhgr.a @@ -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 diff --git a/src/ui.common.a b/src/ui.common.a index 828dc4890..18116f067 100755 --- a/src/ui.common.a +++ b/src/ui.common.a @@ -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