Talk:SmileBASIC (Petit Computer 3)/@comment-5539101-20141003100939/@comment-15296152-20141004040737

Ok, so I found out a few more things (forgive me if it's already been mentioned).

While we have 6 graphic pages, they are shared with everything, including the BG and sprites. BGPAGE and SPPAGE are used for assigning a graphic page to be used with them. If we wanted to have separate tiles and sprites for each screen, we'd have to assign them individually, leaving just 2 pages left for personal use. Unless I'm mistaken, the moment you swap a graphic layer with another for BGs and/or sprites, everything you use will be immediately changed, graphically.

The graphic layers are also where we can read/write user-made graphics. I found out something interesting with GLOAD.

GLOAD [X, Y, W, H], image data array, color conversion flag, copy mode

Typical areas to write to and copy mode, but it also has one field for color conversion. I imagine it may be for designating what type of graphics are in the array, like 16-bit, 24-bit, etc. That's the first form, but the second one has me more interested.

GLOAD [X, Y, W, H], image data array, palette array, copy mode

That first GLOAD was for loading of direct color graphics, whereas this one is for loading paletted graphics. Because this is the only command I've seen that mentions palettes, my guess is that it doesn't load the data as paletted graphics, but converts to direct color, by reading the index from the image data array, locates the color in the palette array, and then writes that color. While it is not what I was hoping for, it does have a little potential for paletted animation. I guess that potential would depend on how fast the conversion is. It doesn't have full palette potential because it writes direct color graphics to the page rather than having indexed data and color palettes separately, so in most cases, you'd either have to have a unique copy of the graphics for each thing, like sprites, or multiple copies that do different paletted effects, and there's only a 512x512 pixel space at any given time.