diff --git a/dither4.s b/dither4.s index 2e78819..c98400b 100644 --- a/dither4.s +++ b/dither4.s @@ -8,6 +8,7 @@ COLPF2 = $D018 COLPF3 = $D019 COLBK = $D01A +DMACTL = $D400 WSYNC = $D40A VCOUNT = $D40B NMIEN = $D40E @@ -82,7 +83,7 @@ displaylist: ; Disable display DMA lda #$00 - sta SDMCTL + sta DMACTL ; Set up the display list lda #.lobyte(displaylist) @@ -90,10 +91,6 @@ displaylist: lda #.hibyte(displaylist) sta SDLSTH - ; Disable VBI and DLI but allow Reset - lda #(128 + 64) - sta NMIEN - ; Manually wait for first scan line wait_vblank: lda VCOUNT @@ -101,7 +98,12 @@ wait_vblank: ; Re-enable display DMA lda #$22 - sta SDMCTL + sta DMACTL + + ; Disable VBI and DLI but allow Reset + lda #32 + sta NMIEN + wait_loop: sta WSYNC