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

Pokémon Yellow - easy walk through walls glitch - Page 1

Pokémon Yellow - easy walk through walls glitch

Posted by: Torchickens
Date: 2013-06-03 13:14:36
This is an easier version of the walk through walls glitch that doesn't require a poisoned Pokémon or Super Glitch. I've only got it to work in Yellow, though. Basically, you just have to do the steps of Paco81's Hooked Dragonite glitch (to get this to work you can get your remaining steps to about 40 or so while you're in the Safari Zone) but talk to the NPC from the right when he's one tile down from the Pokémon Center door instead of from the left.

This will cause you to move automatically and the Start menu to keep popping up. The down button will be disabled, but only until you Fly away. If you hold B after closing the menu you can walk through walls anywhere you want. For some reason, different NPC sprites can appear in the wrong places and the S.S. Anne NPC in Vermilion City gets removed entirely.

To remove the walk through walls effect and bring the NPC back to his original spot, you can just enter a door.

Video: Here

Re: Pokémon Yellow - easy walk through walls glitch

Posted by: TheZZAZZGlitch
Date: 2013-06-05 11:16:49
Cool, good to know that this glitch is possible without struggling to get a poisoned Pokemon. However, holding B all the time is a little bit tiring.
Also, it's very good to know that effects of the Hooked Dragonite glitch happen to differ depending on the player's position while talking to the NPC. This really makes me wonder if there are more amazing effects to discover.

And this museum guy's "YOU HAVE TO GO" look is pure win.

Re: Pokémon Yellow - easy walk through walls glitch

Posted by: camper
Date: 2013-06-05 23:23:49
Can you encounter Pokemon while following someone? One of the positions I tried brought me down to the Route 2 grass patch, then out of bounds. I wonder if entering a battle ends this effect.

Re: Pokémon Yellow - easy walk through walls glitch

Posted by: Torchickens
Date: 2013-06-06 08:46:04

Can you encounter Pokemon while following someone? One of the positions I tried brought me down to the Route 2 grass patch, then out of bounds. I wonder if entering a battle ends this effect.


I'm unable to get a battle when the follow-me effect is active, but I don't know for sure. If you force an encounter with 01xx58D0, the game will freeze for a moment before the battle. If in the impossible case this happens in the NPC's normal path before the glitch/in Pewter City after the glitch, you won't be able to press A or B to continue the battle like in the Hooked Dragonite glitch.

If this happens after moving to another location, you will be able to use A/B but not down (unless you Fly away). Ending the battle disables the automatic start button effect/re-enables down/makes you stop walking automatically, like if you encounter a Trainer or enter a door. This causes the "It's right here!" message to appear the next time you go to Pewter City.

Re: Pokémon Yellow - easy walk through walls glitch

Posted by: camper
Date: 2013-06-06 10:43:24
What causes the player to walk through walls? I've tried many positions in Red but so far I can only get the Start menu to pop up. Is the WTW effect exclusive to Yellow?

Re: Pokémon Yellow - easy walk through walls glitch

Posted by: Torchickens
Date: 2013-06-06 11:33:00

What causes the player to walk through walls? I've tried many positions in Red but so far I can only get the Start menu to pop up. Is the WTW effect exclusive to Yellow?


I'm not sure. I believe the WTW effect is exclusive to Yellow, yes.

Re: Pokémon Yellow - easy walk through walls glitch

Posted by: ISSOtm
Date: 2015-04-05 03:24:52
I've made a bit of research, and it appears that memory address $CD38 allows to walk through walls.
It makes sense, because the developers may have thought that their paths wouldn't need any collision detection, because they are correctly programmed, so they removed the hitboxes while following someone to spare CPU time (extrapolation here !).

But why does the glitch pull up ?
It appears that, as soon as you begin following a path, RAM address CD38 is decreased every step. Once it equals zero, the game does something… with both Pewter guys, it makes their last dialogue pop up. I don't know what handles this.
Path data seems to be written from CCD2 onwards, and in the case of our bug the path is too long ; it overwrites CD38 and there you go !
(I tested editing the values CCD3~CD37 before moving, and it effectively changed my path)

(After tests) According to a comment in Pokered disassembly, path data is written before CCD3 (I doubt it though)
To explain how the code works, I need to understand how the FillMemory routine works. Sadly, this code's location isn't referenced anywhere, and it was a struggle to find it. FillMemory is at 0:36E0. So what does it do ? Does it go for- or backwards ? (How does the ldi instruction work ?)

According to VBA Disassembler :

FillMemory::
36E0: push de
36E1: ld d, a
36E2: ld a, d
36E3: ldi (hl), a
36E4: dec bc
36E5: la a, b
36E6: or c
36E7: jr nz, 36E2h
36E9: pop de
36EA: ret


[Time passed on https://github.com/iimarckus/pokered/: 2 hours]
Okay, found this in wram.asm

wSimulatedJoypadStatesIndex:: ; cd38
; the next simulated joypad state is at wSimulatedJoypadStatesEnd plus this value minus 1
; 0 if the joypad state is not being simulated
ds 1

wOverrideSimulatedJoypadStatesMask:: ; cd3b
; mask indicating which real button presses can override simulated ones
; XXX is it ever not 0?
ds 1

ds 1

By putting CD3B to hex:00, the player can't move and the B button doesn't work until the START menu pops up again. This seems to be another important part on how the glitch works.

Also, I've done a bit of testing, and there I can say : CD38, for an unknown reason, does only decrease each time the start menu is closed. No idea why. But this would explain why it continuously pops up :





Can you encounter Pokemon while following someone? One of the positions I tried brought me down to the Route 2 grass patch, then out of bounds. I wonder if entering a battle ends this effect.

I don't know, but I can tell that warps are active while following the Youngster. Also, path data is written onto memory used within battle, so if you could encounter wild Pokémon while following the Youngster, you may screw the path. I haven't seen any protections against wild encounters in the disassembly, though.





What causes the player to walk through walls? I've tried many positions in Red but so far I can only get the Start menu to pop up. Is the WTW effect exclusive to Yellow?


I'm not sure. I believe the WTW effect is exclusive to Yellow, yes.

I tested on English Blue, and it worked, so WTW isn't exclusive to Yellow.

I've tried a bit more places to talk him from, and the images are the result :

Re: Pokémon Yellow - easy walk through walls glitch

Posted by: Háčky
Date: 2015-04-05 13:20:14
To explain how the code works, I need to understand how the FillMemory routine works. Sadly, this code's location isn't referenced anywhere, and it was a struggle to find it. FillMemory is at 0:36E0. So what does it do ? Does it go for- or backwards ? (How does the ldi instruction work ?)

[tt]ldi (hl), a[/tt] (written as [tt]ld [hli], a[/tt] in RGBDS syntax) is equivalent to [tt]ld (hl), a[/tt] plus [tt]inc hl[/tt]. The effect of the function is, as noted in pokereds home.asm, Fill bc bytes at hl with a.

Re: Pokémon Yellow - easy walk through walls glitch

Posted by: ISSOtm
Date: 2015-06-10 04:17:43
I recently bought a Pokémon Rouge (French Red) cartridge, and in this version, this glitch doesn't work along with the Amazing Man glitch (I think there is a link between these). As soon as I enter Pewter City, I get the museum dialog, then the guy teleports away. But as soon as I move, he pops back straight next to the Mart.

I'm going to try entering Pewter City not through the Mart (either re-entering the Safari Zone, then Digging out 1. to Pewter City Pokémon Center or 2. to another Pokémon Center, then entering Pewter city by a) Walking (probably from Viridian City) or b) Flying ; or blacking out)

Can this glitch be performed in European R/B versions using the Walk around with only fainted Pokémon glitch ? I doubt it, but maybe…

Just an aparté : the Amazing Man glitch doesn't teleport NPCs, but their orientation remains South-facing until the START menu is closed.

Re: Pokémon Yellow - easy walk through walls glitch

Posted by: Krys3000
Date: 2015-06-11 11:52:26

I recently bought a Pokémon Rouge (French Red) cartridge, and in this version, this glitch doesn't work along with the Amazing Man glitch (I think there is a link between these). As soon as I enter Pewter City, I get the museum dialog, then the guy teleports away. But as soon as I move, he pops back straight next to the Mart.

I'm going to try entering Pewter City not through the Mart (either re-entering the Safari Zone, then Digging out 1. to Pewter City Pokémon Center or 2. to another Pokémon Center, then entering Pewter city by a) Walking (probably from Viridian City) or b) Flying ; or blacking out)

Can this glitch be performed in European R/B versions using the Walk around with only fainted Pokémon glitch ? I doubt it, but maybe…

Just an aparté : the Amazing Man glitch doesn't teleport NPCs, but their orientation remains South-facing until the START menu is closed.


Je vois que tu es français, ISSOtm, connais-tu PRAMA ? N'hésite pas à venir sur notre forum aussi :) et merci de nous éviter de faire ce test, du coup !

Re: Pokémon Yellow - easy walk through walls glitch

Posted by: ISSOtm
Date: 2015-06-14 15:17:56

I recently bought a Pokémon Rouge (French Red) cartridge, and in this version, this glitch doesn't work along with the Amazing Man glitch (I think there is a link between these). As soon as I enter Pewter City, I get the museum dialog, then the guy teleports away. But as soon as I move, he pops back straight next to the Mart.

I'm going to try entering Pewter City not through the Mart (either re-entering the Safari Zone, then Digging out 1. to Pewter City Pokémon Center or 2. to another Pokémon Center, then entering Pewter city by a) Walking (probably from Viridian City) or b) Flying ; or blacking out)

The glitch does not work on my cartridge. I'm beginning to doubt about this glitch also working on Us carts, that would mean this glitch is emulator-only ? That's sad.

The "Best" result I could achieve was to teleport to Vermilion City, then to fly to Pewter City : the guy began walking downwards as he does infinitely on emulator, but he snapped back towards his normal location after a few steps.

Could someone please test this on a US cartridge ?