If you appreciate the work done within the wiki, please consider supporting The Cutting Room Floor on Patreon. Thanks for all your support!

Pokémon Red and Blue/Debug Functions

From The Cutting Room Floor
Jump to navigation Jump to search

This is a sub-page of Pokémon Red and Blue.

Debug Battle

This unusual functionality was used for battle debugging purposes as seen in the Pokémon Blue debug ROM. It can be accessed by running the code at 01:4DA6, which requires a bank switch to be performed using the bank switch function at $35D6. This sets the bank to whatever register b.

  • The "badges" value is set to $80, which gives you the Earth Badge and nothing else.
  • Your current location is set to Pallet Town and your current Pokémon party is removed.
  • You are prompted to nickname a level 20 Rhydon.
  • A battle against another level 20 Rhydon will begin.
  • All four of your moves will act like Pound, though this doesn't apply to the opposing Rhydon.
  • Whatever the outcome of the battle ends up being, once the fight is over the nickname prompt will appear again, and the entire process repeats.

According to an interview with Ken Sugimori, Rhydon was the first Pokémon ever created, as well as the first valid index number for Pokémon, which may be why Rhydon are used in this battle. Pound is likely used as it is the first valid index number for Moves. This battle is used when selecting the fight option in the main menu on the Pokémon Blue debug ROM.

The same setup also exists in the Japanese Red and Green, at 01:4B8D, where it appears to work in an identical manner, while in contrast it was removed in Yellow. Please refer to this post for the location of the bank switch function in other regions & revisions.

(Source: Pokémon Red Disassembly Project)

Debug Mode

Setting bit 1 of RAM address D732 enables a debug mode with the following features:

  • When starting a new game, most of Oak's intro speech is skipped, including the player and rival name selections. This results in the player and rival's names being automatically set to the version's defaults. (See the chart below.)
  • The player begins the game outside their house, rather than inside their bedroom.
  • Holding the B button prevents wild Pokémon encounters.

The RAM address can be set using the GameShark code 010332D7. However, this code also changes other unrelated bits of the same address, causing incidental side effects, such as not forcing the player to use a bicycle on Cycling Road, and incorrectly-functioning warps. In the debug ROM this is used when the debug option is selected, also giving you the debug Pokémon Party.

Default Names by Version

Version Player Rival Notes
Red (J)
Green (J)
やまぐち
(Yamaguchi)
いしはら
(Ishihara)
Named for Wataru Yamaguchi, listed in the games' credits under "Special Thanks", and Tsunekazu Ishihara, then director of Creatures Inc.
Blue (J) ゲーフリ
(Gēfuri)
クリチャ
(Kuricha)
Named for Game Freak and Creatures Inc., two of the companies that worked on Pokémon.
Red (U)
Blue (U)
NINTEN SONY A tongue-in-cheek reference to the rivalry between Nintendo and Sony.
(Source: IIMarckus - Default Names, Pokémon Red Disassembly Project - Debug Flag)

Error Codes

PokemonRed ERROR code.png

Error code messages are displayed when a 00 character appears in the middle of a text string. When an error message is printed on the screen, all text after the 00 character is ignored. The messages' formatting differs between versions:

  • Red & Green: "[x] エラー"
  • Red & Blue: "[x] ERROR."
  • Yellow: "[x] error."

[x] is a number that represents the identifier of the text string. However, it is possible for other text, including numbers, to precede the error code, which can potentially result in confusing messages. Take "54 error," for example, which could be read as both "5[4 error]" and "[54 error]".

You can cause an error code to appear by using the Trainer-Fly glitch in the English versions of Pokémon Red and Blue. This glitch is enabled by flying away from the long-range trainer on Route 6, re-enabling the start menu using a Trainer in another location, and then reading the PokéMart sign in Vermilion City and return to Route 6. An error message reading "9 ERROR" will now appear, as seen in the picture at right. This is because Vermilion's PokéMart sign has a text identifier of 09, stored at the memory address CF13, and the game is attempting to load the last text box ID in memory. There is no such corresponding text for Route 6, and the information at that address is, presumably, a single 00 character, so the game prints a "9 ERROR."

The PokéMart sign in Yellow, meanwhile, has a text identifier of 0B, which, coincidentally, does not result in an error message. However, the sign that says "VERMILION CITY - The Port of Exquisite Sunsets" has an identifier of 08, so reading it and returning to Route 6 will bring up an "8 ERROR."

Debug Pokémon Party

In the Japanese Red and Green, an unused function exists that adds three Pokémon to the player's party:

  • Exeggutor (Level 90)
  • Ekans (Level 90)
  • Rhydon (Level 5)
Version Offset
Red (J) 1.0 01:645C
Red (J) 1.1 01:6401
Green 1.0 01:645D
Green 1.1 01:6402

In Japanese Blue, the function adds three slightly different party members:

  • Exeggutor (Level 90)
  • Chansey (Level 100)
  • Rhydon (Level 5)
Version Offset
Blue (J) 01:656F

In English Red and Blue, the function adds five Pokémon. Notably, with the exception of a missing Level 5 Pikachu, this is the exact team given to you when creating a Debug save in the Debug Blue ROM:

  • Exeggutor (Level 90) (Debug Rom: Level 90, Moves: Fly, Cut, Surf, Strength)
  • Mew (Level 20) (Debug Rom: Level 5, Moves: Pound)
  • Jolteon (Level 56) (Debug Rom: Level 56, Moves: Double Kick, Agility, Pin Missile, Thunderbolt)
  • Dugtrio (Level 56) (Debug Rom: Level 56, Moves: Dig, Sand-Attack, Slash, Earthquake)
  • Articuno (Level 57) (Debug Rom: Level 57, Moves: Fly, Ice Beam, Blizzard, Agility)
Version Offset
Red & Blue (U) 01:64CA

In a 2000 ABC News interview with Pokémon developer Tsunekazu Ishihara, he states that Exeggutor is his favourite Pokémon, since he used it while debugging the game. This may explain the inclusion of Exeggutor.

(Source: Glitch City Laboratories Forums and Pokémon Red Disassembly Project)