Actions

SCHG

Difference between revisions of "Chaotix"

From Sonic Retro

m (Level data pointers)
(RAM Locations)
Line 318: Line 318:
 
|$11B088
 
|$11B088
 
|Mighty ring and hand
 
|Mighty ring and hand
 +
|}
 +
 +
==Mapping Locations==
 +
===Planes, Enigma-compressed===
 +
{| border="1" class="prettytable"
 +
!ROM Address||X Size||Description
 +
|-
 +
|$2C801A
 +
|37
 +
|Sound Test layout
 
|}
 
|}
  

Revision as of 12:36, 22 January 2010

This is the Sonic Community Hacking Guide for Knuckles' Chaotix.

Pointer lists

Level data pointers

Knuckles' Chaotix uses lists of pointers to get level data. On the 68000 side, these lists come in two forms:

  • Triple indirection - At the given address is a list of pointers corresponding to the current level. At each address in that list is a list of pointers corresponding to stage numbers. At each address in this new list is a list of addresses corresponding to the time of day, whose entries point to the actual data.
  • Offset lists - The pointers are represented as jump tables are represented (a list of words describing offsets), except this time, the offsets are from the address of each word, and not from a master address. These lists take the form
zone 0 stage 0 morning
zome 0 stage 0 day
zone 0 stage 0 sunset
zone 0 stage 0 night
zone 0 stage 1 morning
zone 0 stage 1 day
...
zone 0 stage 6 sunset
zone 0 stage 6 night
zone 1 stage 0 morning
...
Some assume the zone, and therefore take this format:
stage 0 morning
stage 0 day
stage 0 sunset
stage 0 night
stage 1 morning
stage 1 day
...
stage 6 sunset
stage 6 night
ROM Address List Format Description
$2B32B0 Offset list Genesis format level palettes.
$2B61FA Offset list, zone assumed Amazing Arena lit palettes.

Palette Locations

Genesis Format

Palette Offset Description
$0066C8 Credits - Flames
$006E18 Sound Test - Foreground
$006E98 Sound Test - Amy
$2B3470 Botanic Base Stages 1-3 - Morning
$2B34F0 Botanic Base Stages 1-3 - Day
$2B3570 Botanic Base Stages 1-3 - Sunset
$2B35F0 Botanic Base Stages 1-3 - Night
$2B3670 Botanic Base Stage 4 - Morning
$2B36F0 Botanic Base Stage 4 - Day
$2B3770 Botanic Base Stage 4 - Sunset
$2B37F0 Botanic Base Stage 4 - Night
$2B3870 Botanic Base Stage 5 - Morning
$2B38F0 Botanic Base Stage 5 - Day
$2B3970 Botanic Base Stage 5 - Sunset
$2B39F0 Botanic Base Stage 5 - Night
$2B3A70 Speed Slider - Morning
$2B3AF0 Speed Slider - Day
$2B3B70 Speed Slider Stages 1 and 2 - Sunset
$2B3BF0 Speed Slider Stages 3-5 - Sunset
$2B3C70 Speed Slider - Night
$2B3CF0 Amazing Arena Stages 1 and 2 - Morning/Day - Unlit
$2B3D70 Amazing Arena Stages 1 and 2 - Sunset/Night - Unlit
$2B3DF0 Amazing Arena Stages 3 and 4 - All - Unlit
$2B3E70 Amazing Arena Stage 5 - All - Unlit
$2B3EF0 Techno Tower Stages 1 and 2 - Morning
$2B3F70 Techno Tower Stages 3 and 4 - Morning
$2B3FF0 Techno Tower Stage 5 - Morning
$2B4070 Techno Tower Stages 1 and 2 - Day
$2B40F0 Techno Tower Stages 3 and 4 - Day
$2B4170 Techno Tower Stage 5 - Day
$2B41F0 Techno Tower Stages 1-4 - Sunset
$2B4270 Techno Tower Stage 5 - Sunset
$2B42F0 Techno Tower Stages 1 and 2 - Night
$2B4370 Techno Tower Stages 3 and 4 - Night
$2B43F0 Techno Tower Stage 5 - Night
$2B4470 Marina Madness - Morning
$2B44F0 Marina Madness - Day
$2B4570 Marina Madness - Sunset
$2B45F0 Marina Madness - Night
$2B4670 Isolated Island - Morning
$2B46F0 Isolated Island - Day
$2B4770 Isolated Island - Sunset
$2B47F0 Isolated Island - Night
$2B4870 Practice Mode
$2B48F0 World Entrance (First Screen) - Morning
$2B4970 World Entrance (First Screen) - Day
$2B49F0 World Entrance (First Screen) - Sunset
$2B4A70 World Entrance (First Screen) - Night
$2B6232 Amazing Arena Stages 1 and 2 - Morning - Lit
$2B62B2 Amazing Arena Stages 3 and 4 - Morning - Lit
$2B6332 Amazing Arena Stage 5 - Morning - Lit
$2B63B2 Amazing Arena Stages 1 and 2 - Day - Lit
$2B6432 Amazing Arena Stages 3 and 4 - Day - Lit
$2B64B2 Amazing Arena Stage 5 - Day - Lit
$2B6532 Amazing Arena Stages 1 and 2 - Sunset - Lit
$2B65B2 Amazing Arena Stages 3 and 4 - Sunset - Lit
$2B6632 Amazing Arena Stage 5 - Sunset - Lit
$2B66B2 Amazing Arena Stages 1 and 2 - Night - Lit
$2B6732 Amazing Arena Stages 3 and 4 - Night - Lit
$2B67B2 Amazing Arena Stage 5 - Night - Lit

