Closed joncampbell123 closed 5 years ago
Another demo by the same group "Eden" does not exhibit the same artifacts.
The demo run in DOSBox SVN does not have these artifacts and rasterization errors.
It doesn't seem to matter which core is used in DOSBox-X (on x86_64 Linux).
An initial analysis shows a lot of 32-bit and 64-bit float FLD and FST use. The proportions seem to imply the vertices use 64-bit float and the texture mapping uses 32-bit float.
If I cannot determine the problem through the debugger I will have to tackle the problem by writing FPU test programs in DOSLIB to run through possible combinations of math and/or conversions from float to int that may be involved.
I just incorporated the x86 FPU support (fpu_instructions_x86.h) from DOSBox SVN which seems to fix the glitches.
So it's a precision issue. Something about the demo's rendering code needs the full 80-bit precision. The non-x86 emulation uses "double" which does NOT provide that precision.
The best way to fix the issue entirely for non-x86 targets is to change the non-x86 emulation to use "long double" instead of "double" which on most targets enables the full 80-bit precision, except on Microsoft's C++ compiler where long double is the same as double. However Microsoft C++ is only supported with this code for x86 and x86_64 targets anyway, so fpu_instructions_x86.h will fill that gap.
Demo requires full 80-bit precision, seems dependent on that with FMUL and FDIV.
Using the long double core on x86 and the x86 core fixes that.
The normal non-x86 core isn't going to provide enough precision to emulate it properly.
Describe the bug The 3D rasterization of the demo has overlarge or missing scan lines on the edges of 3D geometry.
To Reproduce Steps to reproduce the behavior:
Demo download link:
http://files.scene.org/get:nl-http/mirrors/hornet/demos/1996/e/explora.zip