Difference between revisions of "Sonic Jam/Models"
From Sonic Retro
m (→Model Groups) |
m (→Model List) |
||
Line 74: | Line 74: | ||
{|class="prettytable" style="width:auto;" | {|class="prettytable" style="width:auto;" | ||
− | ! | + | ! Description||Address |
|- | |- | ||
| Sonic (Normal)||$42620 | | Sonic (Normal)||$42620 |
Revision as of 08:26, 19 February 2021
SCHG: Sonic Jam |
---|
Main Article |
Sonic World |
Model data starts at $3F908 in MUSEUM.MUS.
Model Format
Models generally consist of the following parts. There are some exceptions, but the general order stays the same.
Vertices
The first part are vertices, stored as a 3D vector.
Indexing Table
The second part is the indexing table for quads, using the vertices given. Indices are words, and jump by $08. The first vertex would be $0000; the second would be $0008. There's one for each quad.
Vertex Normals
The third, for objects that use Dynamic Gouraud Shading, are the vertex normals. These are normalized 3D vectors. As you'd expect, there's one for each vertex.
Draw Settings
After the above is the draw settings. There's one list of settings for each quad. Each list is 16 bytes long. Here's its format:
Description | Length |
---|---|
Unknown. Highest bit seems to turn off backface culling. | Byte |
Unknown. Bits $1 and $2 affect depth testing in certain instances. | Byte |
Texture index. $0-$1DB. | Word |
CMDPMOD command for VDP1. Bit flags. | Word |
Unknown. | Word |
Static/Dynamic Gouraud Shading Table Index. | Word |
CMDCTRL command for VDP1. Bit flags. | Word |
Unknown. | Word |
Unknown. | Word |
This can vary from model to model, depending on which parts are present. For Sonic, this consists of the following:
- Pointer to start of vertices (long), number of vertices (long)
- Pointer to start of indexing table (long), number of quads (long)
- Pointer to draw command (long)
- Pointer to vertex normals (long)
Model Groups
Some models, such as Sonic and Tails, consist of multiple sub-models in a group. After the last sub-model in the group, there's a footer.
The first part of the footer is a list of addresses pointing to each sub-model's footer. Replacing one of these with another sub-model footer address will result in that model being drawn instead.
The second part is a list of 3D Vectors, relative positions for each sub-model. They correspond to the addresses given in the previous section.
Certain model groups have some seemingly unused data that appears before the footer. This data seems to correlate with how the model group parenting hierarchy is set up.
Model List
Here's the list of models in the game that are currently known. Addresses given are pointers to model group footers, or model footers for ungrouped models.
Addresses for sub-model footers can be found in the model group footer; just subtract $06040000 from the part address you want if searching in MUSEUM.MUS, as they're set up for High Work RAM.
Description | Address |
---|---|
Sonic (Normal) | $42620 |
Sonic (Jumping) | $45428 |
Sonic (Sprinting) | $44230 |
Jumpball | $49D48 |
Drop Shadow (Sonic) | $49D88 |
Tails | $4D31C |
Tails (Low-Poly) | $4E1B4 |
Test Object? | $4E454 |
Cyan Pixel? | $4E468 |
Black Pixel? | $4E47C |
Blue Pixel? | $4E490 |
Stone Arch | $4E9FC |
Star Balloon | $4EE7C |
Star Balloon (Exploding) | $4F754 |
Checkpoint Post | $4F98C |
Exit Building | $4FE00 |
Exit Doors | $4FEDC |
Drop Shadow (Ring) | $4FF48 |
Drop Shadow (Platform) | $4FF5C |
Palm Tree | $5034C |
Bush | $506F4 |
Spring | $50B44 |
Spinning Top (Tall) | $50DBC |
Post (Tall) | $50E30 |
Post & Spinning Top (Short) | $51130 |
Grassy Platform | $514E4 |
Mission Button | $51888 |
Character House Monitor | $51C6C |
Stone Post (Large) | $51EE0 |
Stone Post (Small) | $52134 |
Water Ripple 1 | $521C4 |
Water Ripple 2 | $521D8 |
Water Ripple 3 | $521EC |
Water Ripple 4 | $52200 |
Water Ripple 5 | $52214 |
Water Ripple 6 | $52228 |
Big Ring | $52FDC |
Seagull | $53224 |
Blue Flicky | $53880 |
Green Flicky | $53BC4 |
Purple Flicky | $53F08 |
Red Flicky | $5424C |
Orange Flicky | $54590 |
Monkey | $54D00 |
Music Shop | $55C14 |
Music Shop Interior | $55D38 |
Art Gallery | $56B44 |
Art Gallery Interior | $56C88 |
Hall of Fame | $57B30 |
Hall of Fame Interior | $57C54 |
Character House (Robotnik) | $58A18 |
Character House (Sonic) | $58B34 |
Character House Interiors | $58D4C |
Movie Theater | $59AF0 |
Movie Theater Interior | $59C14 |
Wall Chunk 1 | $5A090 |
Wall Chunk 2 | $5A4A0 |
Wall Chunk 3 | $5AB8C |
Wall Chunk 4 | $5B20C |
Wall Chunk 5 | $5B604 |
Wall Chunk 6 | $5B9F0 |
Wall Chunk 7 | $5BE44 |
Wall Chunk 8 | $5C270 |
Wall Chunk 9 | $5C560 |
Wall Chunk 10 | $5CA48 |
Wall Chunk 11 | $5CE04 |
Wall Chunk 12 | $5D484 |
Wall Chunk 13 | $5D960 |
Wall Chunk 14 | $5E010 |
Wall Chunk 15 | $5E300 |
Wall Chunk 16 | $5E548 |
Wall Chunk 17 | $5E73C |
Wall Chunk 18 | $5EC0C |
Wall Chunk 19 | $5F1C0 |
Wall Chunk 20 | $5F6F0 |
Wall Chunk 21 | $5FB90 |
Wall Chunk 22 | $5FD30 |
Wall Chunk 23 | $5FF78 |
Wall Chunk 24 | $60070 |
Wall Chunk 25 | $6051C |
Wall Chunk 26 | $608A8 |
Wall Chunk 27 | $60E74 |
Wall Chunk 28 | $6150C |
Wall Chunk 29 | $6191C |
Wall Chunk 30 | $61B34 |
River Collider 1 | $61D3C |
River Collider 2 | $6202C |
River Collider 3 | $622E0 |
River Collider 4 | $625BC |
River Collider 5 | $6292C |
River Collider 6 | $62C00 |
River Collider 7 | $62E9C |
River Collider 8 | $632E4 |
River Collider 9 | $6368C |
River Collider 10 | $638AC |
River Collider 11 | $63AF8 |
Plateau Top Chunk 1 | $63D74 |
Plateau Top Chunk 2 | $6437C |
Plateau Top Chunk 3 | $644EC |
Plateau Top Chunk 4 | $6489C |
Plateau Top Chunk 5 | $64DF0 |
Plateau Top Chunk 6 | $64F54 |
Plateau Top Chunk 7 | $651B4 |
River Chunk 1 | $65588 |
River Chunk 2 | $65BE4 |
River Chunk 3 | $66114 |
River Chunk 4 | $66668 |
River Chunk 5 | $66C40 |
River Chunk 6 | $67284 |
River Chunk 7 | $67730 |
River Chunk 8 | $67E4C |
River Chunk 9 | $68364 |
River Chunk 10 | $68780 |
River Chunk 11 | $68B48 |
River Mask 1 | $68E08 |
River Mask 2 | $69E98 |
River Mask 3 | $697A8 |
River Mask 4 | $69C0C |
River Mask 5 | $6A070 |
River Mask 6 | $6A5D0 |
River Mask 7 | $6A938 |
River Mask 8 | $6ACF4 |
River Mask 9 | $6AF3C |
River Mask 10 | $6B2C8 |
River Mask 11 | $6B588 |
Sonic Statue | $6C9AC |
Robotnik Statue | $6D290 |
Statue Stand | $6D424 |
Big Bridge Chunk 1 | $6DB7C |
Big Bridge Chunk 2 | $6DEFC |
Little Bridge | $6E510 |
Big Bridge Collider | $6EBEC |
Little Bridge Collider | $6EC78 |
Z Camera Trigger 1 | $6F1C0 |
Z Camera Trigger 2 | $6F7D4 |
Z Camera Trigger 3 | $6FDD4 |
Z Camera Trigger 4 | $70394 |
Z Camera Trigger 5 | $70648 |