Actions

SCHG

Difference between revisions of "Sonic Jam/Models"

From Sonic Retro

m
(Added Sonic's Model Addresses)
Line 1: Line 1:
Models start at $3F908 in MUSEUM.MUS.
+
__NOTOC__
 +
{{SCHG SJ}}
 +
Model data starts at $3F908 in MUSEUM.MUS.
  
 
==Model Format==
 
==Model Format==
Line 47: Line 49:
 
This can vary from model to model, depending on which parts are present. For Sonic, this consists of the following:
 
This can vary from model to model, depending on which parts are present. For Sonic, this consists of the following:
  
<ul><li>Pointer to start of vertices (long), number of vertices (long)</li>
+
<ol><li>Pointer to start of vertices (long), number of vertices (long)</li>
  
 
<li>Pointer to start of indexing table (long), number of quads (long)</li>
 
<li>Pointer to start of indexing table (long), number of quads (long)</li>
Line 53: Line 55:
 
<li>Pointer to draw command (long)</li>
 
<li>Pointer to draw command (long)</li>
  
<li>Pointer to vertex normals (long)</li></ul>
+
<li>Pointer to vertex normals (long)</li></ol>
  
 
===Model Groups===
 
===Model Groups===
Line 67: Line 69:
 
==Model List==
 
==Model List==
  
Here's the list of models in the game that I know of. Addresses given are pointers to footers, for both model groups and individual models.
+
Here's the list of models in the game that are currently known. Addresses given are pointers to footers, for both model groups and individual models.
  
 
{|class="prettytable" style="width:auto;"
 
{|class="prettytable" style="width:auto;"
!Sonic||$42620
+
! Name||Address
 +
|-}
 +
 
 +
{|class="prettytable" style="width:auto;"
 +
! Sonic||$42620
 +
|-
 +
| Body||$40058
 +
|-
 +
| Head||$40C58
 +
|-
 +
| Right Thigh||$40DA8
 +
|-
 +
| Right Calf||$41048
 +
|-
 +
| Right Foot||$412A0
 +
|-
 +
| Left Thigh||$413F0
 +
|-
 +
| Left Calf||$41690
 +
|-
 +
| Left Foot||$418E8
 +
|-
 +
| Right Bicep||$41A50
 +
|-
 +
| Right Forearm||$41CF0
 +
|-
 +
| Right Hand||$41F18
 +
|-
 +
| Left Bicep||$42080
 +
|-
 +
| Left Forearm||$42320
 +
|-
 +
| Left Hand||$42548
 
|-
 
|-
| Body||$3FD98
+
| Tail||$42608
 
|}
 
|}
  
 
{{SCHGuides}}
 
{{SCHGuides}}
 
[[Category:SCHG: Sonic Jam]]
 
[[Category:SCHG: Sonic Jam]]

Revision as of 22:23, 18 February 2021

SCHG: Sonic Jam
Main Article
Sonic World

Models
Animations
Textures
Sounds
RAM Editing

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

Footer

This can vary from model to model, depending on which parts are present. For Sonic, this consists of the following:

  1. Pointer to start of vertices (long), number of vertices (long)
  2. Pointer to start of indexing table (long), number of quads (long)
  3. Pointer to draw command (long)
  4. Pointer to vertex normals (long)

Model Groups

Some models, such as Sonic and Tails, consist of multiple models in a group. After the last model in the group, there's a footer.

The first part of the footer is a list of addresses pointing to each model's footer.

The second part is a list of 3D Vectors, relative positions for each 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 footers, for both model groups and individual models.

Name Address
Sonic $42620
Body $40058
Head $40C58
Right Thigh $40DA8
Right Calf $41048
Right Foot $412A0
Left Thigh $413F0
Left Calf $41690
Left Foot $418E8
Right Bicep $41A50
Right Forearm $41CF0
Right Hand $41F18
Left Bicep $42080
Left Forearm $42320
Left Hand $42548
Tail $42608
Sonic Community Hacking Guide
General
SonED2 Manual | Subroutine Equivalency List
Game-Specific
Sonic the Hedgehog (16-bit) | Sonic the Hedgehog (8-bit) | Sonic CD (prototype 510) | Sonic CD | Sonic CD (PC) | Sonic CD (2011) | Sonic 2 (Simon Wai prototype) | Sonic 2 (16-bit) | Sonic 2 (Master System) | Sonic 3 | Sonic 3 & Knuckles | Chaotix | Sonic Jam | Sonic Jam 6 | Sonic Adventure | Sonic Adventure DX: Director's Cut | Sonic Adventure DX: PC | Sonic Adventure (2010) | Sonic Adventure 2 | Sonic Adventure 2: Battle | Sonic Adventure 2 (PC) | Sonic Heroes | Sonic Riders | Sonic the Hedgehog (2006) | Sonic & Sega All-Stars Racing | Sonic Unleashed (Xbox 360/PS3) | Sonic Colours | Sonic Generations | Sonic Forces
Technical information
Sonic Eraser | Sonic 2 (Nick Arcade prototype) | Sonic CD (prototype; 1992-12-04) | Dr. Robotnik's Mean Bean Machine | Sonic Triple Trouble | Tails Adventures | Sonic Crackers | Sonic 3D: Flickies' Island | Sonic & Knuckles Collection | Sonic R | Sonic Shuffle | Sonic Advance | Sonic Advance 3 | Sonic Battle | Shadow the Hedgehog | Sonic Rush | Sonic Classic Collection | Sonic Free Riders | Sonic Lost World
Legacy Guides
The Nemesis Hacking Guides The Esrael Hacking Guides
ROM: Sonic 1 | Sonic 2 | Sonic 2 Beta | Sonic 3

Savestate: Sonic 1 | Sonic 2 Beta/Final | Sonic 3

Sonic 1 (English / Portuguese) | Sonic 2 Beta (English / Portuguese) | Sonic 2 and Knuckles (English / Portuguese)
Move to Sega Retro
Number Systems (or scrap) | Assembly Hacking Guide | 68000 Instruction Set | 68000 ASM-to-Hex Code Reference | SMPS Music Hacking Guide | Mega Drive technical information