Page 1 of 1

Software

PostPosted: Mon Aug 16, 2010 10:32 am
by carbon14
The OPL3 outputs data as a serial 16-bit offset value. Unlike the OPL2 where the data is in a floating bit form.

Since the YAC512 digital to analogue converter is a floating point DAC, it must be the DAC itself which converts the linear data stream to floating point.

The offset is 32768 so you can basically flip the most significant bit to produce a signed data stream instead. Either way, it's trivial to get this data into a WAV or AIFF file if you want to.

Internally, my first experiments show that the negative data is in 1s-complement, not in 2s-complement. What this means basically is that there is both a +ve zero (at 32768 with the offset) and -ve zero (at 32767 with the offset). This distinction is negligible, and if the YAC512 algorithm is the same as that used by the YM3014B (for the OPL2) then actually the DAC ignores the distinction as well and gives a different output for +ve zero as it does for -ve zero.

Anyway the upshot of this is that Olli's simple reader program is no good to you, because it assumes the incoming data is in the floating point format and converts it to linear. HOWEVER, if you download the source from Olli's website you'll find that he provides another reader DBUGREAD.EXE which bypasses the conversion and will give you exactly what you need. The source code for both the readers is included along with all the tools you should need to compile it under DOS.