Main Menu
Main Page
Forums
New pages
Recent changes
Random page
Help

Glitches
Arbitrary code execution
Pokémon cloning
Pomeg glitch and Glitzer Popping
Tweaking and voiding
Glitches by generation
Glitch categories

References/Resources
Databases
Disassembly projects
The Big HEX List
Pokémon cheat codes
Pokémon glitch terminology
Useful tools
More

Affiliates
Legendary Star Blob 2 (Hakuda) (日本語/Japanese)
Pokémon Speedruns wiki (English)
PRAMA Initiative (Français/French)
MissingNo. Glitch City (Italiano/Italian)
Become an affiliate!

Technical
Site source code

Search Wiki

 

Search Forums

 

Author Topic: WTW mechanics discussions  (Read 3506 times)

0 Members and 1 Guest are viewing this topic.

SatoMew

  • Member+
  • *
  • Offline Offline
  • Gender: Female
    • View Profile
WTW mechanics discussions
« on: February 18, 2015, 11:10:57 pm »
On an unrelated note, 01xx38CD can be set to 00 to revert the behavior of "walking through walls". I don't know if this was already known since people always mention 010138CD but this is far more practical than disabling the code and entering another map from a warp in order to restore the normal behavior.

Evie the Mother Hen ☽ ❤

  • Head Administrator
  • *****
  • Offline Offline
  • Gender: Female
  • I love My Melody. I want to be a mum. 🦋 ✿
    • View Profile
Re: WTW mechanics discussions
« Reply #1 on: February 18, 2015, 11:28:40 pm »
On an unrelated note, 01xx38CD can be set to 00 to revert the behavior of "walking through walls". I don't know if this was already known since people always mention 010138CD but this is far more practical than disabling the code and entering another map from a warp in order to restore the normal behavior.

Yes. I usually go to CD38 in memory viewer, set it to 01 when I need to and set it to 00 when I want it off (e.g. when I want to use an exit) but people may not be aware you can disable WTW like that.

I don't know if you know, but CD38 is actually set to 01 when you jump off a ledge. If you use 010038CD and try to jump off a ledge, you won't go two tiles below for some reason and you will end up on top of the ledge.

It is also used when a guide takes you somewhere; where it counts down from a value (29h for the person who brings you to the Pewter Gym, 11h for Professor Oak) each step until it becomes 00h, after which:

For Professor Oak - he disappears interestingly, the game locks up (if you set CD38 to 00 early) and the guide music still plays. In at least Yellow you enter the door while CD38 is 01 so this behaviour is not seen.
For the Pewter Gym guy - the music goes back to normal, the guide stops and says "If you have the right stuff, go take on BROCK!" and he starts walking back.
« Last Edit: February 18, 2015, 11:35:26 pm by Torchickens »

✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿
Here have some free flowers on every post :)
✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿



(Images © Sanrio, Nintendo, Pokémon, HAL Laboratory)

✿ Hi, I'm Evie. Transgender woman but spiritually doesn't believe 'male'/'female' needs to be defined; lives more stereotypically like a woman. Call me whichever pronouns you like. :)

Feel free to contact me here about anything regarding the site.

Forgiveness. I feel that the more people pray to our greatest source/God/mathematical equality for world peace, the more and more it manifests into reality (until our next spiritual death).

Thank you Nyapon for this lovely artwork. :3

SatoMew

  • Member+
  • *
  • Offline Offline
  • Gender: Female
    • View Profile
Re: WTW mechanics discussions
« Reply #2 on: February 18, 2015, 11:37:04 pm »
I don't know if you know, but CD38 is actually set to 01 when you jump off a ledge. If you use 010038CD and try to jump off a ledge, you won't go two tiles below for some reason and you will end up on top of the ledge.

It is also used when a guide takes you somewhere; where it counts down from a value (29h for the person who brings you to the Pewter Gym, 11h for Professor Oak) each step until it becomes 00h, after which:

