trying clean disable of interrupts
This commit is contained in:
parent
f9431749d2
commit
1f813b4e8e
1 changed files with 8 additions and 6 deletions
14
dither4.s
14
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
|
||||
|
|
Loading…
Reference in a new issue