QP: Shooting Dangerous - strange audio codec

Codecs, formats, encoding/decoding of game audio, video and music
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

QP: Shooting Dangerous - strange audio codec

Post by AlphaTwentyThree »

Hi there!
I wanted to look at the music from the above game and stumbled across an audio codec that I've never seen before. The byte distribution reminds of uncompressed PCM but the structure is completely different. There's one big file without TOC but I'd like to play around with a header if available.
Here are the first 16mb of the archive: http://*USE_ANOTHER_FILEHOSTING*/0710fe8 ... m.dat_16mb
Has anybody seen this codec before? Is it maybe some kind of obfuscated PCM?
Any help is appreciated!
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: QP: Shooting Dangerous - strange audio codec

Post by aluigi »

Code: Select all

filexor "\x8e\x07\xfa\xe9\x8c\xdf\x8e\xf1\x83\x1e\xe1\xbf"
math OFFSET = 0x1c
get SIZE asize
math SIZE -= OFFSET
get NAME basename
string NAME += ".wav"
log NAME OFFSET SIZE
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: QP: Shooting Dangerous - strange audio codec

Post by AlphaTwentyThree »

damn, such an easy solution... THANKS LUIGI! :)
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: QP: Shooting Dangerous - strange audio codec

Post by AlphaTwentyThree »

Well uhm... I'm having problems with writing a correct script for extraction of the archive... Could you eventually take a quick look for a short script? That would be great! Here's the complete archive: http://*USE_ANOTHER_FILEHOSTING*/5c714ff ... 43/bgm.dat
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: QP: Shooting Dangerous - strange audio codec

Post by aluigi »

AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: QP: Shooting Dangerous - strange audio codec

Post by AlphaTwentyThree »

You're my hero, Luigi! ;)
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: QP: Shooting Dangerous - strange audio codec

Post by aluigi »

I have updated the script to version 0.2 but there are no good news.
Those files that look "strange" are compressed but I don't know what algorithm or customization it is.
So now the files have a correct filename (they were wrong before) and are saved "as-is" if they are compressed.

My guess is that they use a modified lzss, maybe just some parameters.
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: QP: Shooting Dangerous - strange audio codec

Post by AlphaTwentyThree »

Interesting news indeed. Maybe something that could be implemented when somebody has the nerve to fiddle around with the parameters.
Thanks for the update! :)
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: QP: Shooting Dangerous - strange audio codec

Post by id-daemon »

I think it would be easier to find the algorithm by debugging.

p.s. just started debugging and immediately found what that was.

the program to unpack here: https://github.com/henteko/2012TeResAI/ ... /DXArchive

key = qppassqppass
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: QP: Shooting Dangerous - strange audio codec

Post by aluigi »

Well done.

Just a note, I guess that the official homepage with the updated tool is http://homepage2.nifty.com/natupaji/DxLib/dxdload.html