For Professor Oak - he disappears interestingly, the game locks up (if you set CD38 to 00 early) and the guide music still plays. In at least Yellow you enter the door while CD38 is 01 so this behaviour is not seen.
For the Pewter Gym guy - the music goes back to normal, the guide stops and says "If you have the right stuff, go take on BROCK!" and he starts walking back.

I didn't know that, interesting. I noticed that guides and guards (like the one in the Safari Zone's gate) were affected by CD38 being set to 00 since the game appeared to loop their scripts until I disabled the code.

...And I just found this: https://sourceforge.net/p/vbam/bugs/116/
I had completely forgotten about it. There are some save files there, in case anyone wants to check them out.
« Last Edit: February 19, 2015, 06:02:57 pm by SatoMew »

pigdevil2010

  • Member+
  • Offline Offline
  • Gender: Male
  • Welcome to the 40 ERROR.
    • View Profile
Re: WTW mechanics discussions
« Reply #3 on: February 22, 2015, 03:26:44 am »
On an unrelated note, 01xx38CD can be set to 00 to revert the behavior of "walking through walls". I don't know if this was already known since people always mention 010138CD but this is far more practical than disabling the code and entering another map from a warp in order to restore the normal behavior.

Yes. I usually go to CD38 in memory viewer, set it to 01 when I need to and set it to 00 when I want it off (e.g. when I want to use an exit) but people may not be aware you can disable WTW like that.

I don't know if you know, but CD38 is actually set to 01 when you jump off a ledge. If you use 010038CD and try to jump off a ledge, you won't go two tiles below for some reason and you will end up on top of the ledge.

It is also used when a guide takes you somewhere; where it counts down from a value (29h for the person who brings you to the Pewter Gym, 11h for Professor Oak) each step until it becomes 00h, after which:

For Professor Oak - he disappears interestingly, the game locks up (if you set CD38 to 00 early) and the guide music still plays. In at least Yellow you enter the door while CD38 is 01 so this behaviour is not seen.
For the Pewter Gym guy - the music goes back to normal, the guide stops and says "If you have the right stuff, go take on BROCK!" and he starts walking back.

CD38 tells the game if it's simulating joypad states. This feature is used to make the game controls the player in some scripts. When the game is simulating joypad states, it will completely ignore any collision just like how the game do it with NPC. This means that setting CD38 to 01 will fools the game out that it's simulating joypad states and won't check the collision data. Hence why you can walk through walls.
« Last Edit: February 22, 2015, 03:28:56 am by pigdevil2010 »

SatoMew

  • Member+
  • *
  • Offline Offline
  • Gender: Female
    • View Profile
Re: WTW mechanics discussions
« Reply #4 on: February 22, 2015, 07:03:29 am »
CD38 tells the game if it's simulating joypad states. This feature is used to make the game controls the player in some scripts. When the game is simulating joypad states, it will completely ignore any collision just like how the game do it with NPC. This means that setting CD38 to 01 will fools the game out that it's simulating joypad states and won't check the collision data. Hence why you can walk through walls.

pokechu022 once said that CD38 is a step counter. Which one is correct?

In the Generation II games, there are 4 addresses manipulated by the various codes, with each allowing the player to "walk through walls" in one of the four directions (north, south, east, west--not by this order). Is there an address in these games like CD38 of the Generation I games?

Evie the Mother Hen ☽ ❤

  • Head Administrator
  • *****
  • Offline Offline
  • Gender: Female
  • I love My Melody. I want to be a mum. 🦋 ✿
    • View Profile
Re: WTW mechanics discussions
« Reply #5 on: February 22, 2015, 12:32:44 pm »
CD38 tells the game if it's simulating joypad states. This feature is used to make the game controls the player in some scripts. When the game is simulating joypad states, it will completely ignore any collision just like how the game do it with NPC. This means that setting CD38 to 01 will fools the game out that it's simulating joypad states and won't check the collision data. Hence why you can walk through walls.

pokechu022 once said that CD38 is a step counter. Which one is correct?

