fix graphics set

forgot that the OS copies shadow registers over lol
This commit is contained in:
Brooke Vibber 2023-01-22 05:54:50 -08:00
parent f22653bd87
commit 7cb879d110

View file

@ -40,6 +40,10 @@ DMACTL = $D400
DLISTL = $D402
DLISTH = $D403
; OS shadow registers
SDLSTL = $230
SDLSTH = $231
.data
aspect:
@ -74,6 +78,10 @@ display_list:
.byte $70 ; 8 blank lines
.endrep
; 8 scan lines, 1 row of 40-column text
.byte $42
.addr textbuffer
; 184 lines graphics
; ANTIC mode e (160px 2bpp, 1 scan line per line)
.byte $4e
@ -87,10 +95,6 @@ display_list:
.byte $0e
.endrep
; 1 line 40-column text
.byte $42
.addr textbuffer
.byte $41 ; jump and blank
.addr display_list
@ -474,14 +478,15 @@ enough:
sta zoom
; Disable display DMA
lda #$00
sta DMACTL
; Set up the display list
lda #.lobyte(display_list)
sta DLISTL
sta DLISTL ; actual register
sta SDLSTL ; shadow register the OS will copy in
lda #.hibyte(display_list)
sta DLISTH
sta DLISTH ; actual register
sta SDLSTH ; shadow register the OS will copy in
; zero the range from framebuffer_top to framebuffer_end
lda #.lobyte(framebuffer_top)