3 ms·
> Drawing a game at a decent framerate at 320x200 required careful coding. 320x200 is 64,000 pixels. If you want to maintain 20 fps, then you have to render 1
by Sohcahtoa82 4y ago
> Drawing a game at a decent framerate at 320x200 required careful coding.
320x200 is 64,000 pixels.
If you want to maintain 20 fps, then you have to render 1,280,000 pixels per second. At 40 Mhz, that's 31.25 clock cycles per pixel. And the IPC of a 386 was pretty awful.
That's also not including any CPU time for game logic.
- anthk 4y agoHint: you don't replace all pixels at once.
- int_19h 4y agoMost PC games of the VGA DOS era did exactly that, though. But, well, a lot can be done in 30 cycles. If it's a 2D game, then you're mostly blitting sprites. If there's no need for translucency, each row can be reduced to a memcpy (i.e. probably REP MOVSD). Something like Doom had to do a lot more tricks to be fast enough. Though even then it still repainted all the pixels.
- adolph 4y agoYou might enjoy the Fridman interview of Carmack. He talks about that era’s repaint strategies.