Introduction

After the first published 151 run on Pokémon Blue (here), there were multiple new glitches found, like the Item Underflow glitch or the use of the Cooltrainer to catch Pokémon, which allow for a significantly faster full completion of the game. This submission tries to use these new techniques to provide a more up-to-date version. I didn't really intend to do a TAS on this initially, I mainly started looking into this for two reasons: firstly to see if the "Gotta Catch 'Em All!" category is even a sound category still, and secondly out of curiosity, how much the total time can be improved using these new glitches. It turned out that the answers to both questions were very promising, and I realized I was half-way into creating a TAS anyway at that point, so I went ahead and finished it.

Categories

  • Aims for fastest completion of the game and relevant side-quests
  • Heavy glitch abuse
  • Heavy luck manipulation
  • Forgoes save corruption
  • Corrupts memory
  • Contains speed/entertainment tradeoffs
Used emulator: BizHawk 1.5.3 (syncs on 1.1.0 - 1.6.1)

About the run

Goal choice

The goal of the run is to catch all 151 Pokémon in the game. This can be done by all means, only excluding arbitrary code execution and any direct manipulation of the Pokédex flags, which would make this category pretty much pointless. The run is considered complete when Oak evaluates your completed Pokédex in the Hall of Fame.

Emulator Choice

The movie requires BizHawk version 1.6.1 or earlier. In version 1.7.0 and after, the frame timing has changed, which lets the movie desync. I'm using a (slightly) outdated version, because the pre-1.7 frame timing represents the input capabilities you have on a real Gameboy way better than the new timing, at least for Pokémon games: The old frame timing always stops at the VBlank interrupt, where the screen is redrawn and Pokémon games fetch the controller input, which allows you to do any input possible on a real Gameboy. With the new frame timing, VBlank is ignored and frames are forced to be a fixed length, which lets the BizHawk frames cut in the middle of a Gameboy frame. This can split up the input fetching and input processing awkwardly into two different frames, which makes it harder to correlate the inputs to the actions (you may or may not need to press the button one frame before the actual action, depending on where BizHawk decides to end the frame) and can lead to certain inputs not being possible at all with the new timing. On the downside, the old timing produces a slightly less accurate total time, since not all frames are of equal length, but are counted as if they were to determine movie length. The difference is negligible, though, since shorter frames occur only in very rare occasions, e.g. when the LCD is turned off by the game, which it commonly only is at the start of the game, and makes the old timing a few frames slower than the new one.

Version Choice

The Red and Blue version are surprisingly close in terms of speed, none of the versions is clearly faster than the other in this category, despite significant route differences due to the version-exclusives of each version. This run uses the Red version, mainly because the routing turned out to be easier, Blue's version-exclusives are slightly easier to catch in Red than vice versa.

General strategy

Since the goal is to catch all Pokémon in the least amount of time, we want to utilize the fastest way for obtaining each Pokémon. Catching wild Pokémon is obviously one of the fastest ways, it takes about the same time as evolving a Pokémon. That means, it's often faster to just catch the evolved forms instead of evolving them if you're already in the area, especially if you would need to withdraw it from a box first or it takes more than one Rare Candy to do. As for glitches, the setup times vary significantly depending on the glitch used, which makes some of them more desirable to use than others. A Trainer-Fly encounter is the most flexible way, especially when combining with Ditto's Transform ability, but is by far the slowest due to its elaborate setup. The Cooltrainer glitch and the newly introduced text pointer manipulation are more limited, but also way faster to execute. In-game trades are only useful if they're on your path anyway or serve an additional purpose, they take pretty long on their own, which makes glitching it faster in most cases.
While it may seem as if you can get any Pokémon at any time using the presented glitches, this is not the case, some of them are significantly harder to catch than others. This is mostly related to their ID, where higher IDs are harder to get then lower IDs. I'll illustrate this using Bellsprout as an example. Bellsprout has ID 188, and there are not many options to get this high: Using Trainer-Fly requires a Ditto transform, since no encounter in the game can get this high (except for Mewtwo, which is already too high). This is not only slow to do, but also gives you only a level 7 Bellsprout, which will take many Rare Candies to evolve and costs even more time. Valid tile IDs only go up to 96 as well, so Cooltrainer on a (non-glitched) map is also impossible. Using the Old Man glitch is another possibility, but there are only 3 possible encounter slots, and there are many other Pokémon with a high ID which need that spot (also, there is no letter in the available alphabet to give you exactly this number). An even more exotic possibility is to use the Old man encounters (which usually have abnormally high levels) to get the right stats for a Trainer-Fly without Ditto. This is possible and quite fast, but again it can only be used for one Pokémon, and there are multiple hard-to-catch ones (Machamp gets this spot in this run). The method which is ultimately used in this run is using Cooltrainer on a glitched map, which happens to allow you to catch Bellsprout. It is somewhat out of the way as well, but still faster than Trainer-Flying for it.
As for the order in which to catch the Pokémon, it doesn't really matter, the main goal is to minimize the travel time between the individual encounters. Only at the start of the game, before enabling instant text boxes, most actions, including catching and evolving Pokémon, is slower to do, so catching them later is preferable, unless they are exclusive to the area and you would need to go back to it, like Jigglypuff or Clefairy.

Route Explanation

This section explains the route used in this run, pointing out non-obvious optimizations and notable glitch uses. You can find more detailed explanations of specific mechanics and glitches in the Glossary below.

