SNES Save State Test core

User avatar
SwedishGojira
Posts: 64
Joined: Sun May 24, 2020 7:26 pm
Location: Sweden
Has thanked: 26 times
Been thanked: 28 times
Contact:

Re: SNES Save State Test core

Unread post by SwedishGojira »

Follow wrote: Thu Oct 10, 2024 9:36 am

I can't say if it's Qmtech's memory, the states of the other cores are working.

The savestates of other cores works in a different way from this.

User avatar
Follow
Posts: 14
Joined: Mon Aug 05, 2024 9:53 pm
Has thanked: 6 times
Been thanked: 2 times

Re: SNES Save State Test core

Unread post by Follow »

SwedishGojira wrote: Thu Oct 10, 2024 9:44 am
Follow wrote: Thu Oct 10, 2024 9:36 am

I can't say if it's Qmtech's memory, the states of the other cores are working.

The savestates of other cores works in a different way from this.

Yes, different access to RAM.
Well, if anyone else has problems with Qtech, let me know.
Mine is the version with built-in RAM.

lordelan
Posts: 17
Joined: Tue Aug 16, 2022 9:36 am
Has thanked: 31 times
Been thanked: 4 times

Re: SNES Save State Test core

Unread post by lordelan »

Follow wrote: Thu Oct 10, 2024 9:36 am

More test:
https://youtu.be/BOws_FCcxhE

Used same rom Contra (PixelCherryNinja) crash
Donkey Kong 2 glitch/crash
Super Mario World 2 , save "disabled"

I can't say if it's Qmtech's memory, the states of the other cores are working.

Really odd that you get different results than PCN. Could be a different rom dump or any other different circumstances in your exact MiSTer build compared to his.

Just to be sure, you are definitely using the unstable Main?

paulbnl wrote: Tue Oct 08, 2024 1:15 pm

Also currently the unstable Main is needed otherwise loading the bin file won't work. It can be found at the bottom of this link: https://github.com/MiSTer-unstable-nigh ... r/releases

User avatar
Follow
Posts: 14
Joined: Mon Aug 05, 2024 9:53 pm
Has thanked: 6 times
Been thanked: 2 times

Re: SNES Save State Test core

Unread post by Follow »

lordelan wrote: Thu Oct 10, 2024 11:37 am
Follow wrote: Thu Oct 10, 2024 9:36 am

More test:
https://youtu.be/BOws_FCcxhE

Used same rom Contra (PixelCherryNinja) crash
Donkey Kong 2 glitch/crash
Super Mario World 2 , save "disabled"

I can't say if it's Qmtech's memory, the states of the other cores are working.

Really odd that you get different results than PCN. Could be a different rom dump or any other different circumstances in your exact MiSTer build compared to his.

Just to be sure, you are definitely using the unstable Main?

paulbnl wrote: Tue Oct 08, 2024 1:15 pm

Also currently the unstable Main is needed otherwise loading the bin file won't work. It can be found at the bottom of this link: https://github.com/MiSTer-unstable-nigh ... r/releases

Yes, SNES_unstable_20241007_11ef03.rbf on directory

paulbnl
Core Developer
Posts: 216
Joined: Sun May 24, 2020 8:48 pm
Has thanked: 49 times
Been thanked: 285 times

Re: SNES Save State Test core

Unread post by paulbnl »

Wave wrote: Tue Oct 08, 2024 7:23 pm

Is this expected to merge into mainline eventually?

Maybe it will happen. Not sure.

mook8515 wrote: Wed Oct 09, 2024 6:41 am

EDIT: instructions are posted here https://www.youtube.com/watch?v=MZ9H_3AcSC8.
You have to override the "MiSTer" file on root of sd card with the unstable version found on discord.

It can also be found on GitHub. I added a link to the first post.

iamTeddyNL wrote: Wed Oct 09, 2024 7:56 am

Does this core have any known/intended limitations, eg for special chip support?

There are no limitations except for the save states. No save states with special chips for now.

PixelCherryNinja wrote: Wed Oct 09, 2024 9:05 am

Thanks Paul

If you have a Patreon/KoFi please let me know, so that I can add it to video descriptions.

I don't have one yet but I will look into KoFi.

Follow wrote: Wed Oct 09, 2024 8:42 pm
Escape-To-88 wrote: Wed Oct 09, 2024 5:15 pm

Anyone else having issues with this saving and the QMTech clone board? I'm guessing a RAM issue?

Me, glitches and crash any rom

https://www.youtube.com/watch?v=7rLcFAwZoW0

