| forum.getinpulse.com http://www.getinpulse.com/hack/forum/ |
|
| Double buffering http://www.getinpulse.com/hack/forum/viewtopic.php?f=6&t=187 |
Page 1 of 1 |
| Author: | kennu [ Sun Apr 03, 2011 6:11 am ] |
| Post subject: | Double buffering |
Drawing a full screen image on the inPulse OLED screen seems to be fairly slow. You can see the image progressing down row-by-row. I wonder if there would be any way of doing double-buffering in this environment? |
|
| Author: | Duane [ Mon Apr 04, 2011 8:40 am ] |
| Post subject: | Re: Double buffering |
Well, the total RAM is only 8K, with only about 3K available for programs. The memory model for the display is 96*128*4 bytes, which comes out to 49K. |
|
| Author: | hudson [ Mon Apr 04, 2011 3:26 pm ] |
| Post subject: | Re: Double buffering |
Duane wrote: The memory model for the display is 96*128*4 bytes, which comes out to 49K. For my 1:1 game of life, I was able to get by with only double buffering the bare minimum of three lines. The bitmap game grid used 96x128/8 = 1.5 Kbytes, so there might be just enough to double buffer a 1-bit image if some of the other features are removed from the library. |
|
| Author: | Duane [ Mon Apr 11, 2011 10:43 am ] |
| Post subject: | Re: Double buffering |
My version of Life uses a similar strategy, but uses a pretty different method for computing the next generation - rather than the typical loop counting neighbors for each cell, it computes an entire scanline worth of cells at the same time using just Boolean operations. It takes advantage of the fact that adding two bits does not require addition, ie b1+b2 = (b1 ^ b2), carry (b1 & b2), which is how processors actually do addition at the hardware level. |
|
| Page 1 of 1 | All times are UTC - 8 hours |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|