VOGONS

Common searches


First post, by carstene1ns

User metadata
Rank Newbie
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: running_caveman.gif
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:

rgblines.png
Filename
rgblines.png
File size
35.37 KiB
Views
571 views
File license
Fair use/fair dealing exception

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:

rline_gline_bline.png
Filename
rline_gline_bline.png
File size
26.51 KiB
Views
571 views
File license
Fair use/fair dealing exception

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!

Attachments

  • Filename
    random_block.png
    File size
    55.21 KiB
    Downloads
    No downloads
    File comment
    a random block in the middle
    File license
    Fair use/fair dealing exception
  • Filename
    magic_at_end.png
    File size
    119.88 KiB
    Downloads
    No downloads
    File comment
    last part of file
    File license
    Fair use/fair dealing exception
  • Filename
    first_block.png
    File size
    101.01 KiB
    Downloads
    No downloads
    File comment
    first 256 bytes block
    File license
    Fair use/fair dealing exception

Reply 1 of 3, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Ultima 7 uses pal files, no idea whether these are similar. I thought one could use them in The Gimp.
Also if the U7 pal files are similar we might have appropiate code in Exult (exult.sf.net) and or even for U8 in Pentagram (pentagram.sf.net)

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 3 of 3, by aqrit

User metadata
Rank Member
Rank
Member

it looks like 256 tables of 256 palette indices... not rgb triples

but if you don't know what it is used for... then why do you care?
if your doing a remake then you'll probably want to go thru the assembly at some-point anyways...

I would start by filling the first 0x1000 bytes with 0x01 then look for changes within the game....

if any interested persons want to look into
the game is "Eracha(cha)" and there is a demo version of it.