S-RAM cartridges - programming information?

By commodorejohn

Expert (92)

commodorejohn의 아바타

07-01-2011, 20:38

Okay, I'd like to be able to support saving to S-RAM cartridges like the Game Master 2 and the PAC/FM-PAC in my projects. I've found information on how the respective mappers work, so I know how to access the RAM, but I'm not finding anything on how it's supposed to be used - since it seems that both of these support multiple save files, I want to make sure that my saving doesn't clobber another game's file.

It looks from what I gather like the PAC just divides up its RAM into 8 1KB slots and the game decides which to write to (that's as simple as letting the player select,) but is there any kind of checksum or anything? And with the Game Master 2, it sounds like it might just store any number of variable-length files in the RAM, but is this the case, and if so, what's the file format like? I have no idea, and I can't seem to find anything. It sounds like Hans Otten used to have a programmer's guide for the FM-PAC, but his MSX pages have been taken down.

Does anyone have any information on this?

Login or 등록 to post comments

By hap

Paragon (2042)

hap의 아바타

19-01-2011, 14:46

I don't know about GameMaster 2, but supporting (FM)PAC sram is easy I assume. Just scan each memory block, if it's filled with 00 or ff, you can assume that it's empty. For user friendliness, I'd show all 8 blocks, like this:
<occupied by another game>
<occupied by another game>
<mygame save blabla info>
<empty block>
<empty block>
...

Then let the user pick, give a warning if they pick a slot occupied by another game, etc etc, you can guess the rest... exactly how SquareEnix does it on their console RPGs. Tongue

And hmm, 2 options for users that don't have an sram cart oO
1: "lol sorry you can't save the game"
2: "ok write down this long password bwahah"

By commodorejohn

Expert (92)

commodorejohn의 아바타

19-01-2011, 15:10

That's kind of what I've been assuming, I'm just curious if anybody has more detailed information...

By Huey

Prophet (2694)

Huey의 아바타

19-01-2011, 16:12

Well this page has two utilities (with source) to access the SRAM of the game master 2.

Also you might also check this link. It's from the same site as the utilities. Which I think is quite easy to find with a simple google search ;p