Open Damaniel opened 3 years ago
Thanks for reporting this! I have checked it, and I think the issue is with the core setting in the config file. The problem seems to only happen if you set core=dynamic_x86
but not core=dynamic_rec
or core=normal
. So please try to set the latter two (core=dynamic_rec
or core=normal
) instead of the dynamic_x86 core in this case for now. Hope this helps.
P.S. I have tried the same setting (dynamic_x86 core) in DOSBox SVN and ECE which will lead to a crash and exit instead of giving incorrect result. DOSBox 0.74 will also give incorrect result if the dynamic_x86 core is active.
@Wengier
Same code compiled and running under linux gives the correct result with core=dynamic_x86
.
linux.zip
dosbox-x -set cputype=pentium -set core=dynamic_x86 -set cycles=max -set "cpu use dynamic core with paging on"=false -c "mount c ./linux.zip" -c "c:" -c "linux.bat"
@grapeli Yes, but I think /usr/bin/example
is a Linux executable running in Linux (within DOSBox-X) rather than DOS executable running directly in DOSBox-X in this case, and so different results may be somehow expected.
P.S. With DOSBox-X 0.83.10 you can just type the command as the following in this case:
dosbox-x ./linux.zip -set cputype=pentium -set core=dynamic_x86 -set cycles=max -c "c:" -c "linux.bat"
Note that dosbox-x ./linux.zip
is functionally equivalent to dosbox-x -c "mount c ./linux.zip"
, and with the default cpu use dynamic core with paging on=auto
it is enabled if and only if the 386 paging AND the guest system are enabled.
Some builds cannot provide the full 80-bit IEEE floating point precision of Intel processors. These builds include the VS2019 builds and any non-Intel builds.
I'm currently aware of several test cases in my collection that have issues when less than 80-bit precision is available:
Describe the bug
I'm working on a game that uses a very small amount of floating point math, built with Borland C++ 3.1. I noticed intermittent problems with the floating point math generating exceptions in my code, and after tracing it down, it seems like any application I build using Borland C++ 3.1's floating point emulation library intermittently fails in DOSBox-X but not elsewhere.
To Reproduce Steps to reproduce the behavior:
Expected behavior The floating point calculations should always work correctly.
Screenshots
A correct run: https://i.imgur.com/5SWW51Z.png
An incorrect run: https://i.imgur.com/snzfWPM.png
Environment:
Additional context
I've tested this program in the following places and confirmed that the behavior in these places is correct:
If you configure Borland C++ to use hardware floating point instructions, the problem goes away - it only appears when using Borland's floating point emulation library (either the fast or accurate version). I've tried adjusting cycle settings to confirm whether the problem may be CPU speed related, but I can reproduce it all the way down to ~5000cycles/ms (I haven't tried lower).
Example program:
dosbox-x.conf