Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Little extractor program

The Original Forum. Game archives, full of resources. How to open them? Get help here.
gamemaster
n00b
Posts: 18
Joined: Mon Jul 21, 2008 1:07 am

Re: Little extractor program

Post by gamemaster »

Am I doing this right? What I do is make a new folder,put GOBREAD.EXE inisde it,copy the file I want extracted and past it in the same folder, then I take the file and drag it on top of GOBREAD.EXE.Nothing happens! All that does is a blank cmdpromt window pops up for half a second than disappears.I tried it with different files just to make sure and the same thing happens.If im not doing it right how am I supposed to?
Csimbi
veteran
Posts: 108
Joined: Thu Nov 06, 2008 9:29 pm
Has thanked: 10 times
Been thanked: 22 times

Re: Little extractor program

Post by Csimbi »

gamemaster wrote:Am I doing this right? What I do is make a new folder,put GOBREAD.EXE inisde it,copy the file I want extracted and past it in the same folder, then I take the file and drag it on top of GOBREAD.EXE.Nothing happens! All that does is a blank cmdpromt window pops up for half a second than disappears.I tried it with different files just to make sure and the same thing happens.If im not doing it right how am I supposed to?
No, you do not drag and drop. This is a command line tool. Open up a command prompt, type the name of the program for help and go on from there.
______
Csimbi
gamemaster
n00b
Posts: 18
Joined: Mon Jul 21, 2008 1:07 am

Re: Little extractor program

Post by gamemaster »

I got it running thanks. But what is the command I need to put in to extract a file?Can You give me an example of how id use it complete with the file path?
Csimbi
veteran
Posts: 108
Joined: Thu Nov 06, 2008 9:29 pm
Has thanked: 10 times
Been thanked: 22 times

Re: Little extractor program

Post by Csimbi »

gamemaster wrote:I got it running thanks. But what is the command I need to put in to extract a file?Can You give me an example of how id use it complete with the file path?
You type gobread at the command prompt, and you will see.
______
Csimbi
gamemaster
n00b
Posts: 18
Joined: Mon Jul 21, 2008 1:07 am

Re: Little extractor program

Post by gamemaster »

Thats not what I mean. The folder where I have both the file I want to extract and GOBRREAD.EXE is K:\gbred I typed in K:\gbred\GOBREAD.EXE in cmdpromt and got the program started.The file I want to extract is data.pak.What do I type in order to extract it?

Anyone?
Csimbi
veteran
Posts: 108
Joined: Thu Nov 06, 2008 9:29 pm
Has thanked: 10 times
Been thanked: 22 times

Re: Little extractor program

Post by Csimbi »

gamemaster wrote:Thats not what I mean. The folder where I have both the file I want to extract and GOBRREAD.EXE is K:\gbred I typed in K:\gbred\GOBREAD.EXE in cmdpromt and got the program started.The file I want to extract is data.pak.What do I type in order to extract it?

Anyone?
Well, if you got it started, then you should have received this:

Code: Select all

GOBREAD extracts all files from a containerfile into the current directory.

Syntax: GOBREAD [{/|-}switch] [containerfile] [{/|-}switch] [>output.log]
  or    GOBREAD {/|-}create{=|:}containerfile {/|-}switch  [>output.log]

Switches:
 LIST   Lists supported formats and their switches
 CHECK  Test if the format can be handled
 CREATE Create container file (not fully supported; format switch reqd.)
 VIEW[{=|:}D] List files with method, offsets, sizes and names;
        D = decimal, default: hex


Examples:
 GOBREAD DATA.PAK       = Extracts all files from DATA.PAK
                          if the format can be detected
 GOBREAD /check FILE.DAT= Shows which format would be used
 GOBREAD DARK.COB -DF   = Extracts all files from DARK.COB
                          forcing format "Dark Forces"
 GOBREAD /cbn file.cbn  = Same as above, but with other format
 GOBREAD -CREATE=REDNECK.GRP /GRP
                        = Creates the containerfile "REDNECK.GRP"
                          from all files in the current directory
                          of type "GRP-Files"
 GOBREAD -view=d data.pak Lists all files in the container with dec numbers

This program is freeware. Use it at your own risk. Only for private use.
From this you should be able to figure out everything you need.
______
Csimbi
gamemaster
n00b
Posts: 18
Joined: Mon Jul 21, 2008 1:07 am

Re: Little extractor program

Post by gamemaster »

I type in GOBREAD Data.pak and it keeps saying GOBREAD is not recognized as an internal or external command.
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1422 times

Re: Little extractor program

Post by chrrox »

gamemaster wrote:I type in GOBREAD Data.pak and it keeps saying GOBREAD is not recognized as an internal or external command.
that means the exe is not in the same path as the directory you are in the command prompt.
you need to do like cd c:\GOBREAD
then type GOBREAD.exe c:\data.pak
just change out the locations for where you have them.
gamemaster
n00b
Posts: 18
Joined: Mon Jul 21, 2008 1:07 am

Re: Little extractor program

Post by gamemaster »