Intro

  • The low byte of the Trainer ID is manipulated to be 0x06, which will later be used to grab a bike (The bicycle has the item ID 0x06)
  • The character is named "BCVXZQr", which will be important for the Old man glitch later on. The "B", "X" and "Q" are not important and chosen simply because they are fast to enter between the relevant characters.
  • The rival's name is chosen to be "BLUE", which serves three purposes:
    • It is faster to select a suggested name than to enter a new one, we'll not encounter the rival often enough for a shorter name to outweigh the time spent on naming him.
    • The letter "U" corresponds to an item that belongs to a family of items commonly called JACK. We'll be able to grab this later on.
    • The game reserves 11 bytes for the rival's name, but you can only use 7 characters for his name. The rest of the characters will be 0x00, which will cause lag when scrolling through it in the item menu. Using a suggested name, all 11 characters will be filled by the game, which reduces lag (see Item scroll lag).

Pallet town

  • The options are changed to fast text speed, no battle animations and a set battle style, which speeds up all upcoming battles. Changing the options in-game is faster than doing it in the main menu.
  • Charmander is chosen as the starter, since it is easily the fastest in the upcoming fights. Charmander will be the main fighter throughout the run, so we manipulate it to have high DVs to speed up the fights. We need 14 ATK and SPC and 15 SPD to kill everything as fast as possible. This runs's Charmander has 15 ATK, SPD and SPC and additionally 13 DEF, which is way more than we need.
  • The rival's Squirtle has 20 HP, a max crit does 6 HP and a max non-crit does 4 HP, so 2 crits and 2 non-crits suffice to kill it (see Damage variation).
  • Jumping over ledges costs time, so it is avoided whenever possible (also see Walking).
  • When delivering Oak's package, it's faster to stand next to or above Oak instead of in front of him. This will cause the rival to walk less steps, and NPCs walk at only half of your speed.

Viridian Forest

  • The Bug Catcher's Weedle is always faster than you, and takes four crits to kill.
  • Talking to trainers directly instead of letting them catch you is faster and is done throughout the run.
  • It is possible to trigger a Trainer-Fly off the trainer by fainting from a wild encounter, catch a L1 Nidoking and use the Experience Underflow glitch to get it to L100, but doing this takes a considerable amount of time and ends up being slower than just going with Charmander.

Pewter city

  • We buy 8 Pokéballs and 2 Escape Ropes in the mart. 7 Pokéballs would suffice for the run, but buying an extra one decreases our money to a specific amount needed later on.
  • When the the guy stopping you from leaving Pewter takes you to the gym, you have a free input frame. This can be abused to save&reset and therefore skip the rest of the cutscene and leave without fighting Brock.

Mt. Moon

  • Even though buying the Magikarp would be fast, it is only level 5, and using the additional Rare Candies is just slower than catching one at level 15 later.
  • Grabbing the Rare Candy here is faster than grabbing the one in Cerulean City by about 2 seconds.
  • Mega punch is collected and thought to Charmander. Using Mega punch makes the upcoming fights way faster and is well worth the detour.
  • There is an alternative route skipping the Mt. Moon trainers by using Trainer-Fly to disable them. This speeds up Mt. Moon, but costs time in later battles due to missing experience on Charmander. It turned out that doing Mt. Moon normally is a few seconds faster than skipping the trainers.
  • Both Moon Stones are collected. Since you can't buy Moon Stones, we'll collect 3 Moon Stones we need throughout the run manually.
  • We choose to take the Helix Fossil, since it's faster to grab. We'll get the Dome Fossil later using the Item Underflow glitch.

Cerulean City

  • We evolve Clefairy and deposit Clefable and Jigglypuff to make room in our party for the Rhydon glitch coming up.
  • The Pokécenter is used to set the warp location.
  • After the Nugget Bridge is cleared, we catch an Abra in Route 24 and set up a Trainer-Fly on the trainer next to us.
  • A Caterpie is caught in Route 25. This is the hardest single encounter in this run, since it is the rarest encounter in this Route and we need specific Special DVs for catching Mew later.
  • After receiving the SS.Ticket from Bill and thus moving the guard in Cerulean City to let us through, an Escape Rope is used to return to Cerulean City. Bills house is one of the few houses in R/B you can dig out of.
  • In Cerulean City, a trade is initiated and then cancelled to set the Trainer-Fly encounter. The nickname of the Pokémon received in a trade is stored in the same memory segment that is read when triggering an encounter, which changes the species to 0x50 in this case, which is one of the Missingno. IDs.
  • The start menu is opened and closed to set the stored text ID of the Trainer-Fly to 0 (which is the start menu). Without this, a trainer's text will be triggered upon entering Route 24, which would overwrite the set up encounter.
  • Missingno. is used to duplicate both the Pokéballs and the Rare Candy. The caught Missingno. triggers the Rhydon glitch.
  • Note that the guard in Cerulean City vanishes as part of the Snorlax Skip glitch. This can't be abused to skip Bill, though, since the guard that blocks the entrance is a completely different object from the guard that is moved one tile over.
  • In the upcoming fights, the sprites will be drawn flipped, as a side-effect of the Missingno. encounter. When updating the graphics, the game gets confused, so that the blocks that make up the sprite are arranged correctly, but the block contents are still flipped, which creates the distortion effect.

