15th February 2017
Mod, Repair

Saving Pokémon: FRAM Upgrade

Originally released in 1996 in Japan, Pokémon is one of the best known game franchises ever created. The first generation of games in the UK, titled ‘Red’, ‘Blue’ and ‘Yellow’, remain popular despite being almost two decades old. This is, in part, due to the vast amount of glitches that are possible, as a consequence of the lack of memory protection used by the games.

Unfortunately, technology in the late 90s was not what it is today, and the cartridges use volatile memory (SRAM, or Static RAM) to hold their save data. Volatile memory needs to be powered at all times to retain data, which is why the cartridges have a small 2032 size coin cell battery inside. This keeps the SRAM powered, and means the games can hold save data when the console is turned off.

Like any batteries, these batteries have a limited lifespan, which after two decades is coming to an end (if it hasn’t already). When the battery dies, the save data is lost, taking your shiny level 100 Magikarp with it. 🙁

Replace, or Upgrade?

Fixing a cartridge that wont save is fairly easy – if a dead battery is indeed the cause of the problem, replacing the battery will allow the game to hold saves again.

However, it is inevitable that a battery will fail again in the future. Having a working cartridge for another decade or two would be nice, but there is a more permanent solution.

FRAM (Ferroelectric RAM, sometimes called FeRAM or F-RAM) is a modern memory design which is non-volatile – it doesn’t need to be powered to retain data. Some FRAM parts are designed to be direct replacements for SRAM parts, mimicking typical SRAM behaviour and pinout.

The SRAM used in Pokémon Red, Blue, Yellow, Gold and Silver are 256Kb (8 banks of 32Kb) arranged in a typical 28 pin SOIC layout, and requires 5V. The Ramtron/Cypress Semiconductor FM28V020 is an almost identical specification, the only difference being the lower operating voltage (2.0 – 3.6V). Pokémon Crystal uses a 1Mbit chip, so is not compatible with this part.

Removing the SRAM & Battery

To replace the RAM in the cartridge, you will first need to remove the screw holding the two halves of the cartridge case together. The screw is the unusual ‘gamebit’ type screw, which Nintendo regularly used in consoles. The cartridge uses the smaller 3.8mm gamebit screw; compatible can be bought cheaply on ebay. iFixit also sell screwdriver sets which include a bit for these screws.

I am performing this replacement on a Pokémon Yellow cartridge, which has had it’s battery removed by a previous owner, and also has issues with sprites. No more Pikachus for me, at least not until the cartridge is fixed.

With the back off the cartridge, you have easy access to the motherboard. The board consists of three main chips; these are the SRAM, ROM and MBC (memory bank controller). The ROM contains the game data, while the MBC controls memory addressing for both the ROM and RAM. The battery is also clearly visible between the ROM and MBC.

Case removed
Inside the cartridge. The battery is already missing from this game, but if it is still present it is best to remove it.

While the battery does not need to be replaced, it is best to remove it as it may leak in the future. The battery is soldered in place using two metal tabs. Using a soldering iron, apply heat to one of the pads, and gently lift the battery away from the board. With one side desoldered, do the same with the other side, and the battery will be free from the board.

The next step is to remove the SRAM chip. the SRAM is the chip to the bottom left of the cartridge, as highlighted in the image below.

SRAM chip
The SRAM is the bottom-left chip on the board, seen here side-on. It is located below the small MBC chip. There are multiple manufacturers of these parts, so don’t worry if the text on the chip is different to the one pictured.

It is possible to do this using a soldering iron, a steady hand and a lot of patience. Alternatively, you can do it in seconds using a hot air rework station. Personally, I used a cheap Atten 858D+ to do the job. Before using hot air, I wrapped foil around the board to protect the other components from the heat. This is not a necessary step, however is it possible the hot air will blow small components of the board. In particular, there are a couple of SMD capacitors very close to the SRAM, which I wanted to protect.

If you have a clamp, you can attach the board vertically, or leaning forward slightly, and use gravity to aid the removal of the chip (it may still need a nudge to break the surface tension of the solder). Alternatively, place the board on a heatproof surface.

