The instructions to download the dosbox source, editing a couple header files, and enabling recompiler support for ARM has been known for years. I've done it myself on an arm chromebook, and on a raspberry pi. So why don't the Raspbian or Arch Linux ARM distributions just package it that way? Being able to apt-get or pacman a working fast emulator should be as easy on ARM as it is on x86. Is this something that the dosbox developers need to work on to get the distros to take it?
This is what my arm chromebook (Nvidia Tegra) gives in the log: (Raspberry pi does something ) similar.
1configure:6274: result: no 2configure:6476: checking for target cpu type 3configure:6514: result: unknown 4configure:6536: checking whether x86 dynamic cpu core will be enabled 5configure:6548: result: no 6configure:6561: checking whether recompiling cpu core will be enabled 7configure:6584: result: no 8configure:6598: checking whether fpu emulation will be enabled 9configure:6601: result: yes 10configure:6618: checking whether x86 assembly fpu core will be enabled 11configure:6631: result: no 12configure:6648: checking whether to enable unaligned memory access 13configure:6656: result: no 14configure:6661: checking png.h usability 15
Now, dosbox has core for arm v4 and arm v7, and a raspberry pi is arm v6. However, an arm v6 runs v4 instructions just fine, its not not perfect... like using only 486 instructions when you have a pentium. Even on my armv7 netbook, armv4 instructions also run fine, and it much faster than pure software emulation. Quake is playable on dynamic (like a slow pentium), but on normal it is a complete slideshow, worse than when I tried on my 486. (On these machines I would run the source port natively, but Quake is a good DOS performance test.)
When I look at the configure script, it seems it doesn't even attempt to recognize any arm cpu: (I do find 68k interesting... are people running DOS games on amigas and old macs? 😀 )
What does the $host_cpu have for contents at your place and which changes do you usually make to get it running on your pi ?
(C_TARGETCPU ARMV4LE and alligned memory or no alligned memory ?)
M86K isn't used, aside for the alligned memory stuff.
PowerPC, Old macs, yes dosbox runs on those 😀
The armv4 recompiler works fine for armv6 such as the pi and armv7 like my chromebook. But, as far as I can tell, even if I had a real armv4 processor, the build will never use the recompiler.
I was using it aligned, but I am trying an unaligned build. I know on some arms it is a bus error to do unaligned access, so it probably shouldn't be default.
Unless something changed since I made the arm backend for dynrec, there's no configure test for arm dynrec, because I didn't create it - I have no idea how and it doesn't bother me, so it's a job for someone else.
I can write those tests. That is not a problem, however I will need information on what needs to be enabled and I need config.log of the chromebook and the raspberry pi
I can get the logs for a raspberry pi zero and the chromebook, but I don't have any armv4 devices, which is what the original recompiler from M-HT seems to target. I don't even know what device has that chip, perhaps an old phone?
I can get the logs for a raspberry pi zero and the chromebook, but I don't have any armv4 devices, which is what the original recompiler from M-HT seems to target. I don't even know what device has that chip, perhaps an old phone?
The original armv4 recompiler was written for GP2X.
This has the information with what I have to enable for version 2. do you need to do the same for the zero ? (I am totally not familiar with the versions of the PI)
Here is the config log from a raspberry pi zero w. The pi zero, and original pi should have the same CPU.
Note, to build on the current version of Raspbian, I needed to add stddef.h to doc_inc.h.
Those instructions for raspberry pi 2 seem about the same as what I did on the chromebook, except I didn't do any special math flags. Perhaps my floating point is not as optimized as it could be. Probably doesn't matter for anything except maybe quake. I doubt quake will be playable on the pi. It is building right now, this damned thing is sooooo slow. (If I really wanted good Quake on pi, I'd use the source port, not dosbox.) But the default build in Raspbian even made old stuff I used to play like on a 286 like Jill of the Jungle really lag.
Just to give an idea how weak the pi is, my k6-2 machine running 600Mhz, with an old build of DOSBOX plays the above mentioned Jill of the Jungle, just fine.
I have added something to the code for this.
As I don't have any info on the first pi with regards to if it allows unaligned memory access, i have not enabled this.
It is enabled for the armv7l processors (pi2/3 and chromebook)
I recently compiled dosbox with dynamic compilation for my Pi3, after i updated the system to Raspbian Stretch. The first thing I've noticed is that Dosbox doesn't work as well as it did under wheezy. Performance is slower, I can't use opengl even though it is enabled and the only way i can get a full screen, where the picture reaches the corners of my screen, is by using overlay.