BizHawk icon indicating copy to clipboard operation
BizHawk copied to clipboard

Add Mesen core (Famicom/NES) and maybe Mesen-S (SNES) too

Open YoshiRulz opened this issue 3 years ago • 5 comments

There wasn't actually an issue open for this though it had come up in #2146 (re: dropping QuickNes), and also in #1757, in #2364, and on IRC.

~~If I'm not mistaken, these emulators were written as C++ cores with C#.NET frontends and thus should be easy to integrate into EmuHawk.~~

~~Mesen is desired for its accuracy and speed. Its inclusion would probably justify the removal of QuickNes.~~ NesHawk would need to remain even if slightly less accurate because it offers subframe emulation timing (i.e. SubNesHawk). We may end up loading NES roms with either Mesen or NesHawk based on which emulates its mapper more accurately.

The Mesen and Mesen-S projects are on indefinite hiatus, and their repos (SourMesen/Mesen, SourMesen/Mesen-S) have been archived. Were we to fork them, our forks would probably become the focus of its dev community.

YoshiRulz avatar Dec 25 '20 09:12 YoshiRulz

Its inclusion would probably justify the removal of QuickNes.

We've been over this, we had a ticket for it, we had IRC discussions of it. QuickNes will only be removed when we find something as fast as it and more accurate.

nattthebear avatar Dec 25 '20 14:12 nattthebear

On my system: Mesen 500fps QuickNES 3000fps

I think QuickNES is still quite useful, particularly for botting

adelikat avatar Dec 25 '20 19:12 adelikat

If I'm not mistaken, these emulators were written as C++ cores with C#.NET frontends

They are.

and thus should be easy to integrate into EmuHawk.

They are not.

The cores aren't awfully organized, but the C++/C# split wasn't determined by Bizhawk core vs frontend concerns; it was determined by what language was more convenient to write certain code in. A decent amount of refactoring would be needed here.

nattthebear avatar Dec 25 '20 22:12 nattthebear

Personally I think the best option in an ideal world is to add TAS tools to Mesen instead of just adding a Mesen core to BizHawk. Mesen does a lot of cool stuff, and is already the go to choice for devs, TAS tools would round it out as probably the final word in NES emulation.

I'm not sure about Mesen-S, development stopped a bit too soon, kind of a shame really.

I'm going to try porting NESHawk to C++ again sometime soon, now that I have a C++ core framework and have a better idea what I'm doing, let's see how much of a performance boost that brings.

alyosha-tas avatar Dec 26 '20 15:12 alyosha-tas

Some follow up on this. I did a quick and dirty C++'ification of NESHawk (nrom only.) With the original core I can run things at about 180 fps. With the C++ version I can get about 280. I would guess with some sensible optimization I can get a bit more out of it, but it might be offset by adding back in all the mapper functionality and such that I left out. Probably would end up a little over 300 fps would be my guess. For comparison Mesen runs at around 400-450 fps for me depending on the game.

So it might be in the right ballpark, but the problem is that this would require a rewrite of all the mappers, as well as all the other peripheral things NESHawk does. I don't think +100 or so fps is worth the effort, That would take me a solid year to do.

alyosha-tas avatar Jan 04 '21 00:01 alyosha-tas