Clone and Repro Cart Problems

From Flash Cart DB
Revision as of 16:25, 26 June 2023 by Metroid maniac (talk | contribs) (→‎Game Boy Advance: Discourage Radical Red now Quetzal exists.)
Jump to navigation Jump to search

Save Types

The cartridge’s save hardware must match what the game was developed for, or else a patch is required. As for SRAM, a larger chip usually is no problem. But for EEPROM or FLASH, the size must be exactly right or it won’t work.

Game Boy

There’s different sizes of SRAM save types:

  • 4K SRAM (512 Bytes)
  • 64K SRAM (8 KiB)
  • 256K SRAM (32 KiB)
  • 512K SRAM (64 KiB) - only Japanese Pokémon Crystal
  • 1M SRAM (128 KiB) - only Game Boy Camera, GB-Memory cartridge, Game Boy Wars 3, Mobile Golf and Super Gals! Kotobuki Ran

There’s also some rare games with EEPROM and FLASH save types, but as they are very obscure, they are not detailed here.

You can look up save sizes used by official games in this spreadsheet.

Game Boy Advance

Official GBA games have one of five save types:

  • 4K EEPROM (512 Bytes)
  • 64K EEPROM (8 KiB)
  • 256K SRAM/FRAM (32 KiB)
  • 512K FLASH (64 KiB)
  • 1M FLASH (128 KiB)

You can look up save types used by official games in this spreadsheet.

Bootleg Cartridges

Reproductions, clone and bootleg cartridges with a battery are usually compatible with SRAM save types. On Game Boy, they’re mostly 32 KiB in size. On Game Boy Advance, 32 KiB or 128 KiB is mostly used but access may be limited to 64 KiB if additional logic is not present.

Note: The SRAM save type requires a battery inside the cartridge to retain the data. Bootleg cartridges that have SRAM but no battery are not designed to work with unmodified ROMs and will need a “batteryless patch”. This is true for both Game Boy and Game Boy Advance. Because SRAM chips lose their data on power off, a batteryless patch will use SRAM only as temporary storage while the game runs and copy over the save data into ROM (esentially re-flashing part of its own ROM). There is currently no tool, tutorial or universal way of creating these batteryless patches for Game Boy, so it is recommended to use cartridges that come with a save battery pre-installed. Batteryless SRAM patches sourced from various bootlegs are being collected in acocalypso’s GitHub repository. For Game Boy Advance, some homebrew such as Jagoomba Color and PocketNES exist in batteryless SRAM versions as well. An automatic batteryless saving patcher for GBA is also currently being developed by metroid-maniac.

Bootlegs are never recommended to run backups and getting a proper flash cartridge will always be providing the best possible experience. However, there are a few bootleg options that work better than others:

Game Boy

Bootleg cartridges of the game “Perfect Dark” come with 4 MiB of ROM storage, 32 KiB of battery-backed SRAM and the MBC5 mapper which is also compatible with most MBC2 and MBC3 games as well as some MBC1 games. However, MBC3 games that use the Real Time Clock feature may be glitchy unless patched.

Game Boy Advance

Bootleg cartridges of the game “Pokémon Quetzal” (a ROM hack) provide 32 MiB of ROM storage and 128 KiB of battery-backed SRAM. These can be used with all save types, however ROMs that don’t use SRAM must first be patched using GBATA’s SRAM Patcher (for 4K EEPROM, 64K EEPROM and 512K FLASH) or bbsan2k’s Flash1M Repro SRAM Patcher (for 1M FLASH).

Bootleg cartridges of the game “Pokémon Radical Red” (a ROM hack) seem to provide 32 MiB of ROM storage and 128 KiB of SRAM (no battery installed). This was previously the best option for batteryless-patched ROMs, but it has been made redundant by the “Pokémon Quetzal” cartridges mentioned above. It will not retain save data of unmodified ROMs.

Bootleg cartridges of the game “MOTHER 3” provide 32 MiB of ROM storage and the actual 512K FLASH save type (a save type that is slower than SRAM but does not require a battery). ROMs that use exactly this save type will not require a patch to run on these cartridges. Other ROMs will not work and are not easily patchable either.

Pokémon Games

Pokémon main series games use the 1M FLASH save type, but there is no known bootleg cartridge that can handle this save type natively. The most popular option is a real flash cartridge such as the GBA 32MB, 1Mbit Flash Save with RTC, Flash Cart or GBA 32MB, 1Mbit Flash Save (No RTC), Flash Cart by insideGadgets. These cartridges will also work for linking up with GameCube games and can be used with event distributions.



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.