Jump to content

LEGO Racers 2 / Drome Archive Format


JrMasterModelBuilder
 Share

Recommended Posts

JrMasterModelBuilder

UPDATE: READ THIS

 

Here is what I presently know about the file format:

It is a 3 file archive. COMPRESS.INF, FILELIST.INF, & GAMEDATA.GTC

COMPRESS.INF hold information on null bytes found in GAMEDATA.GTC.
FILELIST.INF hold file names and pointers to them of some kind.
GAMEDATA.GTC holds the files.



FILELIST.INF
The list of files, 136 byte blocks:
First 128 bytes = File path (null terminated).
uint32 {4} = Unknown pointer. 0 indexed and each greater than the rest (unless the next uint32 {4} = 0, then reused) so almost certainly points to the file.
uint32 {4} = Unknown pointer. As files that are likely bitmaps of the same resolution have the exact same value, almost certainly the file size.

NOTE: the first uint32{4} can exceed the size of the gamedata.gtc file. Most likely, the pointer is only correct after the files in gamedata.gtc are decompressed.


This file's structure is different between the games. (Thanks origamiguy!)
COMPRESS.INF (Drome)
12 byte blocks:
uint32 {4} - Pointer to start of a data chunk in GAMEDATA.GTC
uint32 {4} - Length of non-null data at the end of the chunk
uint32 {4} - Length of the chunk

COMPRESS.INF (LEGO Racers 2)
20 byte blocks:
uint32 {4} - Pointer to start of a data chunk in GAMEDATA.GTC
uint32 {4} - Length of non-null data at the end of the chunk
uint32 {4} - Length of the chunk
unknown {4} - unknown. Most likely meaningless.
unknown {4} - unknown. Most likely meaningless.


GAMEDATA.GTC
Stores all the files listed in filelist.inf. Has non-null groups separated by null groups. Uses some form of compression, most likely index based. Possibly separate for each non-null group in the file.

  • Like 2
Link to comment
Share on other sites

I found this:

http://www.file-extensions.org/gtc-file-extension?searchstring=Advance+Design&searchtype=3

It says you can open .gtc files with a program called Advance Design made by Graitec.

Screw that. I higly doubt that program will work.

Link to comment
Share on other sites

  • 5 weeks later...

I think you might be wrong about it being 12-byte. Here's what I've come up with so far:

COMPRESS.INF

20 byte blocks:

uint32 {4} - Pointer to start of a data chunk in GAMEDATA.GTC

uint32 {4} - Length of non-null data in the chunk

uint32 {4} - Length of the chunk (including the null data, that's why the subtraction thing works)

unknown {4} - no idea yet.

unknown {4} - no idea yet.

  • Like 2
Link to comment
Share on other sites

JrMasterModelBuilder

You're right! Er, we're both right. I just checked, and the LEGO Racers compress.inf is structured that way, but the Drome one apparently isn't. I put a note in the topic post.

Link to comment
Share on other sites

JrMasterModelBuilder

I just did some experimentation on the unknown bytes present in LR2 but not Drome, and they appear to be meaningless. I rewrote them all to 0xFFFFFFFF then 0x00000000 and the game appeared to work just the same as when the bytes were unaltered.

Link to comment
Share on other sites

  • 1 month later...

How do you find info like this anyway? A hex editor?

That's how you find most of pretty much anything in computer software. If we didn't have Hex, this site wouldn't exist.

Link to comment
Share on other sites

JrMasterModelBuilder

How do you find info like this anyway? A hex editor?

That's how you find most of pretty much anything in computer software. If we didn't have Hex, this site wouldn't exist.

Hex editor, my Hex Convert Program and deductive reasoning.

BTW, hex tells me that the source file that handled it was "g:\DEV2\NEXTGEN\Engine\PC Specific\GT Decompression\Ungtdc.c" Unfortunately, that doesn't help as it doesn't appear to be open source or anything.

Link to comment
Share on other sites

What Hex editor do you use? I already have one, but I wanna know what you recommend.

Hopefully he uses Hex Workshop like I do...it's a tool of the gods, if you ask me.

Link to comment
Share on other sites

I have HxD.

That's alright, but Hex Workshop comes with a whole ton of tools, as well as making Hex a little less intense on the eyes...

Link to comment
Share on other sites

  • 5 months later...

I may be able to put a tool together to break the archive down into seperate (still compressed) files.

EDIT: Information I did find before this edit was written in the first post... just not directly explained.

Link to comment
Share on other sites

Fluffy Cupcake

Yay for more info!

I may be able to put a tool together to break the archive down into seperate (still compressed) files.
That would be.. awesome! I've been waiting for a bit of progress on this for months now :P, I haven't done it myself because I have no idea what to look for in files because I have yet to learn reverse engineering, and I can't seem to learn much about it..
Link to comment
Share on other sites

Bit of a road block. It was all working till I realised there are about 5000 files listed in FILELIST and only around 2500 listed in the COMPRESS list.

Link to comment
Share on other sites

JrMasterModelBuilder

Bit of a road block. It was all working till I realised there are about 5000 files listed in FILELIST and only around 2500 listed in the COMPRESS list.

That was my confusion when I calculated from the file lengths that there are more files in FILELIST.INF that COMPRESS.INF. There are a few 0 byte files in FILELIST.INF, but not nearly that many. I'm thinking that maybe there are a lot of uncompressed files in GAMEDATA.GTC and that COMPRESS.INF doesn't list them.

Link to comment
Share on other sites

That was my confusion when I calculated from the file lengths that there are more files in FILELIST.INF that COMPRESS.INF. There are a few 0 byte files in FILELIST.INF, but not nearly that many. I'm thinking that maybe there are a lot of uncompressed files in GAMEDATA.GTC and that COMPRESS.INF doesn't list them.

There does look to be some uncompressed files in the GTC. I need some way of knowing which files are compressed and which aren't. FILELIST I was hoping would tell me, but i'm yet to work out what the extra data in it means. I certainally hope this information wasn't hardcoded into the game, because that could mean game over for the GTC.

Link to comment
Share on other sites

Fluffy Cupcake
Thanks, I'll need to do a test. Unfortunatly, I turned off my pc last night without saving the tool... so I have to re-write about half the code all over again.
That must suck. I hate losing work on things (as I'm sure everyone else does).
Link to comment
Share on other sites

I can now 100% confirm that ('DataB' when using the inf tool) the second "uint32 {4}" is the decompressed file size and 'DataB' of COMPRESS.INF is the compressed file size.

Also I believe the compression is some form of RLE compression.

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.