Open leiradel opened 2 years ago
Oh, I'm using version 0.17.
Hi there First and foremost, I quite like the idea of your frontend! Original DOSBox has some debug tools with a crude UI built in (although everything is disabled in DOSBox Pure builds). It might be fun to expose it to Hackable Console. If I find some time I'd certainly like to tinker with that :-)
Now that you mention it, the error message is wrong there. It shows that same message when the state was serialized while DOS wasn't running (or had a crash), BUT also when it's currently not (yet) running (or crashed).
I'm not sure if calling retro_run once is enough to have the AUTOBOOT start up the DOS process fully. Because as is in version 0.17 the emulation runs in its own thread so this is all a bit wonky. Maybe calling it a few more times would "fix" it?
Once #184 is completed things should be much smoother. The thread should go away and overall things should be a fair bit more deterministic. After that is done, I'd like to fix the state loading so it can load into a game process even when it hasn't been started.
Do you have a Win64 binary of the frontend I could have?
Ah, calling retro_run
60 times before loading the state did the trick, thanks for the tip!
Maybe quick fix in the core would be to do a busy loop, waiting for the correct internal state to arrive, in retro_unserialize
? Just thinking out loud here, as it would be better to be sure the state can be loaded than to run some frames ahead.
As for my frontend, thanks, it's fun to work with it. It's far from what I want it to be though. I don't have a Windows build as my machine runs Linux, but I believe it can be built with MSYS2. The code that loads the state is hammered in a place it shouldn't be, as it's just testing for now.
I'll leave this issue opened in case you think you can fix this before #184 , otherwise feel free to close it as the workaround solved my immediate issue.
Listen, if you need me to test a fix for this, just shout. I can remove the workaround and try to reproduce the issue.
Hi,
I have a Libretro frontend that aims to provide debugging facilities to Libretro cores here. It can already run a number a cores, including DOSBox Pure.
I'm trying to implement states now and am facing issues with DOSBox Pure. When I try to load a state in my frontend, I get the following error:
The state was generated in RetroArch on Windows after the game had started, meaning I could already see it's screen rendered in RetroArch when I hit F1 to create the state.The save file contains a valid
AUTOBOOT.DBP
file so the core shouldn't be stuck in the Pure Menu:Debugging my frontend on Linux, I can see that the error comes from this:
So it doesn't strike me as a corrupted state but the DOSBox Pure internal state being wrong.
How should I setup the core so it's ready to load a state? Right now the sequence of calls in my frontend is:
retro_set_environment
retro_init
retro_get_system_info
just to log the core informationretro_load_game
with the content data loaded from disk (this callsretro_get_system_info
again as it needs to queryneed_fullpath
)retro_get_system_av_info
to initialize the audio and video componentsretro_set_controller_port_device
depending on the frontend configurationretro_run
, I currently do this to try and make sure DOSBox Pure is in the correct state to load the state file, other cores don't need this (and I'm not entirely sure DOSBox Pure needs it)retro_unserialize
, which fails with the above traceThanks in advance!