Glitch traders in Pokémon Red (TraderDex) - work in progress
Posted by: Torchickens
Date: 2016-01-30 15:12:30
Every trade NPC has his or her own ID. I found a way to be able to manipulate it as such:
1) Enter the trader's house in the house on Route 2.
2) In BGB debugger, go to Debug>Breakpoints and add a breakpoint for PC=0:2992 (this is where the beginning of text scripts are stored into hl)
3) Talk to the trader and BGB should break before his text is printed.
4) Save a state and add another breakpoint; PC=any, A=$0001 ('a' represents the trader ID).
5) Disable the PC=0:2992 breakpoint.
6) Do Run>Trace (or hold F7) until the program counter points to ld (CD3D),a
7) Save a state here.
8) Now, right click on af=0100 and click "edit register". Enter the new value as XX00, where XX is the trade ID you want, with values 0A and up being glitch traders.
9) You may receive glitch text that doesn't mention what the trader wants and what you will receive, but regardless; a Yes/No box should appear.
10) Select yes and observe the memory:
The memory address CD0F tells you the Pokémon you need to trade.
The memory addresses CD34, D11E tell you which Pokémon you will receive in return.
11) Now simply change D164 (party Pokémon 1 to match CD0F) and you will be able to trade with the glitch trader to get the Pokémon that could be predicted with CD34, D11E after you wait for a Yes/No box to appear, unless their text freezes the game.
You can view the bytes for its exact nickname by tracking D2EC-D2F6 (nickname for your sixth party Pokémon because the Pokémon you receive moves to slot 6).
Alternatively, here is a way to theoretically trade with glitch traders without a cheating device or BGB debugger:
1) Using arbitrary code execution, we should be able to run a custom script. We could possibly work on this to represent it as items and quantities.
ld a, $(text ID)
ld [W_WHICHTRADE], a
ld a, $54
call Predef
jp TextScriptEnd
[W_WHICHTRADE] = CD3D
Predef pointer = 3E6D
TextScriptEnd pointer = 24D7
It would be good if somehow there was a sure way to avoid the freezing glitch dialog some glitch traders can bring up.
If you want to do this in Pokémon Yellow, the equivalent breakpoint should be 0:2882. I do not know the equivalent pointers for creating an arbitrary code method and the relevant predefined command if it uses one as of yet, sadly.
These are valid traders:
00 - Wants Nidorino for Nidorina - Name "TERRY"
01 - Wants Abra for Mr. Mime - Name "MARCEL"
02 - Wants Butterfree for Beedrill - Name "CHIKUCHIKU" (UNUSED!)
03 - Wants Ponyta for Seel - Name "SAILOR"
04 - Wants Spearow for Farfetch'd - Name "DUX"
05 - Wants Slowbro for Lickitung - Name "MARC"
06 - Wants Poliwhirl for Jynx - Name "LOLA"
07 - Wants Raichu for Electrode - Name "DORIS"
08 - Wants Venonat for Tangela - Name "CRINKLES"
09 - Wants Nidoran for Nidoran - Name "SPOT"
Glitch traders list:
0A - Wants AF Missingno., gives you glitch Pokémon EA, nickname was " 6 ".
0B - Wants 5C Horsea, gives you glitch Pokémon F1. Sadly their text seemed to lock up the game after the trade. - Seems like this glitch trader is into Glitzer Popping!
0C - Wants B8 Missingno., gives you 3E Missingno. Nickname was "4S M".
0D - Wants glitch Pokémon CD, gives you 87 Missingno. Nickname was " 4".
0E - Wants 06 Voltorb, gives you 01 Rhydon. Sadly their text seemed to lock up the game after the trade.
0F - Wants 92 Missingno., gives you glitch Pokémon CF. Nickname was "4 T Y".
10 - Wants glitch Pokémon CD, gives you 6D Paras. Sadly their text seemed to lock up the game after the trade.
11 - Wants glitch Pokémon EA, gives you 91 Marowak. Nickname was "p".
12 - Wants 80 Golduck, gives you glitch Pokémon EA. Nickname was "TRAINER SLOWPOKE".
13 - Wants 50 Missingno., gives you 50 Missingno. Nickname was "U".
14 - Wants 50 Missingno., gives you 50 Missingno. Nickname was "CHIKUCHISLOWPOKE". - Note: This glitch Trainer coincidentally had "x' y" in their text like the interesting text pointer effect shown at AGDQ 2016's Pokémon glitch exhibition.
15 - Wants 8A Kingler, gives you 94 Abra. Nickname was "d". "x' y" text appeared in Trainer's text again.
16 - Wants 50 Missingno., gives you 50 Missingno. "x' y" text appeared in Trainer's text again. Nickname was "DUX", with glitch characters preceding it.
17 - Wants 50 Missingno., gives you 50 Missingno. "x' y" text appeared in Trainer's text again. Nickname was glitch characters.
18 - Wants 50 Missingno., gives you 50 Missingno. "x' y" text appeared in Trainer's text again. Nickname was "LOLA", with glitch characters preceding it.
19 - Wants 50 Missingno., gives you 50 Missingno. "x' y" text appeared in Trainer's text again. Nickname appeared as many blank spaces.
1A - Wants 50 Missingno., gives you 50 Missingno. "x' y" text appeared in Trainer's text again. Nickname appeared as "CRINKLES", with glitch characters preceding it and 9s/glitch characters following it.
1B - Wants 50 Missingno., gives you 50 Missingno. "x' y" text appeared in Trainer's text again. Nickname appeared as "p 6", with 9s/glitch characters following it.
1C - Wants 50 Missingno., gives you 50 Missingno. "x' y" text appeared in Trainer's text again. Nickname appeared as "p 6", with 9s/glitch characters following it. (again)
1D - Wants glitch Pokémon F5, gives you glitch Pokémon CD. Nickname appeared as "TM ;TM4 KE".
1E - Wants glitch Pokémon FA, gives you 91 Marowak. Nickname appeared as "y 4S M".
1F - Wants 01 Rhydon, gives you 2C Hitmonchan. Nickname appeared as "H ".
20 - Wants glitch Pokémon CD, gives you 4F Missingno. Nickname appeared as "ITRAINER2", seemingly followed by many characters.
99 - Wants 91 Marowak, gives you 88 Muk. Nickname terminated with 50 before it begins.
AA - Wants 01 Rhydon, gives you 8B Cloyster. "x' y" text appeared in Trainer's text again. Nicknamed appeared as "LA".
BB - Wants 50 Missingno., gives you 08 Slowbro. Was unable to trade because the music faded and the screen become fully white.
CC - Wants 50 Missingno., gives you 50 Missingno. . "x' y" text appeared in Trainer's text again. Nicknamed terminated with 50 before it begins.
CD - Wants 50 Missingno., gives you 50 Missingno. . "x' y" text appeared in Trainer's text again. Nicknamed terminated with 50 before it begins. (again, but I think the internal name may have been slightly different??)
DD - Wants 94 Abra, gives you 82 Golbat. Nickname appeared as "IKU".
EE - Wants 80 Golduck, gives you 91 Marowak. Nickname appeared as "EL". Note: The Trainer kept saying 'h p' and an item obtained jingle kept playing like they were saying "happy".
FD - Wants glitch Pokémon EA, gives you 27 Graveler. Evolves into Golem (unless level 0?). Nickname appeared as "S 4 R Y SW. Filled party screen with black regions.
FE - Wants glitch Pokémon EA, gives you 49 Moltres. Nickname appeared as "V A", seemingly followed by many characters.
FF - Wants A8 Nidorina, gives you 00 'M. Nicknamed appeared as "ERRY".