Follow us on Facebook: https://www.facebook.com/xentax/ :)

My quickBMS scripts

Coders and would-be coders alike, this is the place to talk about programming.
AlphaTwentyThree
double-veteran
double-veteran
Posts: 985
Joined: Mon Aug 24, 2009 10:55 pm
Has thanked: 75 times
Been thanked: 621 times

Re: My quickBMS scripts

Post by AlphaTwentyThree » Sun Jun 14, 2015 2:57 pm

makcar wrote:Kane & Lynch: Dead Men™ PC version?
Example: https://yadi.sk/d/Lzd_2w2NhEM2r
Tried some time ago without success. :\
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 ;)

AlphaTwentyThree
double-veteran
double-veteran
Posts: 985
Joined: Mon Aug 24, 2009 10:55 pm
Has thanked: 75 times
Been thanked: 621 times

Re: My quickBMS scripts

Post by AlphaTwentyThree » Sun Jun 14, 2015 2:59 pm

Das Hexagon-Kartell - *.anm movies

Code: Select all

# extract audio from "Das Hexagon-Kartell" *.ANM videos
# (c) 2015-06-05 by AlphaTwentyThree of XeNTaX
# script for QuickBMS http://quickbms.aluigi.org

idstring "AN15"
get FSIZE asize
PutVarChr MEMORY_FILE FSIZE 0
log MEMORY_FILE 0 0
set FIRST 1
set OFFSET 0x48
for
	goto OFFSET
	getDstring IDENT 4
	get SIZE long
	savepos OFFSET
	#print "%OFFSET%"
	if IDENT == "SAMP"
		if SIZE > 0x10
			if FIRST == 1
				get DUMMY longlong
				get FREQ short
				get DUMMY byte
				get CH byte
				get BITS byte
				get DUMMY short
				set FIRST 0
			else
				getDstring DUMMY 0xf
			endif
			savepos OFFSET
			math SIZE -= 0xf
			append
			log MEMORY_FILE OFFSET SIZE
			append
		endif
	elif IDENT == "ENDE"
		break
	endif
	math OFFSET += SIZE
next
get SIZE asize MEMORY_FILE
set CODEC 1
set BLOCKALIGN 2

	endian little
	set PRE SIZE
	math PRE += 0x2c
	putVarChr MEMORY_FILE2 PRE 0
	log MEMORY_FILE2 0 0
	set MEMORY_FILE2 binary "\x52\x49\x46\x46\x20\xC0\xB1\x00\x57\x41\x56\x45\x66\x6D\x74\x20\x10\x00\x00\x00\x01\x00\x02\x00\x44\xAC\x00\x00\x10\xB1\x02\x00\x04\x00\x10\x00\x64\x61\x74\x61\xFC\xBF\xB1\x00"
	append
	log MEMORY_FILE2 0 SIZE MEMORY_FILE
	append
	set RIFFSIZE SIZE
	math RIFFSIZE += 36
	set AVGBYTES FREQ
	math AVGBYTES *= BLOCKALIGN
	
	putvarchr MEMORY_FILE2 0x04 RIFFSIZE long
	putvarchr MEMORY_FILE2 0x14 CODEC short          # wFormatTag: Microsoft PCM Format (0x0001)
	putvarchr MEMORY_FILE2 0x16 CH short   # wChannels
	putvarchr MEMORY_FILE2 0x18 FREQ short   # dwSamplesPerSec
	putvarchr MEMORY_FILE2 0x1c AVGBYTES long    # dwAvgBytesPerSec
	putvarchr MEMORY_FILE2 0x20 BLOCKALIGN short # wBlockAlign
	putvarchr MEMORY_FILE2 0x22 BITS short       # wBitsPerSample
	putvarchr MEMORY_FILE2 0x28 SIZE long
	get NAME basename
	string NAME += ".wav"
	get SIZE asize MEMORY_FILE2
	log NAME 0 SIZE MEMORY_FILE2
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 ;)

AlphaTwentyThree
double-veteran
double-veteran
Posts: 985
Joined: Mon Aug 24, 2009 10:55 pm
Has thanked: 75 times
Been thanked: 621 times

Re: My quickBMS scripts

