Hacking in Rare Candies in Pokémon Crystal Legacy

Pokémon Crystal Legacy is a phenomenal ROM hack but if you want a nuzlocke with rare candies, follow this guide to hack them in without a GameShark code.

Hacking in Rare Candies in Pokémon Crystal Legacy

If you don't want to use the Pokémon Crystal Legacy GameShark codes given in the version 1.2 announcement video to get rare candies, then you'll have to modify the game memory - which isn't as bad as it sounds. This page will guide you with:

  1. A short version, if you know what you're doing
  2. Detailed steps, if you're new to this
  3. Extra information about how it all works

But if you can, use the GameShark codes given in the video linked above, it's easier!

Short Version

Using an emulator such as mGBA, modify the following memory addresses:

  1. 0xD89FE to 20
  2. 0xD89FF to 63

Then save the game. This will change the first item in your bag to 99 rare candies.

If this didn't make sense to you, read on. I'll give you friendly step by step instructions with screenshots, it's easier than it looks!

Step by Step Version

1. The Emulator

If you're playing Pokémon ROM hacks, chances are you are familiar with an emulator. For the purposes of this, I'll be showing how to use mGBA, a cross platform, performant, and accurate GB and GBA emulator.

To use this, your save file and ROM should be in the same folder, with the same name such as below:

Pokémon Crystal Legacy ROM and save file.
Ensure you make a backup of the .sav file somewhere else in case something doesn't go right.

2. Setup your Bag

Get the game running as usual in mGBA and make sure the item you want to be turned into a rare candy is in the first slot. In Pokémon Crystal you can rearrange your bag by using the SELECT button. For this example, I will be using an X-Accuracy.


Using SELECT to move an X-Accuracy to the top of the bag.

3. Memory Modification

Now we'll be modifying the contents of your bag. To do this, we'll be using the memory window to change two numbers. The first number is the item ID and the second is the quantity.

Remember, you have your backed up .sav file, so you'll be fine!

In mGBA, go to Tools > Game state views > View Memory. This brings up the memory window.

In the top right where it says "Inspect address" make it: 0xD89F. This takes us to row 0000D890 in memory where the bag begins.

Using "inspect address" to get to the correct memory row.

We'll be looking to modify column E and column F. Your values for column E and F might be different from mine, this is because your bag might have a different item and quantity in the first slot - that's completely fine. I have 21 (X-Accuracy) and 01 (only one of them).

Finding the correct addresses for item ID and quantity.

From here, it's as easy as clicking the number is column E and typing in 20. Then clicking the number in column F and typing in 63. I'll explain 63 instead of 99 later in this post.

Our end state of having 99 rare candies (hex 63) viewed in the memory window of mGBA.

Close the memory window, return to your game, and open your bag. If your bag was open when you started, close and reopen it. The first item should now be 99 rare candies. If it is, congratulations! Save the game and you've now locked in your grind-free run. If it didn't work, close the game without saving and carefully try again. Remember, if it goes really bad, you've always got your backup save!

Here's a full video of the process from start to finish:


Full process start to finish.

Need more? Do the trick again when you run out.

If you want to know why this works, why we don't use PKHex, why the first item, and a couple of other explanations, read on. Otherwise, enjoy your grind-free run!

In-Depth Topics

Here you'll find supplementary points about the hack you've done.

Why Does This Work?

We modify two values: the item ID and the quantity.

Each item in the game has an ID and rare candy has a hex ID of 20.

The second is the quantity and we type in 63. Why not 99? That's because the number 99 is represented by 63 in hex.

If you want to know more about hex numbers you can start at the hexadecimal Wikipedia page, otherwise don't worry about it.

We are modifying the game while it's running which is why we use the memory window in mGBA. It's almost as if you picked up 99 rare candies off the ground.

And, if you had the know-how, you could do anything from here such as: changing the level of your Pokémon, giving yourself max money, and much more.

How Is This Different From the Given GameShark Codes?

In the announcement video for version 1.2, SmithPlays puts two GameShark codes for rare candies in the description:

Video description outlining GameShark codes.

This works in about the same way, you can easily use this if your emulator supports GameShark (mGBA does, but not all emulators or cartridges do).

In short, a GameShark/GameGenie intercepts code and changes values while the game runs. We can break codes into three parts to show it's doing about the same thing as you did:

