JrMasterModelBuilder Posted May 23, 2011 Share Posted May 23, 2011 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 chunkCOMPRESS.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. le717 and Fluffy Cupcake 2 Link to comment Share on other sites More sharing options...
s0d3rb3rg Posted May 30, 2011 Share Posted May 30, 2011 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 More sharing options...
dead_name Posted June 30, 2011 Share Posted June 30, 2011 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. Fluffy Cupcake and le717 2 Link to comment Share on other sites More sharing options...
JrMasterModelBuilder Posted July 7, 2011 Author Share Posted July 7, 2011 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 More sharing options...
JrMasterModelBuilder Posted July 13, 2011 Author Share Posted July 13, 2011 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 More sharing options...
JrMasterModelBuilder Posted August 26, 2011 Author Share Posted August 26, 2011 Just added some more information on the filelist.inf pointers and gamedata.gtc file format. Link to comment Share on other sites More sharing options...
Fluffy Cupcake Posted August 27, 2011 Share Posted August 27, 2011 Good work on finding more info. We need all the info on this we can get. Link to comment Share on other sites More sharing options...
Fluffy Cupcake Posted August 29, 2011 Share Posted August 29, 2011 How do you find info like this anyway? A hex editor? Link to comment Share on other sites More sharing options...
McJobless Posted August 29, 2011 Share Posted August 29, 2011 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 More sharing options...
JrMasterModelBuilder Posted August 29, 2011 Author Share Posted August 29, 2011 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 More sharing options...
Fluffy Cupcake Posted August 30, 2011 Share Posted August 30, 2011 What Hex editor do you use? I already have one, but I wanna know what you use. Link to comment Share on other sites More sharing options...
McJobless Posted August 30, 2011 Share Posted August 30, 2011 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 More sharing options...
Fluffy Cupcake Posted August 30, 2011 Share Posted August 30, 2011 I have HxD. Link to comment Share on other sites More sharing options...
McJobless Posted August 30, 2011 Share Posted August 30, 2011 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 More sharing options...
JrMasterModelBuilder Posted August 30, 2011 Author Share Posted August 30, 2011 I use HxD also. It's free and works really well and it doesn't look hard on the eyes. Link to comment Share on other sites More sharing options...
Cyrem Posted February 19, 2012 Share Posted February 19, 2012 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 More sharing options...
Fluffy Cupcake Posted February 19, 2012 Share Posted February 19, 2012 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 , 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 More sharing options...
Cyrem Posted February 19, 2012 Share Posted February 19, 2012 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 More sharing options...
JrMasterModelBuilder Posted February 19, 2012 Author Share Posted February 19, 2012 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 More sharing options...
Cyrem Posted February 19, 2012 Share Posted February 19, 2012 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 More sharing options...
le717 Posted February 19, 2012 Share Posted February 19, 2012 @Cyrem I believe this will help you with your mission: ;) Cyrem 1 Link to comment Share on other sites More sharing options...
Cyrem Posted February 19, 2012 Share Posted February 19, 2012 @Cyrem I believe this will help you with your mission: http://www.rockraide...unused-lr2-sfx/ 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. Link to comment Share on other sites More sharing options...
Fluffy Cupcake Posted February 19, 2012 Share Posted February 19, 2012 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 More sharing options...
Cyrem Posted February 20, 2012 Share Posted February 20, 2012 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. dead_name 1 Link to comment Share on other sites More sharing options...
le717 Posted February 20, 2012 Share Posted February 20, 2012 YES! New info on the GTC file(s)! Hopefully we'll have an extractor (and compressor!) soon! Link to comment Share on other sites More sharing options...
Recommended Posts