Monday, October 23, 2006

Pictures!!!

Mike has been pestering me to put up an in-progress picture, and I have to emphasise that this is very much in-progress (including programmer art).

Basically this shows the scrolling area being redrawn every frame with a sprite being rendered on top (actually it is currently 4 sprites in the same position).

The border colours are showing how long is being taken for the 2 routines (Cyan is the scroll render and red is the sprite drawing). So the scroll render is taking around 2/3rds of a full frame and we are only rendering the top 2/3rds of the screen (128 pixels).

I've been talking tactics with Mike and I've had to rethink some things over the weekend as the Z80 was just not fast enough for what I was thinking... it really take some time to readjust to how little can really be done by these processors, we really are spoiled by current machines!

I still have to write the processing part of the scrolling which will create the code to render the screen and rotate the tiles of the actual screen, but we have already decided that the game will run in 2 frames (i.e. it will update at 25fps, the same as the Plus/4 and the C64) so I have plenty of time.

Mike also pointed out that the 128K Spectrum would allow me to double buffer the screen (which would mean I would not need to use the floating bus technique), currently I'm a purist aiming at the 48K Spectrum but I will be doing a 128K version as well so I'll keep that knowledge in my back pocket.

I need to get back to this processing stuff now so that I can get it all moving...

Comments:
Yeah, we're a bit spoiled by all these modern machines with their hardware scrolling ;)

(Disclaimer: I'm not a Spectrum coder so I'm just guessing here)

Lets see if I've got this right.
The CPU runs at about 3.5 Mhz and you'll be rendering at 25 Hz, so you've got about 140,000 cycles per frame to play with.
Furthermore I assume you'll be loading 16-bit immediates and pushing them on the stack, so 24 T-states per word. With a 256x224 (or 7 kB) screen that works out to 86,016 cycles for a full redraw, or more than 60% of the available time. And that's not even counting rebuilding the speedcode itself!

I guess you can try to only update the sections of the level that's actually changed (although then you'll also have to clear the sprites). And you could keep frequently used patterns (i.e. all black or all white) in the free register pairs and push them directly.

And yet I'm sure I've seen plenty of spectrum games with smooth scrolling. Interesting..

/doynax
 
DAMN!!!

Can someone PLEASE email me the picture? I want to see but this freaking firewall blocks it.

cbmeeks@gmail.com

THANKS!!
 
"modern machines with their hardware scrolling" lol! You mean like the Commodore 64 and Plus/4 then ;-)

Regards,

Shaun.
 
Precisely =)

/doynax
 
Got the picture emailed to me.

Thanks guys...

Looks good. I must just run out and get me a Speccy now. ;)
 
Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?