Glitch City Laboratories Forums

Lab γ: Video Games and Glitches Discussion => Generation I Glitch Discussion => Pokémon Glitch Discussion => Arbitrary Code Execution Discussion => Topic started by: naf102 on February 18, 2016, 07:35:54 pm

Title: 8F crashes game
Post by: naf102 on February 18, 2016, 07:35:54 pm
I obtained 8F through the Item Counter Underflow Glitch and my party meets the requirements for it to run code. But every time I attempt to run code through 8F the game crashes. I have no idea why though. Any idea?
Title: Re: 8F crashes game
Post by: Krys3000 on February 19, 2016, 08:13:57 am
Hi,

Could you tell us more about:
- The game you are playing (R/B or Yellow) and its localization (US/UK, JP, EUR)
- The content of your party (R/B) / active box (Yellow)
- The code you try to execute (= the items you currently have in your bag while using 8F)

We will then be able to help you more  ;)
Title: Re: 8F crashes game
Post by: naf102 on February 20, 2016, 01:59:58 pm
I am playing on a US / UK Pokémon Blue. I currently have a Onix, Pidgey, Tentacool, Meowth, Hitmonlee and Snorlax in that exact order. The code I was trying to run required  64 Ultra Balls, 201 Lemonades, 75 TM55s and Repel x(Pokémon index number) That's what I have in my bag including 8F and 255 Master Balls.
Title: Re: 8F crashes game
Post by: Krys3000 on February 20, 2016, 02:54:49 pm
If I understand well, the order of your items is:
- Master Ball x255
- 8F
- Hyper Ball x64
- Lemonade x201
- TM55 x75
- Repel x(hex)

Because if so it doesn't seem to do something and also lacks a ret instruction to end it. Could you tell us what you want to do, precisely? Also, where did you find this party setup? I couldn't figure out how it jumps to items.
Title: Re: 8F crashes game
Post by: naf102 on February 20, 2016, 03:12:01 pm
I made a mistake sorry. The order of my items are Master Ball x255, 8F, Repel ( hex ), X Speed x14, Ultra Ball x64, TM05 x72 and Lemonade x201. I didn't have my game on hand to look at my items. And I followed the steps in this link http://forums.glitchcity.info/index.php?topic=6638.0
Title: Re: 8F crashes game
Post by: Krys3000 on February 20, 2016, 03:33:00 pm
Alright, yes indeed this setup works if you make sure you follow all the PP and move requirements. But there are other setup, way more easy to do, like this one:

    5 Pokémon
    Pidgey as the first Pokémon
    Parasect as the second Pokémon
    Onix as the third Pokémon
    Tentacool as the fourth Pokémon
    Kangaskhan as the fifth Pokémon
    Pidgey must have 233 HP

(taken from the wiki page (http://glitchcity.info/wiki/index.php/Arbitrary_code_execution#Using_8F_.28English_Red.2FBlue.29))

So, the code now. Are you sure about the number of the TM? What are you trying to do with this code?

Title: Re: 8F crashes game
Post by: naf102 on February 21, 2016, 11:15:32 am
Okay, so I changed my party to the  party you suggested but the  game still crashes once I select use. I'm trying to run the "Catch Em' All" script as a proof of concept so that I can run my own code. And yes, I am sure it is TM05
Title: Re: 8F crashes game
Post by: Krys3000 on February 21, 2016, 11:29:12 am
I never tried that catch'em all script written in TheZZAZZGlitch's introductive post of the 8F thread, but I'm assuming it works and if you do things correctly (party & items) then it shouldn't crash.

Have you ever tried another code? Like the 'change the second item' code just below? So that we see if you can indeed run code?
Title: Re: 8F crashes game
Post by: naf102 on February 21, 2016, 01:45:53 pm
Yes I have tried and the same result happens, the game freezes.
Title: Re: 8F crashes game
Post by: Krys3000 on February 21, 2016, 02:11:32 pm
Can you provide screens of your party and items menu? This is really weird.
Title: Re: 8F crashes game
Post by: naf102 on February 21, 2016, 03:00:35 pm
Okay here there are
Title: Re: 8F crashes game
Post by: Krys3000 on February 21, 2016, 03:37:54 pm
One tricky thing about this setup is that you have to remember to use a PP Up so $D1B6 = 55.  But I don't think your problem is in the setup because you would have solved that problem with the other setup.

I really don't get what your problem is. Which emulator do you use? If you have access to a memory viewer, can you check that every suitable value is set? When you activate the 8F item, the following addresses should be as below:

D163 = 06
D164 = 22
D165 = 24
D165 = 18
D166 = 4D
D1B5 = 18
D1B6 = 55
D20C = 24
D20D = 18
D20E = 14
D223 = 68
D224 = 18
D225 = 46
D26C = E9

If it's not the case, that's probably because something altered your save file. If you don't know how to check that, you can send me your save file.
Title: Re: 8F crashes game
Post by: TheZZAZZGlitch on February 21, 2016, 05:14:40 pm
The problem is in these 5 requirements:

6.  24 PP left on the second Pokémon's second move                    [0xD1B5 = 0x18]
7.  21 PP left on the second Pokémon's third move w/ 1 PP Up used     [0xD1B6 = 0x55]
8.  36 PP left on the fourth Pokémon's first move                     [0xD20C = 0x24]
9.  24 PP left on the fourth Pokémon's second move                    [0xD20D = 0x18]
10. 20 PP left on the fourth Pokémon's third move                     [0xD20E = 0x14]


It turns out that these requirements are a bit unclear, and I wasn't aware of that until just now. What I really meant is:

6.  24 PP left on the second Pokémon's second move w/ 0 PP Ups used   [0xD1B5 = 0x18]
7.  21 PP left on the second Pokémon's third move w/ 1 PP Up used     [0xD1B6 = 0x55]
8.  36 PP left on the fourth Pokémon's first move w/ 0 PP Ups used    [0xD20C = 0x24]
9.  24 PP left on the fourth Pokémon's second move w/ 0 PP Ups used   [0xD20D = 0x18]
10. 20 PP left on the fourth Pokémon's third move w/ 0 PP Ups used    [0xD20E = 0x14]


PP Ups should not be used on moves other than the second Pokémon's third move.
Title: Re: 8F crashes game
Post by: naf102 on February 21, 2016, 06:33:43 pm
Fixed it thank you two very much  ;)
Title: Re: 8F crashes game
Post by: Krys3000 on February 22, 2016, 01:09:06 pm
Nice! But I really recommend you to use another setup  :P