I found one of these cheap LCDs on ebay and thought I would get one to see how well I could get 9bit running as 8bit. It’s cheap enough I could just toss if I didn’t think it was worth the trouble. It’s also ugly enough that I don’t think I would use it for anything anyway.
To use up all the bits I created 9byte command sets. The command set transfers to a larger 7k command queue that is able to write the entire screen in less than 5ms. At the most it would only waste around 7bits out of 7k which is why it can update so fast.
Now I just have to find the best way to merge draw data into the command buffer and not update full commands every time.
[url]- YouTube
It looks like a different controller but identical functions. The key thing is that any incomplete commands are ignored when the CS is pulled. It would probably even use the identical code with just the Commands enum and Init changed.
The buffer is scalable and only has to be large enough to hold all the commands to draw the current address frame. It still works if it’s smaller but the update isn’t as smooth. The small buffer is 54 bytes because the speed increase seems inverse square to the number of stages so it doesn’t really matter that much after 3.
Thanks, I always like to get something to work well in a way it’s not supposed to work.
This is a speed test of a sprite draw method. It has some flicker because of the display scan rate so I don’t think this method is that useful over 9x9.
[url]Nokia3510lcdtest2 - YouTube
That one was less than $9 on ebay. It works well in bright light but the back light is no good with just the 2 LEDs at the bottom. It comes off the board and is just sitting on some pads.
Here’s another test running a little platform game engine. The tiles draw at startup and get saved to the back buffer so only moving sprites need drawn each frame.
[url]- YouTube
That’s a possibility because this was just cut and paste from what I had running on the 128x64 lcd. Now if I can just get a smooth side scroll without taking much more ram.
The only specific LCD control it needs is the SetDot(x,y) method for the sprite draw, and a way to save/load the current frame to a back buffer in the Level init and draw. It’s setup for 3 frame animation and will load tiles and sprites from standard 1bit BMP from SD.
It was adapted from the XNA platformer example which just needed a few adjustments to make it more efficient and I added bar and ladder mechanics. The ladder still needs some work for the up/down control but the rest seems to work.