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
|
COLPF3 = $D019
|
||||||
COLBK = $D01A
|
COLBK = $D01A
|
||||||
|
|
||||||
|
DMACTL = $D400
|
||||||
WSYNC = $D40A
|
WSYNC = $D40A
|
||||||
VCOUNT = $D40B
|
VCOUNT = $D40B
|
||||||
NMIEN = $D40E
|
NMIEN = $D40E
|
||||||
|
@ -82,7 +83,7 @@ displaylist:
|
||||||
|
|
||||||
; Disable display DMA
|
; Disable display DMA
|
||||||
lda #$00
|
lda #$00
|
||||||
sta SDMCTL
|
sta DMACTL
|
||||||
|
|
||||||
; Set up the display list
|
; Set up the display list
|
||||||
lda #.lobyte(displaylist)
|
lda #.lobyte(displaylist)
|
||||||
|
@ -90,10 +91,6 @@ displaylist:
|
||||||
lda #.hibyte(displaylist)
|
lda #.hibyte(displaylist)
|
||||||
sta SDLSTH
|
sta SDLSTH
|
||||||
|
|
||||||
; Disable VBI and DLI but allow Reset
|
|
||||||
lda #(128 + 64)
|
|
||||||
sta NMIEN
|
|
||||||
|
|
||||||
; Manually wait for first scan line
|
; Manually wait for first scan line
|
||||||
wait_vblank:
|
wait_vblank:
|
||||||
lda VCOUNT
|
lda VCOUNT
|
||||||
|
@ -101,7 +98,12 @@ wait_vblank:
|
||||||
|
|
||||||
; Re-enable display DMA
|
; Re-enable display DMA
|
||||||
lda #$22
|
lda #$22
|
||||||
sta SDMCTL
|
sta DMACTL
|
||||||
|
|
||||||
|
; Disable VBI and DLI but allow Reset
|
||||||
|
lda #32
|
||||||
|
sta NMIEN
|
||||||
|
|
||||||
|
|
||||||
wait_loop:
|
wait_loop:
|
||||||
sta WSYNC
|
sta WSYNC
|
||||||
|
|
Loading…
Reference in a new issue