Finally got it working just fine!It extracts and everything!Thanks for clearing that up for me.
User avatar
asmxtx
veteran
Posts: 127
Joined: Sun Jun 08, 2008 10:32 pm
Location: Developers Country
Has thanked: 1 time
Been thanked: 30 times

Re: Little extractor program

Post by asmxtx »

@Csimbi/@chrrox: Thank you that you got the point.
And thank you that you are able to cope with my program.

I have created GOBREAD more than ten years ago as a 16-Bit-DOS-program when I was a youngster in PC-assembler-programming.
Nowadays I wouldn't go up to a program in a way like this.
But the skeleton of GOBREAD includes all mechanisms to handle lot of file derivatives - and even with the usage of the newest 32Bit-processors instruction set - so I am bound to its scaffold.
It would cost it a lot work to convert it to a more modern script-like interpreter.
But if you think it helps you in any kind I would be grateful.
Steefjan
n00b
Posts: 12
Joined: Sun Jul 26, 2009 1:33 pm
Has thanked: 2 times

Re: Little extractor program

Post by Steefjan »

wow awesome program! :D
could you please add support for burnout paradise .BIN files?

thanks a lot!
Csimbi
veteran
Posts: 108
Joined: Thu Nov 06, 2008 9:29 pm
Has thanked: 10 times
Been thanked: 22 times

Re: Little extractor program

Post by Csimbi »

asmxtx wrote: I have created GOBREAD more than ten years ago as a 16-Bit-DOS-program when I was a youngster in PC-assembler-programming.
Nowadays I wouldn't go up to a program in a way like this.
But the skeleton of GOBREAD includes all mechanisms to handle lot of file derivatives - and even with the usage of the newest 32Bit-processors instruction set - so I am bound to its scaffold.
It would cost it a lot work to convert it to a more modern script-like interpreter.
But if you think it helps you in any kind I would be grateful.
Adding scripting support would be beneficial for people who have experience with reversing file formats. On the other hand, any user can invoke a hard-coded functionality with a few parameters. I am quite happy with the tool as it is - it gets the job done without much hassle. I have the feeling that a lot of people think alike.

I would personally find scripting capability useful (especially if it would remain a command-line tool), especially when one's trying to reverse a new format. But. Since adding such capabilities is going to be a tremendous task, I will not make a statement saying: go for it.
Why not start from scratch behind the scenes and do it according to your own pace - without pressure from the community? This way, you can even drop the ball when you don't feel like doing it anymore.
Another alternative is making it an open-source project so those interested could contribute - though you might eventually end up without help, or, the other extreme: spend too much time on verifying code to be checked in.
Think it through, there is no rush.
______
Csimbi
neoen
n00b
Posts: 19
Joined: Wed Oct 15, 2008 11:34 am
Has thanked: 2 times
Been thanked: 1 time

Re: Little extractor program

Post by neoen »

Hi, I successfully extracted Chronicles of Mystery datal.vbf archive with Gobread (viewtopic.php?p=27415#p27415), but I could not repack it. Is it possible? Thank you very much...
User avatar
asmxtx
veteran
Posts: 127
Joined: Sun Jun 08, 2008 10:32 pm
Location: Developers Country
Has thanked: 1 time
Been thanked: 30 times

Re: Little extractor program

Post by asmxtx »

Added: Extraction support for Wolfenstein 2.

Warning:
- The "/VIEW"-switch doesn't work for this format.
- Many files don't get their proper file extensions (because I don't know them).
They are replaced by the magic value from the main container and enclosed in exclamation marks. Examining the PK4-files doesn't give more information than I've already got.
For example: MP3-sounds are named to "ambience.!!!SNDS!!!"
Could anybody give me a hint?


Notes:
The main container (SPK/MPK) consists of concatenated ZLIB-compressed chunks.
Each chunk is preceded by a magic value (which determines the data type) and two values for uncompressed and compressed size. A chunk extracts to another container with the final data and (rather simple) structure: Number_of_files + table_filenames_lengths + data (no offsets).

Therefore the extraction process is separated into two steps:
- Decompressing each ZLIB-chunk to a temporary file
- Extracting the data from this file

[Edit:
Please report if you encounter an "File format not recognized" (or anything else) error like Savage did:
viewtopic.php?p=31405#p31405
This allows me to update the program.
Thanks.

According to this file structure the game must be an awful memory spendthrift in my opinion because of the large buffers needed to decompress the data.
You do not have the required permissions to view the files attached to this post.
Last edited by asmxtx on Wed Aug 26, 2009 5:22 am, edited 2 times in total.
User avatar
aluigi
VVIP member
VVIP member
Posts: 1916
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 664 times
Contact:

Re: Little extractor program

Post by aluigi »

usually the chunk based archives must be handled like a compressed file system.
for example if the name table says that the file myfile.dat is located at offset 0x12345 and has a size of 80000 bytes you must extract it chunk-by-chunk finding the starting chunk through the reading of the various chunks sizes (like an array) and continuing with this type of handling.

the memory consumed for the process will be only the one of a single chunk and those for keeping the array of "chunks sizes", so it's very good.

and the cool thing is that when you implement this process transparently you will only need to call your function instead of fread... and it works perfectly :)
Post Reply