Technicalities/Sources of Inconsistency
(Last updated 5 Feb 2018)
- Since the original post, there has been a lot of research performed to determine and root out sources of inconsistency. I'll keep this post updated with various findings from ongoing RNG research.
(1) Palettes / Bootrom inputs
In Red/Blue, there are five different input methods during the bootrom (i.e. when the Game Boy logo flashes) that will produce unique (but consistent) RNG:
- Not pressing any buttons
- Pressing or holding one of A/B/Start/Select at any point during the bootrom (this won't select a palette)
- Pressing and releasing inputs to select a palette (86 frame window for d-pad only; 12 frame window for d-pad + A/B)
- Selecting the inputs for a palette and holding them through the end of the bootrom (same 86/12 frame windows)
- Buffering a d-pad input during the hard reset, adding A or B between when the 'E' and 'B' in 'GAME BOY' appear, and holding both inputs through the end of the bootrom (12 frame window for the d-pad, 16 frame window for A/B)
Note that inputs can be buffered during the hard reset on Game Boy Player, so the initial window is much larger than 12 frames there.
For clarity, you can see a video here
for what the inputs look like for each of these methods.
(2) A vs Start+A on Continue screen
Input methods during the intro can end either with A or Start+A on the Continue/File Select screens. Holding A will produce a jingle, whereas Start+A will not. So far, this has not seemed to matter in most cases, but there are certain setups where the choice of inputs in the intro has produced RNG differences.
(3) NPCs / Overworld Sprites
All NPCs and other overworld sprites (e.g. Poké Ball items) have internal timers that are included in save data. These timers are initialized to random values (unless, of course, it is during a manip segment), so saving with them on-screen should be avoided.
You need to be wary not only of saving with these sprites off-screen, but also of whether they appear on-screen at any point prior to saving (with the exception of any Poké Balls that you picked up). You will find inconsistency between saves if the path you take after the S&Q reloads any of these sprites onto the screen. That said, once you account for these mechanics, the issue can be avoided through smart pathing.
NOTE: Sprites have their timers reset when you reload the map (exit/re-enter cave, go up/down stairs, etc). So if you are routing and notice that you had taken a bad path up to some point, you can recover to a workable state relatively easily.
NOTE: Additionally, there will be different RNG between saves if different trainers are fought or different items are picked up on any maps that get loaded during a manipulation segment. Be sure that setups account for the strats that you'll be using on the run (e.g. S&Q setups for post-Bug Catcher vs post-Lass on Mt. Moon entry floor are sensitive to which trainer you actually fought), and be aware that you may not produce the same results from any arbitrary save file.
(4) IGT0 (also "IGTimer0" or "IGT fuckery")
The in-game timer's frame count (at the point of S&Q) has a chance to create inconsistencies in RNG between saves, and these inconsistencies are not likely to be eliminated entirely. To illustrate things, the IGT is stored as hh/mm/ss/ff (hours/minutes/seconds/frames), where mm/ss/ff will be values between 0-59. Whenever loading a new map, there are two [consecutive] values for ff that will cause the in-game timer to overflow at a sensitive time, and consequently disrupt the normal cycle for RNG. The two undesirable frames impact the RNG in different ways, so there are multiple failure cases that can surface.
This only applies to map loading routines that disable the LCD, so overworld route transitions (e.g. Viridian -> Route 22) are not affected. However, each map loaded after an S&Q or after ladder/building/cave transitions has a chance to induce the issue. This essentially means that each applicable map load has a 1/30 chance of getting screwed by IGT overflowing.
Additionally, when an on-screen NPC's timer hits 0 (or when an NPC first comes on-screen) the same frame IGT overflows, there is a decent chance that cycle differences will creep in and affect RNG. As a result, the more sprites you pass during a manipulation segment, the greater the likelihood will be for inconsistencies to surface.
There are a couple other places where "IGT0" (as dubbed by Dabomstew/ExtraTricky) can occur, such as manips that use pokedex buffering or yoloballing. There are also many more subtle ways for IGT0 issues to surface, and at this point, botting has taken over as the main way to empirically tell what the success rate is for any given manip.
(5) Clearing text boxes ("PrintLetterDelay")
Another subtle, but preventable, source of inconsistency lies in how you clear text boxes during item ball pickups. Inputs here can cause differences in RNG, so care must be taken when picking up items during a manipulation segment (e.g. picking up Moon Stone in Mt. Moon). The recommended approach (and the approach used in current manips) is to hold A and wait to release the input during the item jingle, as there is a much larger window for consistency.
Other manips that involve textboxes (yoloball manips and advanced/extended manips) also need to account for the possible impacts of PrintLetterDelay. For more information, read Dabomstew's writeup here
(6) Buffered vs unbuffered saves
Whether or not you "buffer" your save (i.e. buffering START on the save tile before your character stops moving) can affect manips that happen to load sprites during the path (the more sprites you pass, the more likely there is a divergence). Theoretically, this affects both Red/Blue and Yellow equally, though in the manips found to date, the issue more directly impacts Yellow.
- The top 4 items in your inventory matter on manips where you are yoloballing, as extra lag can be produced depending on which items appear.
- In Red/Blue, yoloball manips will likely have different success rates if your lead Pokemon is in red bar (as the cry will be cancelled, so the ball will be thrown a different frame). Though cries still play in Yellow for red bar, extra lag is produced when in yellow bar or red bar, so there is a difference for yoloball manips in those instances vs being in green bar.
- The timing of A inputs can affect RNG on naming screens, though this is currently limited to a couple advanced manips (starter manips and extended manips after catching NidoranM).
A couple of edge cases that can also affect manips (in most cases, they won't):
- The number of Pokemon in your party has a small chance to affect manip results (on one or more IGT frames)
- Manips where you pick up items (such as in Mt. Moon) can have different success rates depending on how many items are in your inventory at the start of the manip
- A vs Start+A and PrintLetterDelay-related techniques (which are mentioned above), as well as general game events that involve waitloops/lag, have a chance to shift things by enough to cause offsets in RNG