Difference between revisions of "Overworld Areas"

From TLoZ: ALTTP Hacking Resources
Jump to: navigation, search
(How maps are stored)
m (Special Areas)
 
(5 intermediate revisions by the same user not shown)
Line 41: Line 41:
 
{|{{prettytable}}
 
{|{{prettytable}}
 
! Index (Light World)
 
! Index (Light World)
! Location (Light World)
 
 
! Index (Dark World)
 
! Index (Dark World)
! Location (Dark World)
 
 
! Size (a{{x}}a)
 
! Size (a{{x}}a)
 
! Description (for Light World)
 
! Description (for Light World)
 
|-
 
|-
 
|{{$|00}} (0)
 
|{{$|00}} (0)
|{{address|0x|8008|????}}(?)
 
 
|{{$|40}} (64)
 
|{{$|40}} (64)
|
 
 
|1024
 
|1024
 
|Lost Woods
 
|Lost Woods
 
|-
 
|-
 
|{{$|02}} (2)
 
|{{$|02}} (2)
|
 
 
|{{$|42}} (66)
 
|{{$|42}} (66)
|
 
 
|512
 
|512
 
|Lumberjacks
 
|Lumberjacks
 
|-
 
|-
 
|{{$|03}} (3)
 
|{{$|03}} (3)
|
 
 
|{{$|43}} (67)
 
|{{$|43}} (67)
|
 
 
|1024
 
|1024
 
|Western Death Mountain
 
|Western Death Mountain
 
|-
 
|-
 
|{{$|05}} (5)
 
|{{$|05}} (5)
|
 
 
|{{$|45}} (69)
 
|{{$|45}} (69)
|
 
 
|1024
 
|1024
 
|Eastern Death Mountain
 
|Eastern Death Mountain
 
|-
 
|-
 
|{{$|07}} (7)
 
|{{$|07}} (7)
|
 
 
|{{$|47}} (71)
 
|{{$|47}} (71)
|
 
 
|512
 
|512
 
|Turtle Rock
 
|Turtle Rock
 
|-
 
|-
 
|{{$|0A}} (10)
 
|{{$|0A}} (10)
|
 
 
|{{$|4A}} (74)
 
|{{$|4A}} (74)
|
 
 
|512
 
|512
 
|Entrance to Death Mountain
 
|Entrance to Death Mountain
 
|-
 
|-
 
|{{$|0F}} (15)
 
|{{$|0F}} (15)
|
 
 
|{{$|4F}} (79)
 
|{{$|4F}} (79)
|
 
 
|512
 
|512
 
|Entrance to Zora's Domain
 
|Entrance to Zora's Domain
 
|-
 
|-
 
|{{$|10}} (16)
 
|{{$|10}} (16)
|
 
 
|{{$|50}} (80)
 
|{{$|50}} (80)
|
 
 
|512
 
|512
 
|Path Between Kakariko Village and Lost Woods
 
|Path Between Kakariko Village and Lost Woods
 
|-
 
|-
 
|{{$|11}} (17)
 
|{{$|11}} (17)
|
 
 
|{{$|51}} (81)
 
|{{$|51}} (81)
|
 
 
|512
 
|512
 
|Kakariko Village Fortune Teller
 
|Kakariko Village Fortune Teller
 
|-
 
|-
 
|{{$|12}} (18)
 
|{{$|12}} (18)
|
 
 
|{{$|52}} (82)
 
|{{$|52}} (82)
|
 
 
|512
 
|512
 
|Pond Between Kakariko Village Fortune Teller and Sanctuary
 
|Pond Between Kakariko Village Fortune Teller and Sanctuary
 
|-
 
|-
 
|{{$|13}} (19)
 
|{{$|13}} (19)
|
 
 
|{{$|53}} (83)
 
|{{$|53}} (83)
|
 
 
|512
 
|512
 
|Sanctuary
 
|Sanctuary
 
|-
 
|-
 
|{{$|14}} (20)
 
|{{$|14}} (20)
|
 
 
|{{$|54}} (84)
 
|{{$|54}} (84)
|
 
 
|512
 
|512
 
|Graveyard
 
|Graveyard
 
|-
 
|-
 
|{{$|15}} (21)
 
|{{$|15}} (21)
|
 
 
|{{$|55}} (85)
 
|{{$|55}} (85)
|
 
 
|512
 
|512
 
|River Between Graveyard and Witch's Hut
 
|River Between Graveyard and Witch's Hut
 
|-
 
|-
 
|{{$|16}} (22)
 
|{{$|16}} (22)
|
 
 
|{{$|56}} (86)
 
|{{$|56}} (86)
|
 
 
|512
 
|512
 
|Witch's Hut
 
|Witch's Hut
 
|-
 
|-
 
|{{$|17}} (23)
 
|{{$|17}} (23)
|
 
 
|{{$|57}} (87)
 
|{{$|57}} (87)
|
 
 
|512
 
|512
 
|East of Witch's Hut
 
|East of Witch's Hut
 
|-
 
|-
 
|{{$|18}} (24)
 
|{{$|18}} (24)
|
 
 
|{{$|58}} (88)
 
|{{$|58}} (88)
|
 
 
|1024
 
|1024
 
|Kakariko Village
 
|Kakariko Village
 
|-
 
|-
 
|{{$|1A}} (26)
 
|{{$|1A}} (26)
|
 
 
|{{$|5A}} (90)
 
|{{$|5A}} (90)
|
 
 
|512
 
|512
 
|Forest Between Kakariko Village and Hyrule Castle
 
|Forest Between Kakariko Village and Hyrule Castle
 
|-
 
|-
 
|{{$|1B}} (27)
 
|{{$|1B}} (27)
|
 
 
|{{$|5B}} (91)
 
|{{$|5B}} (91)
|
 
 
|1024
 
|1024
 
|Hyrule Castle
 
|Hyrule Castle
 
|-
 
|-
 
|{{$|1D}} (29)
 
|{{$|1D}} (29)
|
 
 
|{{$|5D}} (93)
 
|{{$|5D}} (93)
|
 
 
|512
 
|512
 
|Bridge Between Graveyard and Witch's Hut
 
|Bridge Between Graveyard and Witch's Hut
 
|-
 
|-
 
|{{$|1E}} (30)
 
|{{$|1E}} (30)
|
 
 
|{{$|5E}} (94)
 
|{{$|5E}} (94)
|
 
 
|1024
 
|1024
 
|Eastern Palace
 
|Eastern Palace
 
|-
 
|-
 
|{{$|22}} (34)
 
|{{$|22}} (34)
|
 
 
|{{$|62}} (98)
 
|{{$|62}} (98)
|
 
 
|512
 
|512
 
|Smithy
 
|Smithy
 
|-
 
|-
 
|{{$|25}} (37)
 
|{{$|25}} (37)
|
 
 
|{{$|65}} (101)
 
|{{$|65}} (101)
|
 
 
|512
 
|512
 
|Path Between Hyrule Castle and Eastern Palace}} (top)
 
