Let's play x86 games!

Also the “only use our modified Allegro”, I’ve look at the differences from the official sources, their changes are only for Windows target, so a bog standard Allegro is fine for any non windows target

1 Like

Thank you man !

The two solutions are intersting :slight_smile:

Of course a building for arm is better, but meanwhile … :yum:

@slock, have you made any more progress with this? I was waiting to try it until I upgraded, and now I’m on 0.5 I decided to check it out.

Both your pre-packaged VVVVVV (with free levels) and the same files with data from the original game (I had it on Humble Bundle) work fine!

I tried to get Undertale working (using my Steam version from Windows, but with some file hackery), but I’m not sure if box86 is the issue, or if I just didn’t hack out and prepare the files correctly. Is there any way you can share the tools/process you used to get a Linux version of Undertale? It seems like there are a number of ways people have hacked the Windows version to work on Linux, but maybe only one of those ways ends up with something that might work through box86? Oh, I see there is a DRM-free version on Humble – I’ll have to see if I have that, but I’m afraid I only got it through Steam.

I also tried Baba is You (from a Humble Bundle version), but it never seemed to launch properly. I’m curious how you configured it, beyond just calling it like this: “./box86 bin32/Chowdren”

I also tried Super Hexagon, Super Meat Boy, and a few more (all Humble Bundle Linux games), but couldn’t get any of them to work.

Have you found a good way to dump debugging information when trying to run these games? I’m thinking if it gave some clues as to why it wasn’t starting, it could be helpful. Also, based on reading some box86 threads in other forums, it sounds like there are environment variables that can be set and fix some issues in certain games. Have you tried any of that? I’m going to spend more time on this when I get a chance, but I don’t want to reinvent the wheel. :slight_smile:

For some good news, Guarodan works PERFECTLY. It’s a joy to play on Gameshell too. Once you get it going, press menu and go to the control option and set your buttons up. After that, it’s like the game was made for Gameshell! :slight_smile:
https://www.locomalito.com/gaurodan.php

Even better, it’s free. I’m not sure if it should be repackaged to make it even easier to share on Gameshell, but all I had to do was download the Ubuntu “untested port”, and extract it. The assets directory just sits there and my launch script just needed: “./box86 runner”

I haven’t tried any other of Locomalito’s games, but I’m hopeful a few more might work.

Thanks for suggesting box86. I’m not sure how well it ran before, but on 0.5 with Lima, it’s works great for the games that work!

2 Likes

Thanks for trying this out !

I think there are a few things that blocks most games :

  • First is a bunch of libraries that are missing, namely libgcc and libc6 iirc.
  • second is DRM. DRM messes everything up (they are pretty much made for this purpose).
  • Third are complicated game engine, such as unity

For the 1st point, you should try to find the libraries for i386. The two main culprit are actually included in the vvvvvv release above, and they don’t seem to cause issues in any games I tested.
For the second point, you should really try to find a DRM-free version. Humble and GOG usually are (but not always).
For the third point, I heard there is a solution for unity but I wouldn’t expect too much of it.

The flags do help for debug, however they don’t really improve compatibility in my experience, or at the cost of extremely degraded performance.

It seems however that the project moved quite a lot since my last build here, and I see that quite a few things that could have a nice impact have been added. I should recompile.

EDIT:
So I recompiled and things actually changed quite a bit.

Super meat boy is a bit faster, and seems to glitch a bit less. Still not very playable imo, and still requires a change in keymap.

vvvvvv is faster. Still a bit slower than normal at times, but really playable.
isaac rebirth boots, goes ingame, but requires a keymap in order to move, and seems quite slow and will probably not be really playable.
Volgarr boots and seems fast enough, but requires a keymap too

1 Like

I just tried a build from the latest git source (using the GAMESHELL flag), and got the following error:

Scanning dependencies of target box86
[ 1%] Building C object CMakeFiles/box86.dir/src/main.c.o
cc: error: unrecognized argument in option ‘-march=armv7-a+fp’
cc: note: valid arguments to ‘-march=’ are: armv2 armv2a armv3 armv3m armv4 armv4t armv5 armv5e armv5t armv5te armv6 armv6-m armv6j armv6k armv6kz armv6s-m armv6t2 armv6z armv6zk armv7 armv7-a armv7-m armv7-r armv7e-m armv7ve armv8-a armv8-a+crc armv8.1-a armv8.1-a+crc iwmmxt iwmmxt2 native
CMakeFiles/box86.dir/build.make:229: recipe for target ‘CMakeFiles/box86.dir/src/main.c.o’ failed
make[2]: *** [CMakeFiles/box86.dir/src/main.c.o] Error 1
CMakeFiles/Makefile2:72: recipe for target ‘CMakeFiles/box86.dir/all’ failed
make[1]: *** [CMakeFiles/box86.dir/all] Error 2
Makefile:140: recipe for target ‘all’ failed
make: *** [all] Error 2

I edited the CMakeLists.txt and changed armv7-a+fp to armv7-a and it seems to be building fine now. Is there a better option to use though? I’m wondering if the floating point reference there offered any improvements, but I don’t know what the correct architecture should be.

I’ve got a few other games working with your old pre-compiled version. I’m curious to see if this new build helps get other stuff working. I’ll post more details about working games in a bit. I’m also considering creating a “warehouse” for x86box games (at least in the cases of free ones), and possibly even entries for the commercial ones, just minus the commercial content, but with everything else needed to run them.

i personally use
CFLAGS="-mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4"

you could also set “native” to march

1 Like

Cool! I’ll try this.

I just tried Guarodan again, using my newly built box86 and it runs noticeably slower than @slock’s original build. I’m hoping with the correct build parameters I might be able to get the same or better performance as the old build. Either that, or the latest git sources just result in a slower (but hopefully more compatible?) version.

Thanks, @r043v, I’ll try your suggestions.

It’s building again, but with your parameters I’m getting a lot of warnings about:

switch -mcpu=cortex-a7 conflicts with -march=armv7ve switch

I used all your CFLAGS and set march to native. Hopefully the warnings don’t matter and this build will be better than the last, but just FYI.

yes, mcpu will compile code dedicated for the specific cpu, march (only on arm platform) will make more generic code for the architecture family, if you have choice only set mcpu

some times we can’t, like in the kernel compile where i also got a warning like your one

2 Likes

Little precision, my gameshell os is quite heavily modified. I probably have a newer version of a lot of thing (for instance, I’m on debian unstable iirc), so my gcc version is likely different.

Anyway, I think I could opt for more generic flags.

As for the floating point extension, the dynarec is built around the neon vfp3 extension, I’m not sure if vfp4 would brings any noticeable improvement so for now at least I choose tested flags against performance. But of course once I have about the same results in term of compatibility with the officially tested arch, then the performance tuning can begin.

Apparently, shovel knight was broken recently (at least that explains why it didn’t work on my side), and fixed a few hours ago, with confirmation from the dev. I will test again soon.

1 Like

I took some time and went back through all my old Humble Bundles and downloaded linux versions of games when available. I still have a lot to check, but I’ve made some progress on getting more to work on the Gameshell. :slight_smile: I built the most recent version of box86 a few days ago, so I haven’t tried it with the fixes you mentioned just went in for Shovel Knight. (Sadly, I don’t have that game, but I’m hoping those fixed may have improved some other games too…) Oh, and when I built it, I used the flags as suggested by @r043v above, just (in the CMakeLists.txt):

add_definitions(-mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -marm)

The original line, which I commented out was:

add_definitions(-march=armv7-a -mfpu=neon -mfloat-abi=hard -marm)

I’m not sure whether I gained any speed improvements from those options or if it was just the more recent code updates that helped. If there are preferred compile options though, it might be good to get them updated in the source.

I’ll make a separate post here, per game, to document the games I’ve gotten working. Some are freely (legally) available for download too, so I’ll provide the links to those games.

Since you already mentioned them @slock, I’ll just confirm that VVVVVV and the free version of VVVVVV both work for me too, and won’t make a separate post for those.

I’ve also tried (again, all from Humble Bundles of old) and got working some games that are unplayable due to speed, display size being too big (and I couldn’t figure out a way to change that), etc:

  • Bards Tale: too slow, but correct screen size, unsure if playable
  • Bit.Trip.Beat: very nearly playable, requires a quick game config file hack to force keyboard controls (since it defaults to mouse)
  • Braid: too slow, can’t remember if it was also wrong screen size
  • DynamiteJack: too slow, but correct screen size, unsure if playable
  • Gish: wrong screen size, couldn’t navigate but seemed decently fast
  • Jaspers Journeys: mostly worked, but slow and I seem to remember a crash
  • Nuclear Throne: too slow to be playable
  • Retro City Rampage: too slow to be playable

It also sounds like a lot of games that require Mono won’t work unless that is built. I haven’t had the time to tackle that yet, and I’m not sure how complete the box86 support is for those games anyway. But it sounds like some might work if Mono was compiled and available for them to find. I’ve got 43 games extracted and ready to test once (if?) I get Mono working, including games like Beatbuddy, FOTONICA, Organ Trail, Thomas Was Alone, TypeRider, etc. And I’ve got 28 more that I haven’t sorted through yet, like Limbo, Luftrausers, Monaco, TokiTori, etc. I know some of these have been mentioned in other threads related to box86 as working on Pandora, so I’m hoping they might work on Gameshell too. :slight_smile:

Also, I noticed a few games (Blocks That Matter, Delver, and Titan Attacks) that use java. At some point I might try to get those working too, but it might be a pain to get a working JRE on Gameshell and combine it with box86 if needed. Delver seemed to be pure Java though, so maybe that would work with just the JRE.

3 Likes

Let’s Play Gaurodan

Main link:
https://www.locomalito.com/gaurodan.php

Download link:
https://www.locomalito.com/juegos/Gaurodan_linux.zip

Status:
Fully playable and seemingly full speed!


Files:

Notes:

  • use libstdc++.so.6 and libgcc_s.so.1 (from OP above)
  • use box86 (from OP above or build your own)
  • runner and assets directory are from Gaurodan download; make sure to chmod 755 runner if it isn’t already executable

Gaurodan.sh

#!/bin/bash
#Remap keys
xmodmap -e “keysym j = z”
xmodmap -e “keysym k = x”
xmodmap -e “keysym u = X”
xmodmap -e “keysym i = Z”

#Run application
./box86 runner > log.txt

#Restore xmodmap keymappings.
#NOTE: Reboot or run this manually if there is a crash, etc.
setxkbmap


Let’s Play EFMB

Main link:
https://www.locomalito.com/efmb.php

Download link:
https://www.locomalito.com/juegos/EFMB_linux.tar.gz

Status:
Fully playable.


Files:

Notes:

  • use libstdc++.so.6 and libgcc_s.so.1 (from OP above)
  • use box86 (from OP above or build your own)
  • runner and assets directory are from EFMB download; make sure to chmod 755 runner if it isn’t already executable

EFMB.sh

#!/bin/bash
./box86 runner > log.txt


Let’s Play Maldita Castilla

Main link:
https://www.locomalito.com/maldita_castilla.php

Download link:
https://www.locomalito.com/juegos/Maldita_Castilla_linux.tgz

Status:
Playable but seems slow.


Files:

Notes:

  • use libstdc++.so.6 and libgcc_s.so.1 (from OP above)
  • use box86 (from OP above or build your own)
  • runner and assets directory are from Maldita Castilla download; make sure to chmod 755 runner if it isn’t already executable
  • controls are mapped via the script; Menu will bring up the in-game menu, and use Select to quit

MalditaCastilla.sh

#!/bin/bash
#Remap keys
xmodmap -e “keysym j = z”
xmodmap -e “keysym k = x”
xmodmap -e “keysym u = X”
xmodmap -e “keysym i = Z”
xmodmap -e “keysym space = Q”

#Run application
./box86 runner > log.txt

#Restore xmodmap keymappings.
#NOTE: Reboot or run this manually if there is a crash, etc.
setxkbmap


Let’s Play Super Crate Box Together

Main link:

Download link:
(Use the download link at the site above; you can choose not to donate, so it’s essentially free.)

Status:
Playable, but unfortunately slow. This seems to fix the graphical glitches found in the original Super Crate Box, and it has all the single player content. Plus, it has two player network play! (I haven’t tested the network play yet, but I expect it will work. If so, it would be a cool way to show off multiplayer play across Gameshells!)


Files:

Notes:

  • use libstdc++.so.6 and libgcc_s.so.1 (from OP above)
  • use box86 (from OP above or build your own)
  • SuperCrateBoxTogether and assets directory are from download; make sure to chmod 755 runner if it isn’t already executable
  • controls are mapped via the script

SuperCrateBox.sh

#!/bin/bash
#Remap keys
xmodmap -e “keysym j = z”
xmodmap -e “keysym k = x”
xmodmap -e “keysym u = X”
xmodmap -e “keysym i = Z”

#Run application
./box86 runner > log.txt

#Restore xmodmap keymappings.
#NOTE: Reboot or run this manually if there is a crash, etc.
setxkbmap


Let’s Play Super Crate Box

Main link:
http://supercratebox.com/

Download link:
http://supercratebox.com/download/linux.zip

Status:
Playable, but sometimes has graphical glitches. (Restarting may help but is random?) Leaving here for completeness, but Let’s Play Super Crate Box Together is the more stable option.

image
Files:

Notes:

  • use libstdc++.so.6 and libgcc_s.so.1 (from OP above)
  • use box86 (from OP above or build your own)
  • runner and assets directory are from Super Crate Box download; make sure to chmod 755 runner if it isn’t already executable
  • controls are mapped via the script

SuperCrateBox.sh

#!/bin/bash
#Remap keys
xmodmap -e “keysym j = z”
xmodmap -e “keysym k = x”
xmodmap -e “keysym u = X”
xmodmap -e “keysym i = Z”

#Run application
./box86 runner > log.txt

#Restore xmodmap keymappings.
#NOTE: Reboot or run this manually if there is a crash, etc.
setxkbmap

3 Likes

Let’s Play Super Hexagon

Main link:
https://www.superhexagon.com/

Download link:
You’ll need to buy it, but maybe you already have it? (I bought mine via Humble Bundle ages ago.)

Status:
Playable, and full speed!

Files:

Notes:

  • use libstdc++.so.6 and libgcc_s.so.1 (from OP above)
  • use box86 (from OP above or build your own)
  • SuperHexagon, data, and x86 directory are from the commercial download; make sure to chmod 755 SuperHexagon if it isn’t already executable

SuperHexagon.sh

#!/bin/bash
#Remap keys
xmodmap -e “keysym j = space”
xmodmap -e “keysym k = Escape”

#Run application
./box86 x86/superhexagon.x86 > log.txt

#Restore xmodmap keymappings.
#NOTE: Reboot or run this manually if there is a crash, etc.
setxkbmap

3 Likes

it run pretty fast !!

as i packaged it, for simplicity i compiled it using -DRPI2=1 flag as the definitions exactly match our need,
also done sudo make install from the build folder, it put the twice emulated libs into /lib/i386-linux-gnu/ and make available box86 from the path, so not need anymore to copy each files in each games folders

in arch i got more recent libcrypto & libssl than supercratebox await, i take x86 one’s from another gog release and put libs into /lib/i386-linux-gnu/, work just fine, edit > there is a legacy openssl-1 package in repository :slight_smile:

it’s a pretty awesome project :sunflower:

oh i see now from where come this systemd errors, i compiled & released latest kernel with this feature enabled.
edit > that’s awesome it’s auto call box86 on directly call x86 executables !

2 Likes

Oops, I didn’t notice that RPI2 and GAMESHELL were the same! I submitted a pull request that was accepted so the GAMESHELL flag now uses these options too. So either will build what we need. :slight_smile:

Cool. Looks like installing also puts a config file somewhere:

install(FILES ${CMAKE_SOURCE_DIR}/system/box86.conf DESTINATION /etc/binfmt.d/)
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libstdc++.so.6 DESTINATION /usr/lib/i386-linux-gnu/)
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libgcc_s.so.1 DESTINATION /usr/lib/i386-linux-gnu/)

That should keep things tidy.

Those working games I posted above were with the older box86 binary I had built. With the most recent code, everything seems much faster and more stable! I also got a bunch of other (commercial) games working:

  • Baba Is You - needs libudev.so.1 which I got from a Debian x86. It also needs some keys remapped [xmodmap -e "keysym j = space";xmodmap -e "keysym k = z";xmodmap -e "keysym u = r";xmodmap -e "keysym i = p"] The game runs great, but it’s incredibly difficult to see and identify the tiles in the game. The default display seems to be 854x480. I noticed all the tiles are just PNG tiles in the game data directory, and could be edited, but that would take a lot of work and I’m still not sure it would look much better on the Gameshell display. :frowning: If anyone has ideas on how to get this displaying better, I’d love to be able to play it on the Gameshell!
  • Bit.Trip.Runner - plays better with a couple of buttons remapped [xmodmap -e "keysym j = space";xmodmap -e "keysym k = Escape";xmodmap -e "keysym u = Left";xmodmap -e "keysym i = Right"]
  • Bit.Trip Presents… Runner2: Future Legend of Rhythm Alien - plays better with a couple of buttons remapped [xmodmap -e "keysym j = space";xmodmap -e "keysym k = Escape";xmodmap -e "keysym u = Left";xmodmap -e "keysym i = Right"]
  • Freedom Planet - needs a couple of buttons remapped [xmodmap -e "keysym j = z";xmodmap -e "keysym k = x";xmodmap -e "keysym u = c"] and requires a bit of blind fiddling of options within the game to set it to fullscreen. Once set up though, it runs beautifully.
  • Jaspers Journeys - needs buttons remapped in the game
  • Momodora: Reverie Under The Moonlight - needs a lot of buttons remapped [xmodmap -e "keysym j = a";xmodmap -e "keysym k = s";xmodmap -e "keysym u = d";xmodmap -e "keysym i = q";xmodmap -e "keysym Return = e";xmodmap -e "keysym space = w";xmodmap -e "keysym Escape = Tab";xmodmap -e "keysym Backspace = Shift_L"]
  • Super Meat Boy - needs a couple of buttons remapped [xmodmap -e "keysym j = space"; xmodmap -e "keysym k = Shift_L"]
  • Retro City Rampage DX - like Baba it’s difficult to read and see text on the screen. There’s an easy fix for that though – go to help & options → settings → TV simulation mode and set it to OFF. The text is actually legible then, and the game is a little faster without the screen effects. I haven’t mapped out the controls on this yet, but xmodmap should work fine. There are lots of keys though, and I’ll have to think about what makes sense on the Gameshell, and probably steal and reapply the default Xbox controller mappings.
  • Undertale - some of the story text is impossible to read, but the game seems fully playable; needs a few buttons remapped [xmodmap -e "keysym j = z";xmodmap -e "keysym k = x";xmodmap -e "keysym u = Return";xmodmap -e "keysym i = Shift_L";xmodmap -e "keysym space = c""]

Some games require a mouse to play, and I don’t see a way around that using just the GameShell by itself. :frowning:

  • Bit.Trip.Beat - playable with the d-pad and a button for “space”, but cannot navigate menus or exit properly without a mouse. It’s a shame because otherwise this works quite nicely.
  • Hack Slash Loot - seems to work fine, and while there are tons of keyboard shortcuts (way more than buttons on the GameShell!), it’s unplayable without a mouse
  • Savant Ascent - requires a mouse, but seems to run fine
  • Turmoil - requires a mouse, but seems to run fine
  • VA-11Hall-A - requires a mouse, and display is too large for the screen, but seems to run ok

Some games require a higher resolution. I couldn’t figure out a way to force these to scale/stretch to 320x240. If anyone figures out a way to fix the display issue, these could be playable.

  • Beat Hazard Ultra - seems to work (though slow with all the effects), but the display is larger than the screen
  • Don’t Move - seems to play great, but the display is larger than the screen and is centered, so everything around the edges is cut off
  • Downwell - seems to run, but the display is larger than the screen; I had to hack the content for this into Undertale to get it to run at all, but I didn’t see a way to force the resolution to 320x240 or make it fullscreen
  • Dwarf Fortress - seems to run fine, but the text is too small to read; I imagine playing it with the GameShell controls would be a challenge too! It’s cool to see the intro movie play though.
  • The Escapists - couldn’t get past the splash screen for language select; I think this one might require a mouse too? But the display is way larger than the screen.
  • Gish - display is larger than the screen, but fixed at the top left, so it’s difficult to navigate the menu and impossible to play the game.
  • Jamestown - the display scales properly, but there are graphics corruptions and the text is impossibly small to read. The game seems like it might be playable if you can navigate the menus though.
  • Jelly Killer - sort of playable; at different points in the game, like the splash and main menu, the display is larger than the screen. Also seems kinda slow.
  • Polychromatic Funk Monkey - This game from http://farbs.org/ works, but I couldn’t figure out a way to make it scale to the Gameshell screen. Even editing the config file didn’t help.

Some games start, but are either too slow to play or seem to lock up. These included Bards Tale, Dynamite Jack, and Nuclear Throne. On a positive note, they were all displaying properly.

Lots of games (so far, 28) crashed at startup for me. Unfortunately this included some games I really wanted to see working on the Gameshell, like Binding of Isaac, PixelJunk Monsters, and others.

I’ve still got a bunch of untested games to go through and try, and there are 40+ games that require Mono. I set up the build environment for Mono and I’ve had it building for close to 10 hours now – there were some hiccups (I forgot to turn on the swap file, for one), but I’m hoping I can get the necessary binaries built so I can get some Mono/Unity dependent games working too.

3 Likes

Oh wow! I’d love to see your updated kernel available and rolled into a future OS release for Gameshell. It would be awesome to be able to run these games (and other x86 stuff) directly on the device! :-o

2 Likes

wow you done an awesome titan work to test all of this !

I submitted a pull request that was accepted so the GAMESHELL flag now uses these options too.

just see it, my compile was from yesterday :slight_smile:
(rpi2 build also adding set(CMAKE_ASM_FLAGS “-marm -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard”) don’t know if it’s change anything or not

Looks like installing also puts a config file somewhere

it must be that file who was made my systemd complain

I’d love to see your updated kernel available and rolled into a future OS release for Gameshell.

it’s already available as an update into my arch linux port, like box86 that i also packaged yesterday,
it must work on clockwork os too, but it need a manual intervention as it’s an arch package and as it directly use zImage, not uImage, can be found here

2 Likes

I must be getting old because it was working for me before with VVVVVV but now that I reflashed my GS with OS.0.4 it does not work at all !

Is there dependencies to be installed?
I remember that everything was in the folder but nothing I do works…

I’ve only been trying this since I upgraded to 0.5 but given the timing of the posts, I’m assuming @slock got it working under 0.4. Not sure if it requires Lima or not (the speed boost would likely be helpful, if not necessary), but that might be an issue if 0.4’s Lima is as unstable as I found it to be. :frowning:

The files at the OP above were enough for me to get VVVVVV running though. The free version is included, and if you swap out some files from the commercial version you can play that too. I’m not sure if there are any other dependencies, as I may have run apt-get to grab some stuff needed for compiling box86 or other things before I first tried it.

Try running this from the VVVVVV directory and looking at the log.
./box86 x86/vvvvvv.x86 > log.txt

If the game is missing any files it will probably complain about it in the log. :slight_smile:

I’ll try that later and report back.
Thanks