diff --git a/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.IInputPollable.cs b/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.IInputPollable.cs index 5967bf43f3..e54db07eb6 100644 --- a/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.IInputPollable.cs +++ b/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.IInputPollable.cs @@ -71,6 +71,8 @@ namespace BizHawk.Emulation.Cores.Arcades.MAME } } + MAMEController.BoolButtons.Add("Reset"); + _buttonFields = buttonFieldList.ToArray(); _analogFields = analogFieldList.ToArray(); _fieldPtrs = fieldPtrList.ToArray(); @@ -81,6 +83,11 @@ namespace BizHawk.Emulation.Cores.Arcades.MAME private void SendInput(IController controller) { + if (controller.IsPressed("Reset")) + { + _core.mame_lua_execute(MAMELuaCommand.Reset); + } + for (var i = 0; i < _buttonFields.Length; i++) { _fieldInputs[i] = controller.IsPressed(_buttonFields[i]) ? 1 : 0; diff --git a/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.cs b/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.cs index 52e2ad6dcb..1bf8ddd705 100644 --- a/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.cs +++ b/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.cs @@ -204,7 +204,7 @@ namespace BizHawk.Emulation.Cores.Arcades.MAME , "-update_in_pause" // ^ including frame-advancing , "-rompath", "" // mame doesn't load roms from full paths, only from dirs to scan , "-joystick_contradictory" // allow L+R/U+D on digital joystick - , "-nvram_directory", "" // path to nvram from + , "-nvram_directory", "" // path to nvram , "-artpath", "" // path to artwork , "-diff_directory", "" // path to hdd diffs , "-cfg_directory", "" // path to config @@ -326,6 +326,7 @@ namespace BizHawk.Emulation.Cores.Arcades.MAME public const string Step = "emu.step()"; public const string Pause = "emu.pause()"; public const string Unpause = "emu.unpause()"; + public const string Reset = "manager.machine:soft_reset()"; public const string Exit = "manager.machine:exit()"; // getters