READ THE RULES: Click here

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

Star Wars The Force Unleashed pcd, pcp files

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Post Reply
lordskylark
beginner
Posts: 39
Joined: Tue May 26, 2009 1:27 pm
Has thanked: 1 time

Star Wars The Force Unleashed pcd, pcp files

Post by lordskylark » Tue Dec 01, 2009 5:53 pm

The contents of this post was deleted because of possible forum rules violation.

joeyq
n00b
Posts: 17
Joined: Tue Jan 19, 2010 11:14 am
Been thanked: 4 times

Re: Star Wars The Force Unleashed pcd, pcp files

Post by joeyq » Thu Nov 11, 2010 1:51 pm

bump on extracting audio!

Tpiom
ultra-n00b
Posts: 5
Joined: Sat Oct 08, 2011 12:37 pm
Has thanked: 1 time

Re: Star Wars The Force Unleashed pcd, pcp files

Post by Tpiom » Sat Oct 08, 2011 12:42 pm

Yes, checking out the .pcp files would be interesting... They are definitely audio and music.
I think the other files (.pcd) are scripts, they are only a few KBs each.

EDIT: Old thread... Have they figured these files already? :oops:

Also, as the original file is down I give you two new ones:
http://tpiom.webs.com/playertroopercomm ... .st.fr.pcp
http://tpiom.webs.com/playerultimategoo ... .re.nv.pcd

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

Re: Star Wars The Force Unleashed pcd, pcp files

Post by AlphaTwentyThree » Mon Jan 02, 2012 12:23 pm

If anyone's interested, I just wrote two scripts that lets you access and play all sounds and music from those files.
First one is the plain extraction, pretty easy. Unquote the three indent lines to add the file name as a subfolder.

Code: Select all

open FDDE pcd 0
open FDDE pcp 1

get UNK long 0
get UNK long 0
get FILES long 0
get XML long 0
xmath NAMEOFF "(0x1c * FILES) + 0x10 + XML"
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
		#set NAME2 FOLDER
		#string NAME2 += NAME
		#set NAME NAME2
	savepos NAMEOFF 0
	log NAME OFFSET SIZE 1
	goto MYOFF 0
next i
Second one converts the resulting files without extension to correct MSADPCM or PCM wave files. I'm quite proud of that little script because the format is a real b****. The resulting files have a complete header so you can play them with the standard msadpcm codec, i.e. you can also import them to any audio editor. :)

Code: Select all

get CODE short
if CODE == 2
	callfunction msadpcm 1
elif CODE == 1
	callfunction pcm 1
else
	print "error: unknown codec"
endif
get SIZE asize MEMORY_FILE
get NAME basename
string NAME += ".wav"
log NAME 0 SIZE MEMORY_FILE

startfunction msadpcm
	set MEMORY_FILE binary "\x52\x49\x46\x46\x9C\xA8\x80\x00\x57\x41\x56\x45\x66\x6D\x74\x20\x32\x00\x00\xff"
	# note: byte at 0x13 has to be set to 0 later
	append
	log MEMORY_FILE 0 0x32
	append
	putVarChr MEMORY_FILE 0x46 0x61746164 long # "data"
	putVarChr MEMORY_FILE 0x4a 0xffffffff long # placeholder
	putVarChr MEMORY_FILE 0x13 0 byte
	set OFFSET 0x32
	get SIZE asize
	math SIZE -= OFFSET
	append
	log MEMORY_FILE OFFSET SIZE
	append
	putVarChr MEMORY_FILE 0x4a SIZE long # actual streamsize
	get RIFFSIZE asize MEMORY_FILE
	math RIFFSIZE -= 8
	putVarChr MEMORY_FILE 4 RIFFSIZE long
endfunction

startfunction pcm
	goto 2
	get CHANNELS short
	get FREQUENCY short
	set BITS 16
	set OFFSET 0x10
	get SIZE asize
	math SIZE -= OFFSET
	set MEMORY_FILE binary "\x52\x49\x46\x46\x00\x00\x00\x00\x57\x41\x56\x45\x66\x6d\x74\x20\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x64\x61\x74\x61\xff\xff\xff\xff"
	append
	log MEMORY_FILE OFFSET SIZE
	append

	set RIFFSIZE SIZE
	math RIFFSIZE += 36
	set BLOCKALIGN BITS
	set AVGBYTES FREQUENCY
	math BLOCKALIGN /= 8
	math BLOCKALIGN *= CHANNELS
	math AVGBYTES *= BLOCKALIGN

	putvarchr MEMORY_FILE 4 RIFFSIZE long
	putvarchr MEMORY_FILE 20 1 short          # wFormatTag: Microsoft PCM Format (0x0001)
	putvarchr MEMORY_FILE 22 CHANNELS short   # wChannels
	putvarchr MEMORY_FILE 24 FREQUENCY long   # dwSamplesPerSec
	putvarchr MEMORY_FILE 28 AVGBYTES long    # dwAvgBytesPerSec
	putvarchr MEMORY_FILE 32 BLOCKALIGN short # wBlockAlign
	putvarchr MEMORY_FILE 34 BITS short       # wBitsPerSample
	putvarchr MEMORY_FILE 40 SIZE long
