Jump to content

Pokémon Yellow: Difference between revisions

→‎Game-breaking glitches: Added information on alternative ways to break the game (an area of active research).
(Accidentally hit "Save changes" when I meant to click "Show preview"... Finishing the current paragraph for now.)
(→‎Game-breaking glitches: Added information on alternative ways to break the game (an area of active research).)
 
(9 intermediate revisions by 2 users not shown)
Line 2:
'''Pokémon Yellow''' is the "third game" of [[bp:Generation I|Generation I]] released worldwide, i.e. the [[bp:Core series#Release model|upper version]] of [[Pokémon Red and Blue]]. It uses the same game engine as its corresponding version in Japan, which is also usually known as "Japanese Pokémon Yellow" in English. However, this version is not named after a color in Japanese, but rather as "Pocket Monster Pikachu" (Japanese: ポケットモンスター ピカチュウ). In Japan, it is the fourth version in Generation I, the paired versions being [[Pokémon Red and Green|Japanese Pokémon Red and Green]] and the third version being [[Pokémon Blue (Japanese)|Japanese Pokémon Blue]].
 
Compared to Pokémon Red and Blue, the game engine of Pokémon Yellow is slightly updated to support various special features of the starter Pikachu (most notably, following the player on the overworld), and for Western releases also to support color palette changes on the Game Boy Color. Several glitches are fixed, but the game remains easily breakable, mostly thanks to the [[trainer escape glitch]] and the [[SRAM glitch|save corruption glitch]]. A new major glitch introduced by Pokémon Yellow is the [[Pikachu off-screen glitch]], which can be used to achieve [[arbitrary code execution]] (ACE), but this is generally less convenient than starting from the trainer escape glitch and doing arbitrary code execution with a [[glitch item]], like in Pokémon Red and Blue.
 
[[Glitch Pokémon]], glitch items, etc. can be accessed in Pokémon Yellow just like in Pokémon Red and Blue, but due to various changes in the game shifting bytes around, their behaviors are often different from their Red and Blue counterparts.
Line 11:
The earliest point a [[trainer escape glitch|trainer escape]] could be performed is still in front of the last trainer in Viridian Forest, and again this early in the game it is impossible to encounter a MissingNo. (or any other glitch Pokémon) with the Special stat encounter to break the game. The speedrun method for Red and Blue relies on very fine details of the game engine, and will not work on Yellow. Instead, speedrun routes of Yellow usually exploits the [[text box ID matching]] aspect of the trainer escape glitch, displaying a glitch text box that reads its contents from the OAM buffer, which can be manipulated to have a 0xFE byte as the first byte of the glitch text box, which becomes a glitch mart. Various glitch items, including the ACE glitch item [[ItemDex/Y:089|4F]], can be purchased from this glitch mart. To access this glitched mart in RTA, runners would perform a carefully designed sequence of actions consisting of both [[luck manipulation]] and glitch setup, collectively known as "THE Manip"<ref>[https://www.youtube.com/watch?v=DonALfmjZOk Video demonstration of "THE Manip"]</ref>. One advantage of "THE Manip" is that, since it does not execute arbitrary code from the RAM per se, it can also be used in speedrun categories that do not allow ACE (where glitch items can be bought to enable non-ACE glitches like the [[Rival's effect]] or the [[LOL glitch]]).
 
For casual players, the most common gateway to breaking the game is still [[MissingNo.]], encountered by using the trainer escape glitch later in the game (notably, the [[old man glitch]] is fixed in Yellow). Since the front sprite of regular MissingNo. in Yellow may freeze the game, usually a "special" MissingNo. with a fossil or ghost front sprite is used. The sequence of glitches that allow the player to get an [[expanded item pack]] from here is the same as in Red and Blue. However, overall this route is significantly less convenient in Yellow than in Red and Blue, since the trainer escape glitch is missable (i.e. on an existing save file, the player may have already defeated all long-range trainers as well as trainers that can be death-warped from), and setting up the appropriate Special stat for a "special" MissingNo. is also more difficult than setting it up for any generic MissingNo.
 
Therefore, the alternative route to break the game through the [[Safari Zone exit glitch]] and [[Glitch City RAM manipulation (Cut abuse)]] has more utility in Yellow than in Red and Blue. In this route, the [[Safari Zone exit glitch]] is exploited to walk through walls, either through the [[Walk through walls glitch (ledge method)|ledge method]] or the [[Walk through walls glitch (museum guy method)|museum guy method]]. ([[Brock through walls]] is technically possible in Pokémon Yellow, but the [[Pewter Gym skip glitch]] is fixed, so the player would need to have broken the game already in order to set it up, making it significantly less useful.) With the ability to walk through walls, the player can access an [[Out of bounds Glitch City (Generation I)|out of bounds Glitch City]], and if the PC is set up beforehand to contain 50 items, a tree will appear in this Glitch City that can be Cut to corrupt the PC item count to 109. This allows the player to access PC item slots beyond slot 50, which can be exploited in ways similar to the expanded item pack, e.g. a ×255 item stack can be withdrawn to allow [[dry underflow]] (and everything that follows in the normal route).
 
A new major glitch introduced by Pokémon Yellow is the [[Pikachu off-screen glitch]], which corrupts bytes in a certain region of the RAM to values between 0x01–0x04 when the player walks on the overworld while the starter Pikachu is off the screen (with the help of a few in-game events causing Pikachu to stop following the player). This can be exploited by spawning a glitch sign that when read leads to ACE. The most popular setup uses the Clefairy in Vermilion City Pokémon Fan Club to cause Pikachu to stop following, and spawns the glitch sign 04 in Pokémon Fan Club, which when read displays text from the RAM address $D221, the catch rate/held item (if traded from/to Generation II) of party Pokémon 5. If the value at $D221 is 0x08 (<code>text_asm</code>), the game will start executing assembly code from $D222 (moves of party Pokémon 5), although such a setup requires trading with Generation II (or another glitch). Alternatively, a 0x08 byte can be set up shortly after $D221, such as the move Ice Punch. As long as the text command processor can reach the 0x08 byte, it will start executing assembly code from the next byte. Overall, this route also holds potential as it is not missable (the Clefairy event always trigger the first time the player enters Pokémon Fan Club with the starter Pikachu, but also has a ~10% chance to be triggered every time thereafter).
 
== Glitch Pokémon ==
{{main|GlitchDex#Pokémon Yellow English GlitchDex}}
 
The data structures for storing Pokémon data in Pokémon Yellow are the same as those in Red and Blue, so [[glitch Pokémon]] in Yellow are overall similar to [[Pokémon Red and Blue#Glitch Pokémon|glitch Pokémon in Red and Blue]]: There are 105 species of glitch Pokémon, 39 being [[MissingNo.]]; Pokémon sharing the same Pokédex number form a [[glitch Pokémon family]]; etc. In fact, since all valid Pokémon have the same internal ID in Red/Blue and in Yellow, any ID that corresponds to a glitch Pokémon in Red/Blue must also correspond to a glitch Pokémon in Yellow, and vice versa. However, specific data taken from out-of-bound memory regions are often different between Red/Blue and Yellow. This includes MissingNo. (as well as other glitch Pokémon with Pokédex number 0): Although there are a few pieces of placeholder data for MissingNo., most data for it are still invalid out-of-bound data.
 
One particularly important difference is that, on Yellow, MissingNo.'s decompressed front sprite has 32×32 tiles<ref>In other words, it has 256×256 ''pixels''. In fact, the byte for its size is 0x00, which means 0×0 tiles, but this is first translated into 0×0 pixels. When the game checks whether the sprite decompression is complete, it does not handle the case of 0 pixels in either dimension correctly, so the pixel count has to reach 256 and overflow the byte before the game thinks the current column or current sprite is complete.</ref> (whereas valid sprites have 5×5, 6×6 or 7×7 tiles), as opposed to 13x13 tiles on Red and Blue. Therefore, whereas on Red and Blue MissingNo.'s front sprite will corrupt part of the Hall of Fame data, on Yellow its corruption extends to the WRAM, causing complicated behaviors that usually freezes the game, although this freeze could be prevented by manipulating a certain unused chunk in the SRAM<ref>[https://www.youtube.com/watch?v=eLuUWUeUTg4 Pokémon Yellow — Encountering Yellow-form MissingNo. without crashing] (video by TheZZAZZGlitch)</ref>. "Special" Missingno. are not affected by this problem because they are hardcoded to use their respective valid sprites.
 
Due to a difference in ROM layout, glitch Pokémon other than MissingNo. in Yellow get their Pokédex number from the function <code>EmotionBubble</code> (which displays emotion bubbles such as the "!" mark that appears when a Trainer sees the player, as well as ones that may appear when talking to the starter Pikachu in Yellow)<ref>[https://github.com/pret/pokeyellow/blob/c73b4ec86e167a8aabee0e0cb6ed6ab485fbcce2/main.asm#L181-L182 The relevant section of ROM layout], and [https://github.com/pret/pokeyellow/blob/c73b4ec86e167a8aabee0e0cb6ed6ab485fbcce2/engine/overworld/emotion_bubbles.asm the function <code>EmotionBubble</code>], which follows the <code>PokedexOrder</code> table</ref>, unlike their Red/Blue counterparts.
 
Despite the difference in behavior, glitch Pokémon with the same internal ID in Red/Blue and in Yellow are [[equivalent trade glitch Pokémon|"equivalent in a trade"]]: Trading a glitch Pokémon from Red/Blue to Yellow will turn it into the glitch Pokémon with the same ID in Yellow, and vice versa.
 
== Glitch items ==
{{main|ItemDex#English versions}}
[[Glitch item]]s in Yellow are also overall similar to [[Pokémon Red and Blue#Glitch items|glitch items in Red and Blue]]. In fact, glitch items in the valid ID range, as well as TM51–TM55 (ID 251–255), have exactly the same names and behaviors in Red/Blue and Yellow.
 
Some other glitch items in Yellow also have the same names as glitch items in Red/Blue. In particular, all the "floor name" items have the same IDs in Red/Blue and Yellow, as well as the "untranslated Japanese name" items (even though they usually have different effects; see below). However, in general, having the same name does not mean that the items also have the same ID. In fact, starting from [[ItemDex/Y:154]] ("POKéTRAINER"), most glitch items in Yellow have names that are similar to the name of the "previous" glitch item in Red/Blue (e.g. [[ItemDex/RB:153]] is also named "POKéTRAINER"). This is because this part of the ROMs have similar layouts between Red/Blue and Yellow, but the part before this (and after the item names) have different layouts, as well as different "accidental" 0x50 bytes.
 
Even though Yellow glitch items with ID 84–128 also take their effect pointers from the code of the function ItemUseBall<ref>[https://github.com/pret/pokeyellow/blob/a42568278b8d401dcd02fc21650379fe464edad1/engine/items/item_effects.asm#L104 The function ItemUseBall in Yellow]</ref>, most of them have very different effect pointers and very different behaviors. The main reason is that the function ItemUseBall differs between Red/Blue and Yellow in a subtle way: The game needs to handle not only the special case of the old man catching tutorial, but also the Prof. Oak battle with Pikachu. This happens very early in the function, when the game makes a check to avoid the [[old man full box glitch]]; this check takes 5 more bytes to perform in Yellow than in Red<ref>[https://github.com/pret/pokeyellow/blob/5db3bdd6551fad07066b669db1e44a6151aaa0b4/engine/items/item_effects.asm#L117-L120 The check to avoid the old man full box glitch in Yellow], and [https://github.com/pret/pokered/blob/21908ba30a8bae5c5e1c86b1164402ec95da0220/engine/items/item_effects.asm#L117-L118 the same check in Red/Blue]. It is not entirely clear why this check was changed, since normally in the Prof. Oak battle the player does not even have any party, let alone a full party and a full box; the change may just be for consistency.</ref>. As a result, not only are the effect pointers of glitch items with ID 91–128 taken from different instructions than that of the corresponding Red/Blue glitch items, but those two-byte pointers also align with the code in a different way, so they never "match up" with any Red/Blue effect pointers again<ref>There is a second check for the old man battle and the Prof. Oak battle, but the effect pointer of [[ItemDex/Y:128]] falls in the middle of that check, and the next glitch item starts from the beginning of the effect pointer table again. Code below that check would "align" with Red/Blue again, but those bytes are never used as effect pointers.</ref>. For example, there is no glitch item in Yellow that executes code from the player's party count like Red/Blue's [[ItemDex/RB:093|8F]], or from the player's Safari Ball count like Red/Blue's [[ItemDex/RB:106|-gm]]. Instead, Yellow has [[ItemDex/Y:099|ws m]], which executes code from the player's Pokémon count in the current box, while a similar glitch item does not exist in Red/Blue.
 
== RAM layout ==
The RAM layout of Pokémon Yellow is almost the same as that of Pokémon Red and Blue. Some variables that only exists in Yellow, such as the starter Pikachu's happiness ($D46F), are stored in a RAM region that is unused in Red/Blue, and thus do not change the overall RAM map. However, there is a single difference that does change the RAM map: The variable wGBC, at WRAM address $CF1A in Red/Blue<ref>[https://github.com/pret/pokered/blob/21908ba30a8bae5c5e1c86b1164402ec95da0220/wram.asm#L1324 Declaration of wGBC in Red/Blue] (compare with [https://github.com/pret/pokeyellow/blob/a42568278b8d401dcd02fc21650379fe464edad1/wram.asm#L1574-L1581 the lack of it in Yellow])</ref>, is moved to the HRAM in Yellow, and becomes hGBC at $FFFE<ref>[https://github.com/pret/pokeyellow/blob/a42568278b8d401dcd02fc21650379fe464edad1/hram.asm#L412 Declaration of hGBC in Yellow]</ref>, presumably for the faster access speed that the HRAM provides. Therefore, all WRAM variables after $CF1A are shifted up a byte (i.e. have 1 subtracted from the address) in Yellow. For example, the address of the third item in the bag (a popular location for [[arbitrary code execution|ACE]] payloads) is $D322 in Red/Blue, but $D321 in Yellow.
 
== References ==
<references />
 
[[Category:Games]]
Cookies help us deliver our services. By using our services, you agree to our use of cookies.