Giter Club home page Giter Club logo

Comments (23)

ptitSeb avatar ptitSeb commented on August 26, 2024 2

image
Got it to run on a Pi4, but it needed MESA_GL_VERSION_OVERRIDE=3.2

Closing ticket.

from box86.

ptitSeb avatar ptitSeb commented on August 26, 2024 1

Ok, I'll check later on my side. It seems there is a mix of mono runtime/tools that break the build.

from box86.

ptitSeb avatar ptitSeb commented on August 26, 2024

I'll work on wrapping the "libmono.so" of Unity games in Box86. That will get much better compatibility (because mono is difficult to emulate), and better speed, as all C# sharp code will run "native"...
That should help EtG (I'm working on that...)

About Stardew Valley, it's an FNA games: it's a "pure" C# games with FNA (i.e. XNA on Linux) Framework. You can run it already using this method: https://magazine.odroid.com/article/playing-modern-fna-games-on-the-odroid-platform/

from box86.

ITotalJustice avatar ITotalJustice commented on August 26, 2024

Great, thank you very much! I'll look forward to that!

As for the guide for playing fna games, i did try running a few games (including starfew) with that method and sadly all but one game failed to boot. The only game that managed to boot was hammerwatch. Starwdew, towerfall, owlboy and fez all failed to boot. I can post a few of the errors if you'd like.

from box86.

ptitSeb avatar ptitSeb commented on August 26, 2024

Ah yes, post some errors here. All the game you listed worked on my side, so that's strange they didn't worked for you (and for information, Hammerwatch is the only one in your list that is not an FNA game, but a regular C# + SDL2 game).

from box86.

ITotalJustice avatar ITotalJustice commented on August 26, 2024

Thank you. I posted the logs on pastebin so as not to clutter this age too much, though if you want them here i can edit them into this post :)

Also, i was unable to compile theorafile on armv7, apart from that everything else compiled fine.

bastion: https://pastebin.com/2NBRpehT

StardewValley: https://pastebin.com/QxKDZ41c

Towerfall (cmd-output): https://pastebin.com/wJyD88iX
Towerfall (error_log): https://pastebin.com/6aYt6eqf

Owlboy: https://pastebin.com/5GmcvfGX
 - Notes: Doesn't actually crash, just hangs and does nothing(?).

FEZ: https://pastebin.com/9rjimjF7

Dust An Elysian Tail: Needs Theorafile (cannot compile on armv7)

from box86.

ptitSeb avatar ptitSeb commented on August 26, 2024

So, for Bastion, there is an issue with your version of MojoShader. I'll check on my side if I can understand what is happening.

For StardewValley, it seems to crash while loading sound data. I see you have 4 GB of RAM, so I guess it's not a memory issue. Still, you can try do recode the sould (to avoid MSADPCM).

I'll check the other logs later.

from box86.

ptitSeb avatar ptitSeb commented on August 26, 2024

And TowerFall had the same mojoshader issue.

I analyzed a bit, and I think you need to rebuild mojoshader with FLIP_VIEWPORT activated.
so add -DFLIP_VIEWPORT=ON to the cmake command (or use ccmake and activate that option from there). That should solve many (most?) issues you have.

from box86.

ITotalJustice avatar ITotalJustice commented on August 26, 2024

The -DFLIP_VIEWPORT=ON flag was already set when i compiled originally (as it was in your guide). Tried compiling it a few more times, even changing the CMake.txt to having these options on just to make sure, still no luck.

However! i decided to try an older(?) repo at https://github.com/flibitijibibo/MojoShader. Checking the CMake.txt it seems that i can just run cmake then make, so i did, copied the .so over...and what do you know! It worked! Bastion, towerfall and owlboy all booted instantly, and setting bastion to 720p allows it run at fullspeed, absolutely amazing. I'll try and let icculus know about this.

Thanks again mate you've been extremely helpful.

EDIT: I solved stardew valley error. It was was fault, i did ln -s /usr/lib/arm-linux-gnueabihf/libopenal.so libsoft_oal.so, but i didnt check if the file was actually there. The correct name for me was libopenal.so.1. After fixing that, the game booted fine, and again its another game running fullspeed. :)

