Glitch City Laboratories Archives

Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of a thread from Glitch City Laboratories Forums.

You can join Glitch City Research Institute to ask questions or discuss current developments.

You may also download the archive of this forum in .tar.gz, .sql.gz, or .sqlite.gz formats.

Generation I Glitch Discussion

Bringing back item balls with a fossil bug in at least Red/Green? - Page 1

Bringing back item balls with a fossil bug in at least Red/Green?

Posted by: Torchickens
Date: 2015-09-22 17:31:15
Earlier Krys3000 mentioned the "missable objects flags" memory addresses and how you may be able to manipulate them as 8F (hex:5D) in the expanded 50+ stored items pack you can get with Glitch City RAM manipulation.

We figured out that these are responsible for objects that can disappear including item balls (and Krys3000 confirmed Snorlax counts), and Krys3000 found a method to get 8F by manipulating the flags.

Today Háčky documented a glitch called the vending machine glitch. I recorded it and SatoMew asked me whether there may be any Japanese fan-sites who knew about the bug before.

I searched for it on Google and found a page that indeed mentions it, as well as something I haven't heard about before that piqued my interest, which I've mentioned below.

Apparently, in Pokémon Red and Green one of the hidden object addresses (items that do not appear as item balls on the screen) have some flags reset every time you try to pass a fossil over to Cinnabar Lab even when you choose not to revive it, causing hidden objects that may have been taken to reappear.

According to the page, the hidden objects that can re-appear this way are:

Rocket Hideout: Nugget
Mimic Girl's house: Nugget
Route 14: Calcium
Pokémon Mansion B1F: Rare Candy
Unknown Dungeon 1F: Rare Candy
Unknown Dungeon B1F: Ultra Ball

Hence we may be looking at an obscure method of farming money and getting infinite Rare Candies.

Source text:

の罠!度0

赤にての面での形となのて
どととと1つてまとののなくなってまのだ!
のと以の6確認て

0の東にの
の家のにの
14路の杭はで左側の板そばの
B1Fひみつのの左ふな
の1F中央の岩ふな
のB1Fきのまの岩
赤てとはの!と人なくなだで

のはど1つできなのとばに
な究で渡そとびに復活
と渡そとてて復活
つまのはとばでとできのだ!
正ってだとのでには注で
ではとばほなはどて込みだっ

報提澪


I'm going to hopefully try and perform this glitch tomorrow and see if it works in the English versions.

Re: Bringing back item balls with a fossil bug in at least Red/Green?

Posted by: Háčky
Date: 2015-09-23 02:52:41
Well, this is more interesting than the vending machine thing :P

Each map has its own list of invisible objectswhich includes things like PCs and posters in addition to hidden items. Each entry defines the coordinates of the object and the function which is called when you inspect that object. Hidden items use a function aptly named HiddenItems in the disassembly, which checks the flag to see if the item has already been picked up.

In order to know which flag represents which hidden item, it calls the function FindHiddenItemOrCoinsIndex, which scans through this list of hidden items until it finds an entry which matches the current map number and the coordinates of the hidden item youre trying to pick up. The problem is that, in Red and Green only, several hidden items have the wrong coordinates in this list, and one item is completely missing!

[table][tr][td]Item[/td][td]Location[/td][td]Actual coordinates
(hidden object list)[/td][td]Wrong coordinates
(hidden item list)[/td][/tr]
[tr][td]Nugget[/td][td]Rocket Hideout B3F[/td][td](27, 17)[/td][td](22, 23)[/td][/tr]
[tr][td]Calcium[/td][td]Route 13[/td][td](16, 13)[/td][td](48, 8⁠)[/td][/tr]
[tr][td]Rare Candy[/td][td]Pokémon Mansion B1F[/td][td](1, 9)[/td][td]missing[/td][/tr]
[tr][td]Nugget[/td][td]Copycats house 2F[/td][td](0, 6)[/td][td](0, 1)[/td][/tr]
[tr][td]Rare Candy[/td][td]Cerulean Cave B1F[/td][td](14, 11)[/td][td](15, 11)[/td][/tr]
[tr][td]Ultra Ball[/td][td]Cerulean Cave 1F[/td][td](27, 3)[/td][td](29, 22)[/td][/tr][/table]