My guess is that you did not use the unstable "MiSTer Main".

jandal wrote: Wed Oct 09, 2024 9:54 pm

one more general question: how come these kind of things dont appear as PRs or forks on the main mister github? Is it just that OP keeps it private/local until theyre ready to do that?

Usually I wait with uploading it to GitHub until everything is working well and the code is cleaned up.

SwedishGojira wrote: Thu Oct 10, 2024 5:53 am

It would be interesting to know more bout how this is done. Will it be able to set the chips into the correct states when loading a savestate, since I believe that was what they had trouble with for the flashcarts?

Basically it is code running on the SNES that restores memory and registers. Shadow registers are used for those that are write only.

I think the trouble with SD2SNES was that they could not restore the SPC sound chip. I needed to modify the SPC chip to allow for register reading during save states. All special chips like SA-1 and FX chip will also need to be modifies to support save states.

lordelan
Posts: 17
Joined: Tue Aug 16, 2022 9:36 am
Has thanked: 31 times
Been thanked: 4 times

Re: SNES Save State Test core

Unread post by lordelan »

paulbnl wrote: Thu Oct 10, 2024 11:44 am
Wave wrote: Tue Oct 08, 2024 7:23 pm

Is this expected to merge into mainline eventually?

Maybe it will happen. Not sure.

Hopefully :)

paulbnl wrote: Thu Oct 10, 2024 11:44 am

All special chips like SA-1 and FX chip will also need to be modifies to support save states.

So they are still on your to do list and will eventually (maybe) be supported in the future? Nice!

User avatar
Follow
Posts: 14
Joined: Mon Aug 05, 2024 9:53 pm
Has thanked: 6 times
Been thanked: 2 times

Re: SNES Save State Test core

Unread post by Follow »

Oops, I thought it was the SNES Core.
I tried moving it to the SD card and renaming it MiSTer_unstable_20241003_062b0a and MiSTer_unstable_20241007_04d836, but neither of them output video.
I'll wait for others with the same card to test it, it could just be my mistake.
paulbnl thanks for the clarification.

jandal
Posts: 2
Joined: Wed Oct 09, 2024 9:52 pm
Been thanked: 2 times

Re: SNES Save State Test core

Unread post by jandal »

you need to name the file "MiSTer", and to do that you also need to do it directly on the SD card from a computer. A live system doesnt let you rename those files.

I had the exact same issue you were (although inexplicably it did seem to work once) and switching to the main unstable nightly is the fix.

Tested and working for me this morning

User avatar
Follow
Posts: 14
Joined: Mon Aug 05, 2024 9:53 pm
Has thanked: 6 times
Been thanked: 2 times

Re: SNES Save State Test core

Unread post by Follow »

jandal wrote: Thu Oct 10, 2024 5:23 pm

you need to name the file "MiSTer", and to do that you also need to do it directly on the SD card from a computer. A live system doesnt let you rename those files.

I had the exact same issue you were (although inexplicably it did seem to work once) and switching to the main unstable nightly is the fix.

Tested and working for me this morning

I was trying via FTP... my mistake
The correct way is as you said, now it's working. Thank you very much :mrgreen:

User avatar
Waifu4Life
Posts: 271
Joined: Fri Jun 19, 2020 5:30 am
Has thanked: 21 times
Been thanked: 47 times

Re: SNES Save State Test core

Unread post by Waifu4Life »

I can confirm that it works with a DE10-Nano in a MiSTer MultiSystem and a MiSTer Pi.

paulbnl wrote: Thu Oct 10, 2024 11:44 am

There are no limitations except for the save states. No save states with special chips for now.

Does the implementation of save states for special chip games seem plausible for you?

Escape-To-88
Posts: 45
Joined: Fri Apr 30, 2021 7:07 pm
Has thanked: 11 times
Been thanked: 2 times

Re: SNES Save State Test core

Unread post by Escape-To-88 »

Follow wrote: Thu Oct 10, 2024 9:36 am

More test:
https://youtu.be/BOws_FCcxhE

Used same rom Contra (PixelCherryNinja) crash
Donkey Kong 2 glitch/crash
Super Mario World 2 , save "disabled"

I can't say if it's Qmtech's memory, the states of the other cores are working.

Same with me. NES core states work fine, SNES crashes

Escape-To-88
Posts: 45
Joined: Fri Apr 30, 2021 7:07 pm
Has thanked: 11 times
Been thanked: 2 times

Re: SNES Save State Test core

Unread post by Escape-To-88 »