Post by AlphaTwentyThree » Sun Jun 14, 2015 3:01 pm

Jane's Combat Simulation - *.cb8 movies

Code: Select all

# demultiplex *.cb8 movies from Jane's Combat Simulation games
# (c) 2015-06-10 by AlphaTwentyThree
# script for QuickBMS http://quickbms.aluigi.org

idstring "DRBC"
get CH long
get UNK short
get FREQ short
get UNK long
get FSIZE asize
putVarChr MEMORY_FILE FSIZE 0
log MEMORY_FILE 0 0
set MEMORY_FILE binary "\x52\x49\x46\x46\x20\xC0\xB1\x00\x57\x41\x56\x45\x66\x6D\x74\x20\x10\x00\x00\x00\x01\x00\x02\x00\x44\xAC\x00\x00\x10\xB1\x02\x00\x04\x00\x10\x00\x64\x61\x74\x61\xFC\xBF\xB1\x00"
putVarChr MEMORY_FILE2 FSIZE 0
putVarChr MEMORY_FILE3 FSIZE 0
log MEMORY_FILE2 0 0
log MEMORY_FILE3 0 0
set OFFSET 0x40
set FIRST 1
do
	goto OFFSET
	getDstring IDENT 4
	get SIZE long
	math SIZE -= 0x8
	savepos OFFSET
	if IDENT == "MRFA"
		math OFFSET += 0x10
		math SIZE -= 0x10
		if FIRST == 1
			math OFFSET += 0x10
			math SIZE -= 0x10
			set FIRST 0
		endif
		append
		log MEMORY_FILE OFFSET SIZE
		append
	elif IDENT == "VooM"
		append
		log MEMORY_FILE2 OFFSET SIZE
		append
	elif IDENT == "MRFI"
		append
		log MEMORY_FILE3 OFFSET SIZE
		append
	else
		print "%IDENT%"
		cleanexit
	endif
	math OFFSET += SIZE
while OFFSET != FSIZE

get NAME basename

string WNAME p= "%s.wav" NAME
get SIZE asize MEMORY_FILE
set RIFFSIZE SIZE
math RIFFSIZE += 36
set AVGBYTES FREQ
if CH == 1
	set BLOCKALIGN 1
else
	set BLOCKALIGN 2
endif
set CODEC 1
set BITS 8
putvarchr MEMORY_FILE 0x04 RIFFSIZE long
putvarchr MEMORY_FILE 0x14 CODEC short          # wFormatTag: Microsoft PCM Format (0x0001)
putvarchr MEMORY_FILE 0x16 CH short   # wChannels
putvarchr MEMORY_FILE 0x18 FREQ short   # dwSamplesPerSec
putvarchr MEMORY_FILE 0x1c AVGBYTES long    # dwAvgBytesPerSec
putvarchr MEMORY_FILE 0x20 BLOCKALIGN short # wBlockAlign
putvarchr MEMORY_FILE 0x22 BITS short       # wBitsPerSample
putvarchr MEMORY_FILE 0x28 SIZE long
log WNAME 0 SIZE MEMORY_FILE

string WNAME p= "%s.VooM" NAME
get SIZE asize MEMORY_FILE2
log WNAME 0 SIZE MEMORY_FILE2

string WNAME p= "%s.mrfi" NAME
get SIZE asize MEMORY_FILE3
log WNAME 0 SIZE MEMORY_FILE3
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 ;)

AlphaTwentyThree
double-veteran
double-veteran
Posts: 985
Joined: Mon Aug 24, 2009 10:55 pm
Has thanked: 75 times
Been thanked: 621 times

Re: My quickBMS scripts

Post by AlphaTwentyThree » Sun Jun 14, 2015 3:05 pm

F-22 Lightning II - *.vdk video demultiplexer

Code: Select all

# demultiplex *.vdk videos from F-22 Lightning II (PC, 1996)
# (c) 2015-06-12 by AlphaTwentyThree of Xentax
# script for QuickBMS http://quickbms.aluigi.org

idstring "xVDK"
get OFFSET long

get SIZE asize
putVarChr MEMORY_FILE SIZE 0
putVarChr MEMORY_FILE2 SIZE 0
putVarChr MEMORY_FILE3 SIZE 0
log MEMORY_FILE 0 0
log MEMORY_FILE2 0 0
log MEMORY_FILE3 0 0

