how to save/load a game?

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
magicphenix
Posts: 3
Joined: Mon Nov 02, 2009 4:34 am

how to save/load a game?

Post by magicphenix » Tue Nov 03, 2009 7:34 pm

in detail.
thanks

User avatar
kyuusaku
Posts: 1665
Joined: Mon Sep 27, 2004 2:13 pm

Post by kyuusaku » Tue Nov 03, 2009 9:52 pm

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.

User avatar
Banshaku
Posts: 2396
Joined: Tue Jun 24, 2008 8:38 pm
Location: Japan
Contact:

Post by Banshaku » Tue Nov 03, 2009 10:16 pm

@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.

User avatar
tokumaru
Posts: 11991
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru » Wed Nov 04, 2009 7:39 am

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.

tepples
Posts: 22278
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples » Wed Nov 04, 2009 8:56 am

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.

magicphenix
Posts: 3
Joined: Mon Nov 02, 2009 4:34 am

Post by magicphenix » Thu Nov 05, 2009 5:35 am

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).

User avatar
Banshaku
Posts: 2396
Joined: Tue Jun 24, 2008 8:38 pm
Location: Japan
Contact:

Post by Banshaku » Thu Nov 05, 2009 7:34 am

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

Post Reply