Skip to content
forked from 0x0ade/XnaToFna

Relink games / tools using the XNA Framework 4.0 to use FNA instead

License

Notifications You must be signed in to change notification settings

Tcenova/XnaToFna

 
 

Repository files navigation

XnaToFna

Relink C# assemblies from XNA Framework 4.0 to FNA instead

zlib-licensed, clone recursively


TL;DR:

Relinker making some games using XNA 4.0 run with FNA. It goes as far as booting some X360 games on Android.

  • Download release OR compile using Visual Studio, MonoDevelop, xbuild or something that compiles C# code.
  • Put XnaToFna.exe into the game directory.
  • Put FNA.dll and the native libs into the game directory.
  • Run XnaToFna.exe with Mono on Linux / macOS or .NET Framework on Windows.
  • Keep XnaToFna.exe in the game directory because the game now also links to the XnaToFnaHelper inside it, whoops.
  • Update Mono or MonoKickstart.
  • Complain about broken paths, unconverted sound / video assets, Windows-specific DllImports and unsupported, closed-source native libraries.

how gamers think ports work vs how ports actually work

Special thanks to:

How?

Using MonoMod, it sets up the relinking map in MonoMod to relink all Microsoft.Xna.Framework references to FNA instead.

It can relink from Microsoft.Xna.Framework.Net and Microsoft.Xna.Framework.GamerServices to either MonoGame.Framework.Net or FNA.Steamworks, depending on which of those two exists in the game directory.

For convenience, XnaToFna contains a fork of MonoGame.Framework.Net as a submodule. You'll still need to compile it and copy it to the game directory on your own. Take a look at this diff to see what changed.

Finally, it applies some optional salt and pepper here and there (XmlIgnore this, XnaToFnaHelper.GetProxyFormHandle that).

What's up with XnaToFna-Legacy?

XnaToFna-Legacy was practically a heavily modified fork of MonoMod, meant to relink and only to relink... and fix the paths, which didn't always work.

This rebuilt version uses "MonoMod neo", which itself is a rebuilt version of MonoMod. It now supports defining a custom relinker and relinking maps for the default relinker.

Before, most relinker fixes ping-ponged between MonoMod and XnaToFna, while some of them weren't even compatible with each other.

Keeping the actual relinking in MonoMod means there's only one relinker to maintain and only one place where it can screw up.

About

Relink games / tools using the XNA Framework 4.0 to use FNA instead

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%