Page 29 of 32

Re: My quickBMS scripts

Posted: Sun Jan 26, 2014 12:29 am
by Prince_of_Peace
AlphaTwentyThree wrote:Wwise sound engine *.pck/AKPK extractor
This is not a re-importable script is it?

Re: My quickBMS scripts

Posted: Sun Jan 26, 2014 3:36 pm
by AlphaTwentyThree
Prince_of_Peace wrote:
AlphaTwentyThree wrote:Wwise sound engine *.pck/AKPK extractor
This is not a re-importable script is it?
No, sorry :/

Re: My quickBMS scripts

Posted: Wed Feb 12, 2014 6:50 pm
by Teancum
How hard would this psuedocode be to translate into BMS script?

// 1) Read bytes 0x10-0x13, store as num_files[]
// 2) Go to 0x30-0x33, store files_start_offset[], jump to files_start_offset[]
// 3) For each item in num_files[]
// 4) Read first four bytes as file_offset[]
// 5) Read next four bytes as file_size[]
// 6) Jump forward 12 bytes
// 7) Read 16 bytes as file_name[]
// 8) Go to file_offset[]
// 9) Select from file_offset[] to file_offset[]+file_size[]
// 10) Save selection as file_name[]
// 11) num_files[]+=1
// 12) files_start_offset[]+=84 bytes
// 13) fetch next

Re: My quickBMS scripts

Posted: Wed Feb 12, 2014 6:58 pm
by AlphaTwentyThree
Teancum wrote:How hard would this psuedocode be to translate into BMS script?

// 1) Read bytes 0x10-0x13, store as num_files[]
// 2) Go to 0x30-0x33, store files_start_offset[], jump to files_start_offset[]
// 3) For each item in num_files[]
// 4) Read first four bytes as file_offset[]
// 5) Read next four bytes as file_size[]
// 6) Jump forward 12 bytes
// 7) Read 16 bytes as file_name[]
// 8) Go to file_offset[]
// 9) Select from file_offset[] to file_offset[]+file_size[]
// 10) Save selection as file_name[]
// 11) num_files[]+=1
// 12) files_start_offset[]+=84 bytes
// 13) fetch next

Code: Select all

goto 0x10
get num_files long
goto 0x30
get files_start_offset long
goto files_start_offset
savepos MYOFF
for i = 0 < num_files
   goto MYOFF
   get file_offset long
   get file_size long
   getDstring dummy 12
   getDstring file_name 16
   log file_name file_offset file_size
   math MYOFF += 84
next i

Re: My quickBMS scripts

Posted: Wed Feb 12, 2014 8:46 pm
by Teancum
I'm getting an error, it may be my problem:

Code: Select all

Error: incomplete input file number 0, can't read 4 bytes.
Here's the offsets 0x10 and 0x30, maybe I'm reading those wrong, are those the correct addresses.

Image

***EDIT***

Here's the basic file structure: http://wiki.xentax.com/index.php?title= ... Apocalypse -- I'm just getting "Number Of Items In Directory 1", then "Offset To Directory Data 3". From there I would grab the data I need (offset, size, name), then jump to the actual files. I can manually rip them, but it's hundreds of files.

Incidentally, directories 4-7 in the wiki don't actually exist in the files. I'm not sure if anyone can edit that data or not.

Re: My quickBMS scripts

Posted: Thu Feb 13, 2014 1:24 am
by AlphaTwentyThree
Sorry to ask but why do you need a BMS script when Game Extractor already supports the archive type?

Re: My quickBMS scripts

Posted: Thu Feb 13, 2014 9:17 am
by Teancum
It doesn't, though. Supposedly it does, but the table structure is platform-specific, so GameExtractor can only do one platform. A QuickBMS script would allow me to adjust sizes and offsets should I ever need to. The Unknown{4} in the // Directory Data 3 is a different size on each platform. For example, the 360 is 12 bytes instead of 4.

Re: My quickBMS scripts

Posted: Tue Mar 04, 2014 11:33 pm
by MacDougal
Is there any chance of a script for the pak & bin files of LOTR Conquest?

Re: My quickBMS scripts

Posted: Wed Mar 05, 2014 10:47 am
by AlphaTwentyThree
MacDougal wrote:Is there any chance of a script for the pak & bin files of LOTR Conquest?
Only if they contain the music, which is what I'm after. ;)

Re: My quickBMS scripts

Posted: Wed Apr 02, 2014 1:38 am
by Kein
Any chance you could update XNB to WAV to support XNA 4.0 XNB format?

Re: My quickBMS scripts

Posted: Wed Apr 30, 2014 1:02 am
by Milesgboy
AlphaTwentyThree wrote:The Amazing Spider-Man *.pkz decompressor

Decompresses the pkz archives from the game and writes the header and decompressed data to disk. I can't make any sense of the given offsets in the header, but if anyone wants to take a look, I can provide a sample.
Nothing special here, so again, it's just another example for the QuickBMS-curious (comments provided). ;)

Code: Select all

