Fixing ROMs for EMS 64 GB Smart Card USB

Discussion of programming and development for the original Game Boy and Game Boy Color.
User avatar
MottZilla
Posts: 2837
Joined: Wed Dec 06, 2006 8:18 pm

Re: Fixing ROMs for EMS 64 GB Smart Card USB

Post by MottZilla »

I'm not sure if that was ever fixed or not. I'll have to look into it when I get a chance.
Great Hierophant
Posts: 780
Joined: Tue Nov 23, 2004 9:35 pm

Re: Fixing ROMs for EMS 64 GB Smart Card USB

Post by Great Hierophant »

I received an Everdrive GB last week, and since I have had a chance to play around with it and test some games, I feel that this thread is obsolete. The Everdrive GB does not need fixes. Instead of worrying about your game crashing because of some stray write to an MBC1 register or the memory map to foil old-style flash carts, you can enjoy the games as they were meant to be played (as well as a flash cart can).
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Fixing ROMs for EMS 64 GB Smart Card USB

Post by tepples »

Then it comes down to whether $92 plus shipping and tax (source) is worth it. I'll start a new topic about the merits of the EverDrive GB.
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Fixing ROMs for EMS 64 GB Smart Card USB

Post by tokumaru »

I did buy a EMS 64 GB Smart Card USB, but the difficulty of setting it up and the hacks in this thread really put me off, so I ended up never using it. Shortly after the EDGB came out and I got one, and from the little use I made of it (real life is kinda tough right now) it felt like a perfectly good flash cart.
Muessigb
Posts: 3
Joined: Thu Jan 08, 2015 6:18 pm

Re: Fixing ROMs for EMS 64 GB Smart Card USB

Post by Muessigb »

Hello,
I'm sorry to ask but I have a problem: Zelda Links Awakening DX is crashing (at rare conditions).
Muessigb
Posts: 3
Joined: Thu Jan 08, 2015 6:18 pm

Re: Fixing ROMs for EMS 64 GB Smart Card USB

Post by Muessigb »

And I found another problem:
If you have multiple files on one bank and one on another if you save on the one w/o the menu, savegame will corrupt when leaving it and starting one from the bank with the multiple saves.
User avatar
MottZilla
Posts: 2837
Joined: Wed Dec 06, 2006 8:18 pm

Re: Fixing ROMs for EMS 64 GB Smart Card USB

Post by MottZilla »

tokumaru wrote:I did buy a EMS 64 GB Smart Card USB, but the difficulty of setting it up and the hacks in this thread really put me off, so I ended up never using it. Shortly after the EDGB came out and I got one, and from the little use I made of it (real life is kinda tough right now) it felt like a perfectly good flash cart.
Yes it is a hassle these days because after Windows XP it's more trouble to install the drivers needed to program it. The hacks to fix certain games are good and bad. The good thing is they can get a game working and playable just fine. The bad thing is there are games that no one has "fixed" or a fix might actually not be complete, or could break something else possibly. The whole problem stems from the fact that there is no protection of the Flash Card's registers, and secondly that there is no pre-MBC5 emulation mode. The second one isn't so bad but the first problem is serious and also something that could have very easily been fixed. The worse thing about it is that I've read things that seem to suggest an older design of the flash cart actually did have protection for the flash card's registers to prevent games from writing to them.

The EverDrive GB is quite a bit more expensive but definitely worth it. The Fixes and the replacement menu I made for the SmartCard I only made because at the time it was the best option available. With the EverDrive now available it is no longer worth the time. If anyone really wants to fix a game though this thread contains plenty of mentions about what problems come up and how to try to fix them.

I haven't bought a EDGB yet but I plan to in the future.
Muessigb wrote:And I found another problem:
If you have multiple files on one bank and one on another if you save on the one w/o the menu, savegame will corrupt when leaving it and starting one from the bank with the multiple saves.
It is known and stated in the documentation that if you use the menu you need it on both banks. This is not a bug or problem, it is a limitation of the hardware.
Muessigb
Posts: 3
Joined: Thu Jan 08, 2015 6:18 pm

Re: Fixing ROMs for EMS 64 GB Smart Card USB

Post by Muessigb »

