Actions

SCHG

Sonic Jam/Animations

From Sonic Retro

SCHG: Sonic Jam
Main Article
Sonic World

Models
Animations
Textures
Sounds
RAM Editing

Animation Data starts at $25F7C in MUSEUM.MUS.

Animation Format

Animations consist of two distinct parts. The first part is the frames that make up the animation. The second part is a jump table, containing a list of offsets to the start of each frame, relative to the table.

Animation Frames

The first word of a frame is a set of bit flags that define how much data is specified in the frame. If all the bits are set, the frame is empty. Here's its layout:

Bit Description
$0001 No X rotations
$0002 No Y rotations
$0004 No Z rotations
$0008 No Global X positioning
$0010 No Global Y positioning
$0020 No Global Z positioning
$0040 No Global X rotation
$0080 No Global Y rotation
$0100 No Global Z rotation
$0200 Unused?
$0400 Unused?
$0800 Unused?
$1000 Unused?
$2000 Unused?
$4000 Unused?
$8000 Unused?

The rest of the frame consists of any elements that weren't culled by the flags. These first two elements will always be here, assuming a flag of $0000:

  1. 3D Vector defining the model's global position.
  2. Euler Rotation defining the model's global rotation.

Each subsequent element is an Euler Rotation for each sub-model in the model this animation belongs to. For Sonic or Tails, this means:

  1. Body Rotation
  2. Head Rotation
  3. Right Thigh Rotation
  4. Right Calf Rotation
  5. Right Foot Rotation
  6. Left Thigh Rotation
  7. Left Calf Rotation
  8. Left Foot Rotation
  9. Right Bicep Rotation
  10. Right Forearm Rotation
  11. Right Hand Rotation
  12. Left Bicep Rotation
  13. Left Forearm Rotation
  14. Left Hand Rotation
  15. Tail Rotation

For any flags that are set, that part of the frame will be skipped. If, say, the No Y Rotations flag is set, all sub-model rotations will consist of two words in a row (an X and a Z rotation), and then the next sub-model's rotations immediately after.

Jump Table

The jump table consists of a series of words. There will be one word for each frame in the animation, plus one $0000 word to mark the end of the table.

Each frame's word is the signed offset from the start of the table to get to the start of the frame in question. For example, the offset for the first frame of the falling animation is $F650. The offset for the last frame of the falling animation is $FFC2.

Animation List

Here's the list of animations that are currently known. Addresses are to the start of the jump table for each.

Name Address
Falling $2692C
Front-Flip Dive $27046
Diagonal Spring Launch $27368
Curl $275B0
Sprinting $277D0
Running $$27BFE
Uncurl $27D56
Jump $27F92
Start Idle $28882
Idle $28E1A
Skid $290AC
Walking $298FA
Start Push $29AD8
Push $2A3A6
Open Door? $2A728
Pick Up Item 1 $2AC66
Push Button? $2B0A2
Hang $2BF22
Balancing $2C924
Start Enter Building $2D6C8
Enter Building $2E5A8
Pick Up Item 2 $2F2F6
Put Item Away 1 $2FE42
Put Item Away 2 $3008E
Start Examine $30860
Finish Examine $30D3C
Vertical Spring $31162
Start Spring Fall $3127C
Spring Fall $31666
Flying $324CA
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 CD (prototype; 1992-12-04) | Sonic 2 (Nick Arcade prototype) | Dr. Robotnik's Mean Bean Machine | Sonic Triple Trouble | Tails Adventures | Sonic & Knuckles Collection | Sonic Crackers | Sonic 3D: Flickies' Island | Sonic R | Sonic Advance | Sonic Advance 3 | Sonic Battle | Sonic Shuffle | Shadow the Hedgehog | Sonic Rush | Sonic Classic Collection | 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