endfunction
Tell me if it works!
Last edited by AlphaTwentyThree on Sun Aug 30, 2015 7:46 pm, edited 2 times in total.
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 ;)

WhiskeyBanger
ultra-n00b
Posts: 6
Joined: Thu Jul 23, 2015 6:09 am
Has thanked: 1 time

Re: Star Wars The Force Unleashed pcd, pcp files

Post by WhiskeyBanger » Thu Jul 23, 2015 5:37 pm

Im interested in trying this out but im new to all this and need to know how to use it hahahaha

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

Re: Star Wars The Force Unleashed pcd, pcp files

Post by AlphaTwentyThree » Thu Jul 23, 2015 6:12 pm

WhiskeyBanger wrote:hahahaha
Laughing shows a lack of sincerity where I come from...
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 ;)

WhiskeyBanger
ultra-n00b
Posts: 6
Joined: Thu Jul 23, 2015 6:09 am
Has thanked: 1 time

Re: Star Wars The Force Unleashed pcd, pcp files

Post by WhiskeyBanger » Thu Jul 23, 2015 6:26 pm

AlphaTwentyThree wrote:
WhiskeyBanger wrote:hahahaha
Laughing shows a lack of sincerity where I come from...
i didnt mean to show lack of interest so for that im sorry.. Im just very new to this and needed direction. I have Multiex Commander now and put your scripts into it but im guessing these are used for after i get the pak.lp files opened? Like i said, im new as of yesterday and watched some tutorials but am having trouble grasping it all. Have any pointers for me?

ARAJediMaster
beginner
Posts: 25
Joined: Fri Jun 12, 2015 5:17 am
Has thanked: 5 times

Re: Star Wars The Force Unleashed pcd, pcp files

Post by ARAJediMaster » Fri Jul 31, 2015 4:31 am

Excuse me, but which .pcd .pcp files are the sound files? There are so many in the Mac version of The Force Unleashed that I don’t know which one(s) it is.

spider91
advanced
Posts: 78
Joined: Mon Feb 14, 2011 8:09 am
Has thanked: 18 times
Been thanked: 44 times

Re: Star Wars The Force Unleashed pcd, pcp files

Post by spider91 » Tue Aug 04, 2015 6:52 pm

AlphaTwentyThree

First of all thanks for your work. I've unpacked some files and found a little error in your script.

Code: Select all

get UNK long 0
set NAMEOFF FILES
math NAMEOFF *= 0x1c
math NAMEOFF += 0x10
should be replaced to

Code: Select all

get XML long 0
set NAMEOFF FILES
math NAMEOFF *= 0x1c
math NAMEOFF += 0x10
math NAMEOFF += XML
Cause there are no any xml files on .pcp and it results incorrect names.

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

Re: Star Wars The Force Unleashed pcd, pcp files

Post by AlphaTwentyThree » Sun Aug 30, 2015 7:46 pm

Thanks! Corrected.
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 ;)

spider91
advanced
Posts: 78
Joined: Mon Feb 14, 2011 8:09 am
Has thanked: 18 times
Been thanked: 44 times

Re: Star Wars The Force Unleashed pcd, pcp files

Post by spider91 » Thu Oct 08, 2015 7:56 pm

Also i've found another mistake, some extra bytes (i think it's always 00 00 after "data" chunk) were in output .wav files. Here is script that extracts wav files without extra bytes and it extracts wav's directly, so no need to use second script

Code: Select all

open FDDE pcd 0
open FDDE pcp 1

get UNK long 0
get UNK long 0
get FILES long 0
get XML long 0
xmath NAMEOFF "(0x1c * FILES) + 0x10 + XML"
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
	string NAME += ".wav"
	savepos NAMEOFF 0
	xmath SIZE "SIZE - (OFFSET2 - OFFSET)"
	goto OFFSET 1
	get CODEC short 1
	if CODEC == 2
	   callfunction msadpcm 1
	elif CODEC == 1
	   callfunction pcm 1
	else
	   print "error: unknown codec"
	endif
	goto MYOFF 0