Damn! :(
I just paid 60$ for that card.
Well, is it possible to write just the/a savegame manager to the beginning of the card and just jump right into the game?
Maybe it could be done in just a fraction of the old size? Without any graphics or input at all, just the bare loader.
User avatar
MottZilla
Posts: 2837
Joined: Wed Dec 06, 2006 8:18 pm

Re: Fixing ROMs for EMS 64 GB Smart Card USB

Post by MottZilla »

All you need to do is add a small game with whatever larger game you put on the other side and the menu will be written. The software writes the menu if more than 1 game is in the list.

I have no plans to make any new changes to the menu. Sorry. There really isn't anything worth adding.
tehgazza
Posts: 1
Joined: Sat Jan 24, 2015 2:45 pm

Re: Fixing ROMs for EMS 64 GB Smart Card USB

Post by tehgazza »

@Mottzilla - Nice work on the menu dude!

Did you make any inroads with the patching of the translated Pokemon Card GB2 game (i.e.Pokemon Card GB2 - GR Dan Sanjou!, patched with http://www.romhacking.net/translations/1736/)
einzelherz
Posts: 4
Joined: Fri Aug 01, 2014 8:21 pm

Re: Fixing ROMs for EMS 64 GB Smart Card USB

Post by einzelherz »

Since this seems to be the most recent and active thread on this cart I figured I'd post a few questions here.

The first is specifically about the USB 64M: Is there a way to 'Read SRAM' in a way that it doesn't pull the whole 128k file? I'm trying to backup saves from a Mega Memory card and they make it to the PC fine (even being able to be written back to the EMS card and still function) but they are unreadable by things like VBA. I've tried it both with single roms on the EMS cart as well as using the menu to try to clean up the SRAM.

The other is actually about the Mega Memory card, which might not be applicable. Out of the group of games I'm trying to back up, two so far are acting strange. They run when the Mega Memory card's switch is set to bypass mode, so they're contacting ok, but they won't let me backup the save files. The two games are Final Fantasy Adventure and Final Fantasy Legend (1). 2 and 3 worked just fine.

Any light shed on this will make me feel better about spending $70 on this kit that so far is only half working :|

Thanks in advance.

Edit: I found another GBC emulator, BGB that can open the 128k files and correct them, so that's a long-way-around solution for now. Still don't know why a few games with saves act strangely in the Mega Memory Card.

Edit 2: I discovered that the reason those two probably won't work is because they don't use a separate SRAM chip. Still wish I knew how to import the 64M's SRAM in blocks rather than as a full 128k lump.
User avatar
MottZilla
Posts: 2837
Joined: Wed Dec 06, 2006 8:18 pm

Re: Fixing ROMs for EMS 64 GB Smart Card USB

Post by MottZilla »

If you are using my Multi SRAM menu, the SRAM is divided into 8 Kilobyte blocks. The first 4 blocks are used for whatever game is going to be run. The next 11 Blocks are the save file data in the order you see them listed in the Menu's SRAM Manager. The final block is the Menu System's save data block which stores data such as the title of each save game slot.

To extract a single save game that is backed up into the 11 blocks of permanent storage you need to calculate where in the 128KB file that data is located. Each block is 8 Kilobytes which in hex is $2000. So the first block is at $0000 and then add $2000 for each following block.

$0000 - Temporary Block
$2000 - Temporary Block
$4000 - Temporary Block
$6000 - Temporary Block
$8000 - 1st Save Block
$A000 - 2nd Save Block
$C000 - 3rd Save Block
$E000 - 4th Save Block
$10000 - 5th Save Block
$12000 - 6th Save Block
$14000 - 7th Save Block
$16000 - 8th Save Block
$18000 - 9th Save Block
$1A000 - 10th Save Block
$1C000 - 11th Save Block
$1E000 - Menu System Block

So if you want to extract a certain game's save data, you must take the 128KB file and open it in a hex editor. Use the above information to figure out where in that save file the game you want has its data. Copy that data into a new file and your emulator will accept it. For games that use 32KB of SRAM you will need to copy 4 blocks, as you will notice in the Menu SRAM Manager those games take 4 blocks.

Final Fantasy Adventure and Final Fantasy Legend use the MBC2 mapper which has built in SRAM. The Mega Memory Card probably wasn't designed for compatibility with this slightly different saving system. There may be nothing you can do there. The Mega Memory Card I think was designed with games like Pokemon in mind.
einzelherz
Posts: 4
Joined: Fri Aug 01, 2014 8:21 pm

Re: Fixing ROMs for EMS 64 GB Smart Card USB

Post by einzelherz »

Thank you, sir!
Nitro
Posts: 6
Joined: Tue Jun 17, 2014 1:16 am
Contact:

Re: Fixing ROMs for EMS 64 GB Smart Card USB

Post by Nitro »

I tried to patch two ROM and has been impossible, both belong to the same company. Perhaps used some and especial protection system ?

CGB Maus, Die (Europe) (En,Fr,De,Es) -- the game does not start
CGB Spirou - La Panique Mecanique (Europe) (En,Fr,De,Es,Ne) -- the game crashes within minutes
User avatar
MottZilla
Posts: 2837
Joined: Wed Dec 06, 2006 8:18 pm

Re: Fixing ROMs for EMS 64 GB Smart Card USB

Post by MottZilla »

Did you run it in a debugger to check for writes to the range that the game select register is mapped to? If I recall, writes between $6000-$7FFF will crash the game on a SmartCard generally. Some games do it purposely (a form of protection) and others I think do it just from bad or careless programming.
Post Reply