Code type Hex value Address
01 20 9ED8
01 99 9FD8

The address looks backwards because it's stored as a little endian address, but otherwise points to the same location with the same hex values - except the value for the quantity is 99 in hex which is 153 and since the game can't handle numbers over 99, it begins to look glitchy. Which is why for this post we use hex value 63 to give us 99 rare candies.

Glitchy number of rare candies due to being over 99.

Why Modify the First Item?

Technically, it can be any item in your bag. The first item being the first address for the bag makes it easy for us to find.

Why Not Just Add a New Item at the End?

This one is running off an old memory of mine. I can't find the source, but the bag in the Game Boy Pokémon games has a separate record of how many items are in the bag. If we just add a new item at the next free memory areas using the trick we learned, we wouldn't be able to scroll down to it because the game will stop us scrolling because it still thinks we have the old number of items in the bag. This is why we manipulate an already existing item, such that we don't run into this problem.

Why Not PKHex?

PKHex is a great Pokémon save editing tool and it does load Crystal Legacy saves. However, if you try to use PKHex to manipulate your bag, it may corrupt your save. I'm going to speculate this is due to the custom code to expand the bag and PKHex doesn't modify the correct areas in this custom memory layout.

Why Not Modify the Save File Itself?

The save file contains the items in your bag and the quantity, so why not modify that instead of opening mGBA and running the game?

Pokémon Crystal, and thus Crystal Legacy has a checksum that checks the integrity of the saved data when we load the game. The checksum is calculated when you save the game. In our case, if we modify the bag without recalculating the checksum, the game will fall back to a backup save (the save file it has a duplicate entire save for redundancy) and if that backup successfully loads, it then overwrites the primary save with the backup save and continues on as normal - which means our modifications of the primary save to give ourselves rare candies will be overwritten by the backup save. If we modify both the primary and the backup save, we get a corrupted save message.

Save file corrupted message for Pokémon Crystal.

Modifying the save also involves downloading a separate hex editor. Chances are you are already familiar with an emulator and mGBA has a simple and accessible hex editor compared to far more powerful and complex ones like ImHex.

Using ImHex to modify the Pokémon Crystal Legacy save file.

What about for an EverDrive-GB X3/X5/X7? Or other cartridge?

It's nearly as easy as you think, but make sure you do it in this order:

  1. Close your Crystal Legacy game
  2. Boot up into another game then close it
  3. Take out the SD card and hack in the rare candies
  4. Put the SD card back in and boot your game

I kept having problems with my save reverting to the unmodified save with my GB X7 and Reddit user Mikebjackson explains why and how to address it.

You will probably also notice the save file stored in \GBCSYS\SAVE will have the extension .srm instead of .sav. That's completely fine, just change it to .sav for mGBA to recognise it, then change it back to .srm when copying it back to the SD card.

Other Points

  • Yes, technically you can argue the address should be 0X0000D89FE, but cleaner to write 0xD89F and mGBA knows what you mean anyway.
  • I've done this for a run using an EverDrive-GB X7 and the InsideGadgets 4MB MBC3 with RTC flash cart (which seems to now be a retired product).
  • At the time of writing his, Pokémon Crystal Legacy is version 1.2.
  • If you understand the memory layout enough, you can top yourself up since you already know the item ID for rare candy is 20.
    • You could do more than 99 rare candies, but I'm not a big fan because a number higher than 99 can't be correctly rendered, it gives a glitched look that I don't like. I'm also unsure how the bag handles more than 99 of an item.
    • Though, with the width of the datatype, you might be able to use FF as the amount. This equals 255 in decimal.
    • Crystal Legacy has been modified to have a bigger bag, making some of the following information invalid, but here is some information on the item bag save data.
  • Using this you could give yourself any amount of any item too.
  • You could also convert multiple items in your bag to be rare candies. Maybe an X-Accuracy, maybe a berry, or whatever items you want to change. Saves time with having to go back and get more rare candies.

To Conclude

mGBA is the most accessible and simple way to modify your Pokémon Crystal Legacy run without resorting to GameShark codes. It might look a bit scary, but with the right tooling and simple steps, it's doable for a grind-free run.

Text in header from https://www.textstudio.com/