Main Menu
Main Page
Forums
Recent changes
Random page
Help

Databases
GlitchDex
AttackDex
ItemDex
TrainerDex
TypeDex
UnownDex
More

Major Glitches
Trainer escape glitch
Old man trick
Celebi Egg 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 glitches
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
Glitch Pokémon cries
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!

Technical
Site Source Code

Search Wiki

 

Search Forums

 

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

Princess Torchic ❤

  • Administrator
  • *****
  • Online Online
  • Gender: Female
  • The Chicken Girl
    • 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 »
Hi! I identify as female.  She/her pronouns, please.

Online I most often use the username Torchickens or Chickasaurus.

Ah.. koucha ga oishii ♪





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

Contact:
If you like, please contact me by private message here on the forums as I no longer check other places very often.

YouTube: http://www.youtube.com/user/ChickasaurusGL

I like to collect interesting video games. ^_^
https://www.vgcollect.com/Torchickens

Give love, receive love, repeat. But in order to love others you must first love yourself unconditionally, even if it means abandoning pressure from projects or taking time off work and empathise with the self as you are your own best friend. The key often is simply to follow your heart, your urges and have faith they are valid; use them to do what you want to do as long as it doesn't harm anyone, and/or sympathise and respect it as we all have bad days (even the prettiest rose has thorns but is still beautiful).

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 !)

Princess Torchic ❤

  • Administrator
  • *****
  • Online Online
  • Gender: Female
  • The Chicken Girl
    • 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 »
Hi! I identify as female.  She/her pronouns, please.

Online I most often use the username Torchickens or Chickasaurus.

Ah.. koucha ga oishii ♪





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

Contact:
If you like, please contact me by private message here on the forums as I no longer check other places very often.

YouTube: http://www.youtube.com/user/ChickasaurusGL

I like to collect interesting video games. ^_^
https://www.vgcollect.com/Torchickens

Give love, receive love, repeat. But in order to love others you must first love yourself unconditionally, even if it means abandoning pressure from projects or taking time off work and empathise with the self as you are your own best friend. The key often is simply to follow your heart, your urges and have faith they are valid; use them to do what you want to do as long as it doesn't harm anyone, and/or sympathise and respect it as we all have bad days (even the prettiest rose has thorns but is still beautiful).