Difference between revisions of "Chaotix"
From Sonic Retro
(→MD Palettes) |
Scarred Sun (talk | contribs) m (Reverted edits by Moosegeek (Talk); changed back to last version by 69.219.34.99) |
||
Line 28: | Line 28: | ||
|Techno Tower - Morning | |Techno Tower - Morning | ||
|- | |- | ||
− | | | + | |2b4070,40 |
|Techno Tower - Day | |Techno Tower - Day | ||
|- | |- | ||
− | | | + | |2b41F0,40 |
|Techno Tower - Sunset | |Techno Tower - Sunset | ||
|- | |- |
Revision as of 14:16, 13 September 2007
This is the Knuckles' Chaotix portion of the Sonic Community Hacking Guide.
Contents
About this Guide
I'm Lostgame, and I'm obsessed with Chaotix. It simply has to be the greatest Sonic-related game I've ever played. And it's not just the amazing 32-bit graphics, with real rotation and scaling, it's the original gameplay, the amazing music, and the general fun involved. So strap yourself in, and get ready for the most fun you've ever had hacking a Sonic game.
MD Palettes
One thing that shocked me, when I was looking through the ROM for palettes was that the standard levels actually only use the Genesis colors, as beautiful as they are! Well, so, as you most likely already know, if you're here, the format for most Genesis palettes is:
0B-GR
The first character, I dunno what it's for. If you put something there it's either ignored, or causes an error, depends on the game, and the level, whatever. The second, third and fourth characters are the Blue, Green and Red values, accordingly.
Here is a list of the palettes that I know of in Chaotix that use the Genesis palette format:
Palette Offset | Description |
---|---|
2b3CF0,40 | Amazing Arena - Morning / Day |
2b3D70,40 | Amazing Arena - Sunset / Night |
2b3EF0,40 | Techno Tower - Morning |
2b4070,40 | Techno Tower - Day |
2b41F0,40 | Techno Tower - Sunset |
2b42F0,40 | Techno Tower - Night |
2b4470,40 | Marina Madness - Morning |
2b44F0,40 | Marina Madness - Day |
2b4570,40 | Marina Madness - Sunset |
2b45F0,40 | Marina Madness - Night |
2b4670,40 | Introduction - Morning |
2b46F0,40 | Introduction - Day |
2b4770,40 | Introduction - Sunset |
2b47F0,40 | Introduction - Night |
0066c8,24 | Credits - Flames |
006e18,40 | Sound Test - Foreground |
006E98,10 | Sound Test - Amy |
MARS Palettes
Now, you may say "Oh, great! Now I can change the palettes in the levels, but what I really wanted to do was change Mighty's palette to look like Sonic!
Alright. You can do that, but this is the tricky part. As you can imagine, the 32x uses it's own palette format that has been dubbed/officially called(?) the MARS format. Why? Simply because MARS was a prototype name for the 32x. Or the Super 32x in Japan. Anywho, this format is different and very confusing. Let's take a look.
XB+(brightness G, max blue value is C)GR
//I only made that mark on the first line to help you
//understand it better. It still applies to the other
//two characters.
Wow. Another 2-byte format. Well, what do the characters represent? Let's see. For the Blue value, the character to edit is the second one, but the first character controls the
brightness, for a nicer effect. The brightness of the blue can be a max of 7, and, of course, a min of 0. But if it's 0, you get no blue. The maximum blue value is C, or it starts affecting the green. The green is the same, but instead of the first character affecting the brightness, the second one does. So, a value from C-F refers to the brightness of the green. The limit of the green value is E. Leaving Red as our last color, with a max value of F, and you can change the green to F if you like.
Voila. Now for the offsets.
Palette Offset | Description |
---|---|
0022921A | Mighty The Armadillo |
0022923E | Knuckles The Echidna |
0022927E | Vector The Crocodile |
0022925C | Charmy The Bee |
002292A0 | Heavy The Robot |
002292BE | Bomb The Robot |
002292DC | Espio The Chameleon |
0000E7C4 | Espio's Rotating Pallete |
Say you want to conver your favorite colors from photoshop to MARS to make Mighty juuuuust the right shade of blue. Take a RGB color. Now you need to find the red(r) green(g) and blue(b) values for this color. In paint you can select the color and chose Colors>Edit Colors>>Define Custom Colors. In Photoshop, you can double-click the color chosen on the bottom of the tool bar. In any case, find the specifics of your choice color. It's got three values, r, g, and b.
(note: all math is in decimal. =/)
[(r + 1) / 8.25] rounded to the nearest integer = R. [(g + 1) / 8.25] rounded to the nearest integer = G. [(b + 1) / 8.25] rounded to the nearest integer = B.
R = x G * 2 = y B * 4 = z
x = X y * 16 = Y z * 256= Z
Z + Y + Z = N
convert N to HEX.
If your result does not have four digits (ex. 1F, 893, A, 0), tack 0s on to the beggining. (ex. 001F, 0893, 000A, 0000).
There you have your 32-bit (MARS) color. (Thanks Kojichao and EricJS. Big helps.)
But what if you want to edit, say, an enemies pallete? That's MARS but not documented (yet, hopefully). Well, now you can convert their colors (bebug>32X VDP) and find them in the ROM. once you know where it is, you can change it.
Great tools for aiding in this are Icy Guy's GBA color picker (assure byteswap is disabled) which can be obtained from Zophar's Domain, and Heran Bago's RGB2GBA32XCC (shameless plug).
Crackers Palettes
Well, thanks to ICEknight, we now know that there are Sonic Crackers palettes in Chaotix.
$005750 in Chaotix ROM == $008D08 in Crackers ROM
Character Art Compression Format
Intro
The way this art works is that the coordinates are just like a coordinate plane
positive and negative values. So if the x pos = -4, and y pos = 5, its just like saying on a regular plane that
the x pos = 0, and the y pos = 9. There is a big list of pointers that point to another list of pointers which point to art datas in chaotix. Each art data is one frame. For example, mighty's starting
frame is at 0x0a0674. Look at the datas there, and you'll notice it follows this
format:
Header
The header tells you how big the piece of art is, and the origin is always 0,0.
x1 = 0x00 (word) x2 = 0x02 (word) y1 = 0x04 (byte) (Followed by it is 00, don't ask me why they did this =P) y2 = 0x06 (byte) (Again, it is followed by another 00)
Art Data
After the header, there is a header for a line of pixels. After this header there
is bytes of pixels. I will explain that in a second.
x1 = 0x00 (byte) x2 = 0x01 (byte) y = 0x02 (byte) (Also followed by 00)
For however long that line is, pixel data will follow it. To find out how many
pixels will follow, just use x2 - x1 (distance formula). Each pixel following it
correspond to a color in the palette. Followed are More line headers followed by
more Pixels, for each line (y2 - y1). You know it is finished when you see straight
word of 0x000.
Art Pointers
Here is a list of pointers that point to more pointers that point to each frame of
art per character.
Note: Each pointer is added 0x2000000 to it:
Art Offset | Description |
---|---|
0a0504 | Mighty |
0b18bc | Knuckles |
0cb3b4 | Charmy |
0d4e44 | Vector |
0f1130 | Bomb |
0f6a18 | Heavy |
101304 | Espio |
11b088 | Mighty ring and hand |