VOGONS


DOSBox SVN for Apple M1 Core Dynrec - A simple hack

Topic actions

Reply 60 of 67, by TheGreatCodeholio

User metadata
Rank Oldbie
Rank
Oldbie
kjliew wrote on 2021-07-20, 20:33:
TheGreatCodeholio wrote on 2021-07-20, 20:06:

DOSBox-X uses a heavily modified SDL1.2 that includes high DPI awareness in Windows and Mac OS X and a workaround that still works in Big Sur.

You really can't make that claim when DOSBox-X issue #1697 remains opened. And I am also pretty sure that high DPI awareness has never been working for Windows 10. I would love to be proven wrong anyway. 😉

I didn't claim any fix for SDL2, I claimed that I had a working fix in the in-tree SDL1 library it uses.
It's still an issue with SDL2 I haven't fixed yet.

DOSBox-X project: more emulation better accuracy.
DOSLIB and DOSLIB2: Learn how to tinker and hack hardware and software from DOS.

Reply 61 of 67, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie
TheGreatCodeholio wrote on 2021-07-20, 21:02:
kjliew wrote on 2021-07-20, 20:33:
TheGreatCodeholio wrote on 2021-07-20, 20:06:

DOSBox-X uses a heavily modified SDL1.2 that includes high DPI awareness in Windows and Mac OS X and a workaround that still works in Big Sur.

You really can't make that claim when DOSBox-X issue #1697 remains opened. And I am also pretty sure that high DPI awareness has never been working for Windows 10. I would love to be proven wrong anyway. 😉

I didn't claim any fix for SDL2, I claimed that I had a working fix in the in-tree SDL1 library it uses.
It's still an issue with SDL2 I haven't fixed yet.

DOSBox-X issue #1697 is an SDL1 issue, if you haven't been paying attention. It was caused by the so-called "working fix" for retina display but broke anything non-retina. In fact, the so-called "working fix" is also broken for retina display when anyone tried any games that make use of mouse pointer. Haven't you read what this whole thread was all about? 😉

Reply 62 of 67, by TheGreatCodeholio

User metadata
Rank Oldbie
Rank
Oldbie
kjliew wrote on 2021-07-20, 21:25:
TheGreatCodeholio wrote on 2021-07-20, 21:02:
kjliew wrote on 2021-07-20, 20:33:

You really can't make that claim when DOSBox-X issue #1697 remains opened. And I am also pretty sure that high DPI awareness has never been working for Windows 10. I would love to be proven wrong anyway. 😉

I didn't claim any fix for SDL2, I claimed that I had a working fix in the in-tree SDL1 library it uses.
It's still an issue with SDL2 I haven't fixed yet.

DOSBox-X issue #1697 is an SDL1 issue, if you haven't been paying attention. It was caused by the so-called "working fix" for retina display but broke anything non-retina. In fact, the so-called "working fix" is also broken for retina display when anyone tried any games that make use of mouse pointer. Haven't you read what this whole thread was all about? 😉

No, I've been very busy lately. Thank you for pointing it out.

DOSBox-X project: more emulation better accuracy.
DOSLIB and DOSLIB2: Learn how to tinker and hack hardware and software from DOS.

Reply 63 of 67, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie

Updated 1st post to separate OpenGL DPI scaling fix from CPU core dynrec. Shamelessly abuse dosbox.conf for DPI scale. So this thread provides everything for a kick *ss DOSBox SVN for Apple M1 native AArch64 build, simple & minimalist solution for DOSBox SVN.

Have fun! 😀

Reply 64 of 67, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie

Updated 1st post with dpiscale v2 patch.

There is a winner at last to obtain DPI scale without abusing dosbox.conf. OpenGL says the initial viewport width/height is set to the same width/height of the window. So DOSBox just has to read them back with glGet() and derive DPI scale from there, simple!

Reply 65 of 67, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie

As DOSBox SVN fully loaded with CPU core dynrec, high CPU demand DOS4GW games such as LOLG 3Dfx Glide is fully playable. Unlike OpenGlide, Kekko's Voodoo chip emulation actually rendered the game well, I didn't notice any black squares artifacts. The 3Dfx Glide rendered of LOLG is indeed better compared to Win95 Direct3D version. So I was wrong again, QEMU is no longer the only emulation that can play this game perfectly on M1. 😉 And DOSBox for DOS games always has the advantage in simplicity over QEMU.

Kekko's Voodoo chip emulation scaled up nicely to fill the retina screen. 😁
@Dominus Now you can try this with DOSBox. No more x11 craps! 🤣

Screen Shot 2021-07-21 at 5.11.39 PM.jpg
Filename
Screen Shot 2021-07-21 at 5.11.39 PM.jpg
File size
1.02 MiB
Views
1223 views
File license
Fair use/fair dealing exception

Reply 66 of 67, by jmarsh

User metadata
Rank Oldbie
Rank
Oldbie
valuedcustomer wrote on 2021-07-14, 20:10:

There was also an experimental tweak I made that dramatically sped up several titles such as Frontier: First Encounters in commit https://github.com/dosbox-staging/dosbox-stag … ef22e1aaa815c26.

Do not do this. You're basically undoing a fix for a specific problem and making the dynrec unstable.
If you can see the cases that hit those lines of code it should be very apparent why they exist.