Difference between revisions of "Underworld"

From TLoZ: ALTTP Hacking Resources
Jump to: navigation, search
(Created page with "==Important Hex Addresses== ===Room Headers=== *$027502-$027781 - Pointer Table, 2 byte local addresses, indexed by room. *$027781-$027FEF - Data <blockquote> Headers are fo...")
(No difference)

Revision as of 10:50, 17 April 2016

Important Hex Addresses

Room Headers

  • $027502-$027781 - Pointer Table, 2 byte local addresses, indexed by room.
  • $027781-$027FEF - Data

Headers are formatted thusly:

  • byte 0: aaab bbcd
    • the a bits are transformed into 0000 0aaa and stored to $0414 ("BG2" in Hyrule Magic)
    • the b bits are transformed into 0000 0bbb and stored to $046C ("Collision" in Hyrule Magic)
    • the c bit is unused
    • the d bit is stored to $7EC005 (If set, use a lights out routine in the room transition)
  • byte 1: aabb bbbb
    • the a bits are unused
    • the b bits are transformed into bbbb bb00, thus making them a multiple of 4.

This value is used to load 4 different palettes for the dungeon, and corresponds to, you guessed it, Palette # in Hyrule Magic!

The resulting index is used to load values for $0AB6, $0AAC, $0AAD, and $0AAE

  • byte 2: gets stored to $0AA2 (GFX # in Hyrule Magic)
  • byte 3: value + #$40 gets stored to $0AA3 (Sprite GFX # in Hyrule Magic)
  • byte 4: gets stored to $00AD ("Effect" in Hyrule Magic)
  • byte 5: gets stored to $00AE ("Tag1" in Hyrule Magic)
  • byte 6: gets stored to $00AF ("Tag2" in Hyrule Magic)

These are the planes to use for bytes 9 through D. This determines which BG you appear on, and possibly more.

  • byte 7: aabb ccdd
    • the a bits are transformed into 0000 00aa and stored to $063F
    • the b bits are transformed into 0000 00bb and stored to $063E
    • the c bits are transformed into 0000 00cc and stored to $063D
    • the d bits are transformed into 0000 00dd and stored to $063C

Note, the only safe values for a plane seem to be 0,1, or 2. Hyrule Magic appears to violate this rule by letting you put 3 down, but nothing higher.

  • byte 8: aaaa aabb
    • the a bits are unused
    • the b bits are transformed into 0000 00bb and stored to $0640
  • byte 9: stored to $7EC000 These are all room numbers that you could possibly exit to.
    • byte A: stored to $7EC001
    • byte B: stored to $7EC002
    • byte C: stored to $7EC003
    • byte D: stored to $7EC004

Sprite Data

  • $04D62E-$04D92E - Pointer Table, 2 byte local addresses, indexed by room.

Object Data

  • $0F8000-$0F83BF - Pointer Table, 3 byte long addresses, indexed by room.

Dungeon Secrets Data

  • $00DB69 - $00DDE8 - Pointer Table

Push Block Data

  • $0271DE-$027369 - Pointer Table

(Inter Room) Torch Data

  • $02736A-$027489 - Pointer Table

Chest Contents

  • $00E96E - $00EB65 - Data

Rooms

Main Map

The main underworld map consists of $FF (decimal: 256) rooms.

Secondary Map