Yesterday at 03:49 PM1 day Deadly Premonition Directors Cut on PC uses a archive named DPSerial and it likely contains the files for the game here are the samples for ithttps://drive.google.com/drive/folders/15mEpFCFVG6sqdN02-oFI5uAMPDhMcu0j?usp=sharing
Yesterday at 05:23 PM1 day Supporter The dirty way.... Thing is each resource is aligned to 16 bytes and i don't know how to do it in bms. I tried padding but it fails.get FileSize asize get BaseFileName basename get FileExtension extension for FindLoc ResOffset string "\x44\x3A\x5C\x70\x72\x6F\x67\x72\x61\x6D\x6D\x65\x72\x5F\x50\x43" goto ResOffset savepos StrOffset get FilePath string goto StrOffset getdstring Dummy 0x100 get ResourceSize uint32 savepos ResourceOffset getdstring ResourceData ResourceSize string Name p "%s/%s/%s" BaseFileName FileExtension FilePath #print "%Name%" log Name ResourceOffset ResourceSize nextAlso i can see some files uses zlib/deflate compression. Edited yesterday at 05:39 PM1 day by h3x3r
4 hours ago4 hr Localization 19 hours ago, h3x3r said:The dirty way.... Thing is each resource is aligned to 16 bytes and i don't know how to do it in bms. I tried padding but it fails.In most games, if the file data is already a multiple of 16 bytes, the padding is 0 bytes, but in this one it's actually 16 bytes. It implies that there must be a single null byte after the file data, and then the padding is calculated. So perhaps you just need to work out the padding based on (length+1)%16 . I don't know how that's written in BMS.So I wrote the specs like this:+--------------------------------------+ | Deadly Premonition *.001 *.002 *.003 | +--------------------------------------+ // DETAILS AND FILE DATA // for each file 256 - Filename (null terminated, filled with (byte)204) 4 - File Length X - File Data 1 - null X - null Padding so that (FileData+null) is a multiple of 16 bytesAs you pointed out, many of the files seem to use ZLib compression - these are 2 of them...XPC seems to be a texture archive, where each file is a compressed DDS image.+--------------------------+ | Deadly Premonition *.xpc | +--------------------------+ // HEADER 4 - Header (XPC2) 4 - File Length 2 - Unknown 2 - Unknown 4 - Unknown (1) 4 - Unknown (1) 12 - null 4 - Directory Offset (64) 4 - File Data Offset 24 - null // DIRECTORY // for each file 16 - Filename (null terminated, filled with nulls) 4 - File Offset 4 - Compressed File Length 4 - Unknown 4 - Decompressed File Length [>>8] // FILE DATA // for each file X - File Data (ZLib Compression)The XAM file seems to be a 3D Model made up of multiple parts, where each part if ZLib compressed. This differs from the XMD files which seem to be a 3D Model with only a single part in it. The individual "files" (or meshes) in the XAM have the same format as the XMD files.+--------------------------+ | Deadly Premonition *.xam | +--------------------------+ // HEADER 4 - Header (XAM2) 4 - File Length 2 - Unknown 2 - Unknown 4 - Unknown 4 - Unknown (256) 12 - null 4 - Unknown 4 - Unknown 4 - Unknown 4 - Directory Offset (80) 4 - File Data Offset 24 - null 4 - Unknown // DIRECTORY // for each file 15 - Filename (null terminated, filled with nulls) 1 - Unknown ID? // FILE DATA // for each file 4 - Header (XZP1) 4 - File Length (including these header fields) 4 - Compressed File Length (File Data only) 4 - Decompressed File Length X - File Data (ZLib Compression) X - null padding so the compressed data is a multiple of 16 bytes Edited 4 hours ago4 hr by wattostudios
Create an account or sign in to comment