This commit is contained in:
Brooke Vibber 2022-11-29 14:54:02 -08:00
parent 538bd2ac7c
commit 8624250012

View file

@ -1,7 +1,7 @@
SAVMSC = $58
SDMCTL = $22F
SDLSTL = $230
SDLSTH = $231
;SDMCTL = $22F
;SDLSTL = $230
;SDLSTH = $231
COLPF0 = $D016
COLPF1 = $D017
COLPF2 = $D018
@ -9,6 +9,8 @@ COLPF3 = $D019
COLBK = $D01A
DMACTL = $D400
DLISTL = $D402
DLISTH = $D403
WSYNC = $D40A
VCOUNT = $D40B
NMIEN = $D40E
@ -80,16 +82,19 @@ displaylist:
sta temp2h
jsr copy_half_frame
; Disable display DMA
lda #$00
sta DMACTL
; Disable VBI and DLI but allow Reset
lda #32
sta NMIEN
; Set up the display list
lda #.lobyte(displaylist)
sta SDLSTL
sta DLISTL
lda #.hibyte(displaylist)
sta SDLSTH
sta DLISTH
; Manually wait for first scan line
wait_vblank:
@ -100,11 +105,6 @@ wait_vblank:
lda #$22
sta DMACTL
; Disable VBI and DLI but allow Reset
lda #32
sta NMIEN
wait_loop:
sta WSYNC
wait_start: