Main > Software Forum

Mame 0187 save and load states and pause

<< < (2/4) > >>

evilsidius:

--- Quote from: headkaze on July 17, 2017, 10:08:51 pm ---
--- Quote from: KenToad on July 17, 2017, 10:07:24 pm ---Doesn't MAME support this natively? It seems to me like I have paused emulation, hit the save state button, then when I load state, it remembers that it was paused. I'm thinking of an older version of MAME.

--- End quote ---

You could be right. I just knocked up a plugin as proof-of-concept.

--- End quote ---

Headkaze, your plugin worked. Thanks a lot.
But still, when i pause (P) the emulation and used your plugin to save, automatically the emulation started with the message that save was sucefull in front of the game.

I would like to save and load and the emulation stayed on pause. Or at least didint show any message of save sucefull or load sucefull. There is a option?

Howard_Casto:
Mame, unfortunately, isn't made with the user in mind.  The only reason we got save states at all is the fact that they make it easier for devs to troubleshoot bugs. 

headkaze:

--- Quote from: evilsidius on July 24, 2017, 09:00:42 pm ---I would like to save and load and the emulation stayed on pause. Or at least didint show any message of save sucefull or load sucefull. There is a option?

--- End quote ---

Yes, just add an "emu.pause()" statement after loading/saving the state.

Eg.

--- Code: ---local function savestate_menu_callback(index, event)
if event == "select" then
local menu_item = savestate_menu[index][1]

if menu_item == "Load State" then manager:machine():load("auto")
elseif menu_item == "Save State" then manager:machine():save("auto")
end

emu.pause()
end
return false
end
--- End code ---

Howard_Casto:
Isn't emu.pause a toggle?

headkaze:

--- Quote from: Howard_Casto on July 25, 2017, 08:28:13 pm ---Isn't emu.pause a toggle?

--- End quote ---

Nope, as per luaengine.cpp source it's:


--- Code: --- * emu.pause() - pause emulation
 * emu.unpause() - unpause emulation
--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version