Future Shock audio format

Off topic discussion. Talk about gaming and life in general. Be awesome to each other.
Post Reply
User avatar
numidium3rd
Posts: 187
Joined: Sun Mar 25, 2018 12:34 am
Location: United States

Future Shock audio format

Post by numidium3rd »

This is a bit of a long shot but has anyone dabbled with reverse-engineering Daggerfall's predecessor Terminator: Future Shock? I'm trying to understand its .RAW sound format but despite also running on XnGine it seems to be very different from Daggerfall's PCM sounds.

Daggerfall's sound is pretty straightforward. It uses 8-bit unsigned samples at 11025hz. If I treat Future Shock's sounds the same way they just sound like garbage. I've tried a few things: signed 8-bit samples, 16-bit samples, 32-bit float samples, even µ-law and A-law. Nothing sounded right. It might be my imagination but the sounds seem vaguely correct if you listen hard but they're buried under loud electronic screeching. I'm by no means an expert on sound engineering so I'm kind of at a loss here.

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Future Shock audio format

Post by Interkarma »

I don't know the answer, but check out the work by @Rubikow. He has a decently advanced build of Future Shock in Unity engine, similar to DFU, and might know.

https://twitter.com/Rubikow/status/1441385036385714179

User avatar
numidium3rd
Posts: 187
Joined: Sun Mar 25, 2018 12:34 am
Location: United States

Re: Future Shock audio format

Post by numidium3rd »

Thanks for pointing me in Rubikow's direction, Interkarma. That Unity port looks promising though it looks like the last post about it was a while ago. Hope he hasn't abandoned it.

Anyhow, I ended up answering my own question and wanted to share this with anyone who is curious. After fumbling around with the DosBox debugger a bit I discovered that Future Shock's audio files have a noise layer applied to them. I discovered a routine that de-noisifies (if this isn't a term then I'm coining it) them for use with the sound device by iterating backwards through a table of bytes and subtracting each value as it iterates forward through the byte-sized samples of sound data. I presume it goes backwards and subtracts because the process of applying the noise involved iterating forward and adding, hence it being the reverse. When it gets to the beginning of the noise table it loops back to the end and repeats until the whole sound file has been read.

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Future Shock audio format

Post by Interkarma »

Wow... :o

I'm assuming intended to be a data obfuscation technique. What a bit of luck DF didn't have anything like this.

Post Reply