Main Menu
Main Page
Forums
New pages
Recent changes
Random page
Help

Glitches
Arbitrary code execution
Pokémon cloning
Pomeg glitch
Tweaking
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)
Pokémon Speedruns wiki
PRAMA Initiative
Become an affiliate!

Technical
Site source code

Search Wiki

 

Search Forums

 

Author Topic: Dry Underflow  (Read 5060 times)

0 Members and 1 Guest are viewing this topic.

luckytyphlosion

  • Distinguished Member
  • *
  • Offline Offline
  • Gender: Male
  • JACK-flys are OP
    • View Profile
Dry Underflow
« on: January 27, 2015, 04:38:18 pm »
Dry Underflow
This is basically a method of item underflow, except you don't need the guard to take the fresh water from your inventory. (hence the name "dry underflow", since there isn't a freshwater involved. Credits for Stumpdotio for coming up with this name)

EDIT: At this point, I realize that you can underflow items using the above method.

New Method:

Requirements:
  • 2 tossable items without 255 quantity
  • 1 tossable item with 255 quantity
  • NO KEY ITEMS IN INVENTORY
Procedure
  • Order items so that your 2 tossable items are in slots 1 and 2 and 255 item is in slot 3
  • Toss everything below the 255 item
  • Toss the top two items so you have 3 255 items
