From 8e223c82644a91fd7372e1aa6d06ef0f4ac967da Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Sat, 21 Dec 2019 16:28:59 -0800 Subject: [PATCH] documentation --- src/ui.common.a | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/ui.common.a b/src/ui.common.a index 71262b9b9..391ecd42a 100644 --- a/src/ui.common.a +++ b/src/ui.common.a @@ -68,6 +68,7 @@ Home +READ_ROM_NO_WRITE sta DHIRESOFF ; get out of DHGR mode sta CLR80VID ; get out of DHGR mode + ; write-order matters for RGB-card jsr $FB3C ;ROM_TEXTish ; clear screen but don't show it jsr ROM_HOME ; HOME lda PAGE1 @@ -91,12 +92,20 @@ BlankDHGR sta WRITEAUXMEM jsr ClearHGR1 ; clear hi-res screen 1 in auxmem sta WRITEMAINMEM + + ; 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 + ; we do that twice because the mode register is two bits wide + ; we need mode 00 for colour + sta SET80VID sta DHIRESON sta DHIRESOFF sta DHIRESON sta DHIRESOFF - sta DHIRESON + + sta DHIRESON ; then turn DHGR on bit PAGE1 jmp HGRMode