.globl spr_submit
spr_submit:
- move.l spr_count, -(%sp)
- move.l #spr_shadow, -(%sp)
- move.l #0x8000, -(%sp)
+ move.w spr_count, %d0
+ tst.w %d0
+ bne.s 0f
+ | if spr_count is zero, upload a single null sprite
+ addq.w #1, %d0
+0: ext.l %d0
+ lsl.w #2, %d0 | 4 words per sprite
+ move.l %d0, -(%sp)
+ pea spr_shadow
+ pea 0xd000.w | we placed the spirte table at d000
jsr dma_systovram
- add.l #12, %sp
+ addq.l #8, %sp
+ addq.l #4, %sp
rts
| vi:ft=gas68k: