FNA Games on ARM board (i.e. play FEZ, Stardew Valley, Bastion... on Odroid/OrangePI/RPi)


ptitSeb

Serial Porter
Joined
Aug 15, 2012
Messages
9,330
Age
52
Location
France, near Lyon
I have published an article on ODroid magazine on how to run FNA games on Odroid boards.
It's basically the method I used to publish PND of Stardew Valley or Hammerwatch on the Pandora, but generalized. I tried on many games, and most works. There are a few that still doesn't work (Transistor doesn't work yet, TheSwapper has some issues), but most just work flawlessly.

I would be interrested in having some feedback on other board (like RPi or OrangePI). I think OrangePI should work fine out of the box. For Rpi, you may need to use "LIBGL_FB=3" if using gl4es (no idea if the beta OpenGL driver have enough extension to make the game runs). Also, the GL part of the RaspberryPi (even the 3) is quite weak, so performances may not be there...

Here is the link: https://magazine.odroid.com/article/playing-modern-fna-games-on-the-odroid-platform/

About the Pandora, most games are a bit too slow to be good, but maybe I'll publish a pnd of Towerfall Acenssion or A Virus Named TOM (but I still have to work a bit on thoses two, to have a nicely playable PND).

And small screenshot of Pandoras running FNA games.
 

Attachments

  • Pandora_FNA_Games.JPG
    Pandora_FNA_Games.JPG
    533.8 KB · Views: 784
Last edited:
H*ly shit, awesome work man. You are really pushing the limits of our beloved Linux minicomputers, and this will be even more awesome when the Pyra is finally out. Thank you very much!

BTW, I had a nerdgasm when I saw that Bastion welcome screen on the Pandora, it's one of my favourite games.
 
Thank you very much! It was a nice read and gave me some insights. I tried to reproduce your steps for StardewValley on the Jetson TX2 (Ubuntu 16.04), but unfortunately it doesn't work.

Code:
nils@tegra-ubuntu:~/Software/StardewValley$ LC_ALL=”C” LIBGL_ES=2 LIBGL_GL=21 LIBGL_DEFAULTWRAP=2 \
> LIBGL_FBOFORCETEX=1 LD_LIBRARY_PATH=~/monolibs mono StardewValley.exe
Please use SDL 2.0.5 or higher.
gameMode was 'titleScreenGameMode (0)', set to 'errorLogMode (11)'.
gameMode was 'errorLogMode (11)', set to 'playingGameMode (3)'.
[ERROR] FATAL UNHANDLED EXCEPTION: System.IndexOutOfRangeException: Index was outside the bounds of the array.
  at Microsoft.Xna.Framework.Audio.MSADPCMToPCM.calculateSample (System.Byte nibble, System.Byte predictor, System.Int16& sample_1, System.Int16& sample_2, System.Int16& delta) [0x0000f] in <d6c8900e06194f5396df8ca14f336577>:0
  at Microsoft.Xna.Framework.Audio.MSADPCMToPCM.MSADPCM_TO_PCM (System.IO.BinaryReader Source, System.Int16 numChannels, System.Int16 blockAlign) [0x00135] in <d6c8900e06194f5396df8ca14f336577>:0
  at Microsoft.Xna.Framework.Audio.SoundEffect.PlatformInitializeFormat (System.Byte[] buffer, System.Int32 format, System.Int32 sampleRate, System.Int32 channels, System.Int32 blockAlignment, System.Int32 loopStart, System.Int32 loopLength) [0x00020] in <d6c8900e06194f5396df8ca14f336577>:0
  at Microsoft.Xna.Framework.Audio.SoundEffect..ctor (System.Byte[] buffer, System.Int32 format, System.Int32 sampleRate, System.Int32 channels, System.Int32 blockAlignment, System.Int32 durationMs, System.Int32 loopStart, System.Int32 loopLength) [0x00041] in <d6c8900e06194f5396df8ca14f336577>:0
  at Microsoft.Xna.Framework.Audio.WaveBank..ctor (Microsoft.Xna.Framework.Audio.AudioEngine audioEngine, System.String nonStreamingWaveBankFilename) [0x00714] in <d6c8900e06194f5396df8ca14f336577>:0
  at StardewValley.Game1.Initialize () [0x000f9] in <9620be4d9d84421696c47b240d5c890d>:0
  at Microsoft.Xna.Framework.Game.DoInitialize () [0x00011] in <d6c8900e06194f5396df8ca14f336577>:0
  at Microsoft.Xna.Framework.Game.Run (Microsoft.Xna.Framework.GameRunBehavior runBehavior) [0x0002d] in <d6c8900e06194f5396df8ca14f336577>:0
  at Microsoft.Xna.Framework.Game.Run () [0x0000c] in <d6c8900e06194f5396df8ca14f336577>:0
  at StardewValley.Program.Main (System.String[] args) [0x00028] in <9620be4d9d84421696c47b240d5c890d>:0
 
Thank you very much! It was a nice read and gave me some insights. I tried to reproduce your steps for StardewValley on the Jetson TX2 (Ubuntu 16.04), but unfortunately it doesn't work.

Code:
nils@tegra-ubuntu:~/Software/StardewValley$ LC_ALL=”C” LIBGL_ES=2 LIBGL_GL=21 LIBGL_DEFAULTWRAP=2 \
> LIBGL_FBOFORCETEX=1 LD_LIBRARY_PATH=~/monolibs mono StardewValley.exe
Please use SDL 2.0.5 or higher.
gameMode was 'titleScreenGameMode (0)', set to 'errorLogMode (11)'.
gameMode was 'errorLogMode (11)', set to 'playingGameMode (3)'.
[ERROR] FATAL UNHANDLED EXCEPTION: System.IndexOutOfRangeException: Index was outside the bounds of the array.
  at Microsoft.Xna.Framework.Audio.MSADPCMToPCM.calculateSample (System.Byte nibble, System.Byte predictor, System.Int16& sample_1, System.Int16& sample_2, System.Int16& delta) [0x0000f] in <d6c8900e06194f5396df8ca14f336577>:0
  at Microsoft.Xna.Framework.Audio.MSADPCMToPCM.MSADPCM_TO_PCM (System.IO.BinaryReader Source, System.Int16 numChannels, System.Int16 blockAlign) [0x00135] in <d6c8900e06194f5396df8ca14f336577>:0
  at Microsoft.Xna.Framework.Audio.SoundEffect.PlatformInitializeFormat (System.Byte[] buffer, System.Int32 format, System.Int32 sampleRate, System.Int32 channels, System.Int32 blockAlignment, System.Int32 loopStart, System.Int32 loopLength) [0x00020] in <d6c8900e06194f5396df8ca14f336577>:0
  at Microsoft.Xna.Framework.Audio.SoundEffect..ctor (System.Byte[] buffer, System.Int32 format, System.Int32 sampleRate, System.Int32 channels, System.Int32 blockAlignment, System.Int32 durationMs, System.Int32 loopStart, System.Int32 loopLength) [0x00041] in <d6c8900e06194f5396df8ca14f336577>:0
  at Microsoft.Xna.Framework.Audio.WaveBank..ctor (Microsoft.Xna.Framework.Audio.AudioEngine audioEngine, System.String nonStreamingWaveBankFilename) [0x00714] in <d6c8900e06194f5396df8ca14f336577>:0
  at StardewValley.Game1.Initialize () [0x000f9] in <9620be4d9d84421696c47b240d5c890d>:0
  at Microsoft.Xna.Framework.Game.DoInitialize () [0x00011] in <d6c8900e06194f5396df8ca14f336577>:0
  at Microsoft.Xna.Framework.Game.Run (Microsoft.Xna.Framework.GameRunBehavior runBehavior) [0x0002d] in <d6c8900e06194f5396df8ca14f336577>:0
  at Microsoft.Xna.Framework.Game.Run () [0x0000c] in <d6c8900e06194f5396df8ca14f336577>:0
  at StardewValley.Program.Main (System.String[] args) [0x00028] in <9620be4d9d84421696c47b240d5c890d>:0
It seems you are using the SDL2 provided by your system. Try to build it, maybe it will fix things?
Also, what is your mono version (I think you may have a too old version, as this is a C# error here)?
Use
Code:
mono --version
to have the detail.
Version 4.6.2 do works, but not sure about earlier version.
 
Another you can try, is to convert the WaveBank to PCM from ADPCM, using rexwb. No need to downsample, so you can keep 44100 kHz, but simply convert MSADPCM to PCM should help (using "-f").
[doublepost=1534163009,1534151327][/doublepost]Also @Nilsnsn , did you create the solftlink to libsoft_oal.so, it's needed only for Stardew Valley.
 
Another you can try, is to convert the WaveBank to PCM from ADPCM, using rexwb. No need to downsample, so you can keep 44100 kHz, but simply convert MSADPCM to PCM should help (using "-f").
[doublepost=1534163009,1534151327][/doublepost]Also @Nilsnsn , did you create the solftlink to libsoft_oal.so, it's needed only for Stardew Valley.
I did create the softlink, but i didn't check it however. The link needs to go to libopenal.so.1, as there was no .so!
And indeed, the SDL library in monolibs had not been loaded, as the game was looking for libSDL2.so, not libSDL2-2.0.so.0

It's running fine now, thank you very much!
 
I did create the softlink, but i didn't check it however. The link needs to go to libopenal.so.1, as there was no .so!
And indeed, the SDL library in monolibs had not been loaded, as the game was looking for libSDL2.so, not libSDL2-2.0.so.0

It's running fine now, thank you very much!
Thanks for the detail of what was needed to make it run :)

So it works on a Jetson TX2 board? Nice \o/. Beeing a Pascal GPU, I assume performances are good, and you don't need gl4es there, a full OpenGL 4.5+ driver must be there right?
 

Here is a video to go with the FNA Article, trying some games on an ODroid N1. The recording from my TV is not really high quality, and the bliking, especially on Stardew Valley is not visible in real life...
 
just saw in your video that you must be using an older version of Stardew - 1.3 has Co-Op Multiplayer enabled and works just fine (although only LAN) on my machine. And it really is a lot of fun!
 
just saw in your video that you must be using an older version of Stardew - 1.3 has Co-Op Multiplayer enabled and works just fine (although only LAN) on my machine. And it really is a lot of fun!
Yes, I haven't updated the version I used (too lazy to copy again the files before the video). Glad to hear Multiplayer works! Connecting a PC and an ODroid/RPi/Other board on LAN makes an actual use case of that trick :)
 
How do i compile gl4es for EVM 5432 board?

cmake -D[?]=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo .

Thomas
 
Back
Top