EarthBound Beginnings/Sprite data: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
m (correct formatting)
m (Xkeeper moved page EarthBound Zero:Sprite data to EarthBound Zero/Sprite data: normalize subpages and titles)
(No difference)

Revision as of 02:41, 24 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:

  1. Top-right
  2. Top-left
  3. Bottom-right
  4. 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