Martijn
IMHO, the fastest method is to maintain your screen buffer in fast,
single-cycle ram (32Kb) and then either DMA it to the front buffer in VRAM
at the start of the v-blank, or DMA-ing it to the back buffer then flipping
it at the end of the v-blank.
You'll note that in mode 4 (8-bit) the screen takes 240x160 bytes (38,400
bytes) which is larger than your single-cycle ram. You can do one of two
things. Firstly, you can cut the bottom 24 pixels off the screen and fill it
with OSD info. Alternatively, depending on how your write your rendering
routines, you can build the screen up in chunks, say 8Kb at a time and DMA
it to the back vram buffer then flip at the end of the v-blank. This will be
better, because you can also have your rendering code and texture/sprite
cache or whatever in the fast ram too.
Not having any actual hardware to play with just now, I'm not sure how
DMAing will affect the bus. Perhaps someone could advise us all on this?
What's everyone else thinking out there?
Tom Kane
-----Original Message-----
From: Martijn Wenting [mailto:mwenting@...]
Sent: Thursday, February 01, 2001 6:52 PM
To: gbadev@yahoogroups.com
Subject: [gbadev] Fastest way to update linear screenbuffer.
Hi,
There are several ways to update a linear screenbuffer, what would be the
fastest method?
a. Drawing direct to screen
b. Drawing to the backbuffer and flipping it
c. Drawing to an area in ram and copying it to screen (32-bit copy).
d. Drawing to an area in ram and copying it to backbuffer (32-bit copy) and
flipping the backbuffer.
e. another method.
Anyone fiddled around with this?
Cheers,
Martijn
unsubscribe: gbadev-unsubscribe@egroups.com