Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
08909 Debugger Major Sometimes Aug 30, 2024, 13:08 6 days ago
Tester jman View Status Public Platform MAME (Official Binary)
Assigned To Resolution Open OS Windows 10/11 (64-bit)
Status [?] Confirmed Driver
Version 0.269 Fixed in Version Build 64-bit
Fixed in Git Commit Github Pull Request #
Summary 08909: debugger: Sometimes stateload command fails to load state
Description Sometimes stateload (or sl) command via debugger fails to load state
No problem with usual way (press F7 key then select state or press shift + F7 key).

I attache two "quick" save state, kof94 (neogeo/neogeo.cpp) and megadriv/gynoug (sega/mdconsole.cpp)
(NOTE : neogeo and megadriv have "support save" flag)
Both games will be reset after loaded state via stateload command.

Also I confirm other games, gigandes (freeze), dondoko (address error), vulcan (illegal instruction).
Steps To Reproduce Sample 1 : kof94
1) extract attached "quick.sta" into sta/kof94 folder
2) start the game (mame kof94)
3) open debugger
4) input "sl quick"

Sample 2 : megadriv/gynoug
1) extract attached "quick.sta" into sta/megadriv folder
2) start the game (mame megadriv gynoug)
3) open debugger
4) input "sl quick"
Additional Information
Github Commit
Flags
Regression Version
Affected Sets / Systems debugger
Attached Files
zip file icon 0269_statesave_kof94_and_gynoug.zip (77,858 bytes) Aug 30, 2024, 13:08 Uploaded by jman
Relationships
There are no relationship linked to this issue.
Notes
4
User avatar
No.22293
hap
Developer
Aug 31, 2024, 06:34
I can confirm it, but the CPU in question is not 68000:
donpachi (single 68k): no issue
ridgerac (has 68k and other cpus): no issue

flower (multiple Z80): bug
pacman (single Z80): bug
User avatar
No.22294
hap
Developer
Aug 31, 2024, 08:22
I tried finding savestates issues in MAME's z80 implementation, but found none that are the cause of this bug.
User avatar
No.22295
hap
Developer
Aug 31, 2024, 11:43
edited on: Aug 31, 2024, 12:31
After more trying, I am getting the problem with donpachi (m68k) as well.
So, the CPU type does not matter?

It's almost as if, after loading a state, it tries to time travel to the point where you entered the "sl" command.
Oh, that thing only happens if the game is running while you enter the command.

m_machine.immediate_load(params[0]); does not care about anonymous timers, maybe it should. I don't see what else could cause these issues, since as you said the savestates work fine if you load it normally.
User avatar
No.22443
cuavas
Administrator
6 days ago
Isn’t immediate_load supposed to fail if anonymous timers are active? It was supposed to make a best effort to load the saved state and fail if it can’t.