It is currently Wed Jul 06, 2011 7:35 pm

All times are UTC - 8 hours




 Page 1 of 1 [ 4 posts ] 
Author Message
 Post subject: Double buffering
PostPosted: Sun Apr 03, 2011 6:11 am 

Joined: Fri Apr 01, 2011 12:29 pm
Posts: 6
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?


Offline
 Profile  
 
 Post subject: Re: Double buffering
PostPosted: Mon Apr 04, 2011 8:40 am 

Joined: Mon Feb 21, 2011 10:03 am
Posts: 26
Location: San Diego, CA
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.


Offline
 Profile  
 
 Post subject: Re: Double buffering
PostPosted: Mon Apr 04, 2011 3:26 pm 

Joined: Sun Feb 27, 2011 11:32 am
Posts: 71
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.


Offline
 Profile  
 
 Post subject: Re: Double buffering
PostPosted: Mon Apr 11, 2011 10:43 am 

Joined: Mon Feb 21, 2011 10:03 am
Posts: 26
Location: San Diego, CA
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.


Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 4 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: