I was hoping you guys could give me a few suggestions on how to write a display driver. As I have mentioned in several other posts, I do a lot of work on embedded platforms like AVR's. Lately, I have been working on an 8x8 LED Matrix video game system. I have working code that can set pixels on the screen, but I am not sure how to go about writing a higher-level driver. It should be capable of drawing sprites saved in memory, and performing operations on those sprites such as rotation(only at 90 degree angles, as rotations at such a low resolution would be greatly distorted).
I was thinking about an approach similar to SDL(keep in mind I am using pure C).
I have no clue how to write drivers, but I'll post anyway.
I don't see your problem. There isn't very much you can do with such resolution.
You should use a buffer to draw stuff. Then call a function to set appropriate pixels.
You could use matrices for simple transformations (moving, scaling, rotating). That probably isn't necessary if you're only going to do 90 rotations (though 45 might not look bad either).
You could use polygons and then texture them. That way images would react better to stretching.
If you rally wanted, you could do 3d support too. It's not hard. It's just ridiculous..
Yes. The LED Matrix I am using is bi-color(Red, Green, and Yellow when both Green and Red pixels are lit in the same position), so it takes a total of only 16 bytes of data to update the display. If I did make it one-byte per pixel, it would take at least 64 bytes.
The micro I am using has 2KB of ram. I think the extra memory is worth the hassle personally.
I'll test your code in a little while, thanks a lot.
Also, I will post all of my code after it is complete.