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: w sm codes for Yellow?  (Read 904 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

Evie the Mother Hen ☽ ❤

  • Head Administrator
  • *****
  • Offline Offline
  • Gender: Female
  • I love My Melody. I want to be a mum. 🦋 ✿
    • 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 »

✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿
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

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)
  • Staff
  • *****
  • 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 !)

Evie the Mother Hen ☽ ❤

  • Head Administrator
  • *****
  • Offline Offline
  • Gender: Female
  • I love My Melody. I want to be a mum. 🦋 ✿
    • 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 »

✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿
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