Main Menu
Main Page
Forums
Recent changes
Random page
Help

Databases
GlitchDex
AttackDex
ItemDex
StatDex
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 data 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: Re: Arbitrary code execution in Red/Blue using the "8F" item  (Read 1868 times)

0 Members and 1 Guest are viewing this topic.

WendyBettyJanice

  • GCLF Member
  • Offline Offline
  • CHARIZRAD 'M ROXORX or is it.
    • View Profile
Re: Arbitrary code execution in Red/Blue using the "8F" item
« Reply #15 on: February 05, 2018, 03:35:31 pm »
Hey, first post!
Using the Wack0's simple Gameshark script to do a couple things, and i'm curious as to what you are supposed to do when the code requires you to enter a 00

for example I have a code that modifies the typing of the current box slot one pokemon. it should look like this

any item
8f
Lemonade * number corresponding to type
X-accuracy * 155 for primary type and 156 for secondary type
Carbos * 218
Pokeball * 119
Fresh Water * 201

This code works perfectly, and i have used it to replace Aerodactyl's flying typing with ghost as a proof of concept. the only problem is that when i want to make something a normal type i would have to have 0 lemonades because 00 is the hex that corresponds with normal. I have tried it just without any lemonades and it freezes the game, as expected. Is it possible to make the game read as having 0 lemonades by somehow rolling it over to 256, or anything like that? Thanks!


I know this is old, but i've taken info from this site a lot but never had need to register, this however is driving me crazy, I can't find a list anywhere, showing with Dec number relates to which typing. all I know is from this, 00 is normal, and from the TypeDex on this site, that 14 is fire.

Can anyone throw me a lifeline or point me to where i can find a list of them?

Thanks in advance all.

WendyBettyJanice

  • GCLF Member
  • Offline Offline
  • CHARIZRAD 'M ROXORX or is it.
    • View Profile
Re: Arbitrary code execution in Red/Blue using the "8F" item
« Reply #16 on: February 05, 2018, 03:52:29 pm »
Here is the hex ID of every type.

00 : Normal
01 : Fighting
02 : Flying
03 : Poison
04 : Ground
05 : Rock
07 : Bug
08 : Ghost
14 : Fire
15 : Water
16 : Grass
17 : Electric
18 : Psychic
19 : Ice
1A : Dragon

As you can guess, you must convert it into decimal for use as the quantity of an item in a 8F code, and you can use the full list to help you. Also, since you're not playing an english game, you should also convert your code for it to work in the german game. It's better to explain rather than give the answer, so here's what you have to do.

- Go there: http://datacrystal.romhacking.net/wiki/Pokemon_Red:RAM_map and note the address you want to change. Let's say that if would be D170 and D171, the types of your current first Pokémon. Note that an address can be represented as a XXYY couple.
- Because you play a european non-english game, add 5 to those. You get D175 and D176.
- Determine the value you want for these. Let's say you want your Pokémon to be Flying type, so the value is 02.
- Use the following items in an 8F code
Anything
8F
Lemonade *(decimal convertion of the value, in this case of the type's hex - flying would be 2, but fire, would then be 20)
X-accuracy *(decimal convertion of YY, in this case 117 for the first type and 118 for the second)
Carbos *(decimal convertion of XX, in this case 209)
Pokeball * 119
Fresh Water * 201

That should do the job. Now if you want the exact equivalent of the code you quote, which modifies the first Pokémon in your PC, then you could apply this to find it!  ;)

Ignore my last post, this guy is my god. I hadn't looked hard enough. <3

WendyBettyJanice

  • GCLF Member
  • Offline Offline
  • CHARIZRAD 'M ROXORX or is it.
    • View Profile
Re: Arbitrary code execution in Red/Blue using the "8F" item
« Reply #17 on: February 05, 2018, 05:29:16 pm »
Type 1 - DA9B|DA= 218 |9B = 155
Type 2 - DA9C |DA= 218 |9C = 156

Type 1 - Psychic

lemonade*24 Psychic
X-accuracy*155
Carbos*218
Pokeball*119
Fresh Water*201

Type 2 - Flying

lemonade*2
x-accuracy*156
Carbos*218
Pokeball*119
Fresh Water*201