Main Menu
Main Page
Forums
Recent changes
Random page
Help

Databases
GlitchDex
AttackDex
ItemDex
TypeDex
UnownDex
More

Major Glitches
Trainer escape glitch
Old man trick
Celebi trick
Select glitches (Japan)
SRAM glitch
CoolTrainer♀ corruption
LOL glitch
Rival LOL glitch
Super Glitch
ZZAZZ glitch
Pomeg corruption glitch (Glitzer Popping)
Tweaking
Elite Four door glitch (Japan)
Pokémon merge glitch
Pokémon cloning
Time Capsule exploit
Arbitrary code execution
Coin Case glitch
More

Other Glitch Categories
Glitches by generation
Glitches between two generations
Japan-only/language specific glitches
Music glitches
Natural glitches
Non-core series glitches
Non-Pokémon glitches
Officially acknowledged glitches
Recurring glitches
Dead glitches

References
Pokémon GameShark codes
The Big HEX List
GB programming
Curiosities
Debugging features
Easter eggs
Error traps
Glitch areas
Glitch myths
Non-glitch exploits
Placeholder texts
Pokémon glitch terminology
Unused content and prerelease information

Useful Tools
8F Helper
GBz80 to Items
Old man trick name generator
PATH (Prama's Advanced Tweaking Heaven)
Save file editors
Special stat/Pokémon converter
Trainer escape Trainer Pokémon finder

Affiliates
Legendary Star Blob 2 (Hakuda)
Pokémon Speedruns wiki
PRAMA Initiative
Become an affiliate!

Search Wiki

 

Search Forums

 

Author Topic: w sm codes for Yellow?  (Read 332 times)

0 Members and 1 Guest are viewing this topic.

MewFlare

  • Team Flare Commander
  • GCLF Member
  • Offline Offline
  • Gender: Female
  • A crazy girl in a crazier world
    • View Profile
w sm codes for Yellow?
« on: February 26, 2017, 08:38:57 am »
I've been looking through some of the forum posts on arbitrary code execution and I can only find the box setups for w sm and no item scripts that it runs. I know that the codes have to be different in Yellow, but I can only find 8F setups.

More specifically, I'm looking for an item setup that would give me any Pokemon I want (not battle it, just give it to me like Eevee or Lapras).

The 8F code for it on Red/Blue is

- Any item
- 8F
- Repel x index number of wanted Pokemon
- X Speed x14
- Ultra Ball x 64
- TM05 (Mega Kick) x72
- Lemonade x201

How would I have to modify this item code to work on Yellow with w sm?

Also, one last thing. What item script would I need to play Yellow's unused song?

Thanks in advance!
I apologize if I go on a tangent about anything, it's one of my favourite pastimes.

Proud feminist

Cat lady in the making

Message me if you want to exchange 3DS friend codes

Torchickens

  • Administrator
  • *****
  • Offline Offline
  • Gender: Female
    • View Profile
Re: w sm codes for Yellow?
« Reply #1 on: February 26, 2017, 01:26:22 pm »
Many codes for Yellow you have to deconstruct/analyze the code and modify the fourth digit of the address(es) involved -1, so for instance D059 (instant encounter) becomes D058; and it would involve changing an item or quantity. This excludes a few (usually lower?) addresses like CD38; so the same walk through walls code could be used between Red/Blue and Yellow, although I don't know the specifics sadly.

But with the gift Pokémon code it's different as it calls a routine and the locations of routines may differ between Red/Blue and Yellow. The best way to deal with it is often to use a hex editor and search for similar bytes from the routine.

Back into raw code using the Big List:


- Repel x index number of wanted Pokemon
- X Speed x14
- Ultra Ball x 64
- TM05 (Mega Kick) x72
- Lemonade x201

Becomes
1e xx 43 0e 02 40 cd 48 3e c9

When you see a cd it means "call", and the code in bold is call 3e48.

Taking a look in BGB debugger, we can find the following code here:



Now, CF91 is one of the addresses that is reduced by 1 in Yellow; so if we search for 78 ea 90 cf [ld a,b ld (cf90),a ld a,c] in a hex editor (I like to use HxD which is freeware) we can luckily find the beginning gift Pokémon routine in Yellow at 3E59.



So we need to change cd 48 3e to cd 59 3e (59 3e because the call routine expects big endian, which may mean highest value comes first; sadly not sure but remember it's the often the opposite byte order you would find in a memory viewer)

Hence the only change you need to make is the x72 (hex:48) in TM05 to x89 (hex:59), and the Lemonade (hex:3E) remains unchanged and you're good to go :).

Hope that helps!
« Last Edit: February 26, 2017, 02:31:59 pm by Torchickens »
Hello. I actually identify as gender questioning, but nowadays feel more firmly that I identify as female. My sex is male but I like to express myself as female.  She/her pronouns, please.


Thank you Myri for my avatar! Thank you Aeriixion for the cute sprite above! :) Roelof also made different variations of the sprite (which I animated).

Contact:

Email Youtube Twitter
Skype: Torchickens
Bulbapedia Starfy Wiki

Beyond all philosophies are the things that go best for you; what makes you feel content. It's important to always follow your heart, so unless you feel perfectly happy about it don't just follow something because it is popular, fits a style or is conventional. Sometimes you may reach a point you're not sure who you are, but as things settle I'm convinced things do work out in time.

MewFlare

  • Team Flare Commander
  • GCLF Member
  • Offline Offline
  • Gender: Female
  • A crazy girl in a crazier world
    • View Profile
Re: w sm codes for Yellow?
« Reply #2 on: February 26, 2017, 02:41:33 pm »
Yay! Thanks Torchickens :)

Unfortunately I only have a very basic understanding of programming and code. I've tried to learn more but I've never been very good with numbers :/

I also brought up the unused song because I watched the video you uploaded recently on your Youtube channel showing how to play that song by switching items around in an expanded item pocket and either riding the bike or trying to print from the Pokedex. I tried it but couldn't find the right items in my expanded inventory, so I figured ACE would be a way to guarantee that I get the effect I want (I'm a bit of a control freak like that :P). But now I recall that in your video you were in Route 1 when you did the glitch and when I did it I was in a Pokemon Center. Are the things you find in your expanded inventory location based? Maybe that's what I did wrong...
I apologize if I go on a tangent about anything, it's one of my favourite pastimes.

Proud feminist

Cat lady in the making

Message me if you want to exchange 3DS friend codes

ISSOtm

  • The French Lord of Laziness (and a huge The Legend Of Zelda fan)
  • Wiki Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Pewter City (B)rocks !
    • View Profile
    • My Little Website
Re: w sm codes for Yellow?
« Reply #3 on: February 26, 2017, 02:42:57 pm »
They are.
"THOU SHALL NOT PASS !!"  RIVAL's effect, Gandalf.

Proudly glitching Pokémon Red and Yellow on a Black & White GB, Pocket GB, GB Color, GBA SP and new 3DS.

My Twitter (beware, I'm French)
My YouTube (same warning)

Here is an online tool to build 8F setups : GBz80 to Items !

They see me layzin', they ha-tin'...
Heavy contributor of the global augmentation of entropy (my room's is too damn high !)

Torchickens

  • Administrator
  • *****
  • Offline Offline
  • Gender: Female
    • View Profile
Re: w sm codes for Yellow?
« Reply #4 on: February 26, 2017, 03:28:11 pm »
Yay! Thanks Torchickens :)

Unfortunately I only have a very basic understanding of programming and code. I've tried to learn more but I've never been very good with numbers :/

I also brought up the unused song because I watched the video you uploaded recently on your Youtube channel showing how to play that song by switching items around in an expanded item pocket and either riding the bike or trying to print from the Pokedex. I tried it but couldn't find the right items in my expanded inventory, so I figured ACE would be a way to guarantee that I get the effect I want (I'm a bit of a control freak like that :P). But now I recall that in your video you were in Route 1 when you did the glitch and when I did it I was in a Pokemon Center. Are the things you find in your expanded inventory location based? Maybe that's what I did wrong...

Pleasure :)

I see. ASM and ROM hacking can look intimidating and I relate re: once not understanding pointers and similar, and mathematics was never my forte either. If you would like to know about some of the basics re: hacking let me know and I'll try the best I can to help. :)

Yeah, like ISSOtm posted some of the items that appear in the expanded items pack are location based.

In order to get the right items for item 31 and 32, you may walk around in Celadon City to find an item x0 (actually x256) based on your x-position and use the Celadon looping map trick if necessary to access out of bounds coordinates; which won't send you to another map unless you step on a map boundary (coordinate 0x32 or 0xFF), or clear your items pack and redo the dry underflow glitch with the items you need to place into item 31 and item 32.
« Last Edit: February 26, 2017, 03:29:24 pm by Torchickens »
Hello. I actually identify as gender questioning, but nowadays feel more firmly that I identify as female. My sex is male but I like to express myself as female.  She/her pronouns, please.


Thank you Myri for my avatar! Thank you Aeriixion for the cute sprite above! :) Roelof also made different variations of the sprite (which I animated).

Contact:

Email Youtube Twitter
Skype: Torchickens
Bulbapedia Starfy Wiki

Beyond all philosophies are the things that go best for you; what makes you feel content. It's important to always follow your heart, so unless you feel perfectly happy about it don't just follow something because it is popular, fits a style or is conventional. Sometimes you may reach a point you're not sure who you are, but as things settle I'm convinced things do work out in time.