Why Tiles?
awesomeduck
Posts: 87
I am about half way through the Hydra book now, and enjoying it. I was playing with several of the demos and realized that at about page 330 in the book I think I got my thinking off into the weeds. I follow the mappings of how the tiles and colors and all work...but what I don't understand is why use tiles at all?
When I look at the graphics demo routines it seems they just don't really need to care about tile boundaries. Why not just lay the screen out as one big map of x by y pixels? What am I missing here?
When I look at the graphics demo routines it seems they just don't really need to care about tile boundaries. Why not just lay the screen out as one big map of x by y pixels? What am I missing here?
Comments
Basically, the largest unit of data that moves from HUB to COG, and from COG to video generator is the long. A long can either be 32 pixels, at one bit per pixel, on or off, or 16 pixels, 2 bits per pixel, four color, or 4 pixels, 8 bits per pixel. The waitvids generate the video signal sequentially from the beginning of the frame to the end of the frame.
0000111122223333444455556666....
This is where the tiles come from. Depending on how you want to use your display, the screen memory mapping might be linear as in just one grid of pixels x and y, or it might be some multiple of the default pixel sizes. 8 pixels, or 32, or 16. Whatever.
Additionally, the Propeller ROM has a 2 bit per pixel character set where each character is 16 pixels wide. If you break the screen into tiles, each tile can either be pointed to the ROM for it's pixel data, or the RAM, for graphics data.
The Parallax drivers work this way to maximize system RAM availability at higher graphics resolutions.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
Safety Tip: Life is as good as YOU think it is!
On the other hand, a smaller number of medium-sized tiles can be created to be much more colorful without much RAM usage. This way, you get much better looking graphics with less RAM usage.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·