It could be both/at least CD38 double serves as letting you walk through walls and as a steps left counter. CD38 can act as a value that decreases every step a guide takes. When you follow guide routes from Professor Oak, the Pewter Gum guy or the Pewter Museum guy, it starts at a value and counts down for every step they take (normally until 00 but Oak is an exception) until the guide takes you to your destination. For the Pewter Gym and Pewter Museum guys CD38 becomes 00, causing you to get a message and they start walking back.

For Oak taking you to his lab, CD38 also serves as a steps left counter, but in Red (Blue?) and Yellow it never gets to 00. If you hack it to 00 when Oak is taking you to his lab then Oak disappears, the music still plays and the game locks up.

CD38 is not a steps left counter for certain other things. I will note for reference that there are different addresses for Repel steps left (I think that address can be found in the diassembly) or steps left until you take poison damage/whether you will black out (that is controlled by D13B).

But I don't know anything about what determines the all fainted Pokémon steps left in Yellow (in Yellow, unlike Red/Blue the game will have it so you can only make one step until you black out if you have all fainted Pokémon even if you save and reset (and in Red/Blue you can increase the amount of extra steps you can take by saving and resetting or using the glitch item "il" (hex:6D)).

In the Generation II games, there are 4 addresses manipulated by the various codes, with each allowing the player to "walk through walls" in one of the four directions (north, south, east, west--not by this order). Is there an address in these games like CD38 of the Generation I games?

I don't know off the top of my head, I'm afraid.
« Last Edit: February 22, 2015, 01:01:54 pm by Torchickens »

✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿
Here have some free flowers on every post :)
✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿



(Images © Sanrio, Nintendo, Pokémon, HAL Laboratory)

✿ Hi, I'm Evie. Transgender woman but spiritually doesn't believe 'male'/'female' needs to be defined; lives more stereotypically like a woman. Call me whichever pronouns you like. :)

Feel free to contact me here about anything regarding the site.

Forgiveness. I feel that the more people pray to our greatest source/God/mathematical equality for world peace, the more and more it manifests into reality (until our next spiritual death).

Thank you Nyapon for this lovely artwork. :3

SatoMew

  • Member+
  • *
  • Offline Offline
  • Gender: Female
    • View Profile
Re: WTW mechanics discussions
« Reply #6 on: February 22, 2015, 12:53:13 pm »
Thanks for the input :)

Evie the Mother Hen ☽ ❤

  • Head Administrator
  • *****
  • Offline Offline
  • Gender: Female
  • I love My Melody. I want to be a mum. 🦋 ✿
    • View Profile
Re: WTW mechanics discussions
« Reply #7 on: February 22, 2015, 01:07:34 pm »
Thanks for the input :)

You're welcome.

My description is not exactly accurate. CD38 briefly becomes 02, then 01, then 00 when jumping down off a ledge in Red and there is no guide there. I tried setting it to FF when it become 02 and something weird happened; I jumped up instead and the start menu popped up with the controls locked (and I note that FFF9 is still 00 meaning the game is still reading buttons from the 'joypad' but they still have no effect).



Pigdevil2010's explanation explains the start menu thing partly because the game is in the position for simulating button presses and up, down, left, right aren't the only buttons.
« Last Edit: February 22, 2015, 01:31:17 pm by Torchickens »

✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿
Here have some free flowers on every post :)
✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿



(Images © Sanrio, Nintendo, Pokémon, HAL Laboratory)

✿ Hi, I'm Evie. Transgender woman but spiritually doesn't believe 'male'/'female' needs to be defined; lives more stereotypically like a woman. Call me whichever pronouns you like. :)

Feel free to contact me here about anything regarding the site.

Forgiveness. I feel that the more people pray to our greatest source/God/mathematical equality for world peace, the more and more it manifests into reality (until our next spiritual death).

Thank you Nyapon for this lovely artwork. :3

SatoMew

  • Member+
  • *
  • Offline Offline
  • Gender: Female
    • View Profile
Re: WTW mechanics discussions
« Reply #8 on: February 22, 2015, 01:20:18 pm »
My description is not exactly accurate. CD38 briefly becomes 02, then 01, then 00 when jumping down off a ledge in Red and there is no guide there. I tried setting it to FF when it become 02 and something weird happened; I jumped up instead and the start menu popped up with the controls locked (and I note that FFF9 is still 00 meaning the game is still reading buttons from the 'joypad' but they still have no effect).