Vermilion City

  • The Jingle Skip in the underground path is impossible with a character name with more than 5 characters, at least on GB (in SGB, it's possible due to lag differences when loading maps).
  • The Full Restore itself is not needed in any way, it is used as a buffer item purely for item management reasons.
  • Two Rare Candies are used on Charmeleon, to bring down the amount to 127, preparing to raise it to 255 with a second upcoming Missingno. encounter. Charmeleon does not actually need them for the upcoming fight, but since it will be evolved to Charizard later anyway, it costs no time.
  • The second Trainer-Fly is set up in Route 6, both to skip the two mandatory trainers and to use it for an arbitrary encounter later on.
  • Route 12 is entered to load Snorlax's missable object and therefore perform the Snorlax Skip glitch.
  • Spearow is traded for Farfetch'd, not only to obtain it, but also to set the Trainer-Fly encounter just like in Cerulean. Again, the start menu is flashed to set the stored text ID.
  • After successfully setting the amount of Rare Candies to 255 using the Missingno. encounter, the teleport location is set to Vermilion by visiting the Pokécenter. It will stay the teleport location for a good part of the run.
  • Another Trainer-Fly is set up in Route 12, for the same two reasons as in Route 6: It skips a mandatory fight and will also be used for an encounter later on.
  • The Nugget is tossed to duplicate the Rare Candy stack, since we don't want to lose the amount of 255 when using them. Charmeleon is brought to L32, to be able to speed up the upcoming Clefairy fights. At L33, it will learn a new move, and considering that we will increase the text speed later, it would cost time to raise it any further.
  • Note that the Full Restore collected in the underground path effectively gets deleted by this, since the number of items you have was still decreased, so any new item will overwrite the Full Restore.

Celadon City

  • In Celadon, we generate money by selling Rare Candies (we keep one to avoid deleting TM28 at the end of our item list) and buy the evolutionary stones needed for this run. We buy 5 extra stones in total and a Soda Pop instead of Fresh Water to manipulate the amount of money.
  • Everything is set up for the Item Underflow glitch now, which is performed on the Saffron guard.
  • Now that we have access to memory segments we are not supposed to, we can do all kinds of neat things that will help speed up the remainder of the run.
    • The text speed is set to 0, which disables any character delay and therefore makes any text instant. To do this, the save menu is opened beforehand; otherwise the corresponding item would be a key item and therefore too important to toss.
    • The S.S.Ticket is used to manipulate the badges, since its item ID happens to correspond to the first 6 badges and will allow us to use any HM.
    • The glitch item 0x94 is taken from the rival's name, which is one of the JACK items.
    • The money, manipulated to represent Full Heals, is taken. They're needed later to cure the status effects inflicted by the Cooltrainer glitch.
    • The Bicycle is grabbed from the Trainer ID, which was manipulated to contain this item.
    • Finally, the saved map ID is manipulated to warp us to Victory Road. Also, the map is slightly distorted to bring the exit closer to our position (see Wrong warp and Map distortion).

Victory Road

  • After every fight the currently selected menu items are reset, which makes it faster to do a fight first rather than getting on the bike immediately, which would require to scroll all the way back in the item menu.
  • Due to the way the encounter mechanics work, wait times are sometimes unavoidable in order to get the encounter you want. The spinning before the Golbat encounter does not to anything other than wasting some time until the encounter is available. These forced waiting times will occur multiple times throughout the run, and minimizing them by choosing the order of encounters carefully is an important optimization.
  • All Pokémon in the party are evolved before we use the last Escape Rope to leave. Whenever possible, the evolutions are done when the menu needs to be opened anyway to save some time.

Vermilion City

  • Using JACK, a Trainer-Fly is set up in Route 6.
  • In the Pokécenter, Charizard, Beedrill and Rhydon are deposited, and the box is switched, saving and resetting the game in order to regain the ability to open the start menu.
  • In the mart, a wrong warp to Route 23 is performed.

Route 23

  • Riding the bike is in theory faster for the amount of steps walked, but scrolling to it in the item menu would cost more time than it saves to use it.
  • A second Ditto encounter is used to transform into Butterfree, which was manipulated to have the right Special stat to encounter Mew with a Trainer-Fly. Note that it is not possible to use the same Ditto that was caught before, since catching it will revert the stat changes done by the transformation.

Vermilion City

  • Mew and Ditto will be the two permanent party members throughout this run: Mew is the only Pokémon that can learn both Dig and Fly, while Ditto is used for the Transform glitch and the resulting Cooltrainer glitch.
  • Another wrong warp takes us to Cinnabar Island.

Cinnabar Island

  • The Transform glitch is set up on Ponyta.
  • The third Moon Stone is collected, which is the last one needed in this run.
  • By manipulating the text pointer of the map, the Escape Rope is turned into a trainer (from Rock Tunnel to be more exact). Escape Ropes happen to correspond to Pinsir. The original text pointer is saved for use much later in the run (see Text pointer manipulation).

Vermilion City

  • As setup for a Cooltrainer encounter, we wrong warp to a glitch map and immediately return, saving the screen tiles of the glitch map for the Cooltrainer glitch, which happens to give us Porygon.
  • since this is a "bad" Cooltrainer, we walk into Diglett's Cave for the Cooltrainer encounter to avoid soft-locking the game.
  • The main menu is flashed to prevent the game from soft-locking when leaving the cave, as part of the "bad" Cooltrainer.
  • The Silph Scope it taken, Mew is thought Fly and Surf, and the Old Amber, representing the background music ROM bank, is taken. Some trickery is required to make it usable, though, since it initially has a quantity of 0, which makes it unusable in the Cinnabar Lab. By putting it over the saved map ID, which gets overwritten each tick on this map, the amount is set to 22.
  • Another glitch map warp is set up for another "bad" Cooltrainer, catching Vaporeon. To get to the right spot on the map, JACK is used. Also, the tileset is manipulated to allow using Dig to escape.
  • The Vaporeon Cooltrainer put Ditto asleep, which prevents it from triggering further Cooltrainers, so it needs to be healed using a Full Heal.
  • Two "good" Cooltrainers allow catching Hitmonchan and Vulpix easily.
  • Another wrong warp brings us into Silph.Co. in order to grab Lapras.
  • By using the teleporter right before Dig, the initial Dig animation is replaced by the much faster teleporter animation. This requires extra steps, though, for a net total of a whopping 3 saved frames.
  • Back in Vermilion, another wrong warp into the Pokémon Tower is performed, catching Gastly, Haunter and Cubone and taking the Super Rod before digging back out.
  • The last Trainer-Fly is set up in Route 6, again using JACK.
  • All fully evolved Pokémon are deposited, Pokémon which still need to be evolved are taken out and the active box is changed, saving and resetting the game.
  • Vulpix is poisoned as part of the Cooltrainer glitch, which costs 4 frames for every poison tick, but curing it would cost more time than just keeping it poisoned. All Cooltrainer Pokémon have absurdly high health, so there is no danger of them dying.
  • Another wrong warp, to Cerulean Cave.

Cerulean Cave

  • After catching Raichu, there is a notable delay before one of the text boxes is closed, which is done to manipulate the D-Sum.
  • JACK is used for a shortcut to get through the cave faster. Running in circles is not actually required, it's again just to burn some time waiting for the right encounter.
  • the map is distorted in order to bring Mewtwo closer, to avoid the need to use Surf.
  • Electrode needs to have a Special DV of exactly 3 in order to be able to catch Sandshrew using Trainer-Fly.

Vermilion City

  • In the mart, the Pokéflute is grabbed, and a wrong warp to the Powerplant is performed.

Viridian City

  • The Dome Fossil is grabbed in the Pokécenter before triggering the Old Man glitch.

Cinnabar Island

  • All three fossils are turned in at the Cinnabar Lab. As we have multiple Dome Fossils and Old Ambers, they don't get used up when turning them in.
  • Using the Old Man glitch, Bulbasaur, Squirtle and Alakazam are caught.
  • Alakazam needs a Special DV of exactly 10 in order to trigger a Machamp Trainer-Fly encounter.

Celadon City

  • The teleport location is changed to Celadon, which it will remain for the rest of the run.
  • The Cooltrainer setup for Dratini is by far the most time-consuming one, especially considering it can be caught legitimately. Levelling it up do Dragonite from L15 would take 40 Rare Candies, though, which takes longer than setting up a glitched encounter with a higher level.
  • JACK is used extensively to navigate the glitch map in order to get to the right spot for Dratini.

Vermilion City

  • Two "bad" Cooltrainers, for Meowth and Lickitung can be performed inside the Vermilion mart.
  • A wrong warp to Seafoam Islands is performed.

Seafoam Islands

  • JACK is used for a shortcut to get to the lowest floor faster.
  • The map is distorted in order to get Articuno closer to us and avoid the need to use Surf or move any boulders.

Celadon City

  • More "good" Cooltrainers are performed to catch Magmar and Mr.Mime, and a "bad" Cooltrainer for Gengar.
  • In the Saffron guard house, walking one extra step inside sets the X coordinate to 1 (instead of 0), which decreases the item scroll lag and saves more time than the two additional steps cost.
  • Two more "good" Cooltrainers for Bellsprout and Eevee. A second Eevee will be received as a gift, which is all we need since we already caught Vaporeon earlier.
  • After catching Oddish, the longest D-Sum based delay of the run is needed. The text box is not closed for 4 seconds in order to setup the Mankey encounter.
  • The game thinks Ditto is at low health, which causes a constant beeping throughout these encounters that suppresses other sound effects and speed up the game, but is a major annoyance and therefore not used as a general optimization.
  • After waking up and catching Snorlax, a wrong warp into the Safari Zone is performed. Not entering the Safari Zone through the entrance has some side-effects: the number of Safari Balls is 0, which is treated as 256 by the game, and the number of remaining steps is also 0, allowing us to stay there for an indefinite amount of time.

Safari Zone

  • A second text pointer manipulation is performed to turn the Nugget in the center area into the corresponding Pokémon, Golem. The text pointer which was saved from the Pokémon Mansion is re-used here.

Pewter City

  • The last two remaining Pokémon, Jynx and Hitmonlee, are caught using "good" Cooltrainers.

Vermilion City

  • Hitmonlee and Golem are released to make room in the box for the rest of the party Pokémon. All but one party Pokémon is deposited in order to speed up the Hall of Fame cutscene. Note that releasing Golem is chosen over Jynx because its cry is way shorter.
  • A wrong warp into the Hall of Fame room skips all of the Elite Four and completes the game.
  • Note that not only the number of caught and seen Pokémon is 151, the game time ends up being 1:51 as well, which was of course totally planned and not just pure coincidence.

Glossary

Cooltrainer glitch

The glitch commonly referred to as "Cooltrainer" is an application of the Transform glitch. In the Transform glitch, you transform into a Pokémon with more moves than your own, and then swap the last with the first move. This causes the original moves to be swapped as well, making your first move slot empty, which is not handled well by the game. The Cooltrainer is based on a side-effect of the name of this invalid move. The game looks for the move's name beyond the actual move name list, and picks up some unpredictable 20 bytes of memory as the name. Further down the line, this name is first stored in $CD6D and later copied to $CF4B. This copy operation expects a terminating EOS byte, which might not be there, causing far more bytes to be copied than expected. This memory corruption is exploited in the Cooltrainer glitch: By manipulating the contents of the bytes following $CD6D, you can manipulate the corresponding bytes from $CF4B by simply opening the move list and looking at the invalid move. When used during a fight, this allows us to manipulate the data of the enemy Pokémon, most importantly its species. Simply speaking, this can basically turn any encounter into the species you want before you catch it.
It has side-effects however, since you're not surgically changing one single byte, but blindly overwriting the whole memory segment. Most prominently, it alters the enemy's (and depending on how far the corruption goes also your) stats and status, giving the Pokémon an absurd amount of health and inflicting multiple status ailments simultaneously. Only one alteration can influence the game's stability, though, which is at $CFC4. This flag determines (indirectly) how sprites are loaded, and having it in the wrong state can just soft-lock the game as soon as the fight ends. There is a way to handle these "bad" Cooltrainers, though, by doing the fight on a map without offending sprites, allowing the fight to end without soft-lock. After the fight, the flag can easily be set to the correct state by opening the start menu before leaving the area in order to avoid soft-locks. There are multiple of these safe maps that don't cause soft-lock in the game, most prominently Diglett's Cave, which is often used since it's close to a warp location.
The memory area that data is copied from contains a buffer of saved screen tiles, which is used to backup the screen when it is covered by a menu. When you open the party or item menu, this memory segment will be used to store the screen contents, so in order to exploit the Cooltrainer glitch you need to stand at specific positions in the overworld when storing the screen content. When stored, different tiles on the screen correspond to different properties of the encounter you'll manipulate, like species and level. You'll also need to have a tile equivalent to the EOS byte visible on screen at the right position, to mark the end of the memory corruption and not actually crash the game by overwriting the whole RAM.

Damage variation

Attack damage is multiplied by a random number between 217/255 and 255/255 to get the actual damage dealt. Because of the way integer division works, only 255/255 results in full damage, while 254/255 and below will always be at least 1 damage less. Dealing the full amount of damage is called max damage and has a 1/39 chance.

D-Sum

The game uses two bytes for determining random events, $FFD3 and $FFD4. Both change erratically based on a hardware register called DIV and are highly unpredictable. However, the two values are not independent: for each roll, DIV is added to one and subtracted from the other byte, which makes their sum almost constant (DIV can change slightly in-between the two operations, and there are carry values to consider). This sum is called the D-Sum, it changes slowly over time and is highly important when manipulating encounters.

DVs

DVs are random values between 0 and 15 assigned to each of the four stats (Attack, Defense, Speed, Special) to make Pokémon of the same species different. DVs increase the respective stats so that high DVs mean better stats. The DVs of wild encounters are random, while Trainer Pokémon always have the same DVs: 9 ATK and 8 DEF, SPD, SPC and HP.

Encounter mechanics

When moving in high grass, the game checks for an encounter after every step. Each area has its own encounter rate, which can range from around 3% to 12%. Furthermore, each area has a list of 10 possible encounters with fixed probabilities. That is, each slot has a fixed chance, independent from the area you are in, only the encounter you get in that specific slot varies. When checking for an encounter, both RNG bytes $FFD3 and $FFD4 are considered: If the value of $FFD3 is lower than the encounter rate of that area, you get an encounter. At the same time, the value of $FFD4 determines the species of the encounter. That means in order to hit a specific encounter slot, your D-Sum must be is a specific range; for a specific step you can only get the encounters that your D-Sum is in range of to allow. Since there is no known way to manipulate the D-Sum effectively, there may be no way to get an encounter at a specific step if your D-Sum just isn't in the necessary range, and you need to wait until it is. Things get even more problematic for consecutive encounters: After an encounter, your D-Sum is always in a specific range, the range it needed to be to get that encounter. During the fight, there is not enough manipulation potential to bring the D-Sum where you want it to be, so it might be simply impossible to have specific pairs of encounters consecutively without some wait time.
There's also a mechanic called the 3-step rule in this game, which ensures that after every encounter, a minimum of three steps is necessary to be able to get another encounter.

EOS

EOS is the end-of-string symbol, a special byte that tells the game that the character sequence it's reading has finished. In this game EOS = 0x50

Glitch maps

When an entrance does not exist for a map and you wrong warp into it, you end up in a glitched map. For each entrance on a map, not only the x and y coordinate is given, but also the address of the block data that makes up the visible tiles on the screen. Since for most glitch maps the address is some ROM address, the layout of the glitch map is fixed and predictable.

Item scroll lag

All item names are placed directly after another in the game's ROM, and whenever the game needs to read an item name with ID i, it will read through all the item names 0 to i-1 (counting the number of EOS) before finally reading the correct item name. That means items with higher IDs take longer to read. With glitch items, the amount of read data can be huge, since there may be no EOS around, which creates lag when scrolling through your item menu. The worst offender is item 0x00, which is treated by the game as ID 256 and creates about 6-7 frames of lag every time its name is looked up. Unfortunately, 0x00 is a common byte to find in RAM, and this run tries to reduce the number of 0x00 bytes whenever possible.

Item Underflow glitch

In the item menu, each item is stored as a group of 2 bytes, denoting the item ID ans the quantity. The byte 0xFF for an item ID is used to mark the end of the list. When you get the quantity of an item to 0xFF (e.g. by encountering Missingno.), the game confuses it with the end marker and modifies the item list in unexpected ways. This allows to toss all items without actually removing them from the inventory. If an event is triggered after that which removes items from the inventory, like the Saffron guards taking water, the item counter underflows from 0 to 0xFF. This enables us to scroll beyond the actual items into other memory areas and manipulate their contents, which opens up a wide variety of possibilities.

JACK

JACK is an effect caused by a set of glitch items, specifically all glitch items that open the party screen when used, like Potions or Rare Candies. All glitch items starting from 0x80 have the same effects as the regular items starting from 0x00. However, they don't appear in any list of items that the game needs to handle in a special way. All items that open up the party screen are is such a list, so that the game can reload the map sprites after the screen is closed. When using a glitch item with the same effect, the map sprites are not reloaded. This has multiple useful effects: Since the sprites are not rendered, all map objects that were invisible while in the item menu are now vanished, they don't block your way and trainers don't engage. This can be used to skip trainers or trigger a Trainer-Fly on any trainer, by walking in front of them and escape while letting them re-appear. The second useful effect is that the character's sprite has vanished as well, which prevents it from updating its orientation while walking. This has effects on the collision detection: To determine if the player can go in any direction, the game checks whether the tile in front of the player is passable, assuming the player always looks in the direction he's going. This is not true any more, so it's possible to go to any adjacent tile, as long as the tile the character is facing is passable, even if the tile you are walking to isn't. This can be exploited to walk through solid objects and walls, taking short cuts. It also helps when navigating glitched maps that have no way to traverse them regularly.

Jingle Skip

Jingle Skip is a minor time-saving glitch which is triggered when a jingle is suppressed by a recent change in the background music. Most famously, it's possible to skip the item pick-up jingle in the underground path when picking up the Full Restore right after entering.

Map distortion

There are two different pieces of information that define the player's position on the map: the X and Y coordinates, and the base address of the blocks of tiles that are visible on screen. While the coordinates determine the position of the objects on the map, the block address determines the map collisions. By using the Item Underflow glitch, you can get these two out of sync, which causes graphical glitches commonly known as map distortion. It is most useful to manipulate the position of map objects and bring them closer to you.

Map loading

The game world is split up in multiple maps, each town and route is on it's own map. When you go from one map to another, the map loading creates some lag frames. The GB has a time advantage over the SGB here, as loading the color palettes costs additional time.

Missingno.

Missingno. has the Pokédex number 0, which will be read as 256 by the game, so when trying to set the Pokédex entry for Missingno., it sets some bit outside the actual Pokédex data. For the "seen" information, this turns out to be the MSB of the 6th inventory item's quantity. What this effectively does is it gives you 128 more of your 6th item, unless you already have 128 or more of it, in which case it does nothing. If you catch a Pokémon, the game sets both the "seen" and the "caught" Pokédex bit, which means you can duplicate the 6th item twice with one Missingno. encounter.

Old Man glitch

The Old Man glitch is one of the first discovered game exploits and allows to catch specific Pokémon at very high levels depending on the character's name. When talking to the old man in Viridian City to show you how to catch Pokémon, the your name is temporarily stored in the same memory segment as the grass encounters, in order to replace it with the old man's name for the duration of the fight. This in itself is not immediately useful, since all routes that have grass to encounter Pokémon provide their own encounter list which would overwrite your name. However, due to the way the game does encounter checks, you can get a grass encounter without any grass: Each tile the player walks on consists of 2x2 graphics tiles. Almost all checks, like collision checks, are made based on the lower-left tile. The test whether you get an encounter, however, is made based on the lower-right tile, while the check which encounter you get is based on the lower-left tile. This can be exploited in Route 20, where the Cinnabar Island coast line has Water in it's lower-right tile, which can trigger an encounter, but coast on the lower-left tile, triggering grass encounters instead of water ones. Combining these, you can talk to the old man and then get an encounter at the Cinnabar coast for a wild encounter based on your character name.

Rhydon glitch

The Rhydon glitch is triggered when catching Missingno., and causes it to turn into Rhydon, since Rhydon is the first Pokémon by index number. While the transformation is always performed, the Pokédex entry for Rhydon is written only when Rhydon is kept in the party and not sent to a PC box.

Snorlax Skip glitch

If a fight is started as a result of a map object interaction, the game checks whether it was a trainer fight. If it wasn't, the game assumes it to be a special encounter (like the legendary birds, Mewtwo or Snorlax) and tries to remove the object from the map. Trainer-Fly encounters are this type of special encounter, but the object is not found in the list of missable objects, which causes the game to remove the object behind the last element in the current map's missable object list. This entry is usually residue from some previous map which had more missable objects than the current one. This can be exploited to remove Snorlax: By entering Route 12, Snorlax is written to the missable item list (1st entry), and as long as all routes visited afterwards have no missable objects, it will stay there and be finally removed when the Trainer-Fly encounter is triggered.

Text pointer manipulation

This is another exploit made possible by the Item Underflow glitch, which is newly introduced in this submission. At $D36C, the game stores the pointer to a list of texts that will be shown for each object on the current map. When manipulating this pointer, texts can be swapped around, combining objects with different texts. Objects have values attached to them, the meaning of which depend on the type of object: Trainers have their trainer type and set, items have their item ID and Pokémon have their species. While items are different, Trainers and legendary encounters are the same thing from the game's perspective, it distinguishes between them only by the provided ID (if it is at least 0xC8, it's a trainer). Now when an item is manipulated to have the text of a trainer, you can "fight" the item, which will result in a legendary encounter or trainer battle depending on the item ID. This method of triggering encounters is highly limited by the fact that you need an item with the right ID in order to convert it into the Pokémon you want, which works out only in a few cases, but is fast to set up compared to many other glitches that allow catching Pokémon.

