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.
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
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.
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.
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.
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 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.
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 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
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 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 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.
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.
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. 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.
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.
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.
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 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.
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.