Page 1 of 1

prog8: const uword SPRITE_DATA_ADDR = $2000 ?

Posted: Wed Mar 13, 2024 4:07 pm
by funkheld
Hi good afternoon.
why does the data in the sprite demo start here in prog8:
const uword SPRITE_DATA_ADDR = $2000 ?

in the x16 kernal : $1:3000 - $1:afff
-------------------------------
main {
; we choose arbitrary unused vram location for sprite data: $12000
const ubyte SPRITE_DATA_BANK = 1
const uword SPRITE_DATA_ADDR = $2000
const ubyte SPRITE_PALETTE_OFFSET_IDX = 16
.......
.......

Thanks.
greeting

Re: prog8: const uword SPRITE_DATA_ADDR = $2000 ?

Posted: Wed Mar 13, 2024 5:31 pm
by desertfish
you can put the sprite data everywhere you like, as long as you also set the sprite data pointer to the correct values, and handle all sprite register manipulation yourself.

I don't know why that $13000 region is even mentioned tbh. Maybe for the two kernal routines that handle sprites? I've never used those.

Re: prog8: const uword SPRITE_DATA_ADDR = $2000 ?

Posted: Wed Mar 13, 2024 6:47 pm
by DragWx
That table explains how the Kernal configures the VERA's memory layout when you're using the Kernal's text mode and graphics/sprite routines.

If you're not using these Kernal functions, then you can manually configure the VERA's memory layout however you like, but it will be your program's responsibility to operate the VERA, instead of relying on Kernal functions.

Re: prog8: const uword SPRITE_DATA_ADDR = $2000 ?

Posted: Wed Mar 13, 2024 7:10 pm
by funkheld
danke für die info.

gruss