blob: 4fe95bda4fa970e0bc2ee4c737bf828df6fae9bc (
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
|
;; See `basics/sprite.s` for more info. I'm not doing anything fancier here.
.proc nmi
bit $20
bpl @next
;; Save registers.
pha
txa
pha
tya
pha
;; We can start rendering stuff.
OAM_WRITE_SPRITES
;; Reset scroll.
bit $2002 ; PPUSTATUS
lda #$00
sta $2005 ; PPUSCROLL
sta $2005 ; PPUSCROLL
;; And unset the render flag so the `main` code is unblocked.
UNSET_RENDER_FLAG
;; Restore registers.
pla
tay
pla
tax
pla
@next:
rti
.endproc
|