Broken hidden items glitch

From Glitch City Wiki
Jump to navigation Jump to search
Please note that this glitch only exists in the Japanese versions of the game, or is otherwise a glitch
from a Pokémon game which was only released in Japan.
Bulbapedia also has an article about Broken hidden items glitch.
伝説のスターブロブ2にも、Broken hidden items glitchに関するページがあります。
伝説のスターブロブ2にも、Broken hidden items glitchに関するページがあります。

The broken hidden items glitch is a natural glitch which occurs in Pokémon Red and Green. Broken hidden items have not been reported in Pokémon Blue (Japanese).

There is a mismatch between two item location databases for specific hidden items; which can cause the Itemfinder to not respond when near the item, or to state that an item is nearby when it may not be nearby (since the item's location according to the Itemfinder depends on the 'hidden item coordinates' labelled as "false coordinates" below).

The glitch allows one to obtain and bring back specific hidden items infinitely, if the player obtains one of the items below and hands over a fossil for the Cinnabar Pokémon Lab scientist to review it (by pressing A the fossil on the choice menu, the scientist doesn't have to take it). The action of showing the scientist the Fossil will bring back all of those specific hidden items back.

The specific items with coordinates data

Place Item Hidden objects list coordinates Hidden item list coordinates (Itemfinder responds if nearby)
Rocket Hideout B3F Nugget x=27, y=17 x=22, y=23
Route 13 Calcium x=16, y=13 x=48, y=8
Pokémon Mansion B1F Rare Candy x=1, y=9 Missing
Copycat's house 2F Nugget x=0, y=6 ?
Cerulean Cave B1F Rare Candy x=14, y=11 x=15, y=11
Cerulean Cave 1F Ultra Ball x=27, y=3 x=29, y=22


Every map has a list of "invisible objects" (things that you can interact not limited to hidden items). PCs, posters, bench people, etc. in addition to hidden items, which can be found in this database that lists a pair of coordinates, with a function for those coordinates.

Every hidden item in the database uses the same function (called "HiddenItems" in Pokémon Red disassembly).

The function checks a second pair of coordinates in a database with each entry stored in this way: map, y-coordinate, x-coordinate.

Hidden item flags (that control whether a hidden item is available or has been taken) are kept in the memory beginning with bit 0 of $D66F.

In order for the game to determine the flag's bit and address, the flag is taken based on how far the hidden item appears in the database of the above paragraph, as long as it finds matching coordinates.

Problematically six of the hidden items do not have matching coordinates in the hidden item database. This causes the game to check hidden item bit 255, which is bit 7 of $D68E (the byte that is overwritten after handing over a fossil).

The way that the hidden object and hidden item coordinates do not match raises the question whether maps had hidden items with different coordinates in the past.

The Fossil trick is possible because the game attempts to set hidden item flag 255, which is an item beyond the end of hidden item addresses; specifically bit 7 (+80) on the memory address $D68E.

$D68E is written to as the fossil identifier, Old Amber ($1F), Helix Fossil ($29), or Dome Fossil ($2A) when a fossil is checked in Cinnabar Lab (it doesn't need to be given but this works as well). All of these values do not have bit 7 of $D68E checked, meaning that one of the six broken hidden items can be brought back after it is taken.