NovaSquirrel / Mesen-X

Mesen X is a cross-platform (Windows & Linux) NES/Famicom emulator built in C++ and C#. This fork is meant to gather development efforts from different forks. Deprecated; see https://github.com/SourMesen/Mesen2/
https://www.mesen.ca
GNU General Public License v3.0
161 stars 29 forks source link

ESPM significantly slows down emulation #151

Open infval opened 1 year ago

infval commented 1 year ago

If I remove _mapper->ProcessEPSMClock(); here https://github.com/NovaSquirrel/Mesen-X/blob/e6d75fcf58da2ccc1b89ed1d3c99f74925f2907e/Core/Console.cpp#L466-L471 I get a 2x speedup (enable FPS and set Maximum Speed). UPD: I made a mistake in the 1st version of the post, the problem can be solved by adding if ("Is Epsm Enabled") _mapper->ProcessEPSMClock();. It remains to write the code for determining that EPSM is enabled. UPD2: Requires a new option in the Emulation settings, or renaming "Enable EPSM" to "Enable EPSM emulation" in the Audio settings, because you can disable EPSM in the Volume tab.