|Path Between Hyrule Castle and Eastern Palace}} (top)
|
 
 
|-
 
|-
 
|{{$|28}} (40)
 
|{{$|28}} (40)
|
 
 
|{{$|68}} (104)
 
|{{$|68}} (104)
|
 
 
|512
 
|512
 
|Kakariko Village Maze Race
 
|Kakariko Village Maze Race
 
|-
 
|-
 
|{{$|29}} (41)
 
|{{$|29}} (41)
|
 
 
|{{$|69}} (105)
 
|{{$|69}} (105)
|
 
 
|512
 
|512
 
|Kakariko Village Library
 
|Kakariko Village Library
 
|-
 
|-
 
|{{$|2A}} (42)
 
|{{$|2A}} (42)
|
 
 
|{{$|6A}} (106)
 
|{{$|6A}} (106)
|
 
 
|512
 
|512
 
|Haunted Grove
 
|Haunted Grove
 
|-
 
|-
 
|{{$|2B}} (43)
 
|{{$|2B}} (43)
|
 
 
|{{$|6B}} (107)
 
|{{$|6B}} (107)
|
 
 
|512
 
|512
 
|Forest Between Haunted Grove and Link's House
 
|Forest Between Haunted Grove and Link's House
 
|-
 
|-
 
|{{$|2C}} (44)
 
|{{$|2C}} (44)
|
 
 
|{{$|6C}} (108)
 
|{{$|6C}} (108)
|
 
 
|512
 
|512
 
|Link's House
 
|Link's House
 
|-
 
|-
 
|{{$|2D}} (45)
 
|{{$|2D}} (45)
|
 
 
|{{$|6D}} (109)
 
|{{$|6D}} (109)
|
 
 
|512
 
|512
 
|Path Between Hyrule Castle and Eastern Palace}} (bottom)
 
|Path Between Hyrule Castle and Eastern Palace}} (bottom)
|
 
 
|-
 
|-
 
|{{$|2E}} (46)
 
|{{$|2E}} (46)
|
 
 
|{{$|6E}} (110)
 
|{{$|6E}} (110)
|
 
 
|512
 
|512
 
|Caves South of Eastern Palace (left)
 
