2 ; Written by Groepaz/Hitmen <groepaz@gmx.net>
3 ; Cleanup by Ullrich von Bassewitz <uz@cc65.org>
7 .export ppubuf_waitempty
15 ; ------------------------------------------------------------------------
17 ; Wait until buffer is empty
19 .proc ppubuf_waitempty
29 ; ------------------------------------------------------------------------
31 ; Wait until buffer is full
35 lda #$ff ; (($0100/3)*1)
42 ; ------------------------------------------------------------------------
43 ; Put a PPU-Memory write to buffer
44 ; called from main program (not necessary when in vblank irq)
52 jsr ppubuf_wait ; wait if buffer is full
69 ; ------------------------------------------------------------------------
70 ; Flush PPU-Memory write buffer
71 ; called from vblank interupt
108 ; ------------------------------------------------------------------------