Only game that i have left in the list that still doesn't work is FEZ. It doesn't seem to give any errors when loading (that i linked in the pastebin), but it doesn't load. very strange.

Back to box86, i have tested quite a large number of games and have saved the errors for the ones that failed to boot. If you want i can upload all the logs here if that would help.

from box86.

ptitSeb avatar ptitSeb commented on August 26, 2024

Ah thanks for the info! That MojoShader github repo is certainly the one to go (as flibitjibibo is the author of FNA after all).

I try to add a comment on the article, but the comment zone is Facebook only, so no-go for me. I'll try to have it fixed.

For FEZ, maybe look in ~/FEZ there should be some debug logs.

For stardew valley, yes, that strange link to libsoft_oal... I see (I should fix the tutorial too).

For Box86 yes, if you can open a ticket per game, I think that would help me to see what stuff I have to do next. Also, did you had some success with Box86?

(also, what error do you have that prevent you from building theorafile in armv7?)

from box86.

ITotalJustice avatar ITotalJustice commented on August 26, 2024

Thanks, found the logs in ~/.local/share/FEZ.

(02:31:04.611) [OpenAL] Context created
(02:31:04.612) [OpenAL] Available mono sources : 255
(02:31:04.630) [OpenAL] Sound manager initialized!
(02:31:04.643) [Version] INFORMATION : 1.10, Build Date : 9/16/2013 2:36 AM
(02:31:05.530) [Unhandled Exception] ERROR : System.TypeInitializationException: The type initializer for 'FezEngine.Tools.SettingsManager' threw an exception. ---> System.InvalidOperationException: There is an error in XML document (0,$
  at System.Xml.XmlTextReaderImpl.Throw (System.Exception e) [0x0002a] in <1de9284cbde641149ec69c3bc257115c>:0
  at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo (System.String res) [0x00017] in <1de9284cbde641149ec69c3bc257115c>:0
  at System.Xml.XmlTextReaderImpl.ParseDocumentContent () [0x0041e] in <1de9284cbde641149ec69c3bc257115c>:0
  at System.Xml.XmlTextReaderImpl.Read () [0x00097] in <1de9284cbde641149ec69c3bc257115c>:0
  at System.Xml.XmlTextReader.Read () [0x00000] in <1de9284cbde641149ec69c3bc257115c>:0
  at System.Xml.XmlReader.MoveToContent () [0x0004b] in <1de9284cbde641149ec69c3bc257115c>:0
  at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderMonoGameJoystickConfig.Read5_MonoGameJoystickConfig () [0x00008] in <91b10e5da6ad4280b4fd1d77cda27128>:0
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00044] in <d0e12f672b88444$
   --- End of inner exception stack trace ---
  at System.Xml.Serialization.XmlSerializer.Deserialize (System.Xml.XmlReader xmlReader, System.String encodingStyle, System.Xml.Serialization.XmlDeserializationEvents events) [0x00139] in <1de9284cbde641149ec69c3bc257115c>:0
  at System.Xml.Serialization.XmlSerializer.Deserialize (System.Xml.XmlReader xmlReader, System.String encodingStyle) [0x00000] in <1de9284cbde641149ec69c3bc257115c>:0
  at System.Xml.Serialization.XmlSerializer.Deserialize (System.IO.Stream stream) [0x0001c] in <1de9284cbde641149ec69c3bc257115c>:0
  at Microsoft.Xna.Framework.Input.SdlGamePad.INTERNAL_AutoConfig () [0x00154] in <6f63475ba53f4512bb376e150fe53f4e>:0
  at Microsoft.Xna.Framework.Input.SdlGamePad.GetState (Microsoft.Xna.Framework.PlayerIndex playerIndex, Microsoft.Xna.Framework.Input.GamePadDeadZone deadZoneMode) [0x00014] in <6f63475ba53f4512bb376e150fe53f4e>:0
  at Microsoft.Xna.Framework.Input.SdlGamePad.GetState (Microsoft.Xna.Framework.PlayerIndex playerIndex) [0x00000] in <6f63475ba53f4512bb376e150fe53f4e>:0
  at FezEngine.Tools.SettingsManager..cctor () [0x001b1] in <f81bffca46d14a91b21c995e806d0ec9>:0
   --- End of inner exception stack trace ---
  at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_generic_class_init(intptr)
  at FezGame.Fez..ctor () [0x0007a] in <6db7a7f217a94e8a9d722a98aa26e3cf>:0
  at FezGame.Program.MainInternal () [0x0000b] in <6db7a7f217a94e8a9d722a98aa26e3cf>:0
  at Common.Logger.Try (System.Action action) [0x00000] in <4dd2f70f0b9e47279518ac154712e6b7>:0
