amiberry icon indicating copy to clipboard operation
amiberry copied to clipboard

Loading a Savestate crashes amiberry

Open Retro1968 opened this issue 2 years ago • 9 comments

Raspberry Pi 4 with Manjaro Linux. Running AmigaOS 3.2.1 and WHDLoad Programs.

I have the following problem in amiberry 4.16 and amiberry 5.0. I start the AmigaOS 3.2.1 workbench. Load a WHDLoad Game from there. Go to the menu with F12 and successfully save a savestate.

If I want to load this save state again, amiberry crashes completely and I'm back on the Manjaro desktop.

Cheers Retro1968

Retro1968 avatar Mar 20 '22 14:03 Retro1968

What config did you have when you saved the savestate? Some things like JIT are not guaranteed to work with Savestates (in fact, they are not officially supported), so it depends a lot on the emulator settings you had enabled.

Savestates normally are meant for floppy images only, but I've extended that to allow limited support for HDDs also, so we can use them with the whdbooter feature of Amiberry. But on a full-blown WB with JIT, RTG and so on, there may be problems.

One workaround for that would be to dynamically disable JIT when launching a game, and re-enabling it when it quits. You could use the WinUAE-bundled Amiga tool uae-configuration for something like that, by triggering it from WHDLoad's startup and shutdown scripts...

midwan avatar Mar 20 '22 21:03 midwan

I save a savestate after AmigaOS 3.2.1 has been loaded from a HDD file and I run from here a WHDLoad game. In the game I now switch to the menu and save a savestate. I was then shown a decent screenshot of the game after the save process was successful. If i now leave the menu i can play normally again.

If I now load this savestate, amiberry crashes. This also happens when I load the savestate after a reboot.

JIT is enabled when I load AmigaOS 3.2.1. It is automatically deactivated when I start a WHDLoad game and is reactivated after the game is closed.

Retro1968 avatar Mar 21 '22 10:03 Retro1968

When you're trying to load the Savestate, is JIT enabled? Can you try disabling it and see if that makes a difference?

midwan avatar Apr 15 '22 19:04 midwan

Raspberry Pi 4 running RetroPie 4.8 with amiberry (2022-04-15)(sdl2)

JIT has been disabled. AmigaOS 3.2.1 was loaded from HDF image. After that I started the game Waterloo (not via WHDLoad). After that I successfully saved a savestate, then did a reset. Amiberry crashed immediately after I tried to load the savestate.

default.zip

Retro1968 avatar Apr 16 '22 09:04 Retro1968

@Retro1968 So you had JIT enabled when you tried to load the savestate again, after the reset? Did you try disabling JIT first?

midwan avatar May 14 '22 19:05 midwan

amiberry 5.2 (2022-05-14) on RaspiOS 64 Bit with RPi 4.

I have now deactivated JIT in my default.uae profile. I also removed JIT settings in WHDLoad.prefs.

Then I loaded my AmigaOS 3.2.1 Worbench, started the game "Waterloo" (no WHDLoad-Game), successfully saved a savestate and then left amiberry completely. After a new start with Workbench 3.2.1 loaded, I loaded the savestate (a screenshot of Waterloo was shown on slot 0). Amiberry crashed immediately afterwards.

default.zip

Retro1968 avatar May 15 '22 11:05 Retro1968

@Retro1968 Ok, then I guess the culprit wasn't JIT in this case. How about RTG? Was that enabled during the process? Perhaps you can test without it, to see if it makes a difference?

midwan avatar May 19 '22 08:05 midwan

@Retro1968 Ok, then I guess the culprit wasn't JIT in this case. How about RTG? Was that enabled during the process? Perhaps you can test without it, to see if it makes a difference?

After I deactivated JIT as described above and also uninstalled the P96 v.3.3.0 driver, I repeated the above test with the NON-WHDLoad game "Waterloo". Here, too, amiberry crashes immediately after the savestate has been loaded.

Retro1968 avatar May 19 '22 09:05 Retro1968

@Retro1968 Sorry, I still can't recreate this exact problem here. Try changing options to see if any of them made a change, things like RAM settings for example. Also try to see if it works better if you do the Save and Load when you boot with no startup-sequence, and only run the game. It might be something that's loaded in Workbench that fails when the savestate is restored.

midwan avatar May 19 '22 18:05 midwan

Closing this as its' been stale for many months now

midwan avatar Sep 08 '22 16:09 midwan