Map Database  •  FAQ  •  RSS  •  Login

textX.dat, .bbm, .map and .rx decoded

<<

harold

Knight

Posts: 562

Joined: 19 Nov 2007, 23:00

Post 06 Jan 2008, 20:54

just wondering: will the decoding-progress of the .rx files be updated?
<<

harold

Knight

Posts: 562

Joined: 19 Nov 2007, 23:00

Post 29 May 2008, 00:44

Update on decoding:
The text0.dat through text3.dat files also contain palette's
and forget most other things I said about those textX.dat files - it was mostly wrong.
Among other things that is
They look a lot like the normal palette's (pal0 etc) and I bet they're used to decode the rest of those files. Not 100% certain though, and those files still contain more information that I can fully explain. Hopefully it's water animation..

Also, I successfully decoded guimain.rx but it required a hardcoded LUT so I'm cheating - the location of this LUT in the data is unknown, if it's there at all. It uses the following palettes: setup.lbm, Setup2.bbm, Map.bbm, Mapgold.bbm if these are numbered 1 through 4, the lut is
  Code:
 { 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 1, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, the rest is also 1 };[/quote] If you do not count the gaps. I'm not going to give the LUT that includes the gaps - if you know what I'm talking about you can figure it out yourself easily enough anyway and otherwise you don't need it.
<<

JBSnorro

Barbarian

Posts: 106

Joined: 20 Nov 2007, 23:00

Post 29 May 2008, 01:50

Harold forgot to mention that he didn't do it on his own, thanks for mentioning me :x
Anyway, he also forgot to mention quite a important number, which is 47.
All palettes in the four bbm files Harold mentioned, the palette starts at the 47th byte, al along to 47 + 3 * 256 = 815.
Contradictionary this number is 48 to the pal[x].bbm files, but this seems so odd to me I strongly doubt my own conclusion :P
I must have made a silly mistake somewhere.

And about the order of the 40 bytes Harold mentioned, I created a code that searched every file in the KaM - The Peasants Rebellion directory, but no results. The specific order doesn't appear anywhere, so unfortunately we cannot tell how the original KaM knows this sequence. It might be a if, else if, else if, etc-construction or something like it.
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 29 May 2008, 09:35

The text0.dat through text3.dat files also contain palette's
and forget most other things I said about those textX.dat files - it was mostly wrong.
Among other things that is
They look a lot like the normal palette's (pal0 etc) and I bet they're used to decode the rest of those files. Not 100% certain though, and those files still contain more information that I can fully explain. Hopefully it's water animation..
Indeed. That is self-sufficient ILBM files. They have animation data (can be based on pallete-cycling and other methods). Data is compressed, that makes it very hard to decode. To ones help TSK and TPR tiles are mostly the same with few difference, it can be used as a hint.
And about the order of the 40 bytes Harold mentioned, I created a code that searched every file in the KaM - The Peasants Rebellion directory, but no results. The specific order doesn't appear anywhere, so unfortunately we cannot tell how the original KaM knows this sequence. It might be a if, else if, else if, etc-construction or something like it.
I guess with such short image library (only 32 images) this can be hardcoded in EXE. After all most obvious place for such info would be .rx palette header.
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

JBSnorro

Barbarian

Posts: 106

Joined: 20 Nov 2007, 23:00

Post 30 May 2008, 01:19

Krom, do you know exactly how the cyclying of the values at the CRNG-headers work? Or the compressionmethod? All I found out was that in pal0.bbm for instance, the same data appears twice(at header TINY and at header BODY).
Still haven't got a clue what both could mean, even if it wasn't compressed.

Anyway, in the BMHD is it suggested that the CmpByteRun1-compression is used, but it isn't... If it were, I would know what to do with 4296 values between -80 and -60... Those numbers don't make much sence to me.
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 30 May 2008, 10:09

If you download BitViewer from my site you see that there's a tileset in those files, but it's compressed/tweaked somehow. It's not looking square and it's using only part of whole file.
Now you know as much as I do :D
I can suggest only Googling for those header tags...
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de

Return to “Website”

Who is online

Users browsing this forum: No registered users and 2 guests