Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Develop Steam-FNA (Codename Rhys) #19

Open
9 of 12 tasks
flibitijibibo opened this issue Jul 4, 2019 · 10 comments
Open
9 of 12 tasks

Develop Steam-FNA (Codename Rhys) #19

flibitijibibo opened this issue Jul 4, 2019 · 10 comments

Comments

@flibitijibibo
Copy link
Collaborator

flibitijibibo commented Jul 4, 2019

As part of the Proton project, Steam now has a system set up for "compatibility tools", allowing games marked for one OS to run on another using an arbitrary program. The common case is Wine, but it is possible for other tools to run Windows-only depots, for example steam-dos:

https://github.com/dreamer/steam-dos

It should be possible to develop a compatibility tool that provides FNA (including FNA.NetStub and the ABI files) and XnaToFna. We can optionally provide the ability to convert WMA/WMV via a system FFmpeg installation.

The current WIP can be found here:

https://github.com/0x0ade/XnaToFna/tree/master/rhys

The checklist:

  • Build a standalone FNA runtime
    • FNA, FNA.NetStub, ABI files
    • XnaToFna
    • fnalibs (Just downloading these)
    • Mono with patches
  • Write rhys script
    • On first run, run XnaToFna in Windows Mode with no relinking
    • If wma/wmv detected, check for FFmpeg and convert at highest quality
    • Replace Steamworks.NET.dll with latest Unix Steamworks.NET.dll
      • Detect specific Steamworks.NET version, for robustness
    • Set MONO_IOMAP=all, MONO_PATH to FNA bins, LD_LIBRARY_PATH to fnalibs
    • Run the passed exe with mono

Note that this does NOT replace the Proton FNA work; many games will never be compatible with Steam-FNA due to C++/CLI binaries, really bad native interop in game engines, and so on.

Games of Interest (WMA/WMV/xWMA Included):

  • Apple Jack 1&2
  • Breath of Death VII
  • Cthulhu Saves the World
  • Explosionade
  • Game Type
  • Hell Yeah! Wrath of the Dead Rabbit
  • Lightfish
  • Mount Your Friends
  • One Finger Death Punch
  • Penny Arcade 3&4
  • Serious Sam: Double D XXL
  • Shoot 1UP
  • Super Amazing Wagon Adventure
  • Stardew Valley
  • Streets of Fury EX
  • Weapon of Choice

Blocked by Win32 Stuff:

  • DLC Quest
  • Lemma

Blocked by DInput:

  • Amazing Princess Sarah
  • Duck Game
  • Super Puzzle Platformer DX

Blocked by C++/CLI:

  • Aqua Kitty
  • Cloudberry Kingdom

Blocked by Who Knows

  • A.R.E.S. Extinction Agenda EX
@flibitijibibo flibitijibibo changed the title Develop Steam-FNA Develop Steam-FNA (Codename Rhys) Sep 25, 2019
@flibitijibibo
Copy link
Collaborator Author

flibitijibibo commented Jan 17, 2020

Updating this... it seems like it'd be a lot less work if we just used the system's Mono runtime. Many distributions are reasonably up-to-date, and there are also official repos that always have the latest version:

https://www.mono-project.com/download/stable/

So now Rhys can just be a quick and dirty tool to add the FNA ABI files to an existing runtime's MONO_PATH, which is the only unique thing the tool would have been doing anyway.

@flibitijibibo
Copy link
Collaborator Author

Rhys folder now exists:

https://github.com/0x0ade/XnaToFna/tree/master/rhys

@harry-cpp
Copy link

Stardew Valley

It has a Mac/Linux version, why is it included?

@flibitijibibo
Copy link
Collaborator Author

It's popular enough to warrant trying to run it anyway. We happen to be fully compatible with the Windows version if you redirect the WinForms calls properly!

@harry-cpp
Copy link

Ah, makes sense.

@flibitijibibo
Copy link
Collaborator Author

It works now!

Screenshot from 2020-02-20 11-25-23

We're now pretty much dependent on #13 and #16, once those are done we can poke XnaToFna into the firsttime function and that should get the ball rolling for a good chunk of the games. The Steamworks.NET swap is a whole other feature but it shouldn't be too hard, I think...

@flibitijibibo
Copy link
Collaborator Author

Steamworks.NET integration is in:

2411687

XnaToFna is the last item on the list.

@rfht
Copy link
Contributor

rfht commented Feb 21, 2020

FYI Amazing Princess Sarah runs on OpenBSD after updating Nuclex.Input. That makes me think it should be achievable to run it in Proton...

@flibitijibibo
Copy link
Collaborator Author

I've just been made aware of an extremely bad regression that was made by de# Mono 6.0 and newer: mono/mono#15845

Short version: We can't use IOMAP and will have to implement case-sensitive filesystem support ourselves.

@flibitijibibo
Copy link
Collaborator Author

Update on this: Discussions to preserve IOMAP went horribly, because the .NET Foundation isn't interested in making existing programs work. So, we have our own patchset for Mono now:

https://github.com/flibitijibibo/MonoKickstart/tree/master/patches

This can be used to build a good version of Mono, so we're back to distributing our own CLR.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants