.include "prefix_ppu.a" sprites = $200 ; Clear sprite table with $F8 clear_sprite_table: lda #$F8 ldx #0 : sta sprites,x inx bne - rts .code ; Set every 4th sprite byte starting at X ; to A, modifying Y sprites in all. move_sprites: : sta sprites,x inx inx inx inx dey bne - rts ; Use DMA to copy sprite table to PPU ; Preserved: A, X, Y dma_sprite_table: pha lda #0 sta $2003 lda #$02 sta $4014 pla rts .code begin_sprite_overflow_tests: sei lda #0 sta $2000 sta $2001 jsr wait_vbl jsr wait_vbl ; black palette lda #$3F jsr set_vpage ldy #$40 lda #$0F : sta $2007 dey bne - jsr clear_sprite_table rts .code begin_overflow_test: sta