The current URL is datacrystal.tcrf.net.
Mother 3/SOB block: Difference between revisions
m (→Format) |
Lorenzooone (talk | contribs) |
||
Line 22: | Line 22: | ||
* <tt>04-.. (..)</tt> = OAM entries | * <tt>04-.. (..)</tt> = OAM entries | ||
The OAM entries follow the same format as the standard [http:// | The OAM entries follow the same format as the standard [http://problemkaputt.de/gbatek.htm#lcdobjoamattributes GBA OAM data]. Each entry uses 8 bytes. | ||
Typically in MOTHER 3, a picture will be composed of many sprites; for example, the NK Cyborg picture is composed of six large sprites, so its primary entry will have 6 OAM sprites. Since the OAM entries store coordinate information, one can easily piece together a full picture from the OAM data, tileset and palette data alone. | Typically in MOTHER 3, a picture will be composed of many sprites; for example, the NK Cyborg picture is composed of six large sprites, so its primary entry will have 6 OAM sprites. Since the OAM entries store coordinate information, one can easily piece together a full picture from the OAM data, tileset and palette data alone. |
Revision as of 21:00, 28 January 2017
Overview
SOB blocks are used for storing sprite arrangement data. They're organized of tables that are two levels deep. They need to be manually associated with a valid tileset and palette group.
Format
- 00-03 (04) = "sob " header
- 04-05 (02) = Number of primary entries
- 06-07 (02) = Number of secondary entries
- 08-.. (..) = Offset table
- ..-.. (..) = Primary entries
- ..-.. (..) = Secondary entries
- ..-.. (04) = "~sob" footer
Offset table
The offset table contains offsets for both the primary and secondary entries. The secondary entry offsets immediately succeed the primary entry offsets. Each offset is 16 bits (unsigned), and is calculated relative to the start of the table (including the header).
Primary entries
The primary entries contain sprite arrangement data.
Primary entry format
- 00-01 (02) = Unclassified data
- 02-03 (02) = Number of OAM sprites in this entry
- 04-.. (..) = OAM entries
The OAM entries follow the same format as the standard GBA OAM data. Each entry uses 8 bytes.
Typically in MOTHER 3, a picture will be composed of many sprites; for example, the NK Cyborg picture is composed of six large sprites, so its primary entry will have 6 OAM sprites. Since the OAM entries store coordinate information, one can easily piece together a full picture from the OAM data, tileset and palette data alone.
Secondary entries
It is not known how secondary entries function. There are typically much fewer secondary entries than primary entries.