|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.
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
||Hidden objects list coordinates
||Hidden item list coordinates (Itemfinder responds if nearby)
|Rocket Hideout B3F
|Pokémon Mansion B1F
|Copycat's house 2F
|Cerulean Cave B1F
|Cerulean Cave 1F
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.