Clone and Repro 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. You may need to over-dump your ROM to the full size of your flash chip, e.g the header may report 2MB ROM but the flash chip is 4MB and the save to flash feature is in the 2MB-4MB region.


How can I extract my save file

Since the rom has been modified, all you need to do is dump the rom (make sure it's set to the maximum size, 8MB for GB and 32MB for GBA) 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.

If that doesn't work, you can try this tool: Save Extractor from Bootleg Pokémon GBA games 1.0.5


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. When trying to boot a Pokemon game it checks for the flash save chip and if it doesn't respond, the game white screens / doesn't boot.


How to resolve the issue

Use a 512Kbit/1Mbit SRAM based clone/repo cart or 512Kbit Flash clone/rep cart


For SRAM

Patch your intended rom with the the "SuperCard" software which patches it to use SRAM and removes the 2nd half of the 512Kbit save so it won't corrupt after the E4 (side effects of the patch aren't known at this stage).


For 512Kbit Flash Save

You can follow this tutorial: https://gbatemp.net/threads/tutorial-fix-all-save-problems-for-pokemon-games-vc-gba.433266/ or https://gbatemp.net/threads/fixes-for-all-gba-pokemons-save-issue-with-agb_firm.390508/


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: https://raw.githubusercontent.com/mamedev/mame/master/hash/gba.xml

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.