Follow wrote: Thu Oct 10, 2024 7:53 pm
jandal wrote: Thu Oct 10, 2024 5:23 pm

you need to name the file "MiSTer", and to do that you also need to do it directly on the SD card from a computer. A live system doesnt let you rename those files.

I had the exact same issue you were (although inexplicably it did seem to work once) and switching to the main unstable nightly is the fix.

Tested and working for me this morning

I was trying via FTP... my mistake
The correct way is as you said, now it's working. Thank you very much :mrgreen:

Have you got this working on the QMTech board now with the unstable MiSTer? This could be my issue too

User avatar
Follow
Posts: 14
Joined: Mon Aug 05, 2024 9:53 pm
Has thanked: 6 times
Been thanked: 2 times

Re: SNES Save State Test core

Unread post by Follow »

Escape-To-88 wrote: Fri Oct 11, 2024 7:08 am

Have you got this working on the QMTech board now with the unstable MiSTer? This could be my issue too

What I did was follow the tip from the users above.

1- I took the MiSTer_unstable_20241007_04d836 and renamed it to MiSTer
2- I removed the SD card from the mister and put it in the computer.
3- I renamed the file already existing in the root to MiSTerBKP
4- I pasted the new MiSTer in the root of the card
5- I removed it from the computer and put it in the mister

Well, I know it's 1 game per bin, but it's working :)
https://youtu.be/rtLVbH5LdAc

spud_q
Posts: 12
Joined: Wed Jan 19, 2022 8:07 am
Has thanked: 2 times
Been thanked: 5 times

Re: SNES Save State Test core

Unread post by spud_q »

If it's at all helpful, here is one that doesn't seem to save at all... "Torneko no Daibouken - Fushigi no Dungeon (Japan)". It still pops up the message saying that the state was saved but on restoration nothing seems to happen. Save states are working on my flash cart for this one. It doesn't seem to use any special chips and I tried other games that have the same pcb and they all work fine.
https://snescentral.com/pcbboards.php?chip=SHVC-2A3M-10

User avatar
holaplaneta
Posts: 22
Joined: Thu May 28, 2020 5:55 am
Has thanked: 28 times
Been thanked: 5 times

Re: SNES Save State Test core

Unread post by holaplaneta »

Follow wrote: Thu Oct 10, 2024 9:36 am

Super Mario World 2 , save "disabled"

SMW 2 Yoshi's Island has a special Super FX chip. Maybe that is why? Or you managed to fix it?

User avatar
Follow
Posts: 14
Joined: Mon Aug 05, 2024 9:53 pm
Has thanked: 6 times
Been thanked: 2 times

Re: SNES Save State Test core

Unread post by Follow »

holaplaneta wrote: Fri Oct 11, 2024 5:13 pm
Follow wrote: Thu Oct 10, 2024 9:36 am

Super Mario World 2 , save "disabled"

SMW 2 Yoshi's Island has a special Super FX chip. Maybe that is why? Or you managed to fix it?

Is Special chip, need wait Paul modify the core

User avatar
Longtime4321
Posts: 116
Joined: Fri Aug 12, 2022 5:17 am
Has thanked: 9 times
Been thanked: 17 times

Re: SNES Save State Test core

Unread post by Longtime4321 »

Oh sweet! Hats off to you!

paulbnl
Core Developer
Posts: 216
Joined: Sun May 24, 2020 8:48 pm
Has thanked: 49 times
Been thanked: 285 times

Re: SNES Save State Test core

Unread post by paulbnl »

Waifu4Life wrote: Fri Oct 11, 2024 5:44 am

Does the implementation of save states for special chip games seem plausible for you?

Yes it is but it is going to be a challenge to add save states without modifying the original code too much.

sixtyfps
Posts: 1
Joined: Sat Oct 12, 2024 10:11 pm

Re: SNES Save State Test core

Unread post by sixtyfps »

Tested a few games a couple days ago. Super Mario World and several SMW-based romhacks work with it, which is huge for speedrunners and kaizo-hack enjoyers.

Super Mario RPG and Super Mario Kart do not work with it.

User avatar
Waifu4Life
Posts: 271
Joined: Fri Jun 19, 2020 5:30 am
Has thanked: 21 times
Been thanked: 47 times

Re: SNES Save State Test core

Unread post by Waifu4Life »

paulbnl wrote: Sat Oct 12, 2024 7:46 pm

Yes it is but it is going to be a challenge to add save states without modifying the original code too much.

