02-19-2011, 09:38 PM
sindecencia Wrote:-Has more sense to be allocated in a interrupt that directly on code.Almost none (if any) of the Speccy games work that way. The Z80 on the Speccy run at 3.5Mhz, and it's almost impossible to redraw the entire screen at 50fps. Mostly games just redraw tiny screen portions, and if the got more than 10fps they were considered Ace games. E.g. Alien 8 runs < 10fps for sure (jump over a platform and you will notice it). Remember screen memory is "contended memory" (slower) than ram above 32767 (32K)
If not, you can flip in middle of a frame, and show up the upper half frame from backbuffer and the lower half from the other buffer. Also is desirable that you can configure the frame skip. If you can draw a entire buffer in 1/50 second, perfect (flip every buffer). But normally, and specially on smoth scroll games, you
need 2/50 or 3/50 seconds (25fps or 16.7fps).
The Spectrum 128k allows screen switching with a single out instruction (which can be directly done in ZX BASIC). So I guess the fastest strategy is to predraw both frames and only draw changes in both of them, swiching them with an out. Not sure if any game used this technique, but know there were games which used the alternative screen memory address.