joncampbell123 / dosbox-x

DOSBox-X fork of the DOSBox project
GNU General Public License v2.0
2.8k stars 383 forks source link

Disabling the FPU doesn’t stop Quake from running #5012

Open skitt opened 5 months ago

skitt commented 5 months ago

Describe the bug

Quake requires a FPU and on a real FPU-less system it aborts with “Error: Quake requires a floating-point processor”. Disabling the FPU in DOSBox-X doesn’t prevent Quake from running, I thought it would/should.

Steps to reproduce the behaviour

  1. Start DOSBox-X with dosbox-x -set "cpu fpu=false" -set "cpu cputype=pentium"
  2. Confirm that the logs show the corresponding warning: “WARNING: Disabling FPU support for this CPU type is unusual, may confuse DOS programs”
  3. NSSI and similar tools determine that there is no FPU
  4. Start Quake, it runs fine

Expected behavior

Quake should abort as described above.

What operating system(s) this bug have occurred on?

Debian 12

What version(s) of DOSBox-X have this bug?

2024.03

Used configuration

No response

Output log

No response

Additional information

I haven’t tried with FPU emulation disabled at build-time, see https://github.com/joncampbell123/dosbox-x/issues/4262

Quake (or rather, DJGPP) expects interrupt 7 to occur if it tries to run a floating-point instruction without a FPU. It seems this doesn’t happen on DOSBox-X.

Have you checked that no similar bug report(s) exist?

Code of Conduct & Contributing Guidelines

joncampbell123 commented 5 months ago

I'm able to cause Quake to crash by setting fpu=false.

skitt commented 5 months ago

That’s intriguing, I wonder what the difference is...

maron2000 commented 3 months ago

Visual Studio x64 version runs MCPDIAG regardless of fpu=true|false when CPU core is dynamic_x86. If CPU core is normal and fpu=false, MCPDIAG mentions FPU is not available.

CPU core = dynamic_x86 and fpu=false

image

CPU core: normal and fpu=false

image

Allofich commented 2 months ago

Visual Studio x64 version runs MCPDIAG regardless of fpu=true|false when CPU core is dynamic_x86.

Also happens in the MinGW build (SDL1 x64 tested).