naxeras
Posts: 4
Joined: Tue Feb 06, 2024 11:47 am
Been thanked: 3 times

Re: SNES Save State Test core

Unread post by naxeras »

Savestastes working great.

Thank you very much.

It is possible the same implementation on the Megadrive Core?

Regards

spud_q
Posts: 12
Joined: Wed Jan 19, 2022 8:07 am
Has thanked: 2 times
Been thanked: 5 times

Re: SNES Save State Test core

Unread post by spud_q »

I did a bit of digging to see if I could find any more games where the save states fail to work. Here are a few more that I found by choosing games at random. I'm getting the same behavior as mentioned in my previous post where the messages show on screen that the state has been saved and then restored but it doesn't seem to do anything. No crashing or strange behavior beyond the failed restore state.

Thank you for your work on this alternate core, it's very exciting.

Super Putty (USA)
Samurai Shodown (USA)
Ranma 1-2 - Hard Battle (USA)
Run Saber (USA)

defender02
Posts: 1
Joined: Wed Oct 23, 2024 4:07 am
Been thanked: 3 times

Re: SNES Save State Test core

Unread post by defender02 »

Noob here. Is there a way for me to support paulbnl? Is there a pateron or something I can subscribe to in order to support his work?

User avatar
xadox
Posts: 9
Joined: Sat Nov 11, 2023 7:23 am
Has thanked: 3 times
Been thanked: 3 times

Re: SNES Save State Test core

Unread post by xadox »

One of my most desired features for the SNES Core.
A super big thank you for that.
Works flawlessly for me so far.

iamTeddyNL
Posts: 9
Joined: Thu Aug 19, 2021 7:54 am
Has thanked: 2 times
Been thanked: 3 times

Re: SNES Save State Test core

Unread post by iamTeddyNL »

I think I have something to report. Not on the SS functionality, but on the button bindings associated with it. I am trying to arrange the same thing as the FXPAK does, start + L to save and start + R to load. I can see a Savestate option in the OSD when I want to do button assignments but it does not respond when I input the buttons I desire. I am using a real SNES controller with my lovely Lik-Sang USB adapter (Super Smartjoy), it shows up as a directinput device in Windows and works fine on Linux too after button assignment.

Genuinely impressed that I can't get the audio to crash like on the FXPAK tho. This is amazing work.

paulbnl
Core Developer
Posts: 216
Joined: Sun May 24, 2020 8:48 pm
Has thanked: 49 times
Been thanked: 285 times

Re: SNES Save State Test core

Unread post by paulbnl »

The save states work the same way as the Game Boy and NES cores. There is a Savestate button that you need to assign and then it is Savestate button+Start+Up/Down to Load/Save. You can probably assign the Savestate button to Select as an alternative button and then use Select+Start+Up/Down but I never tried this.

paulbnl
Core Developer
Posts: 216
Joined: Sun May 24, 2020 8:48 pm
Has thanked: 49 times
Been thanked: 285 times

Re: SNES Save State Test core

Unread post by paulbnl »

Here is a new version with SA1 support. It should also fix most of the games that were reported here. Those games did not use NMI during gameplay.

Super Mario RPG has a known issue: Loading a state during a screen transition might show a blue screen only. Press X to to open the menu as a workaround if that happens.

Attachments
SNES_ss_20241109.zip
(1.91 MiB) Downloaded 148 times
Dudu
Posts: 2
Joined: Tue Oct 08, 2024 10:11 pm
Has thanked: 1 time
Been thanked: 2 times

Re: SNES Save State Test core

Unread post by Dudu »

thank you! you are amazing!!

fabrisco
Posts: 4
Joined: Tue Jun 23, 2020 12:07 am
Has thanked: 1 time
Been thanked: 1 time

Re: SNES Save State Test core

Unread post by fabrisco »

Thank you so much Paul!!

MARl0
Posts: 2
Joined: Tue May 24, 2022 4:18 pm
Has thanked: 1 time
Been thanked: 4 times

Re: SNES Save State Test core

Unread post by MARl0 »

So I tested the latest save state core, and noticed that it only seems to load save states (for any game) after you've created a new save state (for any game). So for example, if I create a save state in Super Mario World, and then leave the SNES core (or reload the core), I can't load that Super Mario World save state until I create another save state in a different game (Final Fight for example), and then load up Super Mario World again, and only then will I be able to load that original save state.

Basically when loading the core, loading save states only seems to work after you create a save state. This behavior did not occur with the previous save state core.

Still, this is awesome. Keep up the amazing work!

Post Reply