Map 0xFF (summary): Difference between revisions
>Torchickens No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
{{MapInfoGenI|(Blank)|Map FF Town Map.png|FF|255|Unknown|Unknown|Unknown|Special map handler,<br>[[Freeze glitch map]]}} |
{{MapInfoGenI|(Blank)|Map FF Town Map.png|FF|255|Unknown|Unknown|Unknown|Special map handler,<br>[[Freeze glitch map]]}} |
||
'''Map 0xFF''' is an indoor-outside map handler in {{RBY}}. When the game locates it, it [https://github.com/pret/pokered/blob/8349bfd8e646002105dfd6a7f997c26cf0e0624b/home/overworld.asm indoor-outside map handler] does not load map 0xFF itself; rather upon following the warp, the actual map loaded is replaced with wLastMap (D365 in R/B and D365 in Y). This handler is stored as a map in wWarpEntries (D3AF onward (D3AE onward in Yellow) and each entry is stored as Y coordinate, X coordinate, exit index, map (or FF handler)). |
|||
'''Map 0xFF''' is a game mechanic in {{RBY}}. Some indoor location exits use map 0xFF to redirect the player to the location stored in the memory address $D365 ($D364 in Yellow). In the [[Safari Zone exit glitch]] this is abused to redirect the player to a map's warp $04 even if the coordinates and block data for that map is invalid, resulting in a [[Glitch City]] for many locations. |
|||
The coordinates typically pertain to the exit mats in buildings when the player bumps into the wall to leave the map (the way for instance, leaving a Pokémon Center returns the player to the 'last town'). The exit index is a single byte as an index number. |
|||
⚫ | |||
When the game finds it, it is copied into wDestinationWarpID (D42F in R/B and D42E in Y), as well as hWarpDestinationMap (FF8B). The exit index is then used as a basis for loading relevant data (such as coordinates and wCurrentTileBlockMapViewPointer (D35F-60 in R/B and D35E-F in Y)) pertaining to the new map (while the map number is leftover from wLastMap) that the player is going to enter after they leave the old map. (In order to do this, the game also needs to locate the map header from LoadMapHeader using the pointer table at MapHeaderPointers; this function also loads much of the data pertaining to any map). |
|||
For example, exit index 0 can be seen as 'position to place the player in the new map #0', index 1 as 'position to place the player in the new map #1' and so on. This is the reason why different exit warps each make the player step down from different buildings, and the cause of [[Safari Zone exit glitch]] when wLastMap is no longer Fuchsia City and wWarpEntries still pertains to the Safari Zone gate. |
|||
In order for an indoor-outside map to work, W_CURMAPTILESET (D367 in R/B and D366 in Y) must be greater than 0 (overworld tileset); hence indoor-outside warps will be ignored in maps (such as towns themselves) with overworld tilesets. |
|||
==As a glitch map== |
|||
⚫ | As a [[Glitch City|glitch map]], it is a common [[freeze glitch map]] that player attempts to put the player in for stepping [[out of bounds]] when an x or y connection doesn't exist, usually resulting in a freeze. It is a reliable way of causing the [[game freeze#bar freeze|bar freeze]] in all versions prior to Japanese Yellow v1.1. For {{RG}} and {{JY}} v1.0, it can result in an [[out of bounds Glitch Hell]] though more specifically involves an exploitable jump to <code>jp F080</code> (Echo RAM for D080) ([[arbitrary code execution]]). |
||
When D365 or D364 is also set to 0xFF, exiting through an indoor exit may cause the game to simply freeze with a white screen. In Spanish Yellow, [[map 0x0B (Spanish Yellow)|map 0x0B]] may warp the player to [[Map 0xFF (Spanish Yellow)|a map 0xFF]] that may either serve as a [[freeze glitch map]] or [[redirection glitch map]] to Team Rocket Hideout B1F (map 0xC7) [[valid source map Glitch City]]. |
When D365 or D364 is also set to 0xFF, exiting through an indoor exit may cause the game to simply freeze with a white screen. In Spanish Yellow, [[map 0x0B (Spanish Yellow)|map 0x0B]] may warp the player to [[Map 0xFF (Spanish Yellow)|a map 0xFF]] that may either serve as a [[freeze glitch map]] or [[redirection glitch map]] to Team Rocket Hideout B1F (map 0xC7) [[valid source map Glitch City]]. |
||
In versions where map 0xFF typically freezes the game (such as English and Japanese Red/Green/Blue/Yellow) it may still be possible to 'access' map 0xFF by locking/changing any attributes which contribute to its freezes (i.e. its map height/width to not be too large, its sound bank to be one of the valid values 02, 08, 1F, 20, W_MAPSCRIPTPTR (D36E-F (D36D-E in Yellow) to point to a script which doesn't freeze the game, etc.). |
|||
{{clr}} |
{{clr}} |
||
[[Category:Glitch areas]] |
[[Category:Glitch areas]] |
Revision as of 14:55, 7 July 2022
This article is a summary page for different variations of a glitches, etc. when talked about as a whole.![]() |
Town Map name: {{{town map}}} [[File:{{{file}}}|200px]] (Raw data: {{{town map raw}}}) Identifier (HEX): {{{hex}}} Identifier (DEC): {{{dec}}} Map header pointer: {{{headerpointer}}} Map bank: {{{mapbank}}} Palette: {{{palette}}} Default track (music): {{{music}}} Default sound bank: {{{soundbank}}} Tileset/Permissions: {{{tileset}}} Fish data (Super Rod only): None (without bypassing "Looks like there's nothing here.") Text pointer table (W_MAPTEXTPTR): {{{textpointertable}}} Script (W_MAPSCRIPTPTR): {{{script}}} Size (width×height): {{{size}}} Wild Pokémon pointer: {{{wildpokemon}}} Map connections: {{{connections}}} NPC data: {{{npcs}}} Sign data: {{{signs}}} Hidden object data: {{{hiddenobjects}}} Fly flag: {{{flyflag}}} Meta-script: {{{metascript}}} Classification (unofficial): {{{nomenclature}}}
|
Map 0xFF is an indoor-outside map handler in Pokémon Red, Blue, and Yellow. When the game locates it, it indoor-outside map handler does not load map 0xFF itself; rather upon following the warp, the actual map loaded is replaced with wLastMap (D365 in R/B and D365 in Y). This handler is stored as a map in wWarpEntries (D3AF onward (D3AE onward in Yellow) and each entry is stored as Y coordinate, X coordinate, exit index, map (or FF handler)).
The coordinates typically pertain to the exit mats in buildings when the player bumps into the wall to leave the map (the way for instance, leaving a Pokémon Center returns the player to the 'last town'). The exit index is a single byte as an index number.
When the game finds it, it is copied into wDestinationWarpID (D42F in R/B and D42E in Y), as well as hWarpDestinationMap (FF8B). The exit index is then used as a basis for loading relevant data (such as coordinates and wCurrentTileBlockMapViewPointer (D35F-60 in R/B and D35E-F in Y)) pertaining to the new map (while the map number is leftover from wLastMap) that the player is going to enter after they leave the old map. (In order to do this, the game also needs to locate the map header from LoadMapHeader using the pointer table at MapHeaderPointers; this function also loads much of the data pertaining to any map).
For example, exit index 0 can be seen as 'position to place the player in the new map #0', index 1 as 'position to place the player in the new map #1' and so on. This is the reason why different exit warps each make the player step down from different buildings, and the cause of Safari Zone exit glitch when wLastMap is no longer Fuchsia City and wWarpEntries still pertains to the Safari Zone gate.
In order for an indoor-outside map to work, W_CURMAPTILESET (D367 in R/B and D366 in Y) must be greater than 0 (overworld tileset); hence indoor-outside warps will be ignored in maps (such as towns themselves) with overworld tilesets.
As a glitch map
As a glitch map, it is a common freeze glitch map that player attempts to put the player in for stepping out of bounds when an x or y connection doesn't exist, usually resulting in a freeze. It is a reliable way of causing the bar freeze in all versions prior to Japanese Yellow v1.1. For Pokémon Red and Green and Pokémon Yellow (Japanese) v1.0, it can result in an out of bounds Glitch Hell though more specifically involves an exploitable jump to jp F080
(Echo RAM for D080) (arbitrary code execution).
When D365 or D364 is also set to 0xFF, exiting through an indoor exit may cause the game to simply freeze with a white screen. In Spanish Yellow, map 0x0B may warp the player to a map 0xFF that may either serve as a freeze glitch map or redirection glitch map to Team Rocket Hideout B1F (map 0xC7) valid source map Glitch City.
In versions where map 0xFF typically freezes the game (such as English and Japanese Red/Green/Blue/Yellow) it may still be possible to 'access' map 0xFF by locking/changing any attributes which contribute to its freezes (i.e. its map height/width to not be too large, its sound bank to be one of the valid values 02, 08, 1F, 20, W_MAPSCRIPTPTR (D36E-F (D36D-E in Yellow) to point to a script which doesn't freeze the game, etc.).