Help us keep the site up! Got some change to spare? Why not donate a few bits and buy us a coffee. Image

Star Wars Pinball (PS3) *.PXP File

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Post Reply
mazor
advanced
Posts: 44
Joined: Tue Jun 07, 2011 9:22 pm
Has thanked: 157 times
Been thanked: 2 times

Star Wars Pinball (PS3) *.PXP File

Post by mazor »

Hello all,

I'm looking at extracting the 3D files from the Star Wars Pinball PKG archive.

Edit: PKG file has been extracted and now we have PXP archives. I'm now looking into the PXP files. Again, any further help would be appreciated.

Thanks
Image

Here is a sample of the PXP file
http://www.sendspace.com/file/4bv1uz

Here is a sample of the PKG file
http://www.sendspace.com/file/kueg10
This is from the PS3 Zen Pinball 2 DLC

Developer: Zen Studios
http://www.starwarspinball.com/

Image
Last edited by mazor on Thu Feb 28, 2013 4:49 am, edited 1 time in total.
Thief1987
advanced
Posts: 72
Joined: Wed Jan 18, 2012 5:11 am
Has thanked: 1 time
Been thanked: 29 times

Re: Star Wars Pinball (PS3) *.PKG File

Post by Thief1987 »

mazor
advanced
Posts: 44
Joined: Tue Jun 07, 2011 9:22 pm
Has thanked: 157 times
Been thanked: 2 times

Re: Star Wars Pinball (PS3) *.PKG File

Post by mazor »

Thanks for the download. It works every time!

Now we have a couple of PXP files extracted, which contains all assets by the looks of them.
mazor
advanced
Posts: 44
Joined: Tue Jun 07, 2011 9:22 pm
Has thanked: 157 times
Been thanked: 2 times

Re: Star Wars Pinball (PS3) *.PXP File

Post by mazor »

Now, looking into the PXP files we can see some file names with extensions such as DFT and DMV. Haven't figured out decompression method yet.

Any advice?

Image
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: 653 times
Contact:

Re: Star Wars Pinball (PS3) *.PXP File

Post by aluigi »

the pxp files use an unknown compression where all the data begins with 0x04, while the following is the format:

Code: Select all

comtype ??????????????
idstring "PX"
get DUMMY short
get INFO_SIZE long
get DATA_OFFSET long
get FILES long
get DUMMY long
for i = 0 < FILES
    get OFFSET long
    get SIZE long
    get TYPE byte
    get NAMESZ byte
    getdstring NAME NAMESZ
    padding 4
    get ZSIZE long
    clog NAME OFFSET ZSIZE SIZE
next i
User avatar
datahaven
ultra-n00b
Posts: 5
Joined: Tue Oct 08, 2013 11:23 pm
Location: London, UK
Has thanked: 3 times
Been thanked: 7 times
Contact:

Re: Star Wars Pinball (PS3) *.PXP File

Post by datahaven »

Anyone still interested in this? I have the droids you are looking for ... :wink:

This QuickBMS script (exactly the same as the one above but with clog replaced by log) extracts the raw compressed data into separate files:

Code: Select all

# Pinball FX2 .PXP resource extractor
# Extracts the compressed resources from the .PXP
# file but does NOT decompress them
idstring "PX"
get DUMMY short
get INFO_SIZE long
get DATA_OFFSET long
get FILES long
get DUMMY long
for i = 0 < FILES
    get OFFSET long
    get SIZE long
    get TYPE byte
    get NAMESZ byte
    getdstring NAME NAMESZ
    padding 4
    get ZSIZE long
	log NAME OFFSET ZSIZE
next i
You can use the -f option if you only want to extract particular kinds of files.

Here's the good bit - the following script will take one of the single files that you extracted above and will decompress it:

Code: Select all

