You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The dynamic core FPU JIT/emulation appears to be broken on Apple Silicon when using DOSBox-x for Apple Silicon. This trivial C program
#include <stdio.h>
int main(void) {
double v = 123.0;
printf("%f", v);
return 0;
}
will "print" the following
Steps to reproduce the behaviour
Compile the above program with DJGPP (any version will do, I tested 12.1.0 and 7.5.0). I've attached an executable: dos.zip
Run the executable using DOSBox-X for Apple Silicon on an Apple Silicon macOS machine
See
Expected behavior
The program should print 123.0.
Note that DOSBox-x x86_64 for macOS running on Apple Silicon via Rosetta 2 works as intended.
What operating system(s) this bug have occurred on?
macOS on Apple Silicon
What version(s) of DOSBox-X have this bug?
0.84.1, latest commit on GitHub
Used configuration
No response
Output log
LOG: Early LOG Init complete
LOG: "65536" is not a valid value for variable: pcrate.
It might now be reset to the default value: 65536
LOG: DOSBox-X's working directory: /Users/badlogic/workspaces/minifb
LOG: Logging init: beginning logging proper. This is the end of the early init logging
LOG: Logging: No logfile was given. All further logging will be discarded.
LOG: DOSBox-X version 0.84.1 (macOS SDL2)
LOG: macOS EXE path: dosbox-x
LOG: macOS Resource path:
LOG: macOS: NSTouchBar support detected in system
LOG: Host keyboard layout is now us (US English)
LOG: Mapper keyboard layout is now us (US English)
LOG: SDL2 reports desktop display mode 2056 x 1329
LOG: The default output for the video system: surface
LOG: Configured windowposition: -
LOG: SDL: Current window pixel format: SDL_PIXELFORMAT_ARGB8888
LOG: Screen report: Method 'CoreGraphics' (2056.000 x 1329.000 pixels) at (0.000 x 0.000) (344.702 x 222.816 mm) (13.571 x 8.772 in) (151.500 x 151.500 DPI)
LOG: ISA BCLK: 8333333.333Hz (25000000/3)
LOG: monopal: green,
LOG: Active save slot: 1 [Empty]
LOG: USING AVI+ZMBV
LOG: Max 3670016 sz 16384
LOG: Final 16384
LOG: MIDI:Opened device:coreaudio
LOG: Pentium CMPXCHG8B emulation is enabled
LOG: VOODOO LFB now at d0000000
LOG: Serial1: BASE 3f8h
LOG: Serial2: BASE 2f8h
LOG: Parallel1: BASE 378h
LOG: MPU-401 Registering I/O ports as if IBM PC MPU-401 at base 330h
LOG: Screen report: Method 'CoreGraphics' (2056.000 x 1329.000 pixels) at (0.000 x 0.000) (344.702 x 222.816 mm) (13.571 x 8.772 in) (151.500 x 151.500 DPI)
LOG: Allocated APM BIOS pm entry point at f000:ce20
LOG: Writing code to fce20
LOG: Writing code to fce40
LOG: ETHERNET: NE2000 Ethernet emulation backend selected: slirp
LOG: SLIRP: Slirp version: 4.7.0
LOG: SLIRP: Successfully initialized
LOG: NE2000: Base=0x300 irq=3
LOG: Screen report: Method 'CoreGraphics' (2056.000 x 1329.000 pixels) at (0.000 x 0.000) (344.702 x 222.816 mm) (13.571 x 8.772 in) (151.500 x 151.500 DPI)
LOG: ISA Plug & Play BIOS enabled
LOG: VGA ROM BIOS init callback
LOG: WARNING: No translation support (to host) for code page 0
LOG: 0 ERROR BIOS:Keyboard layout file auto not found
LOG: 0 ERROR BIOS:Keyboard layout file auto not found
LOG: XMS: 50 handles allocated for use by the DOS environment
LOG: EMS page frame at 0xe000-0xefff
LOG: COMMAND.COM env size: 720 bytes
LOG: COMMAND.COM environment block: 0x0701 sz=0x002d
LOG: COMMAND.COM main body (PSP): 0x072f sz=0x009a
LOG: COMMAND.COM stack: 0x0749
LOG: pixratio 1.350, dw false, dh false
LOG: Aspect ratio: 720 x 540 xToY=1.333 yToX=0.750
LOG: surface consider=720x400 final=720x400
LOG: Screen report: Method 'CoreGraphics' (2056.000 x 1329.000 pixels) at (0.000 x 0.000) (344.702 x 222.816 mm) (13.571 x 8.772 in) (151.500 x 151.500 DPI)
LOG: SHELL:Redirect output to nul
LOG: DOSBox-X has switched to max cycles, because of the setting: cycles=auto.
If the game runs too fast, try a fixed cycles amount in DOSBox-X's options.
### Additional information
_No response_
### Have you checked that no similar bug report(s) exist?
- [X] I have searched and didn't find any similar bug report.
### Code of Conduct & Contributing Guidelines
- [X] I agree to follow the code of conduct and the contributing guidelines.
The text was updated successfully, but these errors were encountered:
I can confirm this with current code, in both the SDL1 and SDL2 builds. I get the correct result in an Apple Silicon build I made on 1 April 2022, but the wrong result in an Apple Silicon build I made on 3 September 2022. I can't narrow it down beyond that, but the regression clearly happened in April through July of this year.
Describe the bug
The dynamic core FPU JIT/emulation appears to be broken on Apple Silicon when using DOSBox-x for Apple Silicon. This trivial C program
will "print" the following
Steps to reproduce the behaviour
Expected behavior
The program should print
123.0
.Note that DOSBox-x x86_64 for macOS running on Apple Silicon via Rosetta 2 works as intended.
What operating system(s) this bug have occurred on?
macOS on Apple Silicon
What version(s) of DOSBox-X have this bug?
0.84.1, latest commit on GitHub
Used configuration
No response
Output log
The text was updated successfully, but these errors were encountered: