EMS 64MB usb cart multiple saves?

Discussion of programming and development for the original Game Boy and Game Boy Color.
reprep
Posts: 20
Joined: Mon Oct 22, 2012 6:38 am

EMS 64MB usb cart multiple saves?

Post by reprep » Thu Nov 01, 2012 2:12 pm

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

Flavor
Posts: 3
Joined: Mon May 09, 2011 11:12 am

Re: EMS 64MB usb cart multiple saves?

Post by Flavor » Sat Nov 03, 2012 7:15 pm

I approve of this message.

User avatar
MottZilla
Posts: 2832
Joined: Wed Dec 06, 2006 8:18 pm

Re: EMS 64MB usb cart multiple saves?

Post by MottZilla » Sun Nov 04, 2012 9:27 pm

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.

Flavor
Posts: 3
Joined: Mon May 09, 2011 11:12 am

Re: EMS 64MB usb cart multiple saves?

Post by Flavor » Sun Nov 04, 2012 9:43 pm

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.

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

Re: EMS 64MB usb cart multiple saves?

Post by tepples » Mon Nov 05, 2012 6:34 am

How hard would it be to compress the saves with run-length encoding or Huffman or the like?

User avatar
MottZilla
Posts: 2832
Joined: Wed Dec 06, 2006 8:18 pm

Re: EMS 64MB usb cart multiple saves?

Post by MottZilla » Mon Nov 05, 2012 2:09 pm

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.

reprep
Posts: 20
Joined: Mon Oct 22, 2012 6:38 am

Re: EMS 64MB usb cart multiple saves?

Post by reprep » Mon Nov 05, 2012 2:19 pm

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

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

Re: EMS 64MB usb cart multiple saves?

Post by tepples » Mon Nov 05, 2012 3:19 pm

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

User avatar
MottZilla
Posts: 2832
Joined: Wed Dec 06, 2006 8:18 pm

Re: EMS 64MB usb cart multiple saves?

Post by MottZilla » Tue Nov 06, 2012 1:17 pm

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.

mikeryan
Posts: 2
Joined: Mon Mar 28, 2011 9:16 pm

Re: EMS 64MB usb cart multiple saves?

Post by mikeryan » Wed Nov 07, 2012 12:11 pm

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.

User avatar
MottZilla
Posts: 2832
Joined: Wed Dec 06, 2006 8:18 pm

Re: EMS 64MB usb cart multiple saves?

Post by MottZilla » Wed Nov 07, 2012 5:46 pm

I have updated my website with the MultiSRAM menu and some new fixes and some save game fixes.

reprep
Posts: 20
Joined: Mon Oct 22, 2012 6:38 am

Re: EMS 64MB usb cart multiple saves?

Post by reprep » Thu Nov 08, 2012 12:00 am

the link doesn't work unfortunately. 404 error.

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

reprep
Posts: 20
Joined: Mon Oct 22, 2012 6:38 am

Re: EMS 64MB usb cart multiple saves?

Post by reprep » Thu Nov 08, 2012 1:36 pm

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

User avatar
MottZilla
Posts: 2832
Joined: Wed Dec 06, 2006 8:18 pm

Re: EMS 64MB usb cart multiple saves?

Post by MottZilla » Thu Nov 08, 2012 2:55 pm

Sorry about that. Somehow the file didn't get uploaded. It's there now.

nitro2k01
Posts: 228
Joined: Sat Aug 28, 2010 9:01 am

Re: EMS 64MB usb cart multiple saves?

Post by nitro2k01 » Thu Nov 08, 2012 10:04 pm

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?

Post Reply