tokumaru wrote:
There is no trick. Whatever you write to SRAM stays there and doesn't vanish when the power is switched off. Well, this is what should happen, because there are some conditions that might corrupt SRAM, but there is nothing a programmer can do to avoid this. Newer mappers have some means of protecting that memory, often offering registers to prevent or allow writing to SRAM. Just read the mapper-specific documents to see if they offer SRAM protection and how you can use it.
For saving games you have to backup whatever variables the game needs to resume it's state. Since you didn't program SMB1 it might be hard to tell what those variables are for that game. But since SMB1 didn't have any extra RAM, you should be able to save a game by backing up the whole 2KB of built in RAM ($0000-$07FF). With the standard 8KB of SRAM you could save up to 4 games.
It should be very easy to write a loop to copy the whole RAM to SRAM, as should be copying it back. The hardest part should be programming the menu interface to select those options. If you ave no idea on how to do this, you are out of luck because I doubt you are going to find a guide/tutorial for something as specific as this.
Writing a menu is like any other kind of NES programming. You have to draw the menu to the Name Tables, read the controllers and move a cursor around, and so on. Inputting names is the same thing, you ned to code your own interface, with all the letters and a cursor. This should be easy for anyone that has programmed anything serious (more complex than "Hello World") for the nes, I don't know exactly how much experience with it you have. But if you ask me, your necessity to build this interactive menu might be a great opportunity to learn some more NES programming.
Thanks, I'll see what I come up with,
All I have to do is make a separate title screen, And using SMBDIS, turn the menu into a Save Game Menu, Pretty simple, but can take time to figure out.
No more 2 player mode. 3 saves for Mario only unless otherwise noted, Game over must have a selection screen.
I figured out Graphics already, And Memblers gave me his NESLIB library for nametable uploads!