(02:31:05.530) [FEZ] INFORMATION : Exiting.

Sure no problem. Yes i've had a few successes! bit-runner, unepic, defcon, FTL, world of goo and human resource machine. Another game that works is retro-city-rampage, however it runs at like 5fps, which is ironic as its the least demanding game by far ;) Though a few games that you got working did not work for me such as airline-tycoon. Airline-tycoon complains that "libsmpeg2-2.0.so.0" is not found, even though those libs are in ./lib32 of the game directory, and i added that path when running box86.

As for theorafile, i get a lot of assembly errors. Looking at the make file, it has a if else checking if the system is x64, else its x86, and then adds the flags. Of course because of this i wont be able to compile on arm. I did try removing the flag to see if it would magically work anyway, and it compiled and booted a game that required it (Dust An Elysian Tail), it tries open a window / goes fullscreen but fails, game continues to run with music etc and there were no errors. Just can't see the game :)

Lastly, for games such as undertale using box86, they require libcrypto. Do I have to install the i386 lib for this? I tried looking for help installing i386 libs on the pi but i couldnt find anything, the only i386 lib in the raspbian repo was libstdc++.so.6.

from box86.

ptitSeb avatar ptitSeb commented on August 26, 2024

So, an XML error in FEZ? Strange. You used the LC_ALL="C" ? Maybe try to remove it?

for libtheora, I'll re-check on my side how I built it.

For Airline-tycoon: the libsmpef2-2.0.so.0 needed is the ARM version, not the i386 (that is in the lib32 of the game). Use file on it to be sure if you want. You need to sudo apt install it, or maybe build it, I'm unsure.
Same for understale, the libcrypto is the ARM version, not the i386 one.

from box86.

ITotalJustice avatar ITotalJustice commented on August 26, 2024

Tried FEZ without LC_ALL, however its the same error.

And thank you. Speaking of compiling, i tried compiling the mono fork thats now linked but i was unable to. Tried on arm and pc and had same errors. I could build the original mono non-fork fine though.

Ah thank you, and nice tip on using file. Now got undertale working as well as a few other games including 2 fantastic games: VA11HallA and Hotline Miami! Amazing stuff. Hotline miani 2 also boots but freezes on the loading screen, ill open a separate issue on that shortly.

from box86.

ptitSeb avatar ptitSeb commented on August 26, 2024

Tried FEZ without LC_ALL, however its the same error.

Strange. The log seems to be about XML Joystick configuration. I need to look a bit more. I didn't tried with any joystick on my side...

And thank you. Speaking of compiling, i tried compiling the mono fork thats now linked but i was unable to. Tried on arm and pc and had same errors. I could build the original mono non-fork fine though.

The regular libmono will not have all the Unity specific symbol and will not work. I built it on the Pandora (so arm). What kind of error do you have?

