3 ms·
Can you explain point 3 a bit more? Specifically where the performance impact came from: A) Mode 13h has not enough ram to have 2 pages, so either you get scre
by hyperman1 5y ago
Can you explain point 3 a bit more? Specifically where the performance impact came from:
A) Mode 13h has not enough ram to have 2 pages, so either you get screen flicker as you see Doom draw, or you loose 64k ram for an offscreen buffer, and the extra data transfer also takes time.
B) The core of ModeX/ModeY is disabling the chain4 mechanism and manually dispatching bytes to the 4 planes. The cost of this is some 'out' instructions, I assume 1 group per vertical slice. I don't know how doom did floors here, maybe draw them 4 times?. Even so, the cost seems not that expensive.
- rasz 5y agoDoom, like Wof3d, renders screen in 1pixel wide columns. https://www.youtube.com/watch?v=ujXrQVyl610 https://www.youtube.com/watch?v=ujXrQVyl610 8-bit accesses only, this alone tanks performance for faster VGA cards. The second problem is slow plane switching in some implementations, especially later cards didnt bother optimizing this. When you write to VGA (ISA in general) CPU is paused for the duration of the transfer. Switching back to 13h and rendering to RAM buffer benefits from motherboard cache and lets you actually use whole bandwidth when copying to the card (rep movsd). Typical 8-Bit VGA write bw is between 700KB/s for very bad Trident up to almost 2000KB/s for ET4000. At the same time fast 386 will do >20MB/s cache writes and extremely fast VGA on overclocked ISA bus can do 7MB/s. Heretic performance is higher compared to Doom because Raven dropped modeY. Fastdoom: Cyrix MediaGX https://www.youtube.com/watch?v=3PAfvDsmzVY https://www.youtube.com/watch?v=3PAfvDsmzVY 24 vs 64 fps and extreme case of very bad modeY handling by Rendition Verite https://www.youtube.com/watch?v=6unNuPympE4 https://www.youtube.com/watch?v=6unNuPympE4 modeY 14, 13h 60, VBE2 300 fps
- rasz 5y agoI forgot one more thing: reading! Doom reads back VGA memory when painting invisible sprites (Spectres, player sprite with partial invisibility blur sphere), this is extremely slow because absolutely nobody optimized VGA cards for reading. Ram buffer removes this disadvantage.
- hyperman1 5y agoI think we played on different machines. You talk about high end VGA and cache. But most 386's had no cache, mine surely hadn't. My VGA was slow enough not to care about transferring 16 bits instead of 8, it just got half as fast or worse. OTOH, the low res mode, 160x200, was created by enabling 2 of the planes, and made a big difference. And 64K on a 4MB meant less of hard disk activity, which was my main bottleneck. The semi translucent spectres causing VGA reads were very bad on that machine, causing <5FPS if there were multiple on screen. I learned to shoot them on sight and from a distance.
- rasz 5y agoFastdoom on 386DX40 is as fast at full resolution as regular Doom in low detail modeY.