# Zen Studios .PXP file decompresser
# (CastleStorm, Pinball FX2)
# Adrian Dale 09/10/2013
# 
# Needs NeoWizLib.dll provided by Ekey
# http://forum.xentax.com/viewtopic.php?f=10&t=10654
#
# This script decompresses a single resource file that has previously
# been extracted from a .PXP file.
# This has been tested with files from Pinball FX2 and appears to
# successfully decompress most of the files in the archives.
log MEMORY_FILE3 0 0

do
  get CHUNKTYPE byte
  If CHUNKTYPE == 0x03
    get ZSIZE threebyte
    SavePos IN_OFFSET
	set SIZE long 0x80000
	#print "%CHUNKTYPE% %ZSIZE|hex% %SIZE|hex% %IN_OFFSET|hex%\n"
    log MEMORY_FILE IN_OFFSET ZSIZE
    putvarchr MEMORY_FILE2 SIZE 0
    CallDLL NeoWizLib.dll NWDecompress stdcall "" MEMORY_FILE MEMORY_FILE2 SIZE
    
	math IN_OFFSET + ZSIZE
    goto IN_OFFSET
	
  ElseIf CHUNKTYPE == 0x04
    get SIZE threebyte
	get ZSIZE threebyte
	SavePos IN_OFFSET
	#print "%CHUNKTYPE% %SIZE% %ZSIZE|hex% %IN_OFFSET|hex%\n"
	log MEMORY_FILE IN_OFFSET ZSIZE
	putvarchr MEMORY_FILE2 SIZE 0
    CallDLL NeoWizLib.dll NWDecompress stdcall "" MEMORY_FILE MEMORY_FILE2 SIZE
  Endif
  
  # Now tag MEMORY_FILE2, which is the decompressed chunk
  # onto the end of MEMORY_FILE3
  append
  log MEMORY_FILE3 0 SIZE MEMORY_FILE2
  append
  
while CHUNKTYPE != 0x04

get NAME basename
get EXT extension
string NAME += "_unpacked."
string NAME += EXT

get FULL_SIZE asize MEMORY_FILE3
log NAME 0 FULL_SIZE MEMORY_FILE3
To run this you'll need the NeoWizLib.dll file from Ekey's CastleStorm decompression tool. That's attached to his post here. Drop that so that QuickBMS can find it when you run it.

I can't guarantee that this works on every file. In fact it crashes on dotmatrix\csicsa.dmv in the two archives I tried. This makes Ekey's tool crash, otherwise you could just use that to unpack the whole pxp file. I've got round that by allowing you to decompress files individually. Note that I used the PC version of the game from Steam to test this.

I don't know where Ekey got the NeoWizLib.dll file from - did it come with CastleStorm? I checked that because it is also made by Zen Studios. Anyway, the code in that dll looks identical to the code compiled into the PFX2 exe.

I have a rough idea of how it works - it seems to be a variant of the Deflate algorithm but with a different file format and slightly different way of storing the data. I can post more if anyone is interested? It would be great if there was already an existing compressor for this format, as then it would be possible to mod the PFX2 files and put them back into the game.

There are some interesting files in the archives. There is an obfuscated python file for each table, which appears to describe how the various switches and lights connect together.

There are also the .dmv files which are the Dot Matrix Video files. Their format is pretty simple:
A two byte frame count; then for each frame four bytes of unknown purpose, possibly frame timing info; then 1024 bytes of frame data. So, 32 rows, x 32 bytes is 1024, which means a byte is 4 pixels. This translates to a 128x32 pixel three colour screen with the other bit being an alpha flag.

I may have a look at extracting the model and animation data as there are some cool resources in this game. If you are curious, you can download the main game for free on Steam here and it comes with one playable table, with the rest available as paid DLC. If you're only interested in extracting the resources, then you won't even need to pay to unlock the DLC as the files are already there on your PC for the preview versions of the tables.

Adrian
Ekey
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1822
Joined: Wed Mar 31, 2010 6:54 am
Has thanked: 92 times
Been thanked: 1053 times

