SNES Save State Test Core

lizey-b
Posts: 1
Joined: Sun Feb 16, 2025 1:56 pm

Re: SNES Save State Test Core

Post by lizey-b »

I just ordered an analogue pocket, and I'm setting up the SD card in advance.
I'm a bit confused about how to tell what mister version I have installed (if at all).
From what I understand, I just need to put the rbf file in the root and the boot1.rom file in the same folder as the ROMs.
But I don't have any mister file in the root or anything like that. I have the agg23.snes core installed. I'm not sure if that's the same as mister (since it's based on it from what I can tell) or what version of mister it has.

Here's a screenshot of the directories that have been setup:

Lr8jcxy.png

Can someone review and let me know if I'm missing anything?

You do not have the required permissions to view the files attached to this post.
rhester72
Top Contributor
Posts: 1568
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 22 times
Been thanked: 258 times

Re: SNES Save State Test Core

Post by rhester72 »

Given the Analogue Pocket and MiSTer have literally nothing to do with one another except they both generally use FPGA technology, I think you'll want to consult Analogue support for assistance.

john1744
Posts: 3
Joined: Wed Aug 28, 2024 6:50 pm
Has thanked: 1 time

Re: SNES Save State Test Core

Post by john1744 »

Another dumb question time, before I start some epic JRPG's on SNES, when the rbf file gets updated for this amazing core, will I lose my save states? Is there a way to back them up before updating next time there is one?

paulbnl
Core Developer
Posts: 239
Joined: Sun May 24, 2020 8:48 pm
Has thanked: 71 times
Been thanked: 360 times

Re: SNES Save State Test Core

Post by paulbnl »

You can load the save states with any version so you don't have to worry about losing them after updating.

If you want to back up your save states then just copy the savestates folder on your sd card. It contains the save states for all cores.

lordelan
Posts: 33
Joined: Tue Aug 16, 2022 9:36 am
Has thanked: 48 times
Been thanked: 10 times

Re: SNES Save State Test Core

Post by lordelan »

Hey Paul, found a game where save states won't work (and had to learn the hard way):

The Firemen (Europe)
Same for Japanese version. Dunno if a USA version even exists.

Great game by the way!

rhester72
Top Contributor
Posts: 1568
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 22 times
Been thanked: 258 times

Re: SNES Save State Test Core

Post by rhester72 »

No USA version of The Firemen, which is a shame - it's a FANTASTIC game!

Cyber Akuma
Posts: 50
Joined: Wed Nov 17, 2021 2:36 pm
Has thanked: 36 times
Been thanked: 5 times

Re: SNES Save State Test Core

Post by Cyber Akuma »

Is this planned to be eventually merged into the main SNES core? If not, will we eventually be able to install it through the updater?

Kanel
Posts: 2
Joined: Sat Mar 29, 2025 8:42 pm
Been thanked: 1 time

Re: SNES Save State Test Core

Post by Kanel »

Hi. I'm new to the forum and hope not to ask something already discussed: why save involves start button (save state+start+down)? In psx save state implementation, for example, start is not used. Am I the only one finding annoying each time I save, the game leaves/enters pause or goes onto next/another stage because start press? Maybe an option to toggle if start button is or is not required would be interesting. Thanks

HistorianXYZ
Posts: 53
Joined: Thu Mar 13, 2025 2:43 pm
Has thanked: 1 time
Been thanked: 3 times

Re: SNES Save State Test Core

Post by HistorianXYZ »

I'm not sure what's going on with my saves. I was playing Civilization last week, and I saved my game a few times. Later on, I read about only exiting through the OSD. I came back to the game yesterday. There isn't even an option to load a saved game! I tried to reload from the OSD, but nothing happened. I played a new game for a few minutes, then saved. I exited, then reset from the OSD. There was no sign of my saved game! What can I try next?

User avatar
ItalianGrandma
Posts: 231
Joined: Sun May 24, 2020 7:09 pm
Has thanked: 49 times
Been thanked: 56 times
Contact:

Re: SNES Save State Test Core

Post by ItalianGrandma »

rhester72 wrote: Sun Mar 02, 2025 5:55 pm

No USA version of The Firemen, which is a shame - it's a FANTASTIC game!

There is a prototype out there that is pretty much complete, actually.

User avatar
KnuckleheadFlow
Posts: 15
Joined: Fri Nov 04, 2022 9:02 pm
Has thanked: 17 times

Re: SNES Save State Test Core

Post by KnuckleheadFlow »

