aboutsummaryrefslogtreecommitdiff
path: root/src/interrupts.s
blob: be276df99e81a0c926d48ab4b4bc38d1eb8759fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
.segment "FIXED"

.proc nmi
    pha
    txa
    pha
    tya
    pha

    ;; Sprite DMA.
    lda #$00
    sta OAM::m_address
    lda #$02
    sta OAM::m_dma

    ;; TODO

    ;; Always reset the scroll just in case.
    bit PPU::m_status
    lda #$00
    sta PPU::m_scroll
    sta PPU::m_scroll

    ;; Restore registers.
    pla
    tay
    pla
    tax
    pla

    rti
.endproc

;; Unused.
.proc irq
    rti
.endproc