next i

startfunction msadpcm
	putVarChr MEMORY_FILE 78 0
	log MEMORY_FILE 0 0
	set MEMORY_FILE binary "\x52\x49\x46\x46\x00\x00\x00\x00\x57\x41\x56\x45\x66\x6d\x74\x20\x32\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x64\x61\x74\x61\x00\x00\x00\x00"
   	append
   	log MEMORY_FILE OFFSET2 SIZE 1
	append
	get RIFFSIZE asize MEMORY_FILE
	math RIFFSIZE -= 8
	get CHANNELS short 1
	get FREQUENCY long 1
	get BPS long 1
	get ALIGN short 1
	get UNKNOWN1 long 1
	get UNKNOWN2 long 1
	get UNKNOWN3 long 1
	get UNKNOWN4 long 1
	get UNKNOWN5 long 1
	get UNKNOWN6 long 1
	get UNKNOWN7 long 1
	get UNKNOWN8 long 1
	get UNKNOWN9 long 1
	putVarChr MEMORY_FILE 4 RIFFSIZE long
	putVarChr MEMORY_FILE 22 CHANNELS short
	putVarChr MEMORY_FILE 24 FREQUENCY long
	putVarChr MEMORY_FILE 28 BPS long
	putVarChr MEMORY_FILE 32 ALIGN short
	putVarChr MEMORY_FILE 34 UNKNOWN1 long
	putVarChr MEMORY_FILE 38 UNKNOWN2 long
	putVarChr MEMORY_FILE 42 UNKNOWN3 long
	putVarChr MEMORY_FILE 46 UNKNOWN4 long
	putVarChr MEMORY_FILE 50 UNKNOWN5 long
	putVarChr MEMORY_FILE 54 UNKNOWN6 long
	putVarChr MEMORY_FILE 58 UNKNOWN7 long
	putVarChr MEMORY_FILE 62 UNKNOWN8 long
	putVarChr MEMORY_FILE 66 UNKNOWN9 long
	putVarChr MEMORY_FILE 74 SIZE long
	get FULLSIZE asize MEMORY_FILE
	log NAME 0 FULLSIZE MEMORY_FILE
endfunction

startfunction pcm
	putVarChr MEMORY_FILE 44 0
	log MEMORY_FILE 0 0
	set MEMORY_FILE binary "\x52\x49\x46\x46\x00\x00\x00\x00\x57\x41\x56\x45\x66\x6d\x74\x20\x10\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x64\x61\x74\x61\x00\x00\x00\x00"
   	append
   	log MEMORY_FILE OFFSET2 SIZE 1
	append
	get RIFFSIZE asize MEMORY_FILE
	math RIFFSIZE -= 8
	get CHANNELS short 1
	get FREQUENCY long 1
	get BPS long 1
	get ALIGN short 1
	get BITS short 1
	putVarChr MEMORY_FILE 4 RIFFSIZE long
	putVarChr MEMORY_FILE 22 CHANNELS short
	putVarChr MEMORY_FILE 24 FREQUENCY long
	putVarChr MEMORY_FILE 28 BPS long
	putVarChr MEMORY_FILE 32 ALIGN short
	putVarChr MEMORY_FILE 34 BITS short
	putVarChr MEMORY_FILE 40 SIZE long
	get FULLSIZE asize MEMORY_FILE
	log NAME 0 FULLSIZE MEMORY_FILE
endfunction

JakeGreen
mega-veteran
mega-veteran
Posts: 162
Joined: Sun Aug 22, 2010 10:14 pm
Has thanked: 37 times
Been thanked: 11 times

Re: Star Wars The Force Unleashed pcd, pcp files

Post by JakeGreen » Fri Oct 09, 2015 5:16 am

spider91 wrote:Also i've found another mistake, some extra bytes (i think it's always 00 00 after "data" chunk) were in output .wav files. Here is script that extracts wav files without extra bytes and it extracts wav's directly, so no need to use second script

Code: Select all

open FDDE pcd 0
open FDDE pcp 1

get UNK long 0
get UNK long 0
get FILES long 0
get XML long 0
xmath NAMEOFF "(0x1c * FILES) + 0x10 + XML"
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
	string NAME += ".wav"
	savepos NAMEOFF 0
	xmath SIZE "SIZE - (OFFSET2 - OFFSET)"
	goto OFFSET 1
	get CODEC short 1
	if CODEC == 2
	   callfunction msadpcm 1
	elif CODEC == 1
	   callfunction pcm 1
	else
	   print "error: unknown codec"
	endif
	goto MYOFF 0
