This is not a re-importable script is it?AlphaTwentyThree wrote:Wwise sound engine *.pck/AKPK extractor
Offtopic: Into Commodore 64 (6502) coding, pixeling or music?
Xentax is looking for new members for the C64 activities!
Just drop us a message at forum@xentax.com and join the Scene Team!
Forum rules: Click here
Xentax is looking for new members for the C64 activities!
Just drop us a message at forum@xentax.com and join the Scene Team!
Forum rules: Click here
My quickBMS scripts
-
- beginner
- Posts: 31
- Joined: Fri May 26, 2006 6:41 am
- Has thanked: 2 times
Re: My quickBMS scripts
-
- double-veteran
- Posts: 984
- Joined: Mon Aug 24, 2009 10:55 pm
- Has thanked: 75 times
- Been thanked: 626 times
Re: My quickBMS scripts
No, sorry :/Prince_of_Peace wrote:This is not a re-importable script is it?AlphaTwentyThree wrote:Wwise sound engine *.pck/AKPK extractor
If you like what you see, why not click the little Thank You button?
It will definitely motivate me! 
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks


And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks

-
- veteran
- Posts: 94
- Joined: Tue Nov 27, 2007 8:30 pm
- Has thanked: 20 times
- Been thanked: 5 times
Re: My quickBMS scripts
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[]
//
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
// 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[]
//

// 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
-
- double-veteran
- Posts: 984
- Joined: Mon Aug 24, 2009 10:55 pm
- Has thanked: 75 times
- Been thanked: 626 times
Re: My quickBMS scripts
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[]
//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
If you like what you see, why not click the little Thank You button?
It will definitely motivate me! 
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks


And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks

-
- veteran
- Posts: 94
- Joined: Tue Nov 27, 2007 8:30 pm
- Has thanked: 20 times
- Been thanked: 5 times
Re: My quickBMS scripts
I'm getting an error, it may be my problem:
Here's the offsets 0x10 and 0x30, maybe I'm reading those wrong, are those the correct addresses.

***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.
Code: Select all
Error: incomplete input file number 0, can't read 4 bytes.

***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.
-
- double-veteran
- Posts: 984
- Joined: Mon Aug 24, 2009 10:55 pm
- Has thanked: 75 times
- Been thanked: 626 times
Re: My quickBMS scripts
Sorry to ask but why do you need a BMS script when Game Extractor already supports the archive type?
If you like what you see, why not click the little Thank You button?
It will definitely motivate me! 
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks


And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks

-
- veteran
- Posts: 94
- Joined: Tue Nov 27, 2007 8:30 pm
- Has thanked: 20 times
- Been thanked: 5 times
Re: My quickBMS scripts
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.
-
- double-veteran
- Posts: 984
- Joined: Mon Aug 24, 2009 10:55 pm
- Has thanked: 75 times
- Been thanked: 626 times
Re: My quickBMS scripts
Only if they contain the music, which is what I'm after.MacDougal wrote:Is there any chance of a script for the pak & bin files of LOTR Conquest?

If you like what you see, why not click the little Thank You button?
It will definitely motivate me! 
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks


And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks

-
- advanced
- Posts: 44
- Joined: Sat Jul 03, 2010 5:02 pm
- Has thanked: 3 times
- Been thanked: 1 time
Re: My quickBMS scripts
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.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
-
- veteran
- Posts: 116
- Joined: Mon Apr 09, 2012 8:40 am
- Has thanked: 50 times
- Been thanked: 5 times
Re: My quickBMS scripts
I used this script with THE AMAZING SPIDER MAN 2. But get error! Can you updated for new pkz format? Thanks in advance!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
-
- ultra-n00b
- Posts: 1
- Joined: Tue Jul 01, 2014 7:48 pm
- Has thanked: 4 times
Re: My quickBMS scripts
Hey A23!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
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

How can I go about exploring these files to see?
Thanks so much!

-
- double-veteran
- Posts: 984
- Joined: Mon Aug 24, 2009 10:55 pm
- Has thanked: 75 times
- Been thanked: 626 times
Re: My quickBMS scripts
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. 

If you like what you see, why not click the little Thank You button?
It will definitely motivate me! 
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks


And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks

-
- ultra-n00b
- Posts: 1
- Joined: Thu Aug 14, 2014 9:48 am
Re: My quickBMS scripts
AlphaTwentyThree, you can make a script to unpack the archives of the game Midnight club Los Angeles for Xbox 360?