Trainer-Fly glitch

The Trainer-Fly glitch is one of the most important glitches in the game, as it is the precursor for many other exploits. When an object appears on screen, its orientation is always south for one frame before adopting its real orientation. This allows us to step into the line of sight of an off-screen trainer and open the start menu before the orientation is corrected and they see us. When now escaping , e.g. by Fly or Dig, the fight is still loaded, but not executed. This has multiple consequences:
  • You are unable to open the start menu or interact with objects, since the game thinks you are in the process of being engaged by a trainer.
  • All trainers in the map you performed the Trainer-Fly on will ignore you, for the same reason.
  • The pending fight is stored for this map.
After fighting another trainer in a different map, the stored fight will trigger upon entering the Trainer-Fly map again. Since the data for the fight has long been overwritten, though, a different encounter is triggered, based on the memory contents at that time. These can be modified in different ways, most commonly by manipulating the special stat of the last fought Pokémon to change the species of the encounter.

Trainer ID

The Trainer ID is a random two byte value assigned to your character at the beginning of the game. All Pokémon you catch will inherit this value to mark them as yours.

Walking

Walking mechanics are weird in Gen I. Walking one step in any directions costs 16 frames, and the first turn you take costs additional 2 frames. All consecutive turns (as long as you don't stop walking) cost no extra frames. Additionally, there is a considerable amount of lag when walking, usually 1 frame per step. Lag frames can occur erratically on some maps, so specific walking patterns can help reduce lag and therefore save time.

Wrong warps

The destination for all warps on any map is stored in the part of RAM which is accessible using the Item Underflow glitch. All maps have many entry points defined for them, which denote the places where you can enter the map. Every warp description contains the map and the entry point it is warping to. Additionally, there is the concept of saved maps: When entering a house or cave from the overworld, the overworld map is stored. All warps that lead to the overworld use the map 0xFF to indicate that the stored map should be used instead, which allows the game to re-use interior maps at different overworld locations. By manipulating the saved map, a wrong warp can be performed. The entrance on the map can be manipulated, too, but this costs extra time, so for the most warps it is faster to choose an interior that already has the correct entrance set up, so you just need to change the map ID.

Known mistakes

As expected with such a long run, mistakes are unavoidable. The ones listed below I noticed while re-watching the run. I decided to not do it over for them, as the time lost is relatively small and any routing improvement will likely yield a far larger time save than fixing these execution mistakes could, so it's not worth to do it all over just to correct them. They do bother me nonetheless, and there are probably a few more I haven't even noticed yet.
  • I discovered that there was a faster menuing technique half-way through the run, that can save some frames when selecting certain list items. It is used in the second half of the run, but not the first. (~0.5s lost)
  • Catching Weedle before Caterpie on Route 25 allows for better D-Sum manipulation (~1.5s lost)
  • Missed an opportunity to bike in Vermilion before catching Sandshrew (~3s lost)
  • Missed an opportunity to bike on Cinnabar Island before catching Bulbasaur (~0.6s lost)
  • Missed an opportunity to bike in Lavender Town before catching Machamp (~1.5s lost)

Noxxa: Judging.
Noxxa: Great improvement. Accepting to Moons as an improvement to the published movie.
Spikestuff: Publishing... but that second part, that I cannot do. Because it cannot see SGB games.


Editor
Joined: 11/3/2013
Posts: 506
MrWint wrote:
Nice graph :) I didn't do the math before, but since catching or evolving costs around 17 seconds each and stuff like wrong warps cost around 12 seconds, there's definitely a theoretical minimum in terms of total time to catch all 151, especially since all of that is not including travel time, and not considering the extra amount of time spent for setting up glitches for otherwise unobtainable Pokémon. I assume the most time can be saved by managing to break the game faster than in 43min, the actual catching simply can't be sped up indefinitely.
To be fair for the longest time I believed that p4wn3r and Mukki's run would never be beaten - considering how long that run took to make, and with the novelty value of the category wearing off, I thought nobody would have the motivation to spend years saving a few minutes on route optimisation and better luck manipulation. And then this run happens. Who's to say history won't repeat itself?
Editor, Expert player (2073)
Joined: 6/15/2005
Posts: 3282
Hm. Impressive. Anyway, I want to mention that Spikestuff's encode was uploaded to Nicovideo and has over 280k views. There are a fair number of Twitch Plays Pokemon references in the comments (despite TPP being largely a western thing), and one person pointed out the existence of ASH (albeit as a glitched menu option; I saw it somewhere but can't find it right now). The main point is, no matter where you are in the world, this run is so obviously broken that words cannot begin to describe it. MrWint, which project are you planning next?
Skilled player (1040)
Joined: 7/24/2013
Posts: 175
I don't have any plans for future projects, yet. There are improvements to make on the Gen I any% which can bring the time down to about 20-22min, but I probably won't do that, at least not right now. I'll probably look out for a different game. I like the automated approach I used for the Pokémon games, and I'm sure there are other games that could benefit from that as well, it's just hard to find a good target. It can be difficult to justify spending that much time on a game. The Gen I and II Pokémon games had probably the ideal preconditions: They have an active community, the GB platform is comparatively easy to understand, use and automate, the games have been largely disassembled (which is a big deal for automation), it benefits greatly from the automated approach, GB has the best debugging emulator I've seen so far (praise the bgb :D), I felt nostalgia since I played them as a kid, the games are rather popular, etc. It's hard to find a game that compares to that.
Former player
Joined: 6/30/2010
Posts: 1107
Location: Zurich, Switzerland
MrWint wrote:
I don't have any plans for future projects, yet. There are improvements to make on the Gen I any% which can bring the time down to about 20-22min, but I probably won't do that, at least not right now. I'll probably look out for a different game. I like the automated approach I used for the Pokémon games, and I'm sure there are other games that could benefit from that as well, it's just hard to find a good target. It can be difficult to justify spending that much time on a game. The Gen I and II Pokémon games had probably the ideal preconditions: They have an active community, the GB platform is comparatively easy to understand, use and automate, the games have been largely disassembled (which is a big deal for automation), it benefits greatly from the automated approach, GB has the best debugging emulator I've seen so far (praise the bgb :D), I felt nostalgia since I played them as a kid, the games are rather popular, etc. It's hard to find a game that compares to that.
The "no memory corruption" TAS of Gen II could need an update ;)
Current project: Gex 3 any% Paused: Gex 64 any% There are no N64 emulators. Just SM64 emulators with hacky support for all the other games.
Joined: 12/29/2007
Posts: 489
Mothrayas wrote:
Personally, I'd like a screenshot of the Cooltrainer glitch in action, and some of the unusual catches made with it. Here are some examples (I like the Eevee one most): There's just so much not right in each of these images.
It's too bad the opponent's name gets corrupted in each case. Having it remain as "DIGLETT" while the lower text box clearly says something else would be quite the double-take.
Experienced player (705)
Joined: 2/5/2012
Posts: 1800
Location: Brasil
MrWint wrote:
I don't have any plans for future projects, yet. There are improvements to make on the Gen I any% which can bring the time down to about 20-22min, but I probably won't do that, at least not right now. I'll probably look out for a different game. I like the automated approach I used for the Pokémon games, and I'm sure there are other games that could benefit from that as well, it's just hard to find a good target. It can be difficult to justify spending that much time on a game. The Gen I and II Pokémon games had probably the ideal preconditions: They have an active community, the GB platform is comparatively easy to understand, use and automate, the games have been largely disassembled (which is a big deal for automation), it benefits greatly from the automated approach, GB has the best debugging emulator I've seen so far (praise the bgb :D), I felt nostalgia since I played them as a kid, the games are rather popular, etc. It's hard to find a game that compares to that.
Bomberman?Megaman Battle Network?
I want all good TAS inside TASvideos, it's my motto. TAS i'm interested: Megaman series, specially the RPGs! Where is the mmbn1 all chips TAS we deserve? Where is the Command Mission TAS? i'm slowly moving away from TASing fighting games for speed, maybe it's time to start finding some entertainment value in TASing.
Editor, Emulator Coder, Site Developer
Joined: 5/11/2011
Posts: 1108
Location: Murka
This movie syncs on the latest SVN bizhawk when converted to BK2 and metadata tweaked so the emu knows which frame mode to use; no input log changes. It takes 14414574424 ticks to execute, for a total calculated time of 1:54:33.40.
Chamale
He/Him
Player (182)
Joined: 10/20/2006
Posts: 1355
Location: Canada
MrWint wrote:
Nice graph :) I didn't do the math before, but since catching or evolving costs around 17 seconds each and stuff like wrong warps cost around 12 seconds, there's definitely a theoretical minimum in terms of total time to catch all 151, especially since all of that is not including travel time, and not considering the extra amount of time spent for setting up glitches for otherwise unobtainable Pokémon. I assume the most time can be saved by managing to break the game faster than in 43min, the actual catching simply can't be sped up indefinitely.
I suspect that if there's a way to improve this run, it will come from either finding a way to use the special case trainer-fly to get useful arbitrary code execution in Viridian Forest, or finding a way to use the Brock skip walk-through-walls glitch in the English version of the game.
Joined: 4/8/2011
Posts: 15
I wrote a possible improvement on the 'temporary encode' Youtube video. I think more people will probably be aware of it in this thread, though.
Instead of MrWint catching Tangela, Rattata, Pidgey and Raticate in the grass, maybe it would be quicker if he did it on the left-facing shore tile, which is closer to Pallet Town than the grass. Those left-facing shore tiles bring up Pokémon from the last list too, like the ones in Route 20 and Route 19 Glitch City and the grass data on that route is written to the list.
Skilled player (1741)
Joined: 9/17/2009
Posts: 4981
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
I've finally watched this. I loved how during that very last part, the hero decides right after the last pokemon to immediately show it off to Oak, without even bothering his rival. I am curious on if and how the Brock walk through walls glitch can improve this though. Still, 10/10 for keeping me entertained for almost 2 hours. :)
Tompa
Any
Editor, Expert player (2215)
Joined: 8/15/2005
Posts: 1941
Location: Mullsjö, Sweden
Fortranm
He/Him
Editor, Experienced player (878)
Joined: 10/19/2013
Posts: 1121
It seems to be Blue on SGB. Maybe it has to do with the faster frame rate of SGB.
Spikestuff
They/Them
Editor, Publisher, Expert player (2643)
Joined: 10/12/2011
Posts: 6441
Location: The land down under.
Fortranm wrote:
It seems to be Blue on SGB. Maybe it has to do with the faster frame rate of SGB.
Close, but not right. Q. How are you Streaming a pokemon game? A. I'm using a Gamecube's Gameboy Player with a Gameboy SP as a controller. I can then use a capture card to transfer the video to my computer. Reference: http://www.twitch.tv/shenanagans_
WebNations/Sabih wrote:
+fsvgm777 never censoring anything.
Disables Comments and Ratings for the YouTube account. Something better for yourself and also others.
ALAKTORN
He/Him
Former player
Joined: 10/19/2009
Posts: 2527
Location: Italy
Tompa wrote:
Obsoleted by Real Time?! http://www.speedrun.com/pkmnredblue/run/56901
What the fuck. lol
Skilled player (1741)
Joined: 9/17/2009
Posts: 4981
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
ALAKTORN
He/Him
Former player
Joined: 10/19/2009
Posts: 2527
Location: Italy
jlun2 wrote:
What was the main improvement?
At ≈ 6:50 in the video he says 2 new strats were found, which would save 25 minutes in the TAS. Brock skip and PC underflow.
Joined: 9/15/2013
Posts: 154
Wouldn't PC underflow defeat the purpose of this run? Or is it not being used to generate battles with [x] Pokemon/change the Pokemon caught flag? I didn't notice that Brock wasn't skipped in this run, though. Was there a specific reason?
Patashu
He/Him
Joined: 10/2/2005
Posts: 4043
Brock Through Walls wasn't known when this TAS was made.
My Chiptune music, made in Famitracker: http://soundcloud.com/patashu My twitch. I stream mostly shmups & rhythm games http://twitch.tv/patashu My youtube, again shmups and rhythm games and misc stuff: http://youtube.com/user/patashu