diff options
-rw-r--r-- | Discovering-GameShark-cheat-codes.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Discovering-GameShark-cheat-codes.md b/Discovering-GameShark-cheat-codes.md index 963c67c..809c0b0 100644 --- a/Discovering-GameShark-cheat-codes.md +++ b/Discovering-GameShark-cheat-codes.md @@ -8,11 +8,11 @@ A GameShark cheat code looks like this: `ttvvllhh` We can reverse-engineer the meaning of particular codes, and discover our own new codes, with the [**symbol files**](https://github.com/pret/pokecrystal/tree/symbols). When we run `make` to build the ROM, along with the .gbc file it creates a .sym file. This file lists all the labels from the source code with their corresponding banks and addresses in the ROM. -For example, the code `010730D2` writes `07` to `01:D230`. We can look up this address in [pokecrystal.sym](https://raw.githubusercontent.com/pret/pokecrystal/symbols/pokecrystal.sym): it's `wBattleType`, from [wram.asm](../blob/master/wram.asm). Its appropriate values are the `BATTLETYPE_*` constants, from [constants/battle_constants.asm](../blob/master/constants/battle_constants.asm), of which #7 (remember, `const_def` counts up from 0) is `BATTLETYPE_SHINY`. So this looks like a cheat to force shiny battles like Red Gyarados. And sure enough, in [GCL's list of Crystal codes](https://www.glitchcity.info/wiki/Pok%C3%A9mon_Crystal_GameShark_codes), that code appears as "Fight Shiny Pokémon". +For example, the code `010730D2` writes `07` to `01:D230`. We can look up this address in [pokecrystal.sym](https://raw.githubusercontent.com/pret/pokecrystal/symbols/pokecrystal.sym): it's `wBattleType`, from [wram.asm](../blob/master/wram.asm). Its appropriate values are the `BATTLETYPE_*` constants, from [constants/battle_constants.asm](../blob/master/constants/battle_constants.asm), of which #7 (remember, `const_def` counts up from 0) is `BATTLETYPE_SHINY`. So this looks like a cheat to force shiny battles like Red Gyarados. And sure enough, in [Matthew Robinson's Pokemon Crystal Gameshark Code Archive](https://www.ocf.berkeley.edu/~jdonald/pokemon/pokemonccodes.txt), that code appears as "Fight Shiney Pokemon". We can design new codes this way. If your pokecrystal-based hack project ended up shifting the location of `wBattleType`, or changed the value of `BATTLETYPE_SHINY`, then the code `010730D2` would affect something else, and might do nothing, cause glitches, or crash the game. But you can just find the new address of `wBattleType` in your own .sym file and edit the code to use that. -Note that not every address has its own label. For example, [GCL](https://www.glitchcity.info/wiki/Pok%C3%A9mon_Crystal_GameShark_codes) lists these four codes as "skill modifiers": +Note that not every address has its own label. For example, [Matthew Robinson](https://www.ocf.berkeley.edu/~jdonald/pokemon/pokemonccodes.txt) lists these four codes as "skill modifiers": ``` Skill 1 Modifier 01??E1DC @@ -40,7 +40,7 @@ party_struct: MACRO box_struct \1 \1Status:: db ... -\1StatsEnd:: +\1StructEnd:: ENDM ``` @@ -50,7 +50,7 @@ box_struct: MACRO \1Item:: db \1Moves:: ds NUM_MOVES ... -\1End:: +\1BoxEnd:: ENDM ``` |