Interesting. I tried the same (FF the moment it became 02) in Japanese Red; it became FB after jumping down the ledge and I can "walk through walls". I did this with the ledge right next to the Pokémon Center in Cerulean City and playing on BGB.

« Last Edit: February 24, 2015, 04:01:15 pm by SatoMew »

Evie the Mother Hen ☽ ❤

  • Head Administrator
  • *****
  • Offline Offline
  • Gender: Female
  • I love My Melody. I want to be a mum. 🦋 ✿
    • View Profile
Re: WTW mechanics discussions
« Reply #9 on: February 22, 2015, 02:02:07 pm »
I forgot to mention something related to the unexpected ledge behaviour.

If after the game does a route (e.g. changing CD38 to someting like 29h and making it count down) you change CD38 to a high value greater than the maxium CD38 value (like what we did for the ledge 02 value) then the game may make 'joypad' inputs not included in the route like going up unexpectedly or opening the start menu.

It turns out that an individual CD38 value may represent one of the button presses or combination of button presses in the route. For example, for talking to the Pewter Gym guy from the left, when CD38 is 15 the game simulates an up press.

So if you kept writing 15 to CD38 during this route you (but not the guide) would keep walking up, and another example would be if you kept writing 07 you would keep walking down.



I think the source of the excessive 'glitch' CD38 value inputs may be extrapolated from the route as it appears in the ROM. Though that is a theory. When I get my own laptop back I will test this theory.

As we have learned from "Brock Through Walls" to make a route the game looks for coordinates that match your coordinates from where you activated the route, at an address ending in 2, 6, A or E. It then reads a pointer directly following those coordinates that represents what the route is and executes it (so in the format: y, x, path pointer byte 1, path pointer byte 2).

I do not know the data structure of a route, but say it included 50 joypad inputs. If you forced the game to load input 255, maybe the input would be located past where the route is located in the ROM (so it would be unrelated data executed as a button).
« Last Edit: February 22, 2015, 02:13:31 pm by Torchickens »

✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿
Here have some free flowers on every post :)
✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿



(Images © Sanrio, Nintendo, Pokémon, HAL Laboratory)

✿ Hi, I'm Evie. Transgender woman but spiritually doesn't believe 'male'/'female' needs to be defined; lives more stereotypically like a woman. Call me whichever pronouns you like. :)

Feel free to contact me here about anything regarding the site.

Forgiveness. I feel that the more people pray to our greatest source/God/mathematical equality for world peace, the more and more it manifests into reality (until our next spiritual death).

Thank you Nyapon for this lovely artwork. :3

SatoMew

  • Member+
  • *
  • Offline Offline
  • Gender: Female
    • View Profile
Re: WTW mechanics discussions
« Reply #10 on: February 22, 2015, 02:15:02 pm »
That would explain the different results we got, correct? Actually, isn't the menu open automatically when you perform the Mew glitch as soon as you arrive at the exact tile on Route 24? I'm not sure of that behavior right now (may be a false memory) but perhaps it happens due to CD38 changing?

Evie the Mother Hen ☽ ❤

  • Head Administrator
  • *****
  • Offline Offline
  • Gender: Female
  • I love My Melody. I want to be a mum. 🦋 ✿
    • View Profile
Re: WTW mechanics discussions
« Reply #11 on: February 22, 2015, 02:56:01 pm »
Maybe. To grasp at straws it could be a memory related thing too though.

That would explain the different results we got, correct? Actually, isn't the menu open automatically when you perform the Mew glitch as soon as you arrive at the exact tile on Route 24? I'm not sure of that behavior right now (may be a false memory) but perhaps it happens due to CD38 changing?

I don't think that's related to CD38 personally.

While the start menu often pops up when you return to the place you escaped from after beating a Trainer on another route, what pops up is determined by which text box you viewed last.

The game stores the index number of the last text box in CF13. If you opened the start menu it is 00 and the game seems to bring up the start menu for 00 values for every applicable Trainer-Fly place.

However, you can do things like talk to people and view signs to get different CF13 values. Different maps have different text boxes, so you can get unexpected messages. For example, one of the signs in Lavender Town is "May the Souls of POKéMON Rest Easy"(...) and has an ID of 09. On Route 8 (west of Lavender Town and where you can set up a Trainer-Fly), ID 09 belongs to the text of a Lass.

This means if you Trainer-Flied from Route 8, beat a Trainer from another route, viewed that sign in Lavender Town then returned to Route 8 the game would bring up her text (I confirmed it bringing up her text from after battle and I previously beat her, maybe the game would bring up her text before battle if you didn't beat her?)

Is it OK if I split the talk about CD38 from this thread Sato? It's getting deep and not related to the glitch Pikachu eye states.
« Last Edit: February 22, 2015, 03:09:15 pm by Torchickens »

✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿
Here have some free flowers on every post :)
✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿



(Images © Sanrio, Nintendo, Pokémon, HAL Laboratory)

✿ Hi, I'm Evie. Transgender woman but spiritually doesn't believe 'male'/'female' needs to be defined; lives more stereotypically like a woman. Call me whichever pronouns you like. :)

Feel free to contact me here about anything regarding the site.

Forgiveness. I feel that the more people pray to our greatest source/God/mathematical equality for world peace, the more and more it manifests into reality (until our next spiritual death).

Thank you Nyapon for this lovely artwork. :3

SatoMew

  • Member+
  • *
  • Offline Offline
  • Gender: Female
    • View Profile
Re: WTW mechanics discussions
« Reply #12 on: February 22, 2015, 02:59:46 pm »
I see, thanks for clarifying.

Is it OK if I split the talk about CD38 from this thread Sato? It's getting deep and not related to the glitch Pikachu eye states.

Sure, go ahead and split it ;)

Evie the Mother Hen ☽ ❤

  • Head Administrator
  • *****
  • Offline Offline
  • Gender: Female
  • I love My Melody. I want to be a mum. 🦋 ✿
    • View Profile
Re: WTW mechanics discussions
« Reply #13 on: February 22, 2015, 03:07:43 pm »
You're welcome.

Cool. Split.

✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿
Here have some free flowers on every post :)
✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿



(Images © Sanrio, Nintendo, Pokémon, HAL Laboratory)

✿ Hi, I'm Evie. Transgender woman but spiritually doesn't believe 'male'/'female' needs to be defined; lives more stereotypically like a woman. Call me whichever pronouns you like. :)

Feel free to contact me here about anything regarding the site.

Forgiveness. I feel that the more people pray to our greatest source/God/mathematical equality for world peace, the more and more it manifests into reality (until our next spiritual death).

Thank you Nyapon for this lovely artwork. :3

pigdevil2010

  • Member+
  • Offline Offline
  • Gender: Male
  • Welcome to the 40 ERROR.
    • View Profile
Re: WTW mechanics discussions
« Reply #14 on: February 22, 2015, 06:49:55 pm »
CD38 tells the game if it's simulating joypad states. This feature is used to make the game controls the player in some scripts. When the game is simulating joypad states, it will completely ignore any collision just like how the game do it with NPC. This means that setting CD38 to 01 will fools the game out that it's simulating joypad states and won't check the collision data. Hence why you can walk through walls.

pokechu022 once said that CD38 is a step counter. Which one is correct?

In the Generation II games, there are 4 addresses manipulated by the various codes, with each allowing the player to "walk through walls" in one of the four directions (north, south, east, west--not by this order). Is there an address in these games like CD38 of the Generation I games?

Because it is an array index of CCD3. If you execute this code in Red/Blue:
Code: [Select]
call $3486while CD38 is set to 4 and CCD3-CCD6 are filled with 08 (start button joypad constant). You can see that the game starts to act like you pressed start button 4 times and the value at CD38 will decrease. Since the script mostly load direction buttons to CCD3, one may mistake that it's a step counter.