do
	goto OFFSET
	getDstring IDENT 4
	#print "%IDENT%"
	get SIZE long
	savepos OFFSET
	math SIZE -= 8
	append
	if IDENT == "pVDK"
		log MEMORY_FILE OFFSET SIZE
	elif IDENT == "aVDK"
		math OFFSET += 0x10
		math SIZE -= 0x13
		log MEMORY_FILE2 OFFSET SIZE
		math SIZE += 3
	elif IDENT == "iVDK"
		log MEMORY_FILE3 OFFSET SIZE
	endif
	append
	math OFFSET += SIZE
while IDENT != ""

get FNAME basename
get SIZE asize MEMORY_FILE
if SIZE != 0
	string NAME p= "%s.pVDK" FNAME
	log NAME 0 SIZE MEMORY_FILE
endif

get SIZE asize MEMORY_FILE2
if SIZE != 0
	string NAME p= "%s.aVDK" FNAME
	log NAME 0 SIZE MEMORY_FILE2
endif

get SIZE asize MEMORY_FILE3
if SIZE != 0
	string NAME p= "%s.iVDK" FNAME
	log NAME 0 SIZE MEMORY_FILE3
endif
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 ;)

troler11
ultra-n00b
Posts: 6
Joined: Sat Aug 15, 2015 7:56 am

Re: My quickBMS scripts

Post by troler11 » Wed Sep 02, 2015 11:48 pm

please one piece warriors 3 PC
unpack,edit text
LINKDATA_EU_OS_EUNA.A
LINKDATA_EU_OS_EUNA.B
LINKDATA_EU_OS_EUNA.C
LINKDATA_EU_OS_EUNA.D

AlphaTwentyThree
double-veteran
double-veteran
Posts: 985
Joined: Mon Aug 24, 2009 10:55 pm
Has thanked: 75 times
Been thanked: 621 times

Re: My quickBMS scripts

Post by AlphaTwentyThree » Mon Nov 16, 2015 11:02 pm

Star Wars: The Force Unleashed (Xbox 360) - .xd/.xp pairs

* script on hold, need to check something *

Code: Select all

# extract the xd/xd source files from Star Wars: The Force Unleashed (Xbox 360)
# (c) 2015-11-16 by AlphaTwentyThree of Xentax
# script for QuickBMS http://quickbms.aluigi.org

open FDDE xd 0
open FDDE xp 1

endian big
get UNK long 0
get UNK long 0
get FILES long 0
get NAMESTART long 0
set NAMEOFF FILES
math NAMEOFF *= 0x1c
math NAMEOFF += 0x10
math NAMEOFF += NAMESTART # only in some files
get FOLDER basename
string FOLDER += "/"
get FSIZE asize 1
for i = 1 <= FILES
	get CRC long 0
	get OFFSET long 0
	get OFFSET2 long 0
	get SIZE long 0
	get FFFF long 0
	get UNK long 0
	get ZERO long 0
	savepos MYOFF 0
	goto NAMEOFF 0
	get NAMEL long 0
	getDstring NAME NAMEL 0
	savepos NAMEOFF 0
	math OFFSET2 -= 0x800
	xmath TEST "OFFSET2 + SIZE"
	if TEST <= FSIZE
		log NAME OFFSET2 SIZE 1
	endif
	goto MYOFF 0
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 ;)

User avatar
angelasvv
ultra-n00b
Posts: 3
Joined: Sun Oct 13, 2013 7:22 am
Has thanked: 2 times
Been thanked: 1 time

Re: My quickBMS scripts

Post by angelasvv » Fri Jan 01, 2016 6:24 am

Tokyo 7th sisters
.and file
http://1drv.ms/1Tt07ON

AnonBaiter
veteran
Posts: 82
Joined: Thu Oct 15, 2015 8:15 pm
Has thanked: 18 times
Been thanked: 6 times

Re: My quickBMS scripts

Post by AnonBaiter » Tue Feb 02, 2016 9:23 pm

Bump in case the author of the original thread decides to show up.