Re: Star Wars Pinball (PS3) *.PXP File

Post by Ekey »

I noticed decompress work fine only on plaintext files, on other files like sounds, textures and .ect it crashed. Later I will try to do something.
nbajam
ultra-n00b
Posts: 2
Joined: Tue Nov 23, 2010 10:39 pm
Has thanked: 2 times

Re: Star Wars Pinball (PS3) *.PXP File

Post by nbajam »

What about re-packing the raw compressed data into a .pxp file? If it's a lot of work, forget I ever asked... but if it's simple (I'm not familiar with QuickBMS), I'd love to use such a script. Why? Well, right now there's one table that's only on the 360 / PS3 versions of the game (Plants Vs. Zombies).

Between the 360 and PC versions, they both use .pxp files. I've tried renaming the Plants Vs. Zombies table to the name of a table that is on the PC version (ex. "Paranormal.pxp" or "MARVEL_CivilWar.pxp"), but so far I'm unsuccessful in getting it to load. It greys-out the table in the main menu and tells you to re-download it.

If it's possible to re-pack PXP files, I can try using some of the meta and XML files from an existing table, and only swap in the table design and graphics files.

In case anyone accuses me of doing something immoral, please be aware that I have a near-complete pinball collection between the 360 and PC versions of the game, and I did buy the Plants Vs. Zombies table on the Xbox 360.
datahaven wrote:Anyone still interested in this? I have the droids you are looking for ... :wink:

This QuickBMS script (exactly the same as the one above but with clog replaced by log) extracts the raw compressed data into separate files:
CheloXL
beginner
Posts: 20
Joined: Sat Apr 09, 2011 6:41 pm
Has thanked: 2 times
Been thanked: 2 times

Re: Star Wars Pinball (PS3) *.PXP File

Post by CheloXL »

Hi, I tried the above qbms to extract the files from kickbeat and worked ok. Now, I can't make the decompression script works on the sound files, as they do not start neither with 0x3 nor 0x4. They are mp3 files that seems to be compressed with an unknown algo. If you drop the files on any music player they play, but you can hear a lot of glitches here and there (probably because of the compression).

Can someone take a look at one file and see if you can decompress it with the above decompression tool? Here you have test file...
Kylor
n00b
Posts: 10
Joined: Fri Jan 08, 2016 7:59 pm
Has thanked: 2 times

Re: Star Wars Pinball (PS3) *.PXP File

Post by Kylor »

datahaven wrote:Anyone still interested in this? I have the droids you are looking for ... :wink:

This QuickBMS script (exactly the same as the one above but with clog replaced by log) extracts the raw compressed data into separate files:

Code: Select all

# Pinball FX2 .PXP resource extractor
# Extracts the compressed resources from the .PXP
# file but does NOT decompress them
idstring "PX"
get DUMMY short
get INFO_SIZE long
get DATA_OFFSET long
get FILES long
get DUMMY long
for i = 0 < FILES
    get OFFSET long
    get SIZE long
    get TYPE byte
    get NAMESZ byte
    getdstring NAME NAMESZ
    padding 4
    get ZSIZE long
	log NAME OFFSET ZSIZE
next i
You can use the -f option if you only want to extract particular kinds of files.

Here's the good bit - the following script will take one of the single files that you extracted above and will decompress it:

Code: Select all

# Zen Studios .PXP file decompresser
# (CastleStorm, Pinball FX2)
# Adrian Dale 09/10/2013
# 
# Needs NeoWizLib.dll provided by Ekey
# http://forum.xentax.com/viewtopic.php?f=10&t=10654
#
# This script decompresses a single resource file that has previously
# been extracted from a .PXP file.
# This has been tested with files from Pinball FX2 and appears to
# successfully decompress most of the files in the archives.
log MEMORY_FILE3 0 0

do
  get CHUNKTYPE byte
  If CHUNKTYPE == 0x03
    get ZSIZE threebyte
    SavePos IN_OFFSET
	set SIZE long 0x80000
	#print "%CHUNKTYPE% %ZSIZE|hex% %SIZE|hex% %IN_OFFSET|hex%\n"
    log MEMORY_FILE IN_OFFSET ZSIZE
    putvarchr MEMORY_FILE2 SIZE 0
    CallDLL NeoWizLib.dll NWDecompress stdcall "" MEMORY_FILE MEMORY_FILE2 SIZE
    
	math IN_OFFSET + ZSIZE
    goto IN_OFFSET
	
  ElseIf CHUNKTYPE == 0x04
    get SIZE threebyte
	get ZSIZE threebyte
	SavePos IN_OFFSET
	#print "%CHUNKTYPE% %SIZE% %ZSIZE|hex% %IN_OFFSET|hex%\n"
	log MEMORY_FILE IN_OFFSET ZSIZE
	putvarchr MEMORY_FILE2 SIZE 0
    CallDLL NeoWizLib.dll NWDecompress stdcall "" MEMORY_FILE MEMORY_FILE2 SIZE
  Endif
  
  # Now tag MEMORY_FILE2, which is the decompressed chunk
  # onto the end of MEMORY_FILE3
  append
  log MEMORY_FILE3 0 SIZE MEMORY_FILE2
  append
  
while CHUNKTYPE != 0x04

get NAME basename
get EXT extension
string NAME += "_unpacked."
string NAME += EXT

get FULL_SIZE asize MEMORY_FILE3
log NAME 0 FULL_SIZE MEMORY_FILE3
To run this you'll need the NeoWizLib.dll file from Ekey's CastleStorm decompression tool. That's attached to his post here. Drop that so that QuickBMS can find it when you run it.

I can't guarantee that this works on every file. In fact it crashes on dotmatrix\csicsa.dmv in the two archives I tried. This makes Ekey's tool crash, otherwise you could just use that to unpack the whole pxp file. I've got round that by allowing you to decompress files individually. Note that I used the PC version of the game from Steam to test this.

I don't know where Ekey got the NeoWizLib.dll file from - did it come with CastleStorm? I checked that because it is also made by Zen Studios. Anyway, the code in that dll looks identical to the code compiled into the PFX2 exe.

I have a rough idea of how it works - it seems to be a variant of the Deflate algorithm but with a different file format and slightly different way of storing the data. I can post more if anyone is interested? It would be great if there was already an existing compressor for this format, as then it would be possible to mod the PFX2 files and put them back into the game.

There are some interesting files in the archives. There is an obfuscated python file for each table, which appears to describe how the various switches and lights connect together.

There are also the .dmv files which are the Dot Matrix Video files. Their format is pretty simple:
A two byte frame count; then for each frame four bytes of unknown purpose, possibly frame timing info; then 1024 bytes of frame data. So, 32 rows, x 32 bytes is 1024, which means a byte is 4 pixels. This translates to a 128x32 pixel three colour screen with the other bit being an alpha flag.

I may have a look at extracting the model and animation data as there are some cool resources in this game. If you are curious, you can download the main game for free on Steam here and it comes with one playable table, with the rest available as paid DLC. If you're only interested in extracting the resources, then you won't even need to pay to unlock the DLC as the files are already there on your PC for the preview versions of the tables.

Adrian
This is good but can someone please explain how to set this up so I can extract stuff? Like what must I put in a new folder to get this ready to extract?
ariarosmurf
ultra-n00b
Posts: 6
Joined: Sun Feb 14, 2016 12:51 pm

Re: Star Wars Pinball (PS3) *.PXP File

Post by ariarosmurf »

Hello I was trying to play force awakensi n Pinball. But when i heard Kylo rens voice i had to get the voice lines "sound files" i was trynig to go in the folders but they dont show the folders for kylo rens voice "voice only" how can i get the sound files? help!
Post Reply