Difference between revisions of "Sprites"

From TLoZ: ALTTP Hacking Resources
Jump to: navigation, search
(Important Hex Addresses)
Line 6: Line 6:
 
===Dungeon Sprite Data===
 
===Dungeon Sprite Data===
 
The pointer table for dungeon sprite data is located at $04D62E. The pointers are 2 byte local addresses. You can find the pointer to a given room's data by taking the room number, multiplying it by two and using that as an offset in this array. The sprite data begins at (and the first pointer points to) $04D92E.
 
The pointer table for dungeon sprite data is located at $04D62E. The pointers are 2 byte local addresses. You can find the pointer to a given room's data by taking the room number, multiplying it by two and using that as an offset in this array. The sprite data begins at (and the first pointer points to) $04D92E.
 
+
===Overworld Sprite Data===
 +
There are separate pointer tables for each phase of the game. The "phase of the game" refers to the byte located at $7EF3C5. If it's set to $00 or $01, the table is located at $04C881, and has values only for the light world screens, thus dark world screens will roll over to the light world data from the following table and of course be incorrect. The second table is for when the game is in phase $02 (after rescuing Zelda) and is located at $04C901. The third table represents phase $03 and is located at $04CA21. The pointers are 2 byte local addresses.
 
==Sprites==
 
==Sprites==
  

Revision as of 05:26, 14 April 2016

Important Hex Addresses

HP Table

The sprite HP table is located at $06B173. Each value is a single byte, so the offset is equal to the sprite ID number as listed below. All values from $00 to $FF are viable for all sprites, but some cannot be damaged by any weapon without more complex tampering with ASM. The sprite's HP is loaded to an array at RAM address $7E0E50, where $10(decimal: 16) values can be loaded at once.

Damage Table

The sprite damage table is located at $06B266. Each value is a single byte, so the offset is equal to the sprite ID number as listed below. There are a finite amount of damage types which all have a different set of damage values for each of the player's armor levels. Not all damage types are compatible with all sprites.

Dungeon Sprite Data

The pointer table for dungeon sprite data is located at $04D62E. The pointers are 2 byte local addresses. You can find the pointer to a given room's data by taking the room number, multiplying it by two and using that as an offset in this array. The sprite data begins at (and the first pointer points to) $04D92E.

Overworld Sprite Data

There are separate pointer tables for each phase of the game. The "phase of the game" refers to the byte located at $7EF3C5. If it's set to $00 or $01, the table is located at $04C881, and has values only for the light world screens, thus dark world screens will roll over to the light world data from the following table and of course be incorrect. The second table is for when the game is in phase $02 (after rescuing Zelda) and is located at $04C901. The third table represents phase $03 and is located at $04CA21. The pointers are 2 byte local addresses.

Sprites