MiSTer-devel / NES_MiSTer

GNU General Public License v3.0
172 stars 75 forks source link

More Save State Slots #277

Closed 40wattrange closed 2 years ago

40wattrange commented 3 years ago

Not sure if there is any limitation preventing this, but could it be possible to get more slots for save states? Possibly 25? 50? unlimited??

I know it sounds crazy but a number of us speedrunners can easily use up to 20 slots per game, so having the ability to have more slots, or just have the ability to dump the save state to a file, then pair that with the option to load it from file from SD?

It would be nice to match the ability of the N8 or N8 Pro. I know a handful of people only keeping their flashcarts around because of the 4 slot limitation.

birdybro commented 2 years ago

There are limitations but it's not very intuitive. Each of those menu options occupies a bit more more. Depending on the options you have it can take more bits.

https://github.com/MiSTer-devel/Main_MiSTer/wiki/Core-configuration-string - reference

https://github.com/MiSTer-devel/NES_MiSTer/blob/4245e385e3f1437c9aed520a79b6eb21c6a93901/NES.sv#L199

// Status Bit Map:
// 0         1         2         3          4         5         6
// 01234567890123456789012345678901 23456789012345678901234567890123
// 0123456789ABCDEFGHIJKLMNOPQRSTUV 0123456789ABCDEFGHIJKLMNOPQRSTUV
// XXXXXXXX XX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXX

Currently the bits with X's are occuppied.

https://github.com/MiSTer-devel/NES_MiSTer/blob/4245e385e3f1437c9aed520a79b6eb21c6a93901/NES.sv#L224 It currently takes up oDE, that's the lower case row (second set of 32 bits) D and E. Meaning the options are as follows (I think) . 00, 01, 10, 11 To add more save states will require adding another bit. Adding status bits has to be carefully considered, since you have a limited amount and it's a bad idea to take them away.

Not arguing for or against, but just hoping to help explain to you what it entails.

Kitrinx commented 2 years ago

this is really an issue for the framework and not for this core. Savestate limitations are a framwork feature.

40wattrange commented 2 years ago

Ok thanks! Maybe I can drop a request in there. I dont really think the amount of states matter, as 4 is enough, but more the ability to load the states from SD card.

Kitrinx commented 2 years ago

all four should be saved to the sd card, as far as I know.

Kitrinx commented 2 years ago

either way, there's nothing that can be done from the core perspective unless the framework changes to have different savestate related mechanics. This core is just idiomatic for the platform in it's savestate handling, the same as all other cores with savestates.

40wattrange commented 2 years ago

Understood. I will close this request since it does not pertain specifically to the core.

whatnowmax commented 8 months ago

In case someone finds this later, there is a fairly simple workaround for this limitation, at least for speedrunners trying to practice using save states (which is the only reason I'd think you'd need more than 4).

Save states are stored on your sd card, per game file. This can be exploited by making copies of your game.

For example, if you have a game with 10 worlds of 3 levels each, copy your game file ten times. For each of the ten files, reach world 1, 2, 3, 4.... and then save state. For each save state slot, save one of the levels per world (so the 3rd file's 4 save state will have World 3, stage 4).

A bit time consuming depending on what game you're playing, however if you're speedrunning, this is just simple necessary practice. I'm sure there is a way to export your save states for the next person as well and post them to src if you are so inclined.