MARS Format

Palette Offset Description
$00001924 HUD (maybe Sonic, Tails)
$0000E7C4 Espio's Rotating Palette
$0022921A Mighty The Armadillo
$0022923E Knuckles The Echidna
$0022925C Charmy The Bee
$0022927E Vector The Crocodile
$002292A0 Heavy The Mechanic
$002292BE Bomb The Mechanic
$002292DC Espio The Chameleon
$002299D6 Sega logo

To convert from standard RGB colors to MARS colors, use HBGDRGB2GBA32XCC.

Art Locations

Genesis Format Art, Nemesis-compressed

Art Offset Description
$22E100 8x8 Menu Font (same as in Sonic Crackers)
$22E40E Ring
$2C2DC8 Sound Test Amy Rose
$2C4B20 Sound Test letters/numbers
$2C7818 Sound Test art
$2CE004 Special Stage background spheres
$2CFA40 Bonus Stage background

MARS Format Pointers

Note: All pointers for these locations add $2000000 to the listed offset.

Art Offset Description
$0A0504 Mighty
$0B18BC Knuckles
$0CB3B4 Charmy
$0D4E44 Vector
$0F1130 Bomb
$0F6A18 Heavy
$101304 Espio
$11B088 Mighty ring and hand

Mapping Locations

Planes, Enigma-compressed

ROM Address X Size Description
$2C801A 37 Sound Test layout

RAM Locations

These locations are offset from the base of RAM ($FF0000, which is mirrored to $FFFF0000).

RAM offset Size Description
$D460 $40 words Genesis palette cache.
$D560 $40 words Copy of the current level's Genesis palette. Used by the Bonus Stage to reload the level.
$DFDE Word Current game mode. Known values:
  • $00: Sega screen
  • $08: Title screen
  • $18: Level
  • $20: Special Stage
  • $38: Demo
  • $40: Options Menu and Items
  • $50: Bonus Stage
$DFE0 Word Current game submode.
  • Sega Screen: used to determine which part of the animation to play.
  • Options Menu and Items:
    • $00: Options Menu
    • $04: Sound Test
    • $08: Color Test
    • $0C: Sound Test (jumps to the same location as $04)
$DFF2 Word Current level:
  • $00: Botanic Base
  • $01: Speed Slider
  • $02: Amazing Arena
  • $03: Techno Tower
  • $04: Marina Madness
  • $05: Isolated Island (Tutorial)
  • $06: Isolated Island (Introduction)
  • $07: World Entrance
  • $09: Bonus Stage
  • $0A: Special Stage
$DFF4 Word Current stage number. For normal stages, this starts from 1; 0 == 1 and 6 == 5 (except 6 crashes the game). For the introduction mode of Isolated Island, 0 is the opening (before Knuckles meets Espio), 1-4 behave as expected, 5 is Practice Mode, and 6 == 5 (with crash).
$DFF6 Word Current time of day:
  • $00: Morning
  • $02: Day
  • $04: Sunset
  • $06: Night

If bit 0 is set ($01, $03, $05, $07), then Amazing Arena is lit, otherwise it is unlit.

$E008 Word Number of rings.
$FCE6 Byte Current pan of the ring sound; positive is left, negative/zero is right.
$FCFC Byte Current song; only set by a certain function and only used by the Bonus Stage to replay the previous song when exiting.
$FFD0 Byte Current demo number (0-4).

Other ROM Data

Genesis VDP Register List Locations

Knuckles' Chaotix reloads VDP registers with each game mode. At each address is a list of word corresponding to the register/value words sent to the VDP (unmodified). A word $0 ends the list.

ROM offset Description
$B34 Sega screen
$3736 Title screen
$4CE6 Level
$5A8A Special Stage

Music Playlist

At address $76ED0, a null-terminated list of bytes corresponding to song numbers is given for the five normal levels and the two Isolated Island levels (see RAM address $DFF2). The World Entrance determines which song to play in code, so a code edit would be required. All other game modes play a song directly.

Contributors

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