Chaotix
From Sonic Retro
This is the Sonic Community Hacking Guide for Knuckles' Chaotix.
Contents
Pointer lists
Normal data pointers
These lists are just lists of addresses.
ROM Address | Description |
---|---|
$2275FA | Demo data |
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 |
---|---|---|
$4EEA | Triple indirection | Object positions |
$22E584 | Offset list | Level art. Each entry is a list of pointers that end in $FFFFFFFF. A value of 0 is ignored and was probably used by the programmers to separate the foreground and the background art. |
$22E974 | Offset list | Level mappings. At each pointed address is a list of addresses. If the uppermost byte of the address is $01, stop processing this specific type of mapping (16x16 primary, 16x16 secondary, 128x128 primary, 128x128 secondary). If the first byte is $03, stop processing all of this type of mapping (16x16 or 128x128).
16x16 primary (as many as needed until $01 or $03) 16x16 secondary (as many as needed until $01, only if not $03) 128x128 primary (as many as needed until $01 or $03) 128x128 secondary (as many as needed until $01, only if not $03) level layout (exactly one) unknown (exactly one) |
$22F1AC | Offset list | Level collision data pointers. |
$2B32B0 | Offset list | Genesis format level palettes. |
$2B61FA | Offset list, zone assumed | Amazing Arena lit palettes. |
Palette Locations
Genesis Format
Palette Offset | Description |
---|---|
$003A60 | Title Screen road and sides |
$005AA2 | Special Stage background |
$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 (similar to Sonic and Tails's palette in Sonic Crackers) |
$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 |
$22F3B4 | Botanic Base foreground tiles |
$232736 | Botanic Base Stages 1 and 2 fountain and associated statues |
$2335E6 | Botanic Base Stage 3 back room foreground tiles |
$2343D4 | Botanic Base Stage 4 trees |
$23FA74 | Botanic Base background tiles |
$2432D8 | Speed Slider foreground tiles |
$245EE0 | Speed Slider Stages 1 and 2 lights |
$246AD2 | Speed Slider Stage 3 lights |
$2479E6 | Speed Slider Stages 4 and 5 lights |
$25670E | Speed Slider background tiles |
$263554 | Amazing Arena foreground tiles |
$26617E | Amazing Arena Stages 1 and 2 secondary foreground tiles |
$275AF0 | Amazing Arena Stages 1 and 2 background tiles |
$2C2DC8 | Sound Test Amy Rose |
$2C3BFA | Title Screen road and sides of road |
$2C4B20 | Sound Test letters/numbers |
$2C7818 | Sound Test art |
$2CE004 | Special Stage background art and 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
16x16 Blocks, Enigma-compressed
ROM Address | Description |
---|---|
$236608 | Botanic Base Primary |
$23716A | Botanic Base Stages 1 and 2 Custom 1 |
$237202 | Botanic Base Stage 3 Custom 1 |
$23730A | Botanic Base Stage 4 Custom 1 |
$23751A | Botanic Base Stage 5 Custom 1 |
$24251C | Botanic Base Secondary |
$242640 | Botanic Base Stages 1 and 2 Custom 2 |
$2427A6 | Botanic Base Stage 3 Custom 2 |
$2429AC | Botanic Base Stage 4 Custom 2 |
$242B08 | Botanic Base Stage 5 Custom 2 |
$24A854 | Speed Slider Primary |
$24B426 | Speed Slider Stages 1 and 2 Custom 1 |
$24B80E | Speed Slider Stage 3 Custom 1 |
$24BC2E | Speed Slider Stages 4 and 5 Custom 1 |
$25F766 | Speed Slider Secondary |
$25F858 | Speed Slider Stages 1 and 2 Morning and Day Custom 2 |
$25FC04 | Speed Slider Stages 1 and 2 Sunset and Night Custom 2 |
$25FF56 | Speed Slider Stage 3 Morning and Day Custom 2 |
$2603FA | Speed Slider Stage 3 Sunset and Night Custom 2 |
$260850 | Speed Slider Stages 4 and 5 Morning and Day Custom 2 |
$260C52 | Speed Slider Stages 4 and 5 Sunset and Night Custom 2 |
$26AB3C | Amazing Arena Primary |
$26B54E | Amazing Arena Stages 1 and 2 Custom 1 |
$26B640 | Amazing Arena Stage 3 Custom |
$26B854 | Amazing Arena Stage 4 Custom |
$26BA78 | Amazing Arena Stage 5 Custom |
$278114 | Amazing Arena Stages 1 and 2 Secondary |
$2787BA | Amazing Arena Stages 1 and 2 Custom 2 |
$2787D8 | Amazing Arena Stages 3 and 4 Secondary |
$278B2A | Amazing Arena Stage 5 Secondary |
$27E8C6 | Techno Tower Primary |
$27FD94 | Techno Tower Stage 3 Custom 1 |
$27FDB2 | Techno Tower Stage 5 Custom 1 |
$28B768 | Techno Tower Secondary |
$28B7E0 | Techno Tower Stages 1 and 2 Custom |
$28B95E | Techno Tower Stage 3 Custom 2 and Stage 4 Custom |
$28BA74 | Techno Tower Stage 5 Custom 2 |
$293512 | Marina Madness |
$2942B2 | Marina Madness Stages 3-5 Custom 1 |
$294306 | Marina Madness Stages 4 and 5 Custom 2 |
$29435A | Marina Madness Stage 1 Custom |
$294372 | Marina Madness Stage 3 Custom 2 |
$2943E6 | Marina Madness Stage 4 Custom 3 |
$2946A4 | Marina Madness Stage 5 Custom 3 |
$29D87E | Isolated Island |
$2A5CAA | Practice Mode Primary |
$2A6066 | Practice Mode Secondary |
$2AA830 | World Entrance Primary |
$2AE704 | World Entrance Secondary |
128x128 Blocks, Enigma-compressed
ROM Address | Description |
---|---|
$237730 | Botanic Base Primary |
$2393C8 | Botanic Base Stage 1 Custom 1 |
$239722 | Botanic Base Stage 2 Custom 1 |
$239F2A | Botanic Base Stage 3 Custom 1 |
$23B0C2 | Botanic Base Stage 4 Custom 1 |
$23C422 | Botanic Base Stage 5 Custom 1 |
$242CAC | Botanic Base Secondary |
$242E2C | Botanic Base Stages 1 and 2 Custom 2 |
$242F36 | Botanic Base Stage 3 Custom 2 |
$24304A | Botanic Base Stage 4 Custom 2 |
$24315A | Botanic Base Stage 5 Custom 2 |
$24C65C | Speed Slider Primary |
$24F4DC | Speed Slider Stages 1 and 2 Custom 1 |
$25044A | Speed Slider Stage 3 Custom 1 |
$2515F0 | Speed Slider Stages 4 and 5 Custom 1 |
$261008 | Speed Slider Secondary |
$2610B6 | Speed Slider Stages 1 and 2 Morning and Day Custom 2 |
$2615D4 | Speed Slider Stages 1 and 2 Sunset and Night Custom 2 |
$261C08 | Speed Slider Stage 3 Morning and Day Custom 2 |
$26216A | Speed Slider Stage 3 Sunset and Night Custom 2 |
$2627AA | Speed Slider Stages 4 and 5 Morning and Day Custom 2 |
$262DB4 | Speed Slider Stages 4 and 5 Sunset and Night Custom 2 |
$26BC20 | Amazing Arena Primary |
$26D560 | Amazing Arena Stages 1 and 2 Custom 1 |
$26E9EE | Amazing Arena Stage 3 Custom |
$26FFDA | Amazing Arena Stage 4 Custom |
$271716 | Amazing Arena Stage 5 Custom |
$27846A | Amazing Arena Stages 1 and 2 Secondary |
$278D78 | Amazing Arena Stages 1 and 2 Custom 2 |
$278DCA | Amazing Arena Stages 3 and 4 Secondary |
$27919C | Amazing Arena Stage 5 Secondary |
$280424 | Techno Tower Primary |
$2838DA | Techno Tower Stage 1 Custom 1 |
$283ABA | Techno Tower Stage 2 Custom 1 |
$283D8E | Techno Tower Stage 3 Custom 1 |
$2842AE | Techno Tower Stage 4 Custom 1 |
$284474 | Techno Tower Stage 5 Custom 1 |
$28BB9C | Techno Tower Secondary |
$28BC78 | Techno Tower Stages 1 and 2 Custom 2 |
$28BD40 | Techno Tower Stages 3 and 4 Custom 2 |
$28BE08 | Techno Tower Stage 5 Custom 2 |
$294940 | Marina Madness |
$2966F6 | Marina Madness Stage 1 Custom |
$296950 | Marina Madness Stage 2 Custom |
$296992 | Marina Madness Stage 3 Custom |
$296F38 | Marina Madness Stage 4 Custom |
$29761E | Marina Madness Stage 5 Custom |
$29EA5C | Isolated Island |
$2A60C0 | Practice Mode Primary |
$2A7034 | Practice Mode Secondary |
$2AB48C | World Entrance Primary |
$2AEC92 | World Entrance Secondary |
Planes, Enigma-compressed
ROM Address | X Size | Description |
---|---|---|
$2C3910 | 40 | Road from title screen |
$2C39CC | 62 | Sides of road from title screen |
$2C801A | 37 | Sound Test layout |
$2CF7DA | 32 | Special Stage background spheres |
$2CF93E | 32 | Special Stage background art |
$2D0E04 | 40 | Bonus Stage background circles |
$2D0EDC | 40 | Bonus Stage background pattern |
Other ROM Data
Level Layouts
All level layouts are Enigma compressed.
ROM Address | Description |
---|---|
$23E7F4 | Botanic Base Stage 1 |
$23EA62 | Botanic Base Stage 2 |
$23ED52 | Botanic Base Stage 3 |
$23F188 | Botanic Base Stage 4 |
$23F5FA | Botanic Base Stage 5 |
$255354 | Speed Slider Stage 1 |
$25568A | Speed Slider Stage 2 |
$255A28 | Speed Slider Stage 3 |
$255DEA | Speed Slider Stage 4 |
$2561F0 | Speed Slider Stage 5 |
$2746FE | Amazing Arena Stage 1 |
$274A3A | Amazing Arena Stage 2 |
$274DA8 | Amazing Arena Stage 3 |
$27528E | Amazing Arena Stage 4 |
$2755F0 | Amazing Arena Stage 5 |
$286E5E | Techno Tower Stage 1 |
$287052 | Techno Tower Stage 2 |
$28726E | Techno Tower Stage 3 |
$2874F2 | Techno Tower Stage 4 |
$2877D2 | Techno Tower Stage 5 |
$298858 | Marina Madness Stage 1 |
$298A24 | Marina Madness Stage 2 |
$298C00 | Marina Madness Stage 3 |
$298D9C | Marina Madness Stage 4 |
$298F74 | Marina Madness Stage 5 |
$2A3DCA | Isolated Island (Tutorial) Stage 1 |
$2A41C8 | Isolated Island (Tutorial) Stage 2 |
$2A3CCC | Isolated Island (Tutorial) Stage 3 |
$2A45EE | Isolated Island (Tutorial) Stage 4 |
$2A4934 | Isolated Island (Introduction) Stages 0 (before meeting Espio) and 1 |
$2A4AC8 | Isolated Island (Introduction) Stage 2 |
$2A4BFC | Isolated Island (Introduction) Stage 3 |
$2A4D0A | Isolated Island (Introduction) Stage 4 |
$2A786E | Practice Mode Level 0 |
$2A7882 | Practice Mode Level 1 |
$2A78A4 | Practice Mode Level 2 |
$2A78E0 | Practice Mode Levels 3 and 4 |
$2A7904 | Practice Mode Levels 5 and 6 |
$2AC9A0 | World Entrance |
Object Positions
Each list of object positions consists of four word entries:
dc.w x position, y position, object type, object subtype
The list ends with a single $FFFF.
Collision Data
Each collision block is $800 bytes with the first $400 being the primary collision layer.
ROM Address | Description |
---|---|
$23D7F4 | Botanic Base Stages 1 and 2 |
$23DFF4 | Botanic Base Stages 3-5 |
$253354 | Speed Slider Stages 1 and 2 |
$253B54 | Speed Slider Stage 3 |
$254354 | Speed Slider Stages 4 and 5 |
$272EFE | Amazing Arena Stages 1 and 2 |
$2736FE | Amazing Arena Stages 3 and 4 |
$273EFE | Amazing Arena Stage 5 |
$284E5E | Techno Tower Stages 1, 2, and 4 (note: stage 4 uses a different pointer from stages 1 and 2 in the pointer list; they both point to this location) |
$28565E | Techno Tower Stage 3 |
$285E5E | Techno Tower Stage 5 |
$298058 | Marina Madness (All Stages) |
$2A34CC | Isolated Island |
$2A706E | Practice Mode |
$2AC1A0 | World Entrance |
Text
Sound Test Song Names
The Sound Test song names are a bunch of null terminated ASCII strings starting at $227338. The equals sign (=) character translates to an apostraphe ('); otherwise the string is interpreted as-is. Not all characters may be supported. Sound effects use the last string in the list ("S.E.") and the number is appended programmatically.
Demo Data Format
At each demo address (see the list of pointers above), a structure of the following form is used:
Offset | Size | Description |
---|---|---|
0 | Byte | Zone |
1 | Byte | Stage number |
2 | Byte | Time of day |
3 | Byte | Player 1 character |
4 | Byte | Player 2 character |
5 | Byte | Unused |
6 | Undefined | Possibly control button data |
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.
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 |
RAM Locations
These locations are offset from the base of RAM ($FF0000, which is mirrored to $FFFF0000).
RAM offset | Size | Description |
---|---|---|
$C030 | Word | VBlank handler opcode. |
$C032 | Long | VBlank handler address. |
$C036 | Word | HBlank handler opcode. |
$C038 | Long | HBlank handler address. |
$C1FE | Long | RAM address of the current uncompressed level layout data. |
$C202 | Long | RAM address of the current uncompressed 128x128 block mappings. |
$C206 | Long | RAM address of the current uncompressed primary 16x16 block mappings. |
$C242 | Long | RAM address of the current uncompressed secondary 128x128 block mappings. |
$C246 | Long | RAM address of the current uncompressed secondary 16x16 block mappings. |
$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:
|
$DFE0 | Word | Current game submode.
|
$DFF2 | Word | Current level:
|
$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 and 5 and 6 are Practice Mode. In Practice Mode, this variable and the current time of day variable decide which practice lesson is in session; see below. |
$DFF6 | Word | Current time of day:
If bit 0 is set ($01, $03, $05, $07), then Amazing Arena is lit, otherwise it is unlit. In Practice Mode, the formula
is used to determine the current lesson:
|
$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). |
Contributors
- drx - Data offsets (art, palettes), character art format information.
- Heran Bago - Some Nemesis-compressed art locations
- andlabs - More stuff