|Caves South of Eastern Palace (left)
|
 
 
|-
 
|-
 
|{{$|2F}} (47)
 
|{{$|2F}} (47)
|
 
 
|{{$|6F}} (111)
 
|{{$|6F}} (111)
|
 
 
|512
 
|512
 
|Caves South of Eastern Palace (right)
 
|Caves South of Eastern Palace (right)
|
 
 
|-
 
|-
 
|{{$|30}} (48)
 
|{{$|30}} (48)
|
 
 
|{{$|70}} (112)
 
|{{$|70}} (112)
|
 
 
|1024
 
|1024
 
|Desert of Mystery
 
|Desert of Mystery
 
|-
 
|-
 
|{{$|32}} (50)
 
|{{$|32}} (50)
|
 
 
|{{$|72}} (114)
 
|{{$|72}} (114)
|
 
 
|512
 
|512
 
|South of Haunted Grove
 
|South of Haunted Grove
 
|-
 
|-
 
|{{$|33}} (51)
 
|{{$|33}} (51)
|
 
 
|{{$|73}} (115)
 
|{{$|73}} (115)
|
 
 
|512
 
|512
 
|Northwestern Great Swamp
 
|Northwestern Great Swamp
 
|-
 
|-
 
|{{$|34}} (52)
 
|{{$|34}} (52)
|
 
 
|{{$|74}} (116)
 
|{{$|74}} (116)
|
 
 
|512
 
|512
 
|Northeastern Great Swamp
 
|Northeastern Great Swamp
 
|-
 
|-
 
|{{$|35}} (53)
 
|{{$|35}} (53)
|
 
 
|{{$|75}} (117)
 
|{{$|75}} (117)
|
 
 
|1024
 
|1024
 
|Lake Hylia
 
|Lake Hylia
 
|-
 
|-
 
|{{$|37}} (55)
 
|{{$|37}} (55)
|
 
 
|{{$|77}} (119)
 
|{{$|77}} (119)
|
 
 
|512
 
|512
 
|Ice Cave
 
|Ice Cave
 
|-
 
|-
 
|{{$|3A}} (58)
 
|{{$|3A}} (58)
|
 
 
|{{$|7A}} (122)
 
|{{$|7A}} (122)
|
 
 
|512
 
|512
 
|Path Between Desert of Mystery and Great Swamp
 
|Path Between Desert of Mystery and Great Swamp
 
|-
 
|-
 
|{{$|3B}} (59)
 
|{{$|3B}} (59)
|
 
 
|{{$|7B}} (123)
 
|{{$|7B}} (123)
|
 
 
|512
 
|512
 
|Southwestern Great Swamp
 
|Southwestern Great Swamp
 
|-
 
|-
 
|{{$|3C}} (60)
 
|{{$|3C}} (60)
|
 
 
|{{$|7C}} (124)
 
|{{$|7C}} (124)
|
 
 
|512
 
|512
 
|Southeastern Great Swamp
 
|Southeastern Great Swamp
 
|-
 
|-
 
|{{$|3F}} (63)
 
|{{$|3F}} (63)
|
 
 
|{{$|7F}} (127)
 
|{{$|7F}} (127)
|
 
 
|512
 
|512
 
|Path Between Lake Hylia and Ice Cave
 
|Path Between Lake Hylia and Ice Cave
Line 335: Line 249:
  
 
;{{$|80}} ― 512{{x}}512
 
;{{$|80}} ― 512{{x}}512
: Master Sword area ― (0,0) to (255,511)
+
: Master Sword area ― (0, 0) to (255, 511)
: Area under the bridge ― (256,0) to (511,255)
+
: Area under the bridge ― (256, 0) to (511, 255)
  
 
;{{$|81}} ― 512{{x}}512
 
;{{$|81}} ― 512{{x}}512
Line 342: Line 256:
  
 
==How maps are stored==
 
==How maps are stored==
{{note|Finish this}}
+
===Compression===
===Background===
+
The background is composed of 32{{x}}32 blocks and are LZ1 compressed.
  
The background is composed of 32{{x}}32 blocks. How these blocks are stored is compressed.
+
===Map32 to Map16 Conversion Values===
 +
* {{0x|18000|1B3FE|3FE}} = Upper leftcorners (end with {{$|FF}} at {{0x|1B3FF}})
 +
* {{0x|1B400|1E7FE|3FE}} = Upper right corners (end with {{$|FF}} at {{0x|1E7FF}})
 +
* {{0x|20000|233FE|3FE}} = Lower leftcorners (end with {{$|FF}} at {{0x|233FF}})
 +
