First post, by carstene1ns
- Rank
- Newbie
Hello guys, I am new on this forums.
I recently started a project to reverse engineer parts of 96' dos platformer and have extracted and documented most of its data formats.
Among some other things, i do not know how to deal with a palette format used by the game. The game works in vga mode, so it uses a 256 color palette, which is embedded in the level files.
These palettes are easy to deal with, they use the vga format with values between 0x0 and 0x3F in groups of 3 (r,g,b), so they can be shifted an the images display fine:
However, it also uses a file called system.pal which is 66448 bytes in size. I learned that most games use such palette for fading effects and such, but i can not figure out, how the format of this file is.
It contains blocks of 256 bytes (with values between 0x0 and 0xFF) and some additional magic, I do not deal with the magic at the end yet, but the "color values".
If I interpret it as
r1 g1 b1, r2 g2 b2, r3 g3 b3, (...), r256 g256 b256
each line with 3 values, I get 86 lines and the colors look like this:
If i interpret it as
r1, r2, r3, (...), r256 | g1, g2 (...) | b1, b2, (...)
each line a color, I get 86 lines and the colors look like this:
I am just guessing here, but the black-white gradients look correct.
Attached are screenshots of the file in a hexeditor, as I do not want to include the file here (copyright -.-).
Has somebody dealt with such palette or seen a similiar? Any help or hints are appreciated.
Thanks!