Zeus wrote: ↑Wed Apr 15, 2020 9:13 pm
20) Broken palette in Shadow Warrior (DOS)
Incorrect palette data for grTexDownloadTable() in DOS.
Alright, got some updates. You were indeed right about something wrong with grTexDownloadTable() but the wrong data were handed in by the game

. I proved this by debug prints at the DOS OVL guest wrapper. Later, I also verified with OpenGlide and having DOSBox and QEMU TCG running side-by-side on 2 GDB sessions dumping out the entire 1KB palette data from the pointer. The 9th call to grTexDownloadTable() (or the 1st call after displaying 3DRealm logo) the pointer pointed to palette data with roughly 1st half of the table values as '0'. It seems that the game generated palette data at runtime, the very 1st 8 calls to grTexDownloadTable() the data were not always the same (though the patterns were similar with some variations), but anyway 3DRealm logo were shown correctly. Tried TCG, KVM (on Linux) and they produced consistent results. The incorrect palette data handed in by the game was not random, the results were consistent with the same incorrect palette table patterns.
Apparently, Shadow Warrior DOS software render with VESA 2.0 on QEMU (TCG, WHPX, KVM) also shows a similar incorrect palette data right at the 3DRealm logo display. Software render with 320x200 (VGA) is OK. So I guess this is either bug in QEMU CPU emulation or the BUILD engine. I hope the engine does not render into 2D framebuffer and then uses the results to generate the palette data. If this is the case, then it will not work.
Zeus wrote: ↑Wed Apr 15, 2020 9:13 pm
17) Broken texturing in Montezuma's Return (Demo or Full)
Fixed and thanks for the hint.
Zeus wrote: ↑Wed Apr 15, 2020 9:13 pm
16) Texturing problem in Monaco 2 Grand Prix (Demo or Full)
No problem with dgVoodoo2 and OpenGlide, the later requires LfbNoAux=1 and the only artifact is the CAR overlay "HUD". OpenGlide does not advertise 2 TMU but dgVoodoo2 does. The shot below was from OpenGlide, noticed the corrupted CAR overlay, but both rear-view mirrors and necessary stats were still OK.

- MGPR2 OpenGlide
- mgpr2_.png (615.79 KiB) Viewed 7210 times
Zeus wrote: ↑Wed Apr 15, 2020 9:13 pm
Could you provide such info like process name to setConfig@4 and call it before grGlideInit, so nGlide can autoconfigure itself?
I am afraid that I cannot do process identification at QEMU since it is a machine emulator rather than OS emulator. This would be very hack-ish and go beyond the scope of device model. I think DOSBox cannot do that, too, if booting off a disk image for DOS and Win9x. DOSBox can only do this when it also provides its own internal DOS emulation.
Zeus wrote: ↑Wed Apr 15, 2020 9:13 pm
What I wasn't able to reproduce was Mechwarrior 2. Colors were ok for me with both handler modes, but I noticed something strange. The HUD weren't being rendered every time you launch the mission (happens even with lfb handler on). Is grLfbBegin called every frame just before grBufferSwap?
Nevermind of it, I knew the problem now, it was not nGlide, but dgVoodoo2 LFB mechanism somehow was able to tolerate it. It depends if you let QEMU find the real Glide.dll at host or use its internal emulation and only requires Glide2x.dll at host. If QEMU finds a real glide.dll at host, then it will just pass-through the APIs and LfbHandler will also be in-placed (which kills VM acceleration). If no Glide.dll was found, QEMU automatically enables the internal emulation then the option of LfbHandler comes into play and the default of LFB as shared memory supports VM acceleration. QEMU outputs the message to console when using internal emulation for Glide 2.11
Code: Select all
glidept: DLL loaded - glide2x.dll, emulating API 2.11
I did not bother to port LFB as shared memory for Glide 2.11 pass-through, no Glide 2.11 games would need the additional speed from VM acceleration and not many Glide wrappers support Glide 2.11 with its awkward LFB semantics. Now, I also have Glide 2.11->Glide 2.43 wrapper implemented in its own DLL.