| |
Rastah Bar Account closed
Registered: Oct 2012 Posts: 336 |
Double buffering color ram in half of the screen?
Suppose you have some text or MC bitmap graphics only in the bottom half of the screen, perhaps you could double buffer (color ram & gfx) using FLD?
I mean: in one frame you first switch to an empty screen in the top half (where you have some sprite action, say) and in the bottom half you switch to the desired graphics screen. In another frame you FLD the top half of desired color ram & gfx down to the bottom half.
Don't know if this can be useful though. |
|
... 11 posts hidden. Click here to view all posts.... |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
Or use linecrunch like Peiselulli did in Incoherent Nightmare |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
linecrunch+doubled lines, no? |
| |
lft
Registered: Jul 2007 Posts: 369 |
Yes, I believe Peiselulli is repeating rows to use the same colour data twice. Since the counters increment anyway, only every other row will be fetched. The remaining rows are the back buffer. To switch, add a linecrunch at the top of the screen.
But due to the double-height rows, that's a different effect from what Color Bar is proposing. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
indeed
as for the original question..... what are you going to show at the top half of the screen then? its a bit much for a sprite scoreboard i guess :) |
| |
ChristopherJam
Registered: Aug 2004 Posts: 1409 |
As others have said, yes, you certainly *could* do that.. and if you used linecrunch to slurp upwards instead of FLD to push down, you could even have some graphics in the top of the frame, as long as it didn't care about d800 contents (eg a BMP that never used the 11 bitpair)
But moving 480 bytes of color ram doesn't take that long at all; a naive slightly unrolled loop is only around 75 rasterlines, and colour-sorted speedcode chunks gets it down to around 40. |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
@Groepaz: Correct.
Btw, if I was to code a scrolling game these days, where VSP has gone out of style, I think I would look into ways of delta-updating the color RAM rather than trying to get it to double-buffer. I.e. look at which cells actually needs to be updated and which stay the same as on the last screen position. My guess is that if you take some actual game gfx, most chars will have the same color after you scroll the screen one char in X or Y.
Then the next question is of course, how to do this in an efficient way. I also have some loose ideas for this. |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
Quoting ChristopherJameg a BMP that never used the 11 bitpair Or hires bitmap. |
| |
TWW
Registered: Jul 2009 Posts: 545 |
For the screenram colors, you can double buffer and spread the gfx-move routine over the amount of HW scroll pixels you scroll with by toggling the screenram location.
For the colorram however, this could work imho. However I would pro'lly speedcode it as I am fucking daft with these VIC tricks. |
| |
Rastah Bar Account closed
Registered: Oct 2012 Posts: 336 |
I wasn't really thinking about a game. I just posted it to get the discussion going. Perhaps it might be useful for some kind of interlaced graphics effect in an intro or demo. But I guess speedcode is the preferred technique in any case.
Cruzer, thanks for the link. Really cool (or should I say "chilly"?) demo. It is the effect just before the twister, isn't it? I love that twister, btw, so colorful. |
| |
Peiselulli
Registered: Oct 2006 Posts: 81 |
Yes, it is the greetings part.
The double buffer color ram has a nice feature: If you scroll not at maximum speed and you need for example only a frame update every 4th frame, than you can build up a quarter of the screen with color ram in one of each of this frames. So you need to update only 120 chars (=240 bytes) per frame if you scroll with 2 pixel per frame.
The idea comes from Groepaz (he posted it some years ago in the Forum64) btw. |
Previous - 1 | 2 | 3 - Next |