Level5 Sample Thread

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Level5 Sample Thread

Post by AnonBaiter »

Looks like I figured out what those HD6 oddities mean:
Let's take this part, for example:

Code: Select all

wav \en \livetalk

The first word that comes to mind is the "wav" string, which is actually a folder. The ones that come with the "\" symbol are actually subfolders. The rest though is still fairly messy as it is, as unlike many index/reference files the HD6 file isn't straightforward like the .HED/.HD2/.HD3 files were. So let's just say Level5 found a way to mess up the header file by randomizing the filenames and (in some cases) reversing their order in the process.

EDIT: Looks like I found something(the link is down, though):
http://asmodean.reverse.net/pages/exhd6.html

Alternatively, there is also a filelist out of Xpert, an tool which used to function as similarly as yours. If you want, I can pinpoint the tool for you, or I can even handle the tool for you but alas, here they are. Use this as a reference for figuring out the filenames.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Level5 Sample Thread

Post by AnonBaiter »

Here's a sample for Dragon Quest VIII. I don't know exactly why I've forgotten this game, but here you go...
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Level5 Sample Thread

Post by aluigi »

Already exists a script for that game:
http://aluigi.org/bms/jeanne_darc.bms
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Level5 Sample Thread

Post by AnonBaiter »

Oh I didn't notice that one. But I have to inform you of what I got when I tested this script:

Code: Select all

- filter string: "*.SPF"
  *.SPF
- filter   1: *.SPF
- start the scanning of the input folder: E:\No-Intro\Sony - PlayStation Portable\0756_JEANNEdARC\PSP_GAME\USRDIR\DATA
- open input file E:\No-Intro\Sony - PlayStation Portable\0756_JEANNEdARC\PSP_GAME\USRDIR\DATA\.\AS0001\BGM0001.SPF
- open script E:\quickbms_scripts\jeanne_darc.bms
- set output folder E:\No-Intro\Sony - PlayStation Portable\0756_JEANNEdARC\PSP_GAME\USRDIR\DATA

  offset   filesize   filename
--------------------------------------
  00000280 952720     BGM0001.PBD
  000e8c10 904        BGM0001.PHD
  000e8fa0 82         BGM0001.MID

Error: incomplete input file 0: E:\No-Intro\Sony - PlayStation Portable\0756_JEANNEdARC\PSP_GAME\USRDIR\DATA\AS0001\BGM0001.SPF
       Can't read 1 bytes from offset 304d4742.
       Anyway don't worry, it's possible that the BMS script has been written
       to exit in this way if it's reached the end of the archive so check it
       or contact its author or verify that all the files have been extracted.
       Please check the following coverage information to know if it's ok.

  coverage file 0    99%   953826     954368

Last script line before the error or that produced the error:
  20  get NAME string
I might ignore this error, though. But again...
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Level5 Sample Thread

Post by aluigi »

I have fixed the handling of the number of files.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Level5 Sample Thread

Post by AnonBaiter »

It works now. Thanks.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Level5 Sample Thread

Post by AnonBaiter »

So, I've been trying to modify the script so that I can know where are the keywords and how do they connect with each other(a.k.a. nested filenames) while in the .HD6 file. Here's the modified script.

You might want to check out the .txt report too, and if you wish I can upload a .hd6 file.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Level5 Sample Thread

Post by AnonBaiter »

Well, it's been a while and I have made several "improvements" within the script.

1. The script can now extract "packed" files within an archive(ex.: .snd, .chr, .mpd, etc...) for as long as ALLOW_UNPACK is set to 1. There is heavy usage of MEMORY_FILE and MEMORY_FILE2, so I'm not responsible for anything that happens with your computer when you use this script.
2. The offset field for the HD6/DAT format used in Dragon Quest VIII or Rogue Galaxy is recalculated to prevent many instances of "one file starts in the middle of another file", which is a issue I pointed out on this thread before I had to address it myself.

If you need a sample, just ask. Although I'd rather upload the entire archive(data.dat/data.hd2 from Dark Cloud) for the sake of showing off this new change.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Level5 Sample Thread

Post by AnonBaiter »

Okay, because I've only tested it on Japanese versions of Dark Cloud and Dark Chronicle/Dark Cloud 2, I found a few issues on both the USA and Europe version of the latter game. Because of this, it may take some time to find what causes these issues to appear if the script is run on these verisons.

Oh, and the .HD3/.HD4/.DAT format is used only on the European version of Dark Cloud 2. I'll get into that, and when all of this is finished I'll release a new version of the above script.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Level5 Sample Thread

Post by AnonBaiter »

Well, that was easier to fix. Anyway, here's a summary of the changes.

1. Fixed a rare bug in which the script would stop extracting because only one file had a size field that was way over the actual size of the "packed" file. This was just the USA version, so no identical issues were found on any regional version of Dark Chronicle/Dark Cloud 2.
2. Added .HD4 support for the European version of Dark Chronicle/Dark Cloud 2.

Again, if you need a sample, just ask. And remember to set the ALLOW_UNPACK variable to 0 if you want me to upload it with filecutter applied.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Level5 Sample Thread

Post by AnonBaiter »

Okay, there was a minor but overlooked issue in that that ".pal" file that was in the European version of Dark Cloud wasn't supported. Instead the script could identify this one as a "packed" file and try to "extract" it without success.

This rare issue has been fixed, and as a bonus the "CHECK_EXTENSION" function has been... "organized", so to speak.
costelabr
Posts: 13
Joined: Mon Nov 18, 2019 2:36 am

Re: Dark Cloud (PS2) - .DAT/.HD2/.HED

Post by costelabr »

AnonBaiter wrote:Well, I just updated your brink.bms script and the extracted files don't look so corrupted anymore. On top of that, it actually decompressed/dumped .zarc files.

Thanks man, you script really is something!


you can help me please for decompress .zarc files from Ni No Kuni Ps3 version?