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
Other glitch categories

References/Resources
Databases
Disassembly projects
The Big HEX List
Interactive tools
Reference documents
Terminology

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: TMTRAINER Pikachu Surfing Mini-game?  (Read 829 times)

0 Members and 1 Guest are viewing this topic.

SwedishDragon

  • GCLF Member
  • Offline Offline
  • My name is エリク
    • View Profile
TMTRAINER Pikachu Surfing Mini-game?
« on: February 15, 2015, 03:47:54 am »
This might be a stupid question, but where else to ask it: Does the HP-part of the TMTRAINER effect have anything to do with the Pikachu Surfing mini-game? (Remaining distance is counted in HP)

It probably doesn't and just looks similar, but it has been bugging me for some time so i wanted to ask anyway, just in case.

Evie the Bird Mother 🌸 ☽

  • Veteran Contributor
  • *
  • Offline Offline
  • Gender: Female
  • ああ、紅茶がおいしい。 ~ ^^
    • View Profile
Re: TMTRAINER Pikachu Surfing Mini-game?
« Reply #1 on: February 15, 2015, 10:46:22 am »
No. The high HP is caused by the cached screen tile data corrupting CFE6-CFE7. Specifically the tiles at y=06 x=0F, y=06 x=10 cause it according to my data.

What CoolTrainer and Super Glitch do is copy data from $CD6D, a buffer that holds the (random for CoolTrainer and at least one other Super Glitch move, I wonder if any have long names from the ROM) internal name of the move that caps at 20(?) characters long. It copies this data to $CF4B or $D0E1 or both (but CoolTrainer can only copy to $CF4B).

If there is no 50h terminator in the 20-long $CD6D buffer, this means that the game will also copy data past the buffer where the cached screen tile data (updated whenever you open a menu like Pokémon in Red/Blue/Yellow or when you enter battle in Yellow) is located until it finds a 50h where it stops copying data.

Battle tile screen data has a conveniently placed 50h so that the game doesn't copy too much data and freeze. Many battle tiles may look the same, but not all of the blank ones are 7F and the 50 is found at x=05 y=08 if you have normal graphics or x=03 y=08 if the graphics are inverted.

See this image:


Incidentally, the "TMTRAINER" part happens when thanks to the cached screen data the enemy Pokémon's nickname is made to have the character $5C followed by $5D in it. $5C causes the game to write "TM" and $5D causes the game to write "TRAINER".
« Last Edit: February 15, 2015, 10:54:52 am by Torchickens »
(I was former joint head admin but stepped down)
✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿
Here have some free flowers on every post. ^^
✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿
Love, faith, hope are free. If all is lost friends save us.
Thanks fans for lovely Torchic artwork. ♡ First image thanks Nyapon.

SwedishDragon

  • GCLF Member
  • Offline Offline
  • My name is エリク
    • View Profile
Re: TMTRAINER Pikachu Surfing Mini-game?
« Reply #2 on: February 15, 2015, 11:33:12 am »
I thought as much. Thanks for the answer.

Evie the Bird Mother 🌸 ☽

  • Veteran Contributor
  • *
  • Offline Offline
  • Gender: Female
  • ああ、紅茶がおいしい。 ~ ^^
    • View Profile
Re: TMTRAINER Pikachu Surfing Mini-game?
« Reply #3 on: February 15, 2015, 11:47:48 am »
You're welcome.
(I was former joint head admin but stepped down)
✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿
Here have some free flowers on every post. ^^
✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿
Love, faith, hope are free. If all is lost friends save us.
Thanks fans for lovely Torchic artwork. ♡ First image thanks Nyapon.