joncampbell123 / dosbox-x

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

Raspberry Pi Target #858

Open yksoft1 opened 6 years ago

yksoft1 commented 6 years ago

Is your feature request related to a problem? Please describe. Currently, Raspberry Pi series don't have acceptable X acceleration. Dosbox-X's Linux target is designed for X, currently it's too slow for Raspbian under Raspberry Pi 1 and 2, especially under PC-98 mode.

Describe the solution you'd like Raspberry Pi series do have OpenGL ES2 hardware acceleration and SDL2 seems already include a backend for that. I wonder if we could port it to our SDL1 fork, or make SDL2 code compatible with it.

Describe alternatives you've considered Dosbox SVN recently had an armv7l dynrec core merged. If we could merge it into Dosbox-X, maybe we can make Dosbox-X perform better on Raspberry Pi.

brunocastello commented 5 years ago

What actually are the steps and requirements to compile DOSBox-X on my raspberryPi3/raspbian? Just running ./build-debug threw me into an error after a few minutes.

joncampbell123 commented 5 years ago

Try ./build-debug-no-avcodec, you probably don't have FFMPEG development headers on the Pi.

brunocastello commented 5 years ago

Try ./build-debug-no-avcodec, you probably don't have FFMPEG development headers on the Pi.

Oh, about that...

Screen Shot 2019-07-26 at 12 26 46 AM
brunocastello commented 5 years ago

Fixed that, installed automake and lib tool. But another error now, this time about the doslib:

Screen Shot 2019-07-26 at 1 18 36 AM
joncampbell123 commented 5 years ago

apt-get install ncurses-devel (I think), you need ncurses headers.

joncampbell123 commented 5 years ago

Most distros install libraries but not headers.

brunocastello commented 5 years ago

I installed, its libncurses5-dev btw. I tried again and a new error...

Screen Shot 2019-07-27 at 12 31 15 AM
joncampbell123 commented 5 years ago

Hunh... why is it trying to use MMX instructions on an ARM-based Raspberry Pi?

brunocastello commented 5 years ago

If you need more information, the gcc version that came with my rpi3 is: gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516

brunocastello commented 5 years ago

I gave up on rpi3 and went on to try again with a elementaryOS VM. I noticed that the rpi3 wouldn't be powerful enough for the job, period. I will keep you updated when I get it done.

Reason for doing this is because (I know this is mostly overkill) since NE2000 emulation only works through ethernet, I thought that I could fool this by doing a VMWare VM, installing dosbox-x on it.

The only problem is the size of the VM, actually elementaryOS sits at about 13GB. Well, it will be double the fun - I wanted to try out elementaryOS and have my DOSBox games/W3.11 running.

EDIT: Actually, the ./build-debug failed on me also with elementaryOS, with similar MAKE errors as described by me above.

brunocastello commented 5 years ago

I decided to try again on a updated and freshly reinstalled Raspbian, and no luck, I cannot compile it for the RPi3.

joncampbell123 commented 5 years ago

Are you compiling it on the Raspberry Pi itself or are you trying to cross compile?

brunocastello commented 5 years ago

Are you compiling it on the Raspberry Pi itself or are you trying to cross compile?

I am trying to compile on the RPi3 itself. Why, Is it possible to do on macOS for the RPi3 later?

joncampbell123 commented 5 years ago

Is your RPi3 running an arm-v7 32-bit or arm8 64-bit configuration?

brunocastello commented 5 years ago

Is your RPi3 running an arm-v7 32-bit or arm8 64-bit configuration?

Well, I am not on it at the moment, but I don’t really remember. I can check tomorrow night when I get back from work. And uh, how do I know it?

joncampbell123 commented 5 years ago

You should be able to tell from "uname -a" or "uname -m"

brunocastello commented 5 years ago

You should be able to tell from "uname -a" or "uname -m"

OK, I just turned it on and did it by SSH. Seems to be armv7

Linux raspberrypi 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux

joncampbell123 commented 5 years ago

I'm running a compile on my RPi3 right now:

pi@raspberrypi3b:~/src/dosbox-x $ ./build-debug-no-avcodec
brunocastello commented 5 years ago

Nice! Please let me know when it finishes. My last attempt took more than half an hour and now is too late for me to try again (almost 2 AM and I have to be up 6-7AM). I will try again later. My plan is to boot rpi in text mode and go straight to run dosbox, so it will look like if it was an old computer.

joncampbell123 commented 5 years ago

It just finished, works fine.

brunocastello commented 5 years ago

Ok, I think it did compile. But when i try to run, it goes black screen and I am stuck.

So I went on SSH and tried again after rebooting, and here is the log output: 57D3A05A-021E-477C-BD5D-6EA0CF232514

brunocastello commented 5 years ago

I am not trying to run with my phone, I just went to the phone to see the log output until it crashes. I have no idea of what’s happening on my rPi3.

joncampbell123 commented 5 years ago

When you boot the RPi3, login, start the desktop (startx) and then from that desktop start DOSBox-X.

brunocastello commented 5 years ago

When you boot the RPi3, login, start the desktop (startx) and then from that desktop start DOSBox-X.

When I boot, I am sent straight to the desktop, no login screen (I was somehow automatically logged in) and Dosbox-x doesn’t appear in any menu option after it was compiled, so I went to the terminal window and ran dosbox-x. The black screen is exactly when I am on desktop.

joncampbell123 commented 5 years ago

Look at the config.log for DOSBox-X and SDL1/SDL2 (whichever you compiled). Does it indicate that it found the headers and libraries for X11?

Most distros tend to install the binaries by default but not the headers and libraries needed to compile against them.

brunocastello commented 5 years ago

I finally managed to compile the damn thing. Thanks God. Probably some library was missing. Then I started all over again - ran your command - waited almost an hour for it to compile - and I finally saw the damn thing. Woot woot! In a few minutes I will test if everything works well, when I set up the same stuff I have on macOS.

I just hope it doesn’t require me to recompile again if NE2000 doesn’t work (then I will probably need the same small patch I was told by a friend to apply when I compiled for macOS).

joncampbell123 commented 5 years ago

NE2000 support should work if libpcap was detected at configure / compile time. Good luck!

brunocastello commented 5 years ago

I will have to recompile, libpcap wasn't detected.

Meanwhile, I tested everything and man, it is painfully slow. I know the rPi isn't a fast computer, but man... I'm impressed

joncampbell123 commented 5 years ago

Dynamic core can help with performance, assuming your system is running as armv7

brunocastello commented 5 years ago

Meanwhile, I have to run it in text mode after boot, I know RetroPie has something to allow it, it's something to do with the SDL. Basically, I know how to set dosbox-x up to run automatically after the boot auto login, but it simply won't for some reason.

brunocastello commented 5 years ago

I compiled OK again, but still no NE2000 working. Anyway, the Pi3 is too slow for a dosbox booting DOS/Win3.x from a disc image. I will just use the rPi3 as a gateway for my other DOSBoxes to connect to the internet, and try again when I get a rPi4. Thanks anyway, you’re very helpful and did a great job with DOSBox-X!

appnjoy commented 4 years ago

Hi, first of all thanks for your wonderful work.

I compiled successfully DosBox X on Raspbian Buster Lite w/out X server on framebuffer only.

When i run it, i only get a black screen :(