Converts sampled audio data inside ROM files to a WAV file
This is a small program which allows you to convert data stored in binary files (initially targetting ROM images for Sega 8-bit home video game systems) into minimally-adjusted WAV representations of the same data.
This covers three aspects:
Currently supported formats are:
- 4-bit SN76489 volume control data (stored in big-endian or little-endian order)
- 8-bit unsigned PCM data
- 1-bit PDM data (stored in big-endian or little-endian order)
Current adjustments are:
- Convert SN76489 volume control values (attenuation at 2dB per step) to linear PCM
- Pass-through (treat source data as linear PCM)
- 8-bit data truncation to SN76489 volume control values (to match operation of some sample players)
Output formats are:
- 8-bit unsigned
- 16-bit signed
- 32-bit float
The sampling rate is entirely under the control of the user, subject to the WAV format's limitation of integer Hz values.