If you are still using the old URL (datacrystal.romhacking.net), please update your bookmarks! The old URL may stop working soon.
The current URL is datacrystal.tcrf.net.
The current URL is datacrystal.tcrf.net.
EarthBound Beginnings/Sprite data: Difference between revisions
Jump to navigation
Jump to search
MOTHERrocks (talk | contribs) (correct mistake) |
m (Hawk moved page EarthBound Zero/Sprite data to EarthBound Beginnings/Sprite data) |
||
(9 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
|game=EarthBound Zero | |game=EarthBound Zero | ||
|loc=ROM | |loc=ROM | ||
|numentries= | |numentries=0x289 | ||
|entrylength= | |entrylength=4 (0x4) | ||
|start=2A010 | |start=2A010 | ||
|end=2C00F | |end=2C00F | ||
Line 10: | Line 10: | ||
}} | }} | ||
This controls the sprites in the game. | This controls the sprites in the game. | ||
== | ==Pointer== | ||
This starts with 0x289 pointers, which each correspond to one sprite: | |||
* Bytes 0-1: Pointer | |||
* Byte 2: PPU offset | |||
*:Each of the sprite's PPU tiles are offset by this amount, plus 0x18000 ($58010 in ROM) | |||
* Byte 3: Attributes | |||
** Bits 0-1: Palette 1 | |||
** Bits 2-3: Palette 2 | |||
*:Multiply these numbers by 4, then add 0x29a2d to get the location of the palette in ROM | |||
** Bit 4: '''Unknown''' | |||
*:Set for the 4 main party members, and some other sprites | |||
** Bits 5-7: '''Unknown''' | |||
*:Only used on sprites 0x1df, 0x1e0 and 0x226 | |||
==Sprite== | |||
This example uses the sprite data for Ninten forwards, located at 2ABAC-2ABBB: | This example uses the sprite data for Ninten forwards, located at 2ABAC-2ABBB: | ||
<pre> | <pre> | ||
Line 22: | Line 35: | ||
In this example, <code>10 20 10 02</code> is the top-right part of Ninten. | In this example, <code>10 20 10 02</code> is the top-right part of Ninten. | ||
===Tiles=== | ===Tiles=== | ||
Each | Each 4 bytes is [https://www.nesdev.org/wiki/PPU_OAM PPU OAM]: | ||
* Byte 0: X location | * Byte 0: X location | ||
* Byte 1: Y location | * Byte 1: Y location | ||
* Byte 2: Attributes | * Byte 2: Attributes | ||
*: | ** Bits 0-1: Palette | ||
** Bits 2-4: Unused | |||
** Bit 5: Priority (0=in front of background, 1=behind background) | |||
** Bit 6: Mirror X | |||
** Bit 7: Mirror Y | |||
* Byte 3: PPU tile index | * Byte 3: PPU tile index | ||
*: | *:The pointer's PPU offset is added to this value |
Latest revision as of 12:15, 26 January 2024
This is a sub-page of EarthBound Beginnings.
Ally data | |
Game | EarthBound Zero |
Start Address | 2A010 |
End Address | 2C00F |
# of Entries | 0x289 |
Entry Length | 4 (0x4) |
Total Length | 8192 bytes (0x2000) |
Back to the ROM map |
This controls the sprites in the game.
Pointer
This starts with 0x289 pointers, which each correspond to one sprite:
- Bytes 0-1: Pointer
- Byte 2: PPU offset
- Each of the sprite's PPU tiles are offset by this amount, plus 0x18000 ($58010 in ROM)
- Byte 3: Attributes
- Bits 0-1: Palette 1
- Bits 2-3: Palette 2
- Multiply these numbers by 4, then add 0x29a2d to get the location of the palette in ROM
- Bit 4: Unknown
- Set for the 4 main party members, and some other sprites
- Bits 5-7: Unknown
- Only used on sprites 0x1df, 0x1e0 and 0x226
Sprite
This example uses the sprite data for Ninten forwards, located at 2ABAC-2ABBB:
10 20 10 02 18 20 10 03 10 28 11 10 18 28 11 11
Sprite are made up of 4 PPU tiles, each of which are four bytes in the sprite data, in order:
- Top-right
- Top-left
- Bottom-right
- Bottom-left
In this example, 10 20 10 02
is the top-right part of Ninten.
Tiles
Each 4 bytes is PPU OAM:
- Byte 0: X location
- Byte 1: Y location
- Byte 2: Attributes
- Bits 0-1: Palette
- Bits 2-4: Unused
- Bit 5: Priority (0=in front of background, 1=behind background)
- Bit 6: Mirror X
- Bit 7: Mirror Y
- Byte 3: PPU tile index
- The pointer's PPU offset is added to this value