Clone and Repo Cart Problems

From Flash Cart DB
Jump to navigation Jump to search

Problems with GB/GBA carts without a battery pre-installed

ES29LV160.jpg S29gl128-1.jpg

If your cart looks like this (no battery), if you flash a new game to it and try to save it will appear to have worked but once you power off, your save will be lost.

How it works

The way this cart functions is the rom is modified to write the save back to the flash chip when you save your game. When the game starts, the opposite occurs, the game extracts your save from the flash chip and puts it back on the SRAM so to the game it appears like everything is normal.

How can I extract my save file

Since the rom has been modified, all you need to do is dump the rom and run it in an emulator and your save file will be created. You will not be able to save again and if you re-load the rom in the emulator, your .sav file will be over written to the original save that is in the rom.

How can I restore my save file

Dump the rom and make a backup of it. You will need to locate the area will your save file contents, most of the time it's near the end. If you load it in an emulator, it will create a .sav file.

Open that file in a hex editor and copy the first few lines, then open the rom file and search the copied hex values to find where the save is located. You then need to copy your entire save file contents to that location (assuming they haven't broken it up into different sections) and then re-write your new rom. Keep the backup rom file in case anything should go wrong.

How to resolve the issue

You will need to install a battery or patch the rom you flash to also perform the above technique. At this time there are no programs that can automatically do that for you so the easiest solution is to install a battery so the save game is retained after power off.

Problems with re-writing Pokemon games to GBA clone/repo carts

The issue

Pokemon games use a 1Mbit flash save type while almost all clone/repo carts use SRAM - 256Kbit, 512Kbit and some rare ones have 1Mbit. I believe that the Pokemon save file structure also contains a back up of the save file.

How to resolve the issue

1. Use a 512Kbit or 1Mbit SRAM based clone/repo cart (for 1Mbit SRAM carts it is limited to 16MB)

2. Patch your intended rom to use SRAM instead of flash saves (GBATA can do this)

3. For 512Kbit or 1Mbit: Understand the Pokemon save file structure and remove the use of the back up save file in the save file structure.

For 1Mbit: Understand the Pokemon save file structure and know when to switch between the 2x 512Kbit areas

Problems with re-writing games that utilise EEPROM or Flash based saves to GBA carts

The issue

GBA games can utilise various save types - SRAM, FRAM, EEPROM and Flash. You can use GBATA's Header Viewer to check what save type the game is.

Writing a game without patching it to use SRAM will mean it may not start correctly and won't save.

How to resolve the issue

Check what save type your game uses here:

As clone/repo carts only come with SRAM you need to patch your game to use SRAM using the GBTA program which seems to work well as reported by some users.

You also need to make sure that the SRAM size on the board matches or is larger than the patched save size that GBATA produces - opening the patched rom in an emulator will show you the .sav file size.

If the cart you have doesn’t have a spot for a battery, then you will need to add a battery or patch that game to save back to the flash (no automated programs are available to do this).

Problems with re-writing some prototype or pre-patched games SRAM based saves to GBA carts

The issue

Some GBA clone/repo carts only have 256Kbit of SRAM where as some prototype games need 512Kbit. If the game was pre-patched, there is a chance it may have been patched to use 512Kbit instead of 256Kbit.

How to resolve the issue

Use a GBA clone/repo cart with 512Kbit of SRAM.

For the pre-patched game, you will need to source the original file and patch it yourself or modify the existing patch.