Ah thank you, and nice tip on using file. Now got undertale working as well as a few other games including 2 fantastic games: VA11HallA and Hotline Miami! Amazing stuff. Hotline miani 2 also boots but freezes on the loading screen, ill open a separate issue on that shortly.

Nice, Hotline Miami :) VA11HallA I don't know it. I'll check later. Basicaly, most (if not all) GameMaker Studio game should work (all that have "runner" binary and "assets" folder). Some may be a bit slow sometimes (like "Not A Hero" or "Risk of rain").

from box86.

ITotalJustice avatar ITotalJustice commented on August 26, 2024

I’ll try compiling again and I’ll post the results. I did try git clone, autogen, make - but I had errors straight away if I remember correctly. Then tried —recursive-submodules when cloning, got a lot further compiling but still errors. I was following the build guide that’s linked at the bottom of the repo, but that was for the original mono repo, maybe the instructions / decencies are different?

And that’s awesome, thats quite a lot of games there then!

from box86.

ITotalJustice avatar ITotalJustice commented on August 26, 2024

Hi, this was the error i got when compiling. it happens when getting to the section that starts with
Microsoft (R) Visual C# Compiler version 2.6.0.62309 (d3f6b8e7)
Copyright (C) Microsoft Corporation. All rights reserved.

Unhandled Exception:
System.TypeInitializationException: TypeInitialization_Type ---> System.TypeInitializationException: TypeInitialization_Type ---> System.Exception: Magic number is wrong: 542
  at System.TermInfoReader.ReadHeader (System.Byte[] buffer, System.Int32& position) [0x00028] in <f3f60569a5ef43cd83c9e4e663990797>:0 
  at System.TermInfoReader..ctor (System.String term, System.String filename) [0x0005f] in <f3f60569a5ef43cd83c9e4e663990797>:0 
  at System.TermInfoDriver..ctor (System.String term) [0x00055] in <f3f60569a5ef43cd83c9e4e663990797>:0 
  at System.ConsoleDriver.CreateTermInfoDriver (System.String term) [0x00000] in <f3f60569a5ef43cd83c9e4e663990797>:0 
  at System.ConsoleDriver..cctor () [0x0004d] in <f3f60569a5ef43cd83c9e4e663990797>:0 
   Exception_EndOfInnerExceptionStack
  at System.Console.SetupStreams (System.Text.Encoding inputEncoding, System.Text.Encoding outputEncoding) [0x00007] in <f3f60569a5ef43cd83c9e4e663990797>:0 
  at System.Console..cctor () [0x0008e] in <f3f60569a5ef43cd83c9e4e663990797>:0 
   Exception_EndOfInnerExceptionStack
  at Mono.ILASM.Report.AssembleFile (System.String file, System.String listing, System.String target, System.String output) [0x0001f] in <4ab07cda724045ca9f6d3c4bf5b47ed9>:0 
  at Mono.ILASM.Driver+DriverMain.ProcessFile (System.String file_path) [0x00019] in <4ab07cda724045ca9f6d3c4bf5b47ed9>:0 
  at Mono.ILASM.Driver+DriverMain.Run () [0x0006e] in <4ab07cda724045ca9f6d3c4bf5b47ed9>:0 
  at Mono.ILASM.Driver.Main (System.String[] args) [0x00015] in <4ab07cda724045ca9f6d3c4bf5b47ed9>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: TypeInitialization_Type ---> System.TypeInitializationException: TypeInitialization_Type ---> System.Exception: Magic number is wrong: 542
  at System.TermInfoReader.ReadHeader (System.Byte[] buffer, System.Int32& position) [0x00028] in <f3f60569a5ef43cd83c9e4e663990797>:0 
  at System.TermInfoReader..ctor (System.String term, System.String filename) [0x0005f] in <f3f60569a5ef43cd83c9e4e663990797>:0 
  at System.TermInfoDriver..ctor (System.String term) [0x00055] in <f3f60569a5ef43cd83c9e4e663990797>:0 
  at System.ConsoleDriver.CreateTermInfoDriver (System.String term) [0x00000] in <f3f60569a5ef43cd83c9e4e663990797>:0 
  at System.ConsoleDriver..cctor () [0x0004d] in <f3f60569a5ef43cd83c9e4e663990797>:0 
   Exception_EndOfInnerExceptionStack
  at System.Console.SetupStreams (System.Text.Encoding inputEncoding, System.Text.Encoding outputEncoding) [0x00007] in <f3f60569a5ef43cd83c9e4e663990797>:0 
  at System.Console..cctor () [0x0008e] in <f3f60569a5ef43cd83c9e4e663990797>:0 
   Exception_EndOfInnerExceptionStack
  at Mono.ILASM.Report.AssembleFile (System.String file, System.String listing, System.String target, System.String output) [0x0001f] in <4ab07cda724045ca9f6d3c4bf5b47ed9>:0 
  at Mono.ILASM.Driver+DriverMain.ProcessFile (System.String file_path) [0x00019] in <4ab07cda724045ca9f6d3c4bf5b47ed9>:0 
  at Mono.ILASM.Driver+DriverMain.Run () [0x0006e] in <4ab07cda724045ca9f6d3c4bf5b47ed9>:0 
  at Mono.ILASM.Driver.Main (System.String[] args) [0x00015] in <4ab07cda724045ca9f6d3c4bf5b47ed9>:0 
