add background_index var

This commit is contained in:
Safyrus 2022-04-02 23:23:00 +02:00
parent aeccbff288
commit fe7b09d97b
2 changed files with 6 additions and 0 deletions

View File

@ -61,6 +61,7 @@
palettes: .res 25 palettes: .res 25
.export _palettes=palettes .export _palettes=palettes
; Index for the background data
background_index: .res 1 background_index: .res 1
.export _background_index=background_index .export _background_index=background_index

View File

@ -68,6 +68,11 @@ extern uint8_t palettes[PALETTES_SIZE];
#pragma zpsym ("palettes") #pragma zpsym ("palettes")
// Index for the background data
extern uint8_t background_index;
#pragma zpsym ("background_index")
// Background data to send to PPU during VBLANK // Background data to send to PPU during VBLANK
// Packet structure: // Packet structure:
// byte 0 = v.ssssss (v= vertical draw, s= size) // byte 0 = v.ssssss (v= vertical draw, s= size)