* {{0x|23400|267EE|3FE}} = Lower right corners (end with {{$|FF}} at {{0x|267EF}})
 +
 +
{{note|1=Theses value come in pack of {{blue|4 bytes}}, followed by {{green|2 bytes}}. The {{green|2 bytes}} are 4 nibble value that are the extension of the {{blue|4 first}}}}
  
'''Example:''' {{red|aa}}{{blue|bb}}{{red|aa}}{{blue|bb}} {{hex|...}} {{red|aa}}{{blue|bb}}; Where {{blue|##}} is the ID of the 32{{x}}32 block (1 byte)
+
{{example|1=You have theses bytes:
  
In the case that {{red|aa}} = {{hex|00}} and {{blue|bb}} = {{hex|nn}}, blocks of ID {{hex|nn}} will be displayed sequentially. Outside the value of {{hex|00}}, {{red|aa}} produces interesting effects
+
{{blue|05 06 07 08 }}{{green|30 1A}}
 +
 
 +
* {{blue|05}} become {{$|305}}
 +
* {{blue|06}} stays {{$|06}}
 +
* {{blue|07}} become {{$|107}}
 +
* {{blue|08}} become {{$|A08}}}}
 +
 
 +
==Map8 to Map16 Conversion Values==
 +
* {{0x|78000|?????|470?}} = Map8 to Map16 conversion values (8 bytes per tile16), 2 byte each tile8
 +
* {{red|v}}{{orange|h}}{{green|o}}{{blue|ppp}}{{purple|cc cccccccc}}
 +
** {{red|v}} = mirror vertical
 +
** {{orange|h}} = mirror horizontal
 +
** {{green|o}} = ???
 +
** {{blue|p}} = priority tile
 +
** {{purple|c}} = tile index
 +
 
 +
==Map Size==
 +
* {{0x|12844|12883}} = 1byte each map
 +
** {{$|00}} = 512{{x}}512pixel map
 +
** {{$|20}} = 1024{{x}}1024 pixel map
 +
 
 +
==Compressed tile arragement==
 +
* {{0x|1794D}} = LONGPointers all tiles of maps [High] (mapid3)
 +
* {{0x|17B2D}} = LONGPointers all tiles of maps [Low](mapid3)
 +
 
 +
{{Note|Data leading to is compressed using the LZ2 compression {{0x|05D97}}  tiles gfx to load the map (correspond to GFX# in HM) surprisingly overworld only use 32 to 47 LW, 48 to 63 DW, 4 bytes per gfx}}
  
 
{{toc}}
 
{{toc}}

Latest revision as of 00:22, 24 December 2017

This is a subpage of Overworld
See also: Standard Notation

Outdoor areas (also known as the Overworld) come in two flavors: Normal and special. Normal outdoor areas (the Light world and the Dark world) are mirrored 8‍×​8 grids of 512‍×​512-pixel cells for a total of 64 cells and a 4096‍×​4096-pixel area in size. Normal outdoor grid cells can be quadruple in size (1024‍×​1024 pixels), in which case their indices represent their top-left quadrants and the indices for the other three quadrants they occupy do not occur. Special outdoor areas (such as Zora's Domain) are separate individual mini-areas on their own.

Area Index

In WRAM, there is a byte which indicates whether or not the player is currently in an indoor or outdoor area, and when the player is in an outdoor area, there is a word which contains the index of the outdoor area the player is currently in.

$7E001B[$1]
0 while player is outside
1 while player is inside
$7E008A[$2]
the current area index while player is outside
invalid while player is inside

Player Coordinates

See also: Player Position

Let A be the current area index, (Px,Py) be the current absolute player coordinates, and (Lx,Ly) be the local coordinates of the player within the current area.

When the player is in the Light world (area index $00..$3F), the player's coordinates originate at the top-left corner of area $00, and the coordinates can be calculated as follows.

Lx = Px - ( A % 8 ) * 512
Ly = Py - ( A / 8 ) * 512

When the player is in the Dark world (area index $40..$7F), the player's coordinates originate at the top-left corner of area $40, and the coordinates can be calculated as follows.

Lx = Px - ( ( A - $40 ) % 8 ) * 512
Ly = Py - ( ( A - $40 ) / 8 ) * 512

When the player is in a special area (area index $80 and up), the player's coordinates originate at the top-left corner of the current special area. There are two special areas: $80 combines the Master Sword area and the area under the bridge east of the player's house, and $81 is Zora's Domain. Local coordinates within the Master Sword area and within Zora's Domain are equal to the absolute coordinates. The player is in the area under the bridge when their X coordinate is 256 or greater, and their local X coordinate is simply their absolute X coordinate minus 256.

The Light World and the Dark World

The Light world and Dark world mirror each other: Any area index in the Light world refers to an area index in the Dark world of the same size and at the same location, except the Dark world index is increased by $40. The following table lists the areas of both worlds by their Light world name for simplicity.

Index (Light World) Index (Dark World) Size (a‍×​a) Description (for Light World)
$00 (0) $40 (64) 1024 Lost Woods
$02 (2) $42 (66) 512 Lumberjacks
$03 (3) $43 (67) 1024 Western Death Mountain
$05 (5) $45 (69) 1024 Eastern Death Mountain
$07 (7) $47 (71) 512 Turtle Rock
$0A (10) $4A (74) 512 Entrance to Death Mountain
$0F (15) $4F (79) 512 Entrance to Zora's Domain
$10 (16) $50 (80) 512 Path Between Kakariko Village and Lost Woods
$11 (17) $51 (81) 512 Kakariko Village Fortune Teller
$12 (18) $52 (82) 512 Pond Between Kakariko Village Fortune Teller and Sanctuary
$13 (19) $53 (83) 512 Sanctuary
$14 (20) $54 (84) 512 Graveyard
$15 (21) $55 (85) 512 River Between Graveyard and Witch's Hut
$16 (22) $56 (86) 512 Witch's Hut
$17 (23) $57 (87) 512 East of Witch's Hut
$18 (24) $58 (88) 1024 Kakariko Village
$1A (26) $5A (90) 512 Forest Between Kakariko Village and Hyrule Castle
$1B (27) $5B (91) 1024 Hyrule Castle
$1D (29) $5D (93) 512 Bridge Between Graveyard and Witch's Hut
$1E (30) $5E (94) 1024 Eastern Palace
$22 (34) $62 (98) 512 Smithy
$25 (37) $65 (101) 512 Path Between Hyrule Castle and Eastern Palace}} (top)
$28 (40) $68 (104) 512 Kakariko Village Maze Race
$29 (41) $69 (105) 512 Kakariko Village Library
$2A (42) $6A (106) 512 Haunted Grove
$2B (43) $6B (107) 512 Forest Between Haunted Grove and Link's House
$2C (44) $6C (108) 512 Link's House
$2D (45) $6D (109) 512 Path Between Hyrule Castle and Eastern Palace}} (bottom)
$2E (46) $6E (110) 512 Caves South of Eastern Palace (left)
$2F (47) $6F (111) 512 Caves South of Eastern Palace (right)
$30 (48) $70 (112) 1024 Desert of Mystery
$32 (50) $72 (114) 512 South of Haunted Grove
$33 (51) $73 (115) 512 Northwestern Great Swamp
$34 (52) $74 (116) 512 Northeastern Great Swamp
$35 (53) $75 (117) 1024 Lake Hylia
$37 (55) $77 (119) 512 Ice Cave
$3A (58) $7A (122) 512 Path Between Desert of Mystery and Great Swamp
$3B (59) $7B (123) 512 Southwestern Great Swamp
$3C (60) $7C (124) 512 Southeastern Great Swamp
$3F (63) $7F (127) 512 Path Between Lake Hylia and Ice Cave

Special Areas

$80 ― 512‍×​512
Master Sword area ― (0, 0) to (255, 511)
Area under the bridge ― (256, 0) to (511, 255)
$81 ― 512‍×​512
Zora's Domain

How maps are stored

Compression

The background is composed of 32‍×​32 blocks and are LZ1 compressed.

Map32 to Map16 Conversion Values

  • 0x18000 = Upper leftcorners (end with $FF at 0x1B3FF)
  • 0x1B400 = Upper right corners (end with $FF at 0x1E7FF)
  • 0x20000 = Lower leftcorners (end with $FF at 0x233FF)
  • 0x23400 = Lower right corners (end with $FF at 0x267EF)



Map8 to Map16 Conversion Values

  • 0x78000 = Map8 to Map16 conversion values (8 bytes per tile16), 2 byte each tile8
  • vhopppcc cccccccc
    • v = mirror vertical
    • h = mirror horizontal
    • o = ???
    • p = priority tile
    • c = tile index

Map Size

  • 0x12844 = 1byte each map
    • $00 = 512‍×​512pixel map
    • $20 = 1024‍×​1024 pixel map

Compressed tile arragement

  • 0x1794D = LONGPointers all tiles of maps [High] (mapid3)
  • 0x17B2D = LONGPointers all tiles of maps [Low](mapid3)


Navigate

Table of Contents
SpritesDungeonsOverworldUnderworldSRAM MapRAM MapROM MapMusicMonologueCreditsDumpsMiscellaneousTo-Do/Suggestions