joncampbell123 / dosbox-x

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

Dynamic core on Apple Silicon broken #3561

Closed digistorm79 closed 1 year ago

digistorm79 commented 2 years ago

Describe the bug

There are some applications that do not work with the dynamic core, but they do work with the normal core. They also work with the Intel build on Apple's emulation. So there is something wrong with the implementation of the dynamic core on arm64 compared to x86.

I discovered the bug in several demo scene productions that use hi-color graphics modes, but I also found that Death Rally shareware version has yellow background glitch in the main menu, and crashes when the game should start. It is not always with hi-color graphics modes that it bugs, but because it goes wrong right at initialisation, it is maybe easier to hunt down. Some other demo's seem to do their calculations wrong, maybe the visuals can give a clue what the problem is.

These are the demo scene productions that give errors:

All examples were working fine in version 0.83.23 Apple Silicon build. (except Headache).

The Intel build does not have these errors. The normal core of the arm64 build also does not have these errors.

Steps to reproduce the behaviour

Download the mentioned demo or game. Configure appropriately (if needed). Run (most examples are demos, you can just run them) Compare with Youtube capture on pouet.net (the provided links). It is very obvious.

Expected behavior

On the pouet pages there are YouTube captures of the expected behaviour. In addition, since this is a regression, in version 0.83.23 things were just okay. (except Headache)

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

macOS Monterey

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

0.84.2 / 2022.08.0

Used configuration

No response

Output log

No response

Additional information

All tests were performed on a M1 Pro Macbook Pro.

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

Code of Conduct & Contributing Guidelines

digistorm79 commented 2 years ago

I want to raise this issue again. It has been several versions, and this bug, which is (largely) a regression, is still not fixed, making DOSBox-X unreliable to use on arm64 architecture, because anything remotely new will not work. It is especially frustrating that this particular bug was not present in version 0.83.23. I already asked in the vanilla DOSBox forum about this bug, and one user responded: "This seems to be a DOSBox-X issue. I tried it on Linux aarch64, and it behaves just as you described. Vanilla DOSBox works." So is it maybe please possible to revert whatever change was made to the dynamic core? It is better to have a slow dynamic core than a broken one.

joncampbell123 commented 1 year ago

We've made some fixes to dynamic core in the last month, especially FPU emulation, that may have resolved this issue.

I am able to run Windows 98 and Quake on my ARM Macbook just fine, so far.

digistorm79 commented 1 year ago

Yes, all software mentioned is working now, and it apparently fixed a lot of other issue too. That's great.