Kanel wrote: Sat Mar 29, 2025 8:54 pm

Hi. I'm new to the forum and hope not to ask something already discussed: why save involves start button (save state+start+down)? In psx save state implementation, for example, start is not used.

The SNES core wasn't designed with save states from the start like the PSX core. There's an FPGA based flashcart for the actual SNES console called the SD2SNES. Devs managed to implement save states on that using a button combo (since the SD2SNES doesn't have an OSD). paulbnl had the bright idea to port the SD2SNES's save state solution to try a similar approach on the MiSTer SNES core.

I'm hoping someone could one day do this with the Genesis core, perhaps how the Mega Everdrive X7/Pro does it. It's not open source like the SD2SNES so maybe Krikzz can be talked into working something out.

paulbnl
Core Developer
Posts: 239
Joined: Sun May 24, 2020 8:48 pm
Has thanked: 71 times
Been thanked: 360 times

Re: SNES Save State Test Core

Post by paulbnl »

Updated the first post with a new build:

Save to SD default to On. Those who had it previously changed to On will need to change it again.
Option for Savestate button+Up/Down without needing to press Start. (Input options->State Ld/Sv)
Fix for Firemen and other minor fixes.

paulbnl
Core Developer
Posts: 239
Joined: Sun May 24, 2020 8:48 pm
Has thanked: 71 times
Been thanked: 360 times

Re: SNES Save State Test Core

Post by paulbnl »

lordelan wrote: Sun Mar 02, 2025 11:16 am

Hey Paul, found a game where save states won't work (and had to learn the hard way):

The Firemen (Europe)
Same for Japanese version. Dunno if a USA version even exists.

Great game by the way!

This game should be working now.

Cyber Akuma wrote: Wed Mar 26, 2025 4:22 pm

Is this planned to be eventually merged into the main SNES core? If not, will we eventually be able to install it through the updater?

If there are no major issues found with todays build then I will send a pull request and we will see if it gets accepted.

Kanel wrote: Sat Mar 29, 2025 8:54 pm

Hi. I'm new to the forum and hope not to ask something already discussed: why save involves start button (save state+start+down)? In psx save state implementation, for example, start is not used. Am I the only one finding annoying each time I save, the game leaves/enters pause or goes onto next/another stage because start press? Maybe an option to toggle if start button is or is not required would be interesting. Thanks

Indeed some cores need the Start button and some cores do not. I added an option to not need the Start button so people can choose.

HistorianXYZ wrote: Tue Apr 01, 2025 8:10 am

I'm not sure what's going on with my saves. I was playing Civilization last week, and I saved my game a few times. Later on, I read about only exiting through the OSD. I came back to the game yesterday. There isn't even an option to load a saved game! I tried to reload from the OSD, but nothing happened. I played a new game for a few minutes, then saved. I exited, then reset from the OSD. There was no sign of my saved game! What can I try next?

I think you are talking about Saving backup RAM instead of Save states. You should enable Autosave so it saves when you open the OSD. This topic is about the SNES core with Save states.

KnuckleheadFlow wrote: Wed Apr 02, 2025 7:07 pm

paulbnl had the bright idea to port the SD2SNES's save state solution to the MiSTer.

To make it clear, nothing was ported. I made all the Save state stuff from scratch for this core.

User avatar
Retro-Nerd
Top Contributor
Posts: 391
Joined: Fri Jul 08, 2022 2:47 am
Has thanked: 16 times
Been thanked: 107 times

Re: SNES Save State Test Core

Post by Retro-Nerd »

Thanks for the update. Earth Defense Earth still doesn't create a save state though.

paulbnl
Core Developer
Posts: 239
Joined: Sun May 24, 2020 8:48 pm
Has thanked: 71 times
Been thanked: 360 times

Re: SNES Save State Test Core

Post by paulbnl »

Retro-Nerd wrote: Thu Apr 03, 2025 4:08 pm

Thanks for the update. Earth Defense Earth still doesn't create a save state though.

That is because the game does not use interrupts at all. Maybe it is possible to force an interrupt in that case. I will try it.

User avatar
Retro-Nerd
Top Contributor
Posts: 391
Joined: Fri Jul 08, 2022 2:47 am
Has thanked: 16 times
Been thanked: 107 times

Re: SNES Save State Test Core

Post by Retro-Nerd »

Ah, ok. Makes sense. I wonder how many SNES games were done that way.

tyvar1
Posts: 8
Joined: Tue Aug 23, 2022 11:51 am
Has thanked: 4 times
Been thanked: 3 times

Re: SNES Save State Test Core

Post by tyvar1 »

paulbnl wrote: Thu Apr 03, 2025 4:05 pm

If there are no major issues found with todays build then I will send a pull request and we will see if it gets accepted.

Great news! :D thanks!

fabrisco
Posts: 8
Joined: Tue Jun 23, 2020 12:07 am
Has thanked: 10 times
Been thanked: 3 times

Re: SNES Save State Test Core

Post by fabrisco »

paulbnl wrote: Thu Apr 03, 2025 3:46 pm

Updated the first post with a new build:

Save to SD default to On. Those who had it previously changed to On will need to change it again.
Option for Savestate button+Up/Down without needing to press Start. (Input options->State Ld/Sv)
Fix for Firemen and other minor fixes.

Thank you for the update! Are you still working to add other special chip support or that is it for now?

Sorry about my english, it’s terrible

User avatar
PistolsAtDawn
Top Contributor
Posts: 383
Joined: Fri Feb 18, 2022 7:29 pm
Has thanked: 339 times
Been thanked: 107 times

Re: SNES Save State Test Core

Post by PistolsAtDawn »

paulbnl, do you have a patreon / kofi / etc.?

Kanel
Posts: 2
Joined: Sat Mar 29, 2025 8:42 pm
Been thanked: 1 time

Re: SNES Save State Test Core

Post by Kanel »

paulbnl wrote: Thu Apr 03, 2025 3:46 pm

Updated the first post with a new build:

Save to SD default to On. Those who had it previously changed to On will need to change it again.
Option for Savestate button+Up/Down without needing to press Start. (Input options->State Ld/Sv)
Fix for Firemen and other minor fixes.

Wow! Incredible speed! Thanks so much for the solution provided. Just to add that for those who change that option (input options -> state ld/sv), remember to save the settings in system page.

lordelan
Posts: 33
Joined: Tue Aug 16, 2022 9:36 am
Has thanked: 48 times
Been thanked: 10 times

Re: SNES Save State Test Core

Post by lordelan »

paulbnl wrote: Thu Apr 03, 2025 4:05 pm
lordelan wrote: Sun Mar 02, 2025 11:16 am

Hey Paul, found a game where save states won't work (and had to learn the hard way):

The Firemen (Europe)
Same for Japanese version. Dunno if a USA version even exists.

Great game by the way!

This game should be working now.

Very nice, I was so eagerly waiting for a fix for this. Thank you so much!

Does the update_all script pull this or would I have to manually download it?

Atohmdiy
Posts: 168
Joined: Thu Jul 02, 2020 12:20 am
Has thanked: 6 times
Been thanked: 26 times

Re: SNES Save State Test Core

Post by Atohmdiy »

Hi,
I find a bug : Yohsi's island, froggy boss. When you are throwing the egg into froggy's glottis, the game just freeze. I tried several time and it always freeze. Then I tested with the "normal" snes core and it is working fine.

paulbnl
Core Developer
Posts: 239
Joined: Sun May 24, 2020 8:48 pm
Has thanked: 71 times
Been thanked: 360 times

Re: SNES Save State Test Core

Post by paulbnl »

fabrisco wrote: Sun Apr 06, 2025 6:24 pm

Thank you for the update! Are you still working to add other special chip support or that is it for now?

I am not working on other chips for now. Which chip would you like?

PistolsAtDawn wrote: Mon Apr 07, 2025 12:30 pm

paulbnl, do you have a patreon / kofi / etc.?

I added a Kofi link to my signature.

lordelan wrote: Mon Apr 07, 2025 2:27 pm

Does the update_all script pull this or would I have to manually download it?

You need to manually download it for now.

Atohmdiy wrote: Sat Apr 12, 2025 7:17 pm

Hi,
I find a bug : Yohsi's island, froggy boss. When you are throwing the egg into froggy's glottis, the game just freeze. I tried several time and it always freeze. Then I tested with the "normal" snes core and it is working fine.

Can you try with the latest SNES unstable build? Here is the link: https://github.com/MiSTer-unstable-nigh ... 07a6ab.rbf

Atohmdiy
Posts: 168
Joined: Thu Jul 02, 2020 12:20 am
Has thanked: 6 times
Been thanked: 26 times

Re: SNES Save State Test Core

Post by Atohmdiy »

No issues with the latest unstable.

lordelan
Posts: 33
Joined: Tue Aug 16, 2022 9:36 am
Has thanked: 48 times
Been thanked: 10 times

Re: SNES Save State Test Core

Post by lordelan »

paulbnl wrote: Sun Apr 13, 2025 10:54 am
lordelan wrote: Mon Apr 07, 2025 2:27 pm

Does the update_all script pull this or would I have to manually download it?

You need to manually download it for now.

Yeah did just that and tested it with Firemen. Works great! Thank you so much!

paulbnl
Core Developer
Posts: 239
Joined: Sun May 24, 2020 8:48 pm
Has thanked: 71 times
Been thanked: 360 times

Re: SNES Save State Test Core

Post by paulbnl »

Atohmdiy wrote: Sun Apr 13, 2025 4:20 pm

No issues with the latest unstable.

Thanks for testing. I tried it with the save state core and did not have any issues with Froggy with or without using save states.

Which region rom are you using? US/Eu/JP. Did you try without loading state?

User avatar
PistolsAtDawn
Top Contributor
Posts: 383
Joined: Fri Feb 18, 2022 7:29 pm
Has thanked: 339 times
Been thanked: 107 times

Re: SNES Save State Test Core

Post by PistolsAtDawn »

paulbnl, thanks so much for your work on this! This was basically "that one thing" that MiSTer didn't have that I wished it did.

My nostalgia for SNES is the highest out of all the consoles, and while I can be fine with playing games legitimately, sometimes it's nice to be able to take a quick snapshot before a challenging part of a game to save time if/when I fail to progress. I'm in my 40s now, and gaming time is scant as it is, so this work of yours allows me to get some of my time back and enjoy gaming more.

I can't express my appreciation for this enough, but that is also true of all of our developers! Thank you!

I would be curious to know how the level of effort for your solution compares to "basically a full re-write" (which is how adding save states to the core was discussed in recent years). Was this a new layer/module that you fit into the current core, or did it require a lot more than that?

Atohmdiy
Posts: 168
Joined: Thu Jul 02, 2020 12:20 am
Has thanked: 6 times
Been thanked: 26 times

Re: SNES Save State Test Core

Post by Atohmdiy »

paulbnl wrote: Mon Apr 14, 2025 3:57 pm
Atohmdiy wrote: Sun Apr 13, 2025 4:20 pm

No issues with the latest unstable.

Thanks for testing. I tried it with the save state core and did not have any issues with Froggy with or without using save states.

Which region rom are you using? US/Eu/JP. Did you try without loading state?

I am using the one from HTGDB pack, it is the "USA REV 1" rom. I just try again and it still freeze, the first time i save state just before the boss, i didn't save state at all this time. I even have to delete my snes config file (long story short i switch from scandouble to "true" 240p but scandoubler fx with 75% scanline was still activated)

paulbnl
Core Developer
Posts: 239
Joined: Sun May 24, 2020 8:48 pm
Has thanked: 71 times
Been thanked: 360 times

Re: SNES Save State Test Core

Post by paulbnl »

PistolsAtDawn wrote: Mon Apr 14, 2025 5:26 pm

I would be curious to know how the level of effort for your solution compares to "basically a full re-write" (which is how adding save states to the core was discussed in recent years). Was this a new layer/module that you fit into the current core, or did it require a lot more than that?

A full rewrite is a bit of an exaggeration but for the save states method like the other cores everything in the core needs to be able to be paused. That means adding a pause signal for all parts of the core.

I wanted to add save states with as few changes to the core as possible. The current method is waiting for an interrupt and when the CPU reads the interrupt address it overrides the ROM data and runs the save state code. The state of the CPU is restored at the end of the interrupt handler and this means the CPU did not need any modifications for save states.

The PPU was also unmodified in the beginning because I used shadow registers to save the write-only registers. This cost a lot of logic and there was an issue with the cart bus so instead I modified the PPU to allow for reading the write-only registers during a save state.

I did have to make a lot of changes to the sound chip because it needed to be paused and almost nothing of the internal state can be read by the CPU.

All the cartridge chips like DSP/SA1/Super FX also needed to be modified to be able to read the state.

Since all the state loading/saving is done in CPU code, it does require writing a lot of assembly code too.

spicylot
Posts: 1
Joined: Sun Apr 13, 2025 9:01 pm
Has thanked: 1 time

Re: SNES Save State Test Core

Post by spicylot »

I started having this issue after the last update. The core recognizes when i press the savestate button but pressing up/down on the dpad does nothing. It will work for left/right only. Do you know why that would happen? i tried it with 2 different controllers.
I have really been enjoying this project, thank you!

Post Reply