Jump to content

Pokémon Yellow: Difference between revisions

Added a remark about Brock through Walls, and added information about glitch Pokémon, glitch items, and the RAM layout difference
(Accidentally hit "Save changes" when I meant to click "Show preview"... Finishing the current paragraph for now.)
(Added a remark about Brock through Walls, and added information about glitch Pokémon, glitch items, and the RAM layout difference)
Line 12:
 
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.
 
[[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.
 
== 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.
 
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 ==
Cookies help us deliver our services. By using our services, you agree to our use of cookies.