Item Setup
Item Count: 1
Item3 x255
Item3 x255
Item3 x255
Cancel x0 (quantity of Cancel doesn't matter)

After acquiring the above setup, which should look like what is shown above, toss 253 of the first 255 stack.

Toss 253
Item Count: 1
Item3 x2
Item3 x255
Item3 x255
Cancel x0

Then, swap the x2 Stack with the x255 Stack.

Swap
Item Count: 0
Item3 x1
Item3 x255
Cancel x0

Swap again to achieve Item Underflow.

Swap again
Item Count: 255
Item3 x0
Cancel x0

Old Method:

Requirements:
  • 2 tossable items without 255 quantity
  • 1 tossable item with 255 quantity
  • NO KEY ITEMS IN INVENTORY

Method:
  • Order items so that your 2 tossable items are in slots 1 and 2 and 255 item is in slot 3
  • Toss everything below the 255 item
  • Toss the top two items so you have 3 255 items
  • Swap items 1 and 2 and slot 2 will become 99 (x5, 99, 255)
  • Toss all but one of item 1 (1, 99, 255)
  • Swap item 2 and 1 (99, 1, 255) (YOU MUST SWAP 2 with 1 NOT 1 with 2, THIS IS THE ONLY PART YOU MIGHT SCREW UP)
  • Toss all but one of item 1 again (1, 1, 255)
  • Swap item 1 and 2 (2, 255)
  • Swap item 1 and 2 again

Explanation of the Old Method
While this isn't related to the New Method, this does explains the mechanics of the glitch that are used in the new method.

When you deposit the three items into the PC (the two useless items and the 255 item stack), and you toss the two items, the item count decrements (read: is subtracted by one). However, the 255 stack shifts up instead of the Cancel Button, so by tossing the two items, you get this layout in your box items.

(note: the item names are simply labels, and do not represent the position of items in the box)

Before Tossing
Box Items Quantity: 3
Item1 x1 (quantity doesn't matter)
Item2 x1 (same case as above)
Item3 x255
Cancel x0 (quantity doesn't matter)

After Tossing Item1 and Item2 in your box items
Box Items Quantity: 1
Item3 x255
Item3 x255
Item3 x255
Cancel x0

This means that you can swap whatever is in the Cancel Slot with the item above. Right now, it doesn't seem useful.
With the current setup, you can't simply toss the remaining 255 stacks, since the Cancel Button Item doesn't actually back you out of the menu. Instead, the Number of Items + 1 determines the location of the real Cancel Button.

Right now, our goal is to decrement the amount of items in the box when the number of items in the box is 0, so that it will underflow to 255. You can't simply toss items, as stated above. To do this, we need to create a setup to decrement the item counter when our item count is 0.

If you swap the two stacks of 255 you can currently access, then you end up with:

Item3 x156
Item3 x99
Item3 x255

Then, we toss 155 of the first item so we have one remaining.

Item3 x1
Item3 x99
Item3 x255

Now, the next part here is very weird. If you swap Item3 x1 with Item3 x99, nothing happens. However, if you swap Item3 x99 with Item3 x1, then Item3 x99 is swapped with Item3 x1.

Item3 x99
Item3 x1
Item3 x255

We can now toss x98 of the first stack, so that only one remains. Then, we can swap both x1 Stacks with each other, decrementing the item count so we have 0 items.

Item Count: 0
Item3 x2
Item3 x255

Normally, you wouldn't be able to scroll down since you have 0 items. For some reason though, if you decrement the item counter BY swapping an item, the cursor boundaries will not change. This allows us to swap Item3 x2 with Item3 x255, decrementing the item counter once again, and allowing you to access other bytes in memory.

Item Count: 255
Item3 x1 (since 255 + 2 = 1, because of overflow)
« Last Edit: January 29, 2015, 06:54:18 pm by luckytyphlosion »

luckytyphlosion

  • Distinguished Member
  • *
  • Offline Offline
  • Gender: Male
  • JACK-flys are OP
    • View Profile
Re: Dry Underflow
« Reply #1 on: January 29, 2015, 06:55:48 pm »
Bumping since I added more information to the first post.

Dabomstew

  • GCLF Member
  • Offline Offline
  • CHARIZRAD 'M ROXORX or is it.
    • View Profile
Re: Dry Underflow
« Reply #2 on: January 30, 2015, 09:23:27 am »
Worth noting that if the 255 quantity item is the last item in your inventory you can achieve dry underflow by just tossing all your non-255 items until you have none left (i.e. your top item is a 255 stack); once this happens your "item count" will be 1 and you can proceed to do the "new method" using the top three stacks. This isn't too relevant to anything other than speedruns, but does make the process a fair bit quicker. Still requires no key items in inventory.
« Last Edit: January 30, 2015, 09:32:09 am by Dabomstew »

Quirky Flower Chicken ❤✿

  • Administrator
  • *****
  • Offline Offline
  • Gender: Female
  • (Image thanks Sanrio + Pexels)
    • View Profile
Re: Dry Underflow
« Reply #3 on: January 30, 2015, 11:05:11 am »
Wow. Excellent.

So thanks to this and good luck, somebody has done Pokémon Blue NSC in 15 minutes.

I wasn't even aware of the join item stacks together to make one stack thing. Though I imagine that is related to why the Gen II duplicate key items glitch works.

You can do the item joining thing in Gen II as well, but if you can just get a stack of 255 items in the correct pocket you can toss the item above it even when the number of items is 0, allowing underflow. I don't know if you can replicate dry underflow in Gen II with you and Dabomstew's methods and get the requirements as I haven't tried that.

Food for thought is that some glitch worlds in Crystal (I don't know about Gold) accessible by stepping out of bounds can corrupt your items, and I did item underflow with one of them (south of Fast Ship from Olivine City).

I thought it was strange how I couldn't swap an item stack with another of the same identifier when playing around with an expanded items pack in the past.

Now that you no longer need a Fossil or drink (and you don't have to rely on the Saffron guard being thirsty) this is much more accessible for non-speedrunning in RB since it's no longer inaccessible after a certain point in game. (or is it?) You could just use the old man glitch for Missingno. and for getting your 255 stack.

In Yellow if you used up all your long-range Trainers, have no glitch items and have no Super Glitch Pokémon, cannot do the Pokémon box byte shift glitch because of having no Q and/or a box 1 that was filled before, cannot do CoolTrainer due to the difficulty (needing glitch Pokémon or box shift glitch to work to learn it) of getting it as the first move, that may create a problem though. The Cable Club escape glitch would save you by letting you encounter fossil/ghost Missingno. I think, but that requires a link cable.

So I wonder if there is a way to get a stack of 255 items in Yellow from no Trainer flies?

Additionally, SheNanagans said you can achieve box underflow with this, so I'm going to have fun with that.

Edit: You don't need to toss all of your items below the stack of 255. The only difference is that I just tossed the 255 stack on the top until my number of items became 1 before moving on to the toss 253 bit of the new method.
« Last Edit: January 30, 2015, 01:03:45 pm by Torchickens »

(Image © Sanrio, Nintendo, HAL Laboratory)

✿ Hi! I'm Evie. I'm a transgender woman, but any pronouns are fine. She/her preferred. ✿ 🦋

Forgiveness is timeless, and moments we look back on humble the soul. Jesus said it best. You must be blind to see and must see to be blind metaphorically is said. I don't think there is one Messiah nor a definitive truth, because we find truths in relative moments. However, there may be unknowable truths and sometimes it feels we have got to embrace the mystery and what we don't know.

Thank you for this lovely artwork Nyapon! :3

Dabomstew

  • GCLF Member
  • Offline Offline
  • CHARIZRAD 'M ROXORX or is it.
    • View Profile
Re: Dry Underflow
« Reply #4 on: January 31, 2015, 02:15:36 am »
Yeah, it's not too difficult to "keep" the items you want and still do dry underflow provided you have two useless items to toss away to establish your three 255 stacks. Unfortunately (again from a speedrunning perspective) you lose 2 of your item slots and can only hold 18 items in your "real" inventory after doing this, but overall this is still a very useful trick.

That tidbit about being able to establish item underflow on pretty much any possible R/B save with the combination of this and Cinnabar Coast is a cool fact. Yellow is a bit tricky, but you can still death-fly with a bit of patience if you have any trainers that see you at all available in places where you can get encounters (mt.moon, rock tunnel, victory road, pokemon tower have a lot, other places are a bit meh). Past that I have no idea how you'd do it though.
« Last Edit: January 31, 2015, 02:16:08 am by Dabomstew »