make[8]: *** [il.make:4: ../../../class/lib/basic/corlib.unsafe.dll.tmp] Error 1
make[7]: *** [../../../build/rules.make:211: do-all] Error 2
make[6]: *** [../build/rules.make:232: all-recursive] Error 1
make[5]: *** [build/rules.make:232: all-recursive] Error 1
make[4]: *** [Makefile:56: profile-do--basic--all] Error 2
make[3]: *** [Makefile:52: profiles-do--all] Error 2
make[2]: *** [Makefile:644: all-local] Error 2
make[2]: Leaving directory '/home/pi/mono/runtime'
make[1]: *** [Makefile:555: all-recursive] Error 1
make[1]: Leaving directory '/home/pi/mono'
make: *** [Makefile:485: all] Error 2

I did git clone --recursive-submodules https://github.com/Unity-Technologies/mono.git
cd mono
PREFIX=/opt/monotest
./autogen.sh --prefix=$PREFIX
make -j4

from box86.

ITotalJustice avatar ITotalJustice commented on August 26, 2024

Tried again compiling unity-mono on arch, x64 debian and raspbian and it fails to compile sadly. Do you think the lib that you managed to compile work on the pi4? Unless it was built against pandora specific libs.

from box86.

ptitSeb avatar ptitSeb commented on August 26, 2024

Nope, it wont work on on the Pi4, the Pandora is SoftFP and HardFP on the floating point side.
Anyway, eve if you compiled the lib, Unity support is far from finish, so it would not work yet.

from box86.

ITotalJustice avatar ITotalJustice commented on August 26, 2024

Ah i see, thank you for explaining.

from box86.

ptitSeb avatar ptitSeb commented on August 26, 2024

Can you retry the game now, and close the ticket if it works?

from box86.

ITotalJustice avatar ITotalJustice commented on August 26, 2024

Hi ptitSeb, really nice to see the huge amount of work that's been put into box86 since i've last used it 😄

I won't be able to get around to checking the games that i have opened issues for sadly, so the same goes for #42 and #39. Hopefully someone else can test

from box86.

ITotalJustice avatar ITotalJustice commented on August 26, 2024

image
Got it to run on a Pi4, but it needed MESA_GL_VERSION_OVERRIDE=3.2

Closing ticket.

That’s amazing! This was the main game I wanted working! Can I ask how the performance was if you don’t mind?

from box86.

ptitSeb avatar ptitSeb commented on August 26, 2024

I haven't really played, but it seemed playable. I'll try some actual game with fps counter later

from box86.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.