After being asked several dozens of times if/when I was going to port Mesen to libretro (and seeing a lot of people saying it couldn’t be done because “lol C#”), I finally got around to doing so. It barely took a day (and less than a thousand lines of code), so now I’m left wondering why I didn’t get it done earlier
Anyway, as of the latest commit, Mesen can be compiled for libretro (see the repository’s readme for info on how to build it). I’ve tested it on Windows with VS2017 (x86 & x64) and Linux on Ubuntu (x64 only) with both clang and GCC. It has no external dependencies, but it does require a C++14 compiler that supports the Filesystem API (which is C++17 I believe). On Linux, clang with LTO enabled tends to produce the fastest binaries. I imagine it could be compiled relatively easily for a lot of other platforms as well (just a matter of having access to a relatively recent compiler for the platform).
The core more or less supports everything Mesen itself does, including HD Packs - which means you can now play this neat Megaman 1 HD pack in RetroArch! (must be in system/HdPacks/romname/ folder) I also added options for most things that made sense in the context of libretro (ntsc filter, palette, overclocking, etc.), but if there is anything missing from the standalone version that would be useful, let me know. Some of the inputs supported by the standalone version are not currently supported in the libretro port (e.g: power pad, etc.). The most popular ones should all work (standard controller, zapper, and some more).
Performance-wise, it is most likely much slower than both FCEUmm & Nestopia UE - I would be surprised if this was able to run at full speed on a Rasberry Pi, for example (but you never know). It should be able to run at full speed on actual PCs, though, even relatively old ones. Compiled with VS2017 and using PGO to optimize the core, it runs roughly the same as the standalone version on my computer (around 350-450 FPS depending on the game).
I think I’ve ironed out most/all of the bugs I found - there are still a few rare issues on my end, but this might just be RetroArch itself acting up (hard to tell - I’ve never used it until now). Please let me know if you have any issues with it. Also, the only Linux environment I have is a VM, and RetroArch refused to run in the VM until I turned off hardware acceleration for it - so I have no idea how well/fast it runs on there.
EDIT: The core is now available on the buildbot, so you can download it from RetroArch