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: Pokémon Crystal: Control what glitch contacts say/do! (arbitrary phone scripts)  (Read 243 times)

0 Members and 1 Guest are viewing this topic.

Evie the Bird Mother 🌸 ☽

  • Veteran Contributor
  • *
  • Offline Offline
  • Gender: Female
  • I am a chicken princess ^^
    • View Profile
24:445F (offset 0x9045F) is the start of the PhoneContacts.

These contain entries about the contacts that are 12 bytes long, beginning with caller 0x00 (no caller).

Here is a dump of the first two entries.

00 (no caller): 00 00 FF FF 00 2F A5 4E 00 2F A5 4E
01 (mom): 00 01 18 06 07 2F AA 4E 00 2F A5 4E

I haven't figured out what all the values do yet, but I found out bytes 6-8 in each entry seem to be a three byte pointer to a script controlling what happens when you ring the contact; so no caller's default behaviour is sourced from a script at 2F:4EA5 (giving unused phone text "Good morning." if forced. 2F:4EAA is mom's script.

Through extrapolation, you can find glitch contacts who have this pointer in RAM.

I made a quick data list below to find them.

https://pastebin.com/amJbgb72

One contact (0x6C) may not be out of the area (at least not always) and runs D2CD as a script when you call them. As this is in WRAM, we can change it with another ACE method (as ACE is the only way to get glitch contacts at present).

Note this uses one of the Generation II scripting codes documented on Tauwasser's  scripting compendium.

As an example, the following script will bring up an unused Goldenrod City Department Store 2F message with no issues.

4B 15 7C 5B 91

4B: Display text from three byte pointer (15:5B7C in this case).
91: Return code3

As these codes are based on the scripting language linked above, there is theoretically quite a lot you can do! It also explains the wild battle and credits triggers that are brought up by some glitch contacts. ✿
« Last Edit: February 07, 2019, 10:15:48 pm by Quirky Flower Chicken ❤✿ »
(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.

Evie the Bird Mother 🌸 ☽

  • Veteran Contributor
  • *
  • Offline Offline
  • Gender: Female
  • I am a chicken princess ^^
    • View Profile
Gold's version of PhoneContacts is at 0x9043A (24:443A)

As before, here is a Pastebin of the phone data. ✿

https://pastebin.com/cTPhrUpj
(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.