vetal-esher / 18bit-DIT

Adding digital output for old synths
MIT License
12 stars 0 forks source link
an200 mu128 roland sc88pro spdif yamaha

18bit-DIT

Adding digital output for old synths

Surely everyone who used to know DOS era met in games the choice of musical accompaniment - General MIDI, Roland Sound Canvas, Yamaha XG. I will not talk about what wonderful devices these are, and how well they played MIDI. Until the end of the 90s, all these home desktop romplers, like most other professional devices, had only analog outputs, however, they were quite acceptable in quality. In early 2010, out of nostalgia, I bought several devices of that era on ebay - these are the Roland Sound Canvas 88 Pro, Roland MT-32, Yamaha MU128 and Yamaha AN200. The first three should be familiar to gamers of the early 90s, while the AN200 module is an analog modeling synthesizer based on the Yamaha PLG150-AN plug-in card. Later Yamaha MU1000/2000 tone generators were also sold on the site - their difference from the MU128 consisted in a slightly expanded version of the sample bank, as well as in the presence of an optical TOSLINK output.

Actually, the presence of optics in the MU2000 prompted me to start comparing circuits to see if it was possible to modify the MU128 circuit and get a digital output on my own. In the MU2000 service manual, the optical output circuitry is based on a proprietary Yamaha YM3437C chip, which is very difficult to get for an ordinary radio amateur. We need to look for a more general DIT. A Google search on this topic led me to a mod for MU10. The author of the mod relied on the Japanese mod for the Roland SC-88VL. The mod is based on the TC9231N chip from Toshiba, which implements a digital audio interface according to the SPDIF/TOSLINK standard. The chip can be ordered on ebay, it costs an average of $ 2.5 per piece (note: this was in 2010, now the chip is almost impossible to find); the rest of the parts are sold at any radio store. I assembled a Japanese version on a breadboard, and it turned out to be working - with a small caveat. The DAC of the Roland SC88 is 18-bit, while the TC9231N is 16-bit. The Japanese author made a binding for this, which allows either cutting off the top 2 bits in the stream - which could lead to clipping, or shifting the stream 2 bits lower (cutting off the bottom 2 bits), which led to a decrease in volume. In any case, 2 bits of information were lost - and that did not suit me.

I started looking for a transceiver that works with 18-bit stream in "hardware" mode, i.e. that does not require setting the operating mode using an additional microcontroller. After a lot of experimentation with DIT 4096, 4192, TC9271N and others, I finally found a transceiver that works native with 18-bit stream - AKM AK4103AVF. Thanks to the internal pull-up and pull-down resistors, you can build the scheme by minimum of components.

Let's sketch out the diagram first. Given that the board should be as versatile as possible, all configurable pins should be placed on jumpers. The output is bound according to the datasheet as consumer S/PDIF. If XLR AES3 (AES/EBU) is needed, see AK4103 datasheet, also there you need another configuration on FS0-FS3 pins.

The input is I2S, for this we need the sdata, lrck(wclk), bck and mclk lines on the sources. In different datasheets, these lines may be called differently, but their essence is always the same - DATA=SDATA=SI=MDAC=SDTI, LRCK=LRCX=MWCLK, CLK=MQCLK=BCK, etc. All of these lines should be easily found in the circuits included in the DAC, with the exception of mclk, which will have to be searched by the oscilloscope at different points in the circuit. Usually, in I2S, mclk is not needed for transmission, but in AK4103AVF the line is used for correct synchronization.

It has been noticed that if the circuit is turned on at the same time as the module, the AK4103 does not pick up the frequency and the digital output is silent. Empirically revealed that the frequency is caught after the initialization of the module, you need a power delay. In 2016, without thinking twice, I simply brought the "spdif reset" button to the case (shown in the diagram). At the beginning of June 2022, nikitalita contacted me and suggested to use the BRESET line in the PLG expansion connector. An oscilloscope check revealed that BRESET remained low for about 70ms, which was enough for the DIT to pick up the frequency. Let's find the lines on all three devices:

I2SRoland SC-88 ProYamaha MU128Yamaha AN200
mclk CN105 pin 5 IC39 pin 16 IC17 pin 160
sdata CN105 pin 3 IC36 pin 15 IC16 pin 15
bck IC35 pin 8 IC36 pin 16 IC16 pin 16
wclk CN105 pin 6 IC36 pin 13 IC16 pin 13
reset IC35 pin 9 IC34 pin 19 CN5 pin 4

Roland SC-88 Pro

Yamaha MU128

Yamaha AN200

The SC88 has an 18-bit PCM69AU, while the MU128 and AN200 have an 18-bit NEC D63200. According to the specification, the SC-88 has a sample rate of 32kHz, MU128 and AN200 - 44kHz. Following the datasheet, we need to set the following modes: audio routing mode - normal, synchronous mode, 18bit right justified. Let's measure frequencies:

wclkmclkbckdif0dif1dif2cks0cks1fs0fs1fs2fs3
default---000100000
SC88 32000Hz8.192 MHz8.192 MHz 100 10 1100
MU128 44100Hz11.2896 MHz2.8224 MHz 100 10 0000
AN200 44100Hz16.9344 MHz2.8224 MHz 100 01 0000

By the way, in 2010, the service manual for the MU128 could only be found on the same Ebay for money. I bought it, got a PDF, and immediately shared it on my site for free for everyone who seeks it. After a few weeks, this service manual was no longer sold :)

This circuit was assembled on a breadboard and successfully worked in MU128 and AN200 in 2016.

In 2021, I suddenly decided to re-release the development in a decent way.

Gerbers: dit_0.2_gerber.zip

Partlist

ReferenceValuePackage
U1AK4103AVFTSSOP-24
T1PE-65612NL, TC-612
C1, C2, C3100nF0603
R1330R0402
R2100R0402

Roland SC88 Pro notes

According to Japanese DIT project, the actual stream is 20bit, so AK4103 can be configured as 20-bit right justified, but you will get only significantly lower volume. This is the same melody recorded 20-bit first, then 18-bit:

Links

https://esher.ru/blog/887.html My initial blog post in 2016

MU100-DIT, a parallel project for MU-series using TOSLINK, by nikitalita

Japanese project using AK4103 too

AKM AK4103A datasheet

Yamaha AN200 service manual

Roland SC88 Pro service notes (in japan)

Yamaha MU128 service manual

MT32-DIT, trying to SPDIF the legendary Roland MT-32