NovaSquirrel/Mesen-X

ESPM significantly slows down emulation

Opened this issue · 0 comments

If I remove _mapper->ProcessEPSMClock(); here

Mesen-X/Core/Console.cpp

Lines 466 to 471 in e6d75fc

void Console::ProcessCpuClock()
{
_mapper->ProcessEPSMClock();
_mapper->ProcessCpuClock();
_apu->ProcessCpuClock();
}
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.