AlphaTwentyThree
double-veteran
double-veteran
Posts: 985
Joined: Mon Aug 24, 2009 10:55 pm
Has thanked: 75 times
Been thanked: 621 times

Re: My quickBMS scripts

Post by AlphaTwentyThree » Wed Feb 03, 2016 8:14 am

Well, I don't do requests here, so...
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 ;)

flowersongs
n00b
Posts: 10
Joined: Tue Feb 02, 2016 7:40 pm

Re: My quickBMS scripts

Post by flowersongs » Tue Feb 09, 2016 12:32 pm

edit
Last edited by flowersongs on Mon Mar 07, 2016 4:15 am, edited 1 time in total.

Peter Rodgers
ultra-n00b
Posts: 2
Joined: Tue Oct 14, 2014 9:09 pm

Re: My quickBMS scripts

Post by Peter Rodgers » Sat Feb 13, 2016 2:13 am

Hey. I need a script to pull out all adpcm raw of file MS LASSET.MS2. The game Mortal Kombat Deception PS2. Tried to pull through PSound, but he did not adpsm raw pulls a ditch. Only converts in wav. But I need a adpcm raw. Here file https://yadi.sk/d/k2-qRmOwoRGoz.

Supplemented. I need a script to pull not a bunch of files is a adpcm raw, and that they are in a file mst.

announcr.mst
announcr_names.mst
bg_beetle_lair.mst
bg_dark_prison.mst

And so on.

flowersongs
n00b
Posts: 10
Joined: Tue Feb 02, 2016 7:40 pm

Re: My quickBMS scripts

Post by flowersongs » Thu Feb 18, 2016 3:31 am

Okay, I have opened textures from NBA Jam on fire edition in photoshop. used xbox sdk kit to finally extract the tga files, and then bundle them back together to xpr2. This makes an xpr2 file with the same name, etc. I tried placing all the files, but the game freezes when loading a match an looking for the textures, it appears it WANTs the .AST file.
NOW, I can someone please help me run this NBA extraction script in reverse to make an ast? I tried running itin quickbms with the Reimport batch, but it errored saying expected BGFA, this file is XPR2. The script worked to Extract the files, now I need to inject them or re-import them to .ast ... Please help me run this script in reverse and my project is complete.

Code: Select all

# NBA Jam on Fire
# script for QuickBMS http://quickbms.aluigi.org

idstring "BGFA"
getdstring VER 4
get DUMMY long
get FILES long
get OFFSET long
goto OFFSET
getdstring DUMMY 12
for i = 0 < FILES
    getdstring DUMMY 10
    get OFFSET long
    get ZSIZE threebyte
    get SIZE threebyte
    getdstring NAME 0x2a
    math OFFSET *= 8
    if SIZE == 0
        log NAME OFFSET ZSIZE
    else
        math SIZE += ZSIZE
        clog NAME OFFSET ZSIZE SIZE
    endif
next i

AnonBaiter
veteran
Posts: 82
Joined: Thu Oct 15, 2015 8:15 pm
Has thanked: 18 times
Been thanked: 6 times

Re: My quickBMS scripts

Post by AnonBaiter » Wed Apr 06, 2016 12:39 am

So, I tried your "EA ast extractor" script on an .ast file that I discovered on an Wii game developed by EA. however, it gave me this error:
Image

Maybe it's an undiscovered .ast file. Here's an sample:
https://mega.nz/#!AM9XhJrJ!O11IMx0eLYqG ... 5_ucY8BZjU

See if you can figure this out.

BitRain
ultra-n00b
Posts: 2
Joined: Tue Jun 07, 2016 7:45 pm

Re: My quickBMS scripts

Post by BitRain » Tue Jun 07, 2016 7:48 pm

Your Half-Life PS2 .pak extracting script only works on certain PAK files, others don't have the PAK header, maybe because they are compressed? Anyone know how to decompress/extract VALVE.PAK for example?

senbon
ultra-n00b
Posts: 9
Joined: Thu Oct 28, 2010 12:22 pm

Re: My quickBMS scripts

Post by senbon » Wed Dec 14, 2016 2:46 pm

There is some script to package the xa files extracted from the str, ie convert the pack of xa to str, as the dragon ball final bout, there is a script to extract but not to pack
?

Post Reply