Jump to content
IGNORED

Ripping audio from the AvP ROM


vananasun

Recommended Posts

Hey so, I fired up the ROM for AvP as raw audio bytes, and found that the audio data looks and sounds like uncompressed 8-bit PCM.

 

I had to flip the bottom part of the wave using the formula `(if sample <= 127: sample = 127 - sample)` to remove most distortion.

 

However, as you can see in the screenshot, our beloved "thonk" sound has a strange distortion to the waveform, it looks a bit too square.

 

 

image.png

Is this a common problem in ripping sounds from Jaguar ROMs?

Is it possible that it's some other weird bit depth such as 7-bit, 12-bit?

 

In the attachments I added the raw audio bytes cut from the ROM, aswell as the partially converted wav file.

 

Hope anyone has a clue about this

 

Cheers

~Maxim

dumped_audio_bytes.raw

Edited by vananasun
Link to comment
Share on other sites

The sounds are compressed using Atari's SNDCOMP utility (part of the software synthesis tools provided in the Jaguar SDK).

 

I looked at the DSP assembly source, and the decompression process is equivalent to this:

1) read sample value as a 8-bit unsigned integer

2) convert it to 16-bit signed integer with zero extension (so the value stays unchanged)

3) if the value is less than 128, square it

4) if the value is 128 or more, subtract 128, then square it, then negate the result

 

Edited by Zerosquare
  • Like 3
  • Thanks 1
Link to comment
Share on other sites

8 hours ago, Zerosquare said:

The sounds are compressed using Atari's SNDCOMP utility (part of the software synthesis tools provided in the Jaguar SDK).

 

I looked at the DSP assembly source, and the decompression process is equivalent to this:

1) read sample value as a 8-bit unsigned integer

2) convert it to 16-bit signed integer with zero extension (so the value stays unchanged)

3) if the value is less than 128, square it

4) if the value is 128 or more, subtract 128, then square it, then negate the result

 

 

I could have never figured this out on my own. Thank you so so so so so much!!!!!!!!!!🤩

For future reference, I created a script that extracts it from a ROM file automatically: https://gist.github.com/vananasun/cc19eb8204d1f716d1303af604a1fd03

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...