Qbasicnews.com

Full Version: Screen 12 animation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am trying to do some animation in screen 12. In a test program, I created a "buffer", an array large enough to hold a full screen worth of data. Just PUTting the array runs about 7 fps, so double buffering the full screen is out (unless someone out ther has some really nice tricks).

I also tried working with just a sprite (48x48):
Code:
'pseudocode
PUT OldBackground
GET NewBackground
PUT Mask, AND
PUT Sprite
This runs about 70 fps for one sprite (the same as my refresh rate), so it flickers even with WAIT &H3DA, 8.

Is it possible to create a buffer that is only part of the screen. I would like to be able to use GET and PUT in memory, then a single PUT statement to video memory.
Two options: Use dirty rectangles or the VGA split screen function.
Dirty rectangles is kind of what I had in mind, but it would be nice to have a buffer that I could use GET and PUT with (I really don't want to bit shift 48x48 sprites and masks).

Would SetVideoSeg work with screen 12, or could it be adapted to do so?

If I created a buffer large enough to handle the maximum height of the sectors I am interested in (about 144 pixels) and the full width of the screen, would there be a risk of the computer writing to a memory location outside of the buffer (assuming I take reasonable precautions)?