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