# decompresses the *.pkz files from The Amazing Spider-Man (PC)
# no extraction of individual files at the moment (TOC offsets don't fit)
# (c) 2012-10-09 by AlphaTwentyThree of XeNTaX

comtype zlib_noerror
get IDENT long
if IDENT == 0xb0b1bEbA
	endian big
elif IDENT == 0xbabeb1b0
else
	cleanexit
endif
get DATA_OFF long              # start of compressed data
get NAME basename
string NAME += ".header"
log NAME 0 DATA_OFF            # write header to disk for later research
get BLOCKSIZE long             # length of one zlib block
get LOOPS asize                # calculate the number of loops
math LOOPS -= DATA_OFF
math LOOPS /= BLOCKSIZE
# memory pre-allocation
get SIZE asize
math SIZE -= DATA_OFF
math SIZE *= 10
putVarChr MEMORY_FILE SIZE 0
log MEMORY_FILE 0 0
set OFFSET DATA_OFF  # initialize first offset
set SIZE BLOCKSIZE
math SIZE *= 10      # set decompressed size to some default
append
for i = 1 <= LOOPS
	clog MEMORY_FILE OFFSET BLOCKSIZE SIZE # decompress block to memory
	math OFFSET += BLOCKSIZE               # jump to next block
next i
append
get NAME basename
string NAME += ".decomp"
get SIZE asize MEMORY_FILE
log NAME 0 SIZE MEMORY_FILE
Any chance you'll ever be able to figure this out so we can have some modding scene go on for these games. So many of their Spiderman games use PKZ and so many costumes that could be ported now into each game now. Surprised no one has figured this out yet. Since ASM2 just came out recently and nothing seems to have changed.

Re: My quickBMS scripts

Posted: Tue Jul 01, 2014 4:51 am
by namquang93
AlphaTwentyThree wrote:The Amazing Spider-Man *.pkz decompressor

Decompresses the pkz archives from the game and writes the header and decompressed data to disk. I can't make any sense of the given offsets in the header, but if anyone wants to take a look, I can provide a sample.
Nothing special here, so again, it's just another example for the QuickBMS-curious (comments provided). ;)

Code: Select all

# decompresses the *.pkz files from The Amazing Spider-Man (PC)
# no extraction of individual files at the moment (TOC offsets don't fit)
# (c) 2012-10-09 by AlphaTwentyThree of XeNTaX

comtype zlib_noerror
get IDENT long
if IDENT == 0xb0b1bEbA
	endian big
elif IDENT == 0xbabeb1b0
else
	cleanexit
endif
get DATA_OFF long              # start of compressed data
get NAME basename
string NAME += ".header"
log NAME 0 DATA_OFF            # write header to disk for later research
get BLOCKSIZE long             # length of one zlib block
get LOOPS asize                # calculate the number of loops
math LOOPS -= DATA_OFF
math LOOPS /= BLOCKSIZE
# memory pre-allocation
get SIZE asize
math SIZE -= DATA_OFF
math SIZE *= 10
putVarChr MEMORY_FILE SIZE 0
log MEMORY_FILE 0 0
set OFFSET DATA_OFF  # initialize first offset
set SIZE BLOCKSIZE
math SIZE *= 10      # set decompressed size to some default
append
for i = 1 <= LOOPS
	clog MEMORY_FILE OFFSET BLOCKSIZE SIZE # decompress block to memory
	math OFFSET += BLOCKSIZE               # jump to next block
next i
append
get NAME basename
string NAME += ".decomp"
get SIZE asize MEMORY_FILE
log NAME 0 SIZE MEMORY_FILE
I used this script with THE AMAZING SPIDER MAN 2. But get error! Can you updated for new pkz format? Thanks in advance!

Re: My quickBMS scripts

Posted: Wed Jul 02, 2014 7:21 am
by DoubleDare
AlphaTwentyThree wrote:AFL Live 2 (2013) X360 - .wad0/.wad1

Be sure to get the latest func_getTYPE.bms for this one!

Code: Select all

snip
Hey A23!

Thank you so much for your time and effort :)

I am a little stuck and maybe you can help?

When I run your great qBMS script, I am able to extract:
  • XMA - Which I have already used your other great XMA decoder script for ToWav and works great
  • DDS - All of the textures are great and works a treat
The only problem is that there are no 3D model files extracted :( I can see there are a lot of '.000000xx' files, which I presume some are the model files.

How can I go about exploring these files to see?

Thanks so much! :wink:

Re: My quickBMS scripts

Posted: Thu Jul 03, 2014 11:24 am
by AlphaTwentyThree
Well, you could look at them using a hex editor but you probably have to write your own conversion script to access them with a 3D program. As I'm neither familiar with nor interested in model files I wish you luck with your quest. ;)

Re: My quickBMS scripts

Posted: Thu Aug 14, 2014 10:54 am
by FASTandFURIOUS
AlphaTwentyThree, you can make a script to unpack the archives of the game Midnight club Los Angeles for Xbox 360?