Test: MonoGame.Framework + Libretro + MonoGame.Forms
In my last post I talked about the guy who wanted to create a GameBoy Emulator with MonoGame.Forms and - coincidentally (hacked my SNES MINI and installed RetroArch on it) - I just played around a little - literally:
There are no P/Invokes for embding a window of a different emulator application or such tricks; an original Super Mario World.sfc rom was natively loaded using the snes9x_libretro.dll core.
Using the LibretroAPI it was possible to get the Framebuffer and process this data to a Texture2D which I then draw using the SpriteBatch of MonoGame.
I also converted the GamePadState to be used with Libretro, so that I can use my Xbox360 gamepad to control the SNES rom.
With Libretro it’s also possible to load different cores such as for a GameBoy, Playstation and so on, so that it would become possible to create an application like RetroArch.
RetroArch is - by the way - the official frontend of Libretro. With that in mind MonoGame would be the frontend of Libretro using a c# wrapper of Libretro. You can find one here (the one which inspired me).
I just thought to share this with you because it’s interesting and fun, isn’t it?