Menu

#541 DOSBox claims to emulate a CPU with FDIV bug

0.74
open
nobody
None
1
2020-10-29
2020-10-29
Robert
No

When emulating a Pentium CPU (cputype=pentium_slow), DOSBox reports a CPU-ID of 0513. This is the CPU-ID of a "Intel Pentium 60/66 B1-step", which happens to be one of the parts with the famous FDIV bug.

I suggest you change the CPU-ID from 0513 to 0517 which is a "Intel Pentium 60/66 D1-step", which is the CPU where the FDIV bug is fixed.

DOSBox does not emulate the FDIV bug, so claiming to be a CPU-ID with FDIV bug is the wrong thing to do. Although I have not run into any such cases, software could decide based on the CPU-ID not to use the FPU.

This value is set in src/cpu/cpu.cpp and is a simple 1 line change.

Basically change:
reg_eax=0x513; / intel pentium /

to:
reg_eax=0x517; / intel pentium P5 60/66 MHz D1-step /

You can use this DOS utility to check the reported CPU-ID
http://web.inter.nl.net/hcc/J.Steunebrink/chkcpu.htm

Discussion


Log in to post a comment.

MongoDB Logo MongoDB