Comment by dspillett
5 hours ago
> Cycle accurate emulation helps little with this era PC demos
It works, and has done for some time, surely. What more is there to add here above accurate playback?
> From 386SX-16 to Pentium 66 MHz, that's 10-20x difference in performance.
Yep, and some demos had specific requirements for not only minimal CPU but maximal because the assumptions inherent in small-code timing tricks would break beyond a certain speed or because of significant differences in relative instruction execution times (and sometimes the unpredictability of those execution times as the P5 architecture and some of its frankenstein-486-like competitors added branch prediction). Larger demos were more flexible as you didn't need the small-code tricks to squeeze into 4Kb or sometimes less, so 64K demos and larger could be more flexible wrt target CPU.
But cycle-accurate emulation has this sorted to: you just need the instruction cycle time accuracy to be matching a particular CPU running to the pace of a particular clock. And given the description of how this is being done (“The demo is run on an x86 emulator that records…”) I assume this is actually using cycle-accurate emulation!
I'm guessing the benefit here is that the overhead of playing back the demo on each client machine is lower when playing this recorded version, compared to each viewer's browser running the initial emulation live in the browser. That and doing something a new way was fun or otherwise intellectually stimulating for the dev(s) involved.
Cycle accurate compared to what?
Even with a cycle accurate CPU you'd still have a lot of variation caused by the motherboard chipsets, DRAM speeds, cache chips and graphics cards.
Tseng ET4000 was on a completely different level than something like Cirrus Logic CL-GD510 or heaven forbid, Oak Technologies card.
If the era appropriate PCs had huge variations, what extra does cycle accuracy really bring at this point? The same PC demo could perform very differently on two 486DX2 66 MHz PCs.
Wrt CPU: The cycles per instruction measures were entirely predictable with 386 and 486 chips, and more-or-less so with early Pentiums, you just need a delay loop so the faster ones didn't speed ahead of the lowest you were targetting. While there was a significant range to deal with, it was predictable. A 4K demo is going to fix in a 486's on-board cache (which I don't think was ever less than 8Kb aside from some relatively rare clone models), so DRAM speed, L2 cache and other motherboard variances, are not significant in those cases either.
Wrt GFX: Most demos, certainly when thinking about the 4K challenges, would be using nothing more than some variant of a basic VGA display mode (usually but not always Mode 13h or some variant like “Mode X”) without detecting and taking advantage of acceleration features - the difference between graphics cards at this point was not nearly as significant as what the demos were doing in the CPU, even the nastiest ISA card of the era is going to keep up at a reasonable framerate, IIRC from my doom playing days.