diff --git a/BizHawk.Emulation/Consoles/Nintendo/N64/N64.cs b/BizHawk.Emulation/Consoles/Nintendo/N64/N64.cs index 73d50efcb4..6bd2dfdd11 100644 --- a/BizHawk.Emulation/Consoles/Nintendo/N64/N64.cs +++ b/BizHawk.Emulation/Consoles/Nintendo/N64/N64.cs @@ -161,6 +161,13 @@ namespace BizHawk.Emulation.Consoles.Nintendo.N64 M64CMD_ADVANCE_FRAME }; + enum m64p_emu_state + { + M64EMU_STOPPED = 1, + M64EMU_RUNNING, + M64EMU_PAUSED + }; + //[DllImport(@"..\..\libmupen64plus\mupen64plus-ui-console\projects\msvc11\Release\mupen64plus.dll", CallingConvention = CallingConvention.Cdecl)] //static extern m64p_error CoreStartup(int APIVersion, string ConfigPath, string DataPath, string context, DebugCallback DebugCallback, string context2, IntPtr bar); @@ -267,6 +274,12 @@ namespace BizHawk.Emulation.Consoles.Nintendo.N64 m64pEmulator = new Thread(ExecuteEmulator); m64pEmulator.Start(); + + int state = -1; + do + { + m64pCoreDoCommandRefInt(m64p_command.M64CMD_CORE_STATE_QUERY, 1, ref state); + } while (state != (int)m64p_emu_state.M64EMU_PAUSED); } public void ExecuteEmulator() diff --git a/BizHawk.MultiClient/output/dll/mupen64plus.dll b/BizHawk.MultiClient/output/dll/mupen64plus.dll index 8dd04b0062..8436fb01ff 100644 Binary files a/BizHawk.MultiClient/output/dll/mupen64plus.dll and b/BizHawk.MultiClient/output/dll/mupen64plus.dll differ diff --git a/libmupen64plus/mupen64plus-core/src/r4300/r4300.c b/libmupen64plus/mupen64plus-core/src/r4300/r4300.c index 9a64fdb480..8753595da2 100644 --- a/libmupen64plus/mupen64plus-core/src/r4300/r4300.c +++ b/libmupen64plus/mupen64plus-core/src/r4300/r4300.c @@ -985,7 +985,7 @@ void r4300_execute(void) debug_count = 0; delay_slot=0; stop = 0; - rompause = 0; + rompause = 1; /* clear instruction counters */ #if defined(COUNT_INSTR)