how to save/load a game?

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
how to save/load a game?
by on (#52007)
in detail.
thanks

by on (#52014)
Typically you press either the A, B or start button with your right thumb after moving an indication object (cursor) with the directional pad (left thumb) near the character graphics depicting "SAVE" or "LOAD" displayed on-screen.

by on (#52016)
@Kyushaku:

I think you explained it well but I don't think this is what he's may be looking for :wink: I didn't write a post in this thread yet with a similar comment since I saw that the user is maybe not english native since he posted his first message in the chinese forum. So I gave him a break.

@magicphenix:

Can you give us more details of what you're looking for? Do you have an issue with:

- using an emulator?
- writing code for an emulator?

your current question is not clear unless you explain the context. Please give more detail about what you're looking for.

Are you by any chance the author of the flash based emulator?

edit:

He asked a similar question in the chinese forum based on a babel fish translation. So we should be a little bit more nice with him since he may have problem with english.

by on (#52032)
Yeah, we need more detail, but since this is the NESemdev forum, we can at least assume you're writing an emulator.

If you're talking about save states, you need to, well, save the state of the emulator in a way that can be retrieved later. This means you have to save all CPU registers, all of RAM, VRAM, etc, so that later the emulator can reload all that stuff and resume it's previous state.

by on (#52041)
The iNES header has a bit for "battery". If this is turned on, you save the game by writing out the emulated PRG RAM to a file every few seconds. Later, when the user plays the same ROM again, read the file back into PRG RAM.

by on (#52103)
Banshaku wrote:
@Kyushaku:

I think you explained it well but I don't think this is what he's may be looking for :wink: I didn't write a post in this thread yet with a similar comment since I saw that the user is maybe not english native since he posted his first message in the chinese forum. So I gave him a break.

@magicphenix:

Can you give us more details of what you're looking for? Do you have an issue with:

- using an emulator?
- writing code for an emulator?

your current question is not clear unless you explain the context. Please give more detail about what you're looking for.

Are you by any chance the author of the flash based emulator?

edit:

He asked a similar question in the chinese forum based on a babel fish translation. So we should be a little bit more nice with him since he may have problem with english.


thanks,I have solved the problem.(- writing save/load code for an emulator).

by on (#52105)
I didn't do anything to help you but since you said thanks I guess I should say you're welcome ;)