Actions

SCHG

Sonic Adventure 2/Model Formats

From Sonic Retro

SCHG: Sonic Adventure 2
Dreamcast
GameCube
PC

The following is a breakdown of the model information used by all versions of Sonic Adventure 2.

Please make note of the version of the game that's being examined, as the byte order varies depending on the game and the file. The Dreamcast version of SA2 and the EXE/DLL of SA2 PC store their data in Little Endian, while SA2B and the rest of SA2 PC is in Big Endian.

The base addresses for models are as follows:
SA2 DC 1STREAD: 0x8C010000
SA2 DC STG Files: 0x8C500000
SA2 PC EXE: 0x402600
SA2 PC Data_DLL: 0x10002000

Chunk Model Format

ATTACH struct

Offset Type Description Notes
0 Pointer Vertlist
4 Pointer Polylist
8 Float[3] Model Center
14 Float Radius

OBJECT struct

Offset Type Description Notes
0 4 Bytes Flags See section below.
4 Pointer Attach
8 Float[3] Position
14 Int[3] Rotation Signed BAMS (0x10000 = 360°)
20 Float[3] Scale Ignored for level geometry.
2C Pointer OBJECT Child
30 Pointer OBJECT Sibling

GC Model Format

ATTACH Struct

Offset Type Description Notes
0 Pointer Vertlist
4 4 Bytes Unknown, tends to be null
8 Pointer Opaque Polylist
C Pointer Alpha Polylist
10 Short Opaque Poly Count
12 Short Alpha Poly Count
14 Float[3] Model Center
20 Float Radius

OBJECT struct

Same as Chunk Model

OBJECT Flags

These flags have (or don't have) various effects on how the model data is used.

Bit Value (hex) Description
0 1 Don't apply position values. Seems to have no actual effect.
1 2 Don't apply rotation values. Seems to have no actual effect.
2 4 Don't apply scale values. Seems to have no actual effect.
3 8 Don't render this model. Does not affect level geometry.
4 10 Don't process children. Seems to have no actual effect.
5 20 Rotation values are in ZYX order. Seems to have no actual effect.
6 40 Don't include this model for animations.
7 80 Don't include this model for morphs.

References


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 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