I might get to it this weekend.
Just look at the psarc format it is 99% identical to it.
its just inflate compression chunks.
Important information: this site is currently scheduled to go offline indefinitely by end of the year.
Saints row IV ps3_vpp.
-
- Moderator
- Posts: 2602
- Joined: Sun May 18, 2008 3:01 pm
- Has thanked: 57 times
- Been thanked: 1422 times
Re: Saints row IV ps3_vpp.
Has nothing to do with psarc.
https://blog.gib.me/
Don't ask me about localization tools; if you don't have the resources to develop them yourself you don't need them.
Don't ask me about localization tools; if you don't have the resources to develop them yourself you don't need them.
-
- veteran
- Posts: 88
- Joined: Sat Feb 27, 2010 6:57 pm
- Has thanked: 40 times
- Been thanked: 77 times
Re: Saints row IV ps3_vpp.
I'm getting some similar results as quickbms using ICSharpCode.SharpZipLib.Zip.Compression; as some of the files the bms script tries seem to start inflating.
I told the inflater's SetInput() to use from the 8th byte of of the chunk the container is referring to.
I also got a similar result by trying from the 11th byte in another file.
I get these results after the inflate attempt on patch_compressed.vpp_xbox2 from TU1.
(The Title Update can be found on xbuc.net if anyone wants to try on the same file. Just search for its media id 130ABF66.)
jump_sm.xtbl
0x31 0x00 0x00 0x00 0x00 .....
pause_save_game.lua
0x31 0x00 0x31 0x00 0x31 0x00 0x31 0x00 0x31 0x00 0x31 0x32 0x00 0x00 0x00 0x00 .....
Its like the inflater is trying because it doesn't throw an exception when I tell it where the real zlib data starts, but I may not be passing the correct chunk size or not looping correctly.
Anyone get similar results trying to inflate headerless zlib data?
I told the inflater's SetInput() to use from the 8th byte of of the chunk the container is referring to.
I also got a similar result by trying from the 11th byte in another file.
I get these results after the inflate attempt on patch_compressed.vpp_xbox2 from TU1.
(The Title Update can be found on xbuc.net if anyone wants to try on the same file. Just search for its media id 130ABF66.)
jump_sm.xtbl
0x31 0x00 0x00 0x00 0x00 .....
pause_save_game.lua
0x31 0x00 0x31 0x00 0x31 0x00 0x31 0x00 0x31 0x00 0x31 0x32 0x00 0x00 0x00 0x00 .....
Its like the inflater is trying because it doesn't throw an exception when I tell it where the real zlib data starts, but I may not be passing the correct chunk size or not looping correctly.
Anyone get similar results trying to inflate headerless zlib data?
-
- Moderator
- Posts: 2602
- Joined: Sun May 18, 2008 3:01 pm
- Has thanked: 57 times
- Been thanked: 1422 times
Re: Saints row IV ps3_vpp.
are you working on an editor?Rick wrote:Has nothing to do with psarc.
If so i wont make a quickbms script.
from what i have seen its just using zlib chunks very simple format.
-
- M-M-M-Monster veteran
- Posts: 1823
- Joined: Wed Mar 31, 2010 6:54 am
- Has thanked: 92 times
- Been thanked: 1058 times
Re: Saints row IV ps3_vpp.
Here tools by ThomasJepp for pack/unpack packs and localization.. Source code here
You do not have the required permissions to view the files attached to this post.
My Github repo
-
- double-veteran
- Posts: 929
- Joined: Fri Jul 08, 2011 12:06 pm
- Location: Torrance, CA
- Has thanked: 10 times
- Been thanked: 274 times
Re: Saints row IV ps3_vpp.
I thought on Rick's site Volition said they were going to (and have released some minor) extracting tools. The fact that they said they were going to release file format information, extracting tools, and an importer/exporter, I think we should all just wait to save us from wasting a lot of time. Then people can figure out the PS3 and XBox360 formats after the PC tools are released.
-
- Moderator
- Posts: 2602
- Joined: Sun May 18, 2008 3:01 pm
- Has thanked: 57 times
- Been thanked: 1422 times
Re: Saints row IV ps3_vpp.
cool tools released here was what i was working on in bms that is not needed. Also i dint put in padding that i think is needed in the format.
Code: Select all
endian big
comtype DEFLATE_NOERROR
IDSTRING "\x51\x89\x0A\xCE\x00\x00\x00\x0A"
get checksum long
get ARCSIZE long
get UNKSIZE long
get FILES long
get NOFF long
get TOFF long
get TASIZE long
get TAZSIZE long
math NOFF + 0x28
math TOFF += NOFF
savepos TMP
for i = 0 < 2
goto TMP
#print "%TMP%"
get NAME_OFF long
get MEM_OFFSET longlong
get TSIZE long
get TZSIZE long
set FSIZE 0
get COMPTYPE long
savepos TMP
math NAME_OFF + NOFF
goto NAME_OFF
#print "%NAME_OFF%"
get NAME STRING
if TSIZE != TZSIZE
append
Do
goto TOFF
get ZSIZE short
math TOFF + ZSIZE
math TOFF + 8
get NULL short
get SIZE long
savepos OFFSET
#print "%TOFF%, %OFFSET% , %ZSIZE% , %SIZE%"
clog MEMORY_FILE OFFSET ZSIZE SIZE
get FSIZE asize MEMORY_FILE
#print "%FSIZE%, %TSIZE%"
while FSIZE < TSIZE
append
log NAME 0 TSIZE MEMORY_FILE
else
goto TOFF
savepos OFFSET
log NAME OFFSET TSIZE
math TOFF + TSIZE
endif
next i
-
- Moderator
- Posts: 954
- Joined: Sun Mar 27, 2011 8:42 pm
- Has thanked: 10 times
- Been thanked: 161 times
Re: Saints row IV ps3_vpp.
Here is Editor for X360
What can this editor do?
As of the current version (0.0.4), it can:
- Open Archive
- Extract Files
- Replace Files
- Save/Rebuild Archive
Download Binary :
Download Source
Autor : XBLToothPik
It does not decompress files, coz he does not know what compression is used. If you know this plsease advice and he will implement it
What can this editor do?
As of the current version (0.0.4), it can:
- Open Archive
- Extract Files
- Replace Files
- Save/Rebuild Archive
Download Binary :
Code: Select all
http://www.mediafire.com/download/enhqu8jo0ylxqb6/SR4_VPP.exe
Code: Select all
http://www.mediafire.com/download/xxcjtdwecl58j9w/SR4_VPP_%5BSource%5D_%5BC%23%5D.zip
It does not decompress files, coz he does not know what compression is used. If you know this plsease advice and he will implement it
Quick BMS Editor GUI - simple easy to use
Goto : viewtopic.php?uid=34229&f=29&t=6797&start=0
Downloads from DropBox : https://dl.dropboxusercontent.com/u/
Goto : viewtopic.php?uid=34229&f=29&t=6797&start=0
Downloads from DropBox : https://dl.dropboxusercontent.com/u/
-
- ultra-n00b
- Posts: 9
- Joined: Thu Aug 22, 2013 6:44 pm
- Been thanked: 1 time
Re: Saints row IV ps3_vpp.
@Michalss
The editor isn't complete & not everything in the source is right as of now. Been waiting on more info before I finish it.
The editor isn't complete & not everything in the source is right as of now. Been waiting on more info before I finish it.
-
- double-veteran
- Posts: 929
- Joined: Fri Jul 08, 2011 12:06 pm
- Location: Torrance, CA
- Has thanked: 10 times
- Been thanked: 274 times
Re: Saints row IV ps3_vpp.
somebody said xbox and ps3 files are identical just different endian, so i'm assuming zlib. post a screenshot of the hex where the compressed data starts. the PC files contain the zlib prefix 78DA so i don't think the xbox one will have the missing prefix. if it's a different compression i would first try one of the LZOs or the xmemcompress as they are fairly common to the xbox.
-
- veteran
- Posts: 88
- Joined: Sat Feb 27, 2010 6:57 pm
- Has thanked: 40 times
- Been thanked: 77 times
Re: Saints row IV ps3_vpp.
The compressed data in the xbox360 file does not contain a regular zlib header. It may have some kind of truncated zlib header though.howfie wrote:somebody said xbox and ps3 files are identical just different endian, so i'm assuming zlib. post a screenshot of the hex where the compressed data starts. the PC files contain the zlib prefix 78DA so i don't think the xbox one will have the missing prefix. if it's a different compression i would first try one of the LZOs or the xmemcompress as they are fairly common to the xbox.
I've yet to try XMemDecompress(), but was thinking about trying it next.
Here are some of the methods I've tried in C#....
Props to all who have been working on this.
This one attempts to use an ICSharpZipLib Inflater. I get the same results as Gh0stBlade's v1.2 bms script on some files.
Code: Select all
public byte[] Inflate(byte[] inputData)
{
Inflater inflater = new Inflater(true);
using (var inputStream = new MemoryStream(inputData))
using (var ms = new MemoryStream())
{
var inputBuffer = new byte[4096];
var outputBuffer = new byte[4096];
while (inputStream.Position < inputData.Length)
{
var read = inputStream.Read(inputBuffer, 0, inputBuffer.Length);
inflater.SetInput(inputBuffer, 11, (read - 11));
while (inflater.IsNeedingInput == false)
{
var written = inflater.Inflate(outputBuffer, 0, outputBuffer.Length);
if (written == 0)
break;
ms.Write(outputBuffer, 0, written);
}
if (inflater.IsFinished == true)
break;
}
inflater.Reset();
return ms.ToArray();
}
}
Code: Select all
public byte[] ZLibDecompress(byte[] zLibCompressedBuffer)
{
byte[] resBuffer = null;
MemoryStream mInStream = new MemoryStream(zLibCompressedBuffer);
MemoryStream mOutStream = new MemoryStream(zLibCompressedBuffer.Length);
InflaterInputStream infStream = new InflaterInputStream(mInStream);
mInStream.Position = 0;
try
{
byte[] tmpBuffer = new byte[zLibCompressedBuffer.Length];
int read = 0;
do
{
read = infStream.Read(tmpBuffer, 0, tmpBuffer.Length);
if (read > 0)
mOutStream.Write(tmpBuffer, 0, read);
} while (read > 0);
resBuffer = mOutStream.ToArray();
}
finally
{
infStream.Close();
mInStream.Close();
mOutStream.Close();
}
return resBuffer;
}
Code: Select all
public static byte[] Decompress(byte[] data)
{
var compressedStream = new MemoryStream(data);
var zipStream = new DeflateStream(compressedStream, CompressionMode.Decompress);
var resultStream = new MemoryStream();
var buffer = new byte[4096];
int read;
while ((read = zipStream.Read(buffer, 0, buffer.Length)) > 0)
resultStream.Write(buffer, 0, read);
return resultStream.ToArray();
}
Code: Select all
byte[] fileTmp = File.ReadAllBytes(this.textBox1.Text);
Stream stream = File.OpenRead(this.textBox1.Text);
Stream DataStream;
stream.Read(fileTmp, 0, fileTmp.Length);
FileStream fs = new FileStream(currentPath + "\\" + Path.GetFileNameWithoutExtension(currentFile) + ".test.bin", FileMode.Create, FileAccess.Write);
using (MemoryStream tempStream = new MemoryStream(fileTmp))
{
using (Stream s = new ZlibStream(tempStream, CompressionMode.Decompress, true))
{
byte[] uncompressedData = new byte[64411];
s.Read(uncompressedData, 0, uncompressedData.Length);
DataStream = new MemoryStream(uncompressedData);
DataStream.CopyTo(fs);
}
}
fs.Close();
Code: Select all
---------------------------------------------------------------------------------------------------
FileStream s1 = new FileStream(this.textBox1.Text, FileMode.Open, FileAccess.Read);
FileStream sw1 = new FileStream(this.textBox1.Text + ".test.bin", FileMode.Create, FileAccess.Write);
DeflateStream ds1 = new DeflateStream(s1, CompressionMode.Decompress);
ds1.CopyTo(sw1);
ds1.Dispose();
s1.Close();
sw1.Close();
---------------------------------------------------------------------------------------------------
byte[] dst = new byte[UInt32.Parse(vx2SectionTable[(int)i][2])];
Inflater ifr = new Inflater(true);
ifr.SetInput(fileTmp, 8, (fileTmp.Length - 8));
ifr.Inflate(dst, 0, dst.Length);
File.WriteAllBytes(currentPath + "\\" + Path.GetFileNameWithoutExtension(currentFile) + "_compressed_files\\decompressed\\" + vx2NamesTable[(int)i], dst);
ifr.Reset();
---------------------------------------------------------------------------------------------------
byte[] dst = new byte[UInt32.Parse(vx2SectionTable[(int)i][2])];
[DllImport("zlib1.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int uncompress(byte[] dest, ref uint destLen, byte[] source, uint sourceLen);
uint dstSize = UInt32.Parse(vx2SectionTable[(int)i][2]);
uint srcSize = UInt32.Parse(vx2SectionTable[(int)i][3]);
uncompress(dst, ref dstSize, fileTmp, (uint)srcSize);
File.WriteAllBytes(currentPath + "\\" + Path.GetFileNameWithoutExtension(currentFile) + "_compressed_files\\decompressed\\" + vx2NamesTable[(int)i], dst);
---------------------------------------------------------------------------------------------------
Its probably something simple that I'm not doing.
-
- veteran
- Posts: 88
- Joined: Sat Feb 27, 2010 6:57 pm
- Has thanked: 40 times
- Been thanked: 77 times
Re: Saints row IV ps3_vpp.
You can grab one from xbuc.net. Search for 130ABF66 in the search bar and unpack the downloaded file with wxpirs or another container tool.howfie wrote:anyone got an xbox sample?
Once the container is extracted, you will have 3 files. The one I'm testing on is patch_compressed.vpp_xbox2.
patch_compressed.vpp_xbox2's contents are as follows..
Code: Select all
ammo.xtbl
cmp_common.lua
credits_xbox2.xtbl
customization_items.xtbl
jump_sm.xtbl
m17.lua
m22_1.lua
menu_DE.be_strings
menu_ES.be_strings
menu_FR.be_strings
menu_IT.be_strings
menu_US.be_strings
pause_menu_common.lua
pause_save_game.lua
ui_bms_dlc_al.cpeg_xbox2
ui_bms_dlc_al.gpeg_xbox2
ui_bms_dlc_al.xtbl
ui_bms_store_weapon_costumes.xtbl
vdo_hint_bar.lua
weapon_costumes.xtbl
-
- Moderator
- Posts: 954
- Joined: Sun Mar 27, 2011 8:42 pm
- Has thanked: 10 times
- Been thanked: 161 times
Re: Saints row IV ps3_vpp.
Thats why i posted it in here on the first place.XBLToothPik wrote:@Michalss
The editor isn't complete & not everything in the source is right as of now. Been waiting on more info before I finish it.
Quick BMS Editor GUI - simple easy to use
Goto : viewtopic.php?uid=34229&f=29&t=6797&start=0
Downloads from DropBox : https://dl.dropboxusercontent.com/u/
Goto : viewtopic.php?uid=34229&f=29&t=6797&start=0
Downloads from DropBox : https://dl.dropboxusercontent.com/u/
-
- Moderator
- Posts: 954
- Joined: Sun Mar 27, 2011 8:42 pm
- Has thanked: 10 times
- Been thanked: 161 times
Re: Saints row IV ps3_vpp.
sent you samples i hope you gonna figure it outhowfie wrote:I thought on Rick's site Volition said they were going to (and have released some minor) extracting tools. The fact that they said they were going to release file format information, extracting tools, and an importer/exporter, I think we should all just wait to save us from wasting a lot of time. Then people can figure out the PS3 and XBox360 formats after the PC tools are released.
Quick BMS Editor GUI - simple easy to use
Goto : viewtopic.php?uid=34229&f=29&t=6797&start=0
Downloads from DropBox : https://dl.dropboxusercontent.com/u/
Goto : viewtopic.php?uid=34229&f=29&t=6797&start=0
Downloads from DropBox : https://dl.dropboxusercontent.com/u/