Page 1 of 3

EMS 64MB usb cart multiple saves?

Posted: Thu Nov 01, 2012 2:12 pm
by reprep
While looking for a way to make full use of 128 kilobyte SRAM of an EMS 64MB cart for multiple saves (most games have 8 kb save and some 32 kb), i found an old program which does exactly the thing i want.

The program is called EMSMenu. it stores the saves into the last 96 kb of SRAM, and copies the save of the game you want to play into the first 32 kb of SRAM, so the game sees the save. So you can use 3 saves on one cart even more in version 2.1 as it takes into account which games use 8 kb.

it additionally lets to choose custom pallettes for bw gameboy games.

Unfortunately this program is written for old versions of EMS carts and it doesn't work on new EMS 64MB cart. The source code is released too. so i thought posting it here might be a good idea, in hope that it might get someone's attention, as it is a too good project to let die.

the main page is here.

http://www.personal.triticom.com/~erm/f ... m/GameBoy/

some more info from the author about the project:

http://www.personal.triticom.com/~erm/f ... _Works.txt

Re: EMS 64MB usb cart multiple saves?

Posted: Sat Nov 03, 2012 7:15 pm
by Flavor
I approve of this message.

Re: EMS 64MB usb cart multiple saves?

Posted: Sun Nov 04, 2012 9:27 pm
by MottZilla
I did some research and multiple game saves on the cartridge at the same time will be possible with some restrictions. I patched the menu program to be able to do this. Details should follow in the future. All I will say for now (as I am in a hurry) is that during my testing I was able to have Final Fantasy Adventure, Kirby's Dreamland 2, and Mega Man Xtreme all have their saves maintained on the cartridge at the same time. I can switch between the games as I please and their save data is never bothered by any other game. Details on what the restrictions will be explained when the menu patch is released.

Re: EMS 64MB usb cart multiple saves?

Posted: Sun Nov 04, 2012 9:43 pm
by Flavor
Nice work, MottZilla. Let me know if there's anything I can do, but I haven't done GB dev in many years. When it's done, I can put it up on that http://www.personal.triticom.com/~erm/f ... m/GameBoy/ page.

Re: EMS 64MB usb cart multiple saves?

Posted: Mon Nov 05, 2012 6:34 am
by tepples
How hard would it be to compress the saves with run-length encoding or Huffman or the like?

Re: EMS 64MB usb cart multiple saves?

Posted: Mon Nov 05, 2012 2:09 pm
by MottZilla
I haven't a clue. The cartridge contains 128 Kbytes of SRAM which is enough for 13 games the way I have it setup. Given the limit of how much ROM you have to store games and even though you have two 4 megabyte pages the SRAM is shared and there is no software way to detect which page you are on so I don't think compression is worth looking into for me personally. But if you want to give it a shot feel free. You might need to poke around to find free room in the 32kbyte menu program.

So far testing has gone well. As I mentioned there are restrictions with what games you can put on the cartridge at once. First, you can only have 1 game that uses 32 kbytes of SRAM at a time, for example Pokemon. You can have 12 other games that use 8 kbytes of SRAM. However some games, probably mostly newer MBC5 games that use 8 kbytes may initialize the RAM Bank Register and end up using the same SRAM that 32Kbyte games use. These will have to be avoided being used together or a patch can be made for the 8kbyte game.

If anyone can think of various Gameboy games that use SRAM data backup please mention them in a list. I know of these so far.

Super Mario Land 2: 6 Golden Coins
Super Mario Land 3: Wario Land
Wario Land 2
Metroid II
Mega Man Xtreme
Mega Man Xtreme 2
Final Fantasy Adventure
Kirby's Dreamland 2
Crystalis
Kaeruno Tameni
Pokemon - Series
Legend of Zelda - Link's Awakening + DX Version
Legend of Zelda - Oracle of Ages & Seasons


I can't test them all but a variety is good.

Re: EMS 64MB usb cart multiple saves?

Posted: Mon Nov 05, 2012 2:19 pm
by reprep
thanks for the research. Some more SRAM gameboy games (i am not including GBC games, there are a lot of GBC sram games)

Mario's Picross
Mario's Picross 2
Sword of Hope 2

Re: EMS 64MB usb cart multiple saves?

Posted: Mon Nov 05, 2012 3:19 pm
by tepples
Game Boy Camera (but that probably doesn't count because its mapper has a sensor)
LSDJ
Tetris DX
Donkey Kong (1994)
Donkey Kong Land series
Kirby Star Stacker

Re: EMS 64MB usb cart multiple saves?

Posted: Tue Nov 06, 2012 1:17 pm
by MottZilla
Thanks for the mentions so far. Some games will need save fix patches for the multi sram menu to work with them. Older games tend not to interfere with the menu but newer games sometimes do, and all greater than 8Kbyte games will. Mario Picross for example is only 8K save but it sets the RAM Bank to 0, which I suspect a number of games will. Basically games that write to the RAM bank register but only have 8K of SRAM will all work with the menu's multi sram feature as long as we patch them. So it should be possible to have 1 32kb save game + 12 8kb save games on the cart at once. Either way it is an improvement.

Testing continues.

Re: EMS 64MB usb cart multiple saves?

Posted: Wed Nov 07, 2012 12:11 pm
by mikeryan
tepples wrote:Game Boy Camera (but that probably doesn't count because its mapper has a sensor)
Not to mention that it has 1 Mbit SRAM.

Re: EMS 64MB usb cart multiple saves?

Posted: Wed Nov 07, 2012 5:46 pm
by MottZilla
I have updated my website with the MultiSRAM menu and some new fixes and some save game fixes.

Re: EMS 64MB usb cart multiple saves?

Posted: Thu Nov 08, 2012 12:00 am
by reprep
the link doesn't work unfortunately. 404 error.

edit: i meant the file link, sc_flasher.zip gives error, not the homepage.

Re: EMS 64MB usb cart multiple saves?

Posted: Thu Nov 08, 2012 1:36 pm
by reprep
few more battery save games (again only bw gb games):

final fantasy legend i and ii
golf
F-1 race
Nobunaga's ambition
personal organizer
torpedo range
ultima:the runes of virtue

Re: EMS 64MB usb cart multiple saves?

Posted: Thu Nov 08, 2012 2:55 pm
by MottZilla
Sorry about that. Somehow the file didn't get uploaded. It's there now.

Re: EMS 64MB usb cart multiple saves?

Posted: Thu Nov 08, 2012 10:04 pm
by nitro2k01
I had a look at the patch. So, the patch is removing the code which calculates a value to be written as the upper nibble of the value that is being written to $7000. The lower nibble apparently limits the ROM size that's visible to the program, whereas the upper nibble is probably meant to limit the visible size of RAM. Your patch makes it always write 0 as the upper nibble which would make all 128 kB of RAM always visible. Did you research this and conclude that this functionality is broken in the FPGA?