4 ms·
Unfortunately, CPU accuracy is not one of DOSBox's focuses. If you install the "Recommended" build of DOSBox-X from the website, then proceed to install the de
by Dwedit 2y ago
Unfortunately, CPU accuracy is not one of DOSBox's focuses.
If you install the "Recommended" build of DOSBox-X from the website, then proceed to install the default "Visual Studio build (64-bit)", you get buggy and inaccurate CPU emulation.
How do you know it's buggy and inaccurate? Run QBasic, and PRINT VAL("5"). You get 4.99999999999.
But...
You get the correct result if you are using a 32-bit build. You get the correct result on all non-MSVC builds. You get the correct result if you have the Dynamic core selected, even on 64-bit MSVC builds. It's just 64-bit MSVC builds with any core other than the Dynamic core that give the wrong result.
So what's going on here?
MSVC 64-bit doesn't support 80-bit floating point math, and doesn't allow you to use inline assembly to manually run the 80-bit floating point instructions. Instead, floating point operations are truncated down to 64-bit.
I think that the MSVC 64-bit build should NOT be the default build recommended to users for just that reason.