next i

startfunction msadpcm
	putVarChr MEMORY_FILE 78 0
	log MEMORY_FILE 0 0
	set MEMORY_FILE binary "\x52\x49\x46\x46\x00\x00\x00\x00\x57\x41\x56\x45\x66\x6d\x74\x20\x32\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x64\x61\x74\x61\x00\x00\x00\x00"
   	append
   	log MEMORY_FILE OFFSET2 SIZE 1
	append
	get RIFFSIZE asize MEMORY_FILE
	math RIFFSIZE -= 8
	get CHANNELS short 1
	get FREQUENCY long 1
	get BPS long 1
	get ALIGN short 1
	get UNKNOWN1 long 1
	get UNKNOWN2 long 1
	get UNKNOWN3 long 1
	get UNKNOWN4 long 1
	get UNKNOWN5 long 1
	get UNKNOWN6 long 1
	get UNKNOWN7 long 1
	get UNKNOWN8 long 1
	get UNKNOWN9 long 1
	putVarChr MEMORY_FILE 4 RIFFSIZE long
	putVarChr MEMORY_FILE 22 CHANNELS short
	putVarChr MEMORY_FILE 24 FREQUENCY long
	putVarChr MEMORY_FILE 28 BPS long
	putVarChr MEMORY_FILE 32 ALIGN short
	putVarChr MEMORY_FILE 34 UNKNOWN1 long
	putVarChr MEMORY_FILE 38 UNKNOWN2 long
	putVarChr MEMORY_FILE 42 UNKNOWN3 long
	putVarChr MEMORY_FILE 46 UNKNOWN4 long
	putVarChr MEMORY_FILE 50 UNKNOWN5 long
	putVarChr MEMORY_FILE 54 UNKNOWN6 long
	putVarChr MEMORY_FILE 58 UNKNOWN7 long
	putVarChr MEMORY_FILE 62 UNKNOWN8 long
	putVarChr MEMORY_FILE 66 UNKNOWN9 long
	putVarChr MEMORY_FILE 74 SIZE long
	get FULLSIZE asize MEMORY_FILE
	log NAME 0 FULLSIZE MEMORY_FILE
endfunction

startfunction pcm
	putVarChr MEMORY_FILE 44 0
	log MEMORY_FILE 0 0
	set MEMORY_FILE binary "\x52\x49\x46\x46\x00\x00\x00\x00\x57\x41\x56\x45\x66\x6d\x74\x20\x10\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x64\x61\x74\x61\x00\x00\x00\x00"
   	append
   	log MEMORY_FILE OFFSET2 SIZE 1
	append
	get RIFFSIZE asize MEMORY_FILE
	math RIFFSIZE -= 8
	get CHANNELS short 1
	get FREQUENCY long 1
	get BPS long 1
	get ALIGN short 1
	get BITS short 1
	putVarChr MEMORY_FILE 4 RIFFSIZE long
	putVarChr MEMORY_FILE 22 CHANNELS short
	putVarChr MEMORY_FILE 24 FREQUENCY long
	putVarChr MEMORY_FILE 28 BPS long
	putVarChr MEMORY_FILE 32 ALIGN short
	putVarChr MEMORY_FILE 34 BITS short
	putVarChr MEMORY_FILE 40 SIZE long
	get FULLSIZE asize MEMORY_FILE
	log NAME 0 FULLSIZE MEMORY_FILE
endfunction
I have to ask cause i'm not sure but what program do i use this script with?

spider91
advanced
Posts: 78
Joined: Mon Feb 14, 2011 8:09 am
Has thanked: 18 times
Been thanked: 44 times

Re: Star Wars The Force Unleashed pcd, pcp files

Post by spider91 » Fri Oct 09, 2015 8:39 am


JakeGreen
mega-veteran
mega-veteran
Posts: 162
Joined: Sun Aug 22, 2010 10:14 pm
Has thanked: 37 times
Been thanked: 11 times

Re: Star Wars The Force Unleashed pcd, pcp files

Post by JakeGreen » Fri Oct 09, 2015 3:02 pm

Ah okay thanks, um for these scripts when one do i use first and then again to convert it to .WAV?

spider91
advanced
Posts: 78
Joined: Mon Feb 14, 2011 8:09 am
Has thanked: 18 times
Been thanked: 44 times

Re: Star Wars The Force Unleashed pcd, pcp files

Post by spider91 » Fri Oct 09, 2015 4:13 pm

No need to use it two times, if you use my script, you should use it only once and it will output wav's.

Post Reply