When heating the chip, it is important to move the hot air wand around all pins of the chip in a circular motion. This will ensure that all pins are heated, while also preventing parts of the chip being damaged through overheating.

When the solder starts to look shiny, you can use a screwdriver, tweezers etc to nudge or lift the chip. The chip will be hot, so place it on a heatproof surface until cool. And don’t touch it. Unless you like melted skin.

Soldering the new FRAM

To attach the new part, you can either solder each pin individually (again requiring a very steady hand), or (again) use a hot air station, along with some solder paste. The notch of the chip needs to be facing the top of the cartridge, pointing towards the small MBC chip. The small dot, which indicates pin 1, will be by the top-left pin.

Before starting, it is important to note that the VDD pin (pin 28) needs to be lifted and left unattached, due to the lower voltage requirement of the new chip. This pin is the top-right pin, opposite the small dot.

If using a soldering iron, it is easiest to start by adding fresh solder to one pad, then placing the chip on top. Heat the solder on the pad, and the chip will ‘sink’ into the solder. When the heat is removed, the chip will be held in place by the leg. It is then possible to solder the other legs one by one.

Using hot air and solder paste, apply paste across the pads on the cartridge, remembering to keep the top-right pad clear. It doesn’t matter if the paste bridges the pads, as the surface tension of the solder when molten will ‘pull’ the solder onto a pad. Only add a small amount of paste; too much and you will end up with solder bridges, which will have to be sorted out later.

The most difficult part is holding the chip in place when applying the hot air, as it could be blown out of place. If this is causing a problem, it can be useful to add a small amount of glue to the bottom of the chip to hold it in place.

As before, apply heat in a circular motion, heating up all of the pins. The dull paste will begin to look ‘dry’ as it gets hot, before becoming shiny as it turns into a liquid. Remove the heat as soon as all of the pins are liquid, to create the best possible connection.

Leave the board to cool down for a few minutes, then check the pins for any signs of bridging. If there are bridges, use a soldering iron to break the connection between the pins.

New chip in place
The replacement is soldered in place, and the cartridge is ready to be reassembled.

You can then remove the foil (if you used any) and put the cartridge back together.

Test the cartridge, to make sure the new chip is soldered correctly. The RAM is not only used to hold save data, but also for holding data while playing the game. Any missing sprites, text, freezes or other glitches when playing will indicate an issue with the installation.

Testing
So far so good. And yes, that GBA does have a backlit screen.

If everything looks good, save the game and switch the console off. Leave it for a few minutes, before switching the console back on. If you are able to continue the game, the install has been successful.

Testing the save
The save game has been retained, meaning the cartridge is fixed.

According to the datasheet, the FM28V20 is rated for 100 trillion read/write cycles and retains data for a minimum of 151 years when stored at 60C. Which means under normal conditions, your Pokémon will now be able to outlast you.

Other Compatible Parts

While I have used the FM28V20 for this post, there are many other FRAM parts available which, in theory, should be compatible. The FM28V20 is There are a few things to look out for when choosing a compatible part.

If the new part is not 5V tolerant, the top-right pin (VDD) needs to be left disconnected from the board. If the part can accept 5V, it can be soldered as normal. The part must have a capacity of 256Kb, split into 8 banks of 32Kb.

The part used in this post has a 70ns access time. Faster parts are available, but will not be worth the extra cost as they are all faster than the old part anyway.

Some parts do not exactly copy the behaviour of an SRAM part. For example, I have previously tested this mod with an FM18W08, which is 5V tolerant. However, as stated in the datasheet, the FM18W08 does not allow address changes once an address is latched, until the hold time parameter has been satisfied. SRAM, and the FM28V20, allow addresses to be changed even when the address has been latched, as long as CE is held low. In practice, I found the FM18W08 caused sprites to be missing during battles, which I can only assume was down to this difference.

If you do use a different part which works, feel free to comment below to help others.

Share:  Twitter Facebook
«
Filed under: Mod, Repair