When a hidden item cant be found on the list, the game ends up using hidden item flag 255. Since that flag is used for all of these ill-defined items, picking up any one of them will cause all the others to disappear.

Hidden item flags are kept in RAM starting at $D66F, so flag 255 is bit 7 of $D68E. And when a fossil is shown to the scientist in Pokémon Lab (before youve agreed to have him restore it), the item index is stored in $D68Eeither $1F for Old Amber, $29 for Dome Fossil, or $2A for Helix Fossil. Since none of these values have bit 7 set, selecting any fossil to show to the scientist will clear hidden item flag 255, and allow one of these six items to be collected again.




Side note: The Nugget in Copycats house is also one of four hidden items which was moved between Red/Green and Blue. Its Red/Green coordinates of (0, 6) place it on her bed, while in later versions its at (1, 1), which is on her desk.

The Hyper Potion on S.S. Anne B1F was at (0, 6) in Red/Green, which appears to be out of bounds, but is still obtainable. (Its actually not outside the map, which contains six cabins.)

[img]http://imgur.com/Esvr7XI.png[/img]

In Blue, it moved to (3, 1), which is on the bed.

Less excitingly, the Elixer on Silph Co. 5F moved from (11, 3) [the left plant] to (12, 3) [the right plant], and the Rare Candy on Route 17 moved from (15, 15) [in the tall grass] to (15, 14) [still in the tall grass].

Re: Bringing back item balls with a fossil bug in at least Red/Green?

Posted by: Krys3000
Date: 2015-09-23 04:54:17
That's very interesting Háčky, and it's a really nice glitch, so bad it's limited to JP versions :(

Thanks also for the knowledge about hidden items. I was about to check this to see if there's a way to use hidden items to have 8F in the 109-expanded PC (as it might be easier to get the correct configuration than using visible items). It will help me :)

Re: Bringing back item balls with a fossil bug in at least Red/Green?

Posted by: SatoMew
Date: 2015-09-23 12:53:48

That's very interesting Háčky, and it's a really nice glitch, so bad it's limited to JP versions :(


The vending machine bug affects both Japanese and English Generation I games. The European versions probably didn't fix it either ;)

Re: Bringing back item balls with a fossil bug in at least Red/Green?

Posted by: Torchickens
Date: 2015-11-14 11:35:11
Thank you very much Háčky. I really appreciate your thorough response. :) I'm going to try this and upload a video about it.

Edit: The video is up. (click to open)

[youtube]https://www.youtube.com/watch?v=THTEoXhPFRk[/youtube]

Re: Bringing back item balls with a fossil bug in at least Red/Green?

Posted by: camper
Date: 2015-11-15 02:15:46
I dunno if I mentioned it, but in FR/LG, some hidden items (like the ones in Underground Path between Routes 7 and 8) couldn't be found when I played through it. Although some guide mention that the hidden items in Underground Path between Routes 5 and 6 cannot be found before completing S.S.Anne, I was able to pick them up when I went there for the first time. Could they have the same cause?

Re: Bringing back item balls with a fossil bug in at least Red/Green?

Posted by: SatoMew
Date: 2015-11-24 14:59:41

I dunno if I mentioned it, but in FR/LG, some hidden items (like the ones in Underground Path between Routes 7 and 8 ) couldn't be found when I played through it. Although some guide mention that the hidden items in Underground Path between Routes 5 and 6 cannot be found before completing S.S.Anne, I was able to pick them up when I went there for the first time. Could they have the same cause?


Are you sure you didn't come across any? That's weird. I found them on both Underground Paths before the S.S. Anne quest.

[img]https://i.imgur.com/eN996Wk.png[/img]

Re: Bringing back item balls with a fossil bug in at least Red/Green?

Posted by: camper
Date: 2015-11-25 02:52:00
I got all the items at Underground Path 5-6, but none at Underground Path 7-8.