Close

Reverse Engineering the DCC Hack Chat Transcript

A event log for Reverse Engineering the Digital Compact Cassette

Jac Goudsmit join us to discuss one of his recent forays into reverse engineering. Plus other retro computing discussion!

shaynaShayna 12/01/2017 at 20:101 Comment

Sophi Kravitz : Let's get started with an intro about yourself from @Jac Goudsmit

Sophi Kravitz : questions/ discussion go in the comments of the event page: https://hackaday.io/event/28313-reverse-engineering-the-digital-compact-cassette

Jac Goudsmit : Hi everyone! I'm Jac Goudsmit, I grew up in the city of Eindhoven in the Netherlands which is where Philips (one L) comes from. I was always surrounded by Philips and I worked for them (directly or indirectly) in various places...

Jac Goudsmit : My first job after graduating with a BSCS degree was at Codim, a small company that made CD-i productions. I wrote the software for a number of those interactive CD's for a training institute in the Netherlands called VAPRO, about processes in the industry, and I worked on background music CD's, special CD's (really CD-i's that could be played on special players) with 4 or 8 hours of background music for use in stores etc.

Jac Goudsmit : My second job was at Philips in Hasselt, Belgium, where I worked on the embedded software for a DVB satellite receiver for the Latin American market. There I talked to several engineers who had worked on embedded software for DCC recorders

Jac Goudsmit : Then I worked at Philips Hearing Instruments (which was taken over by Beltone while I worked there), on the Windows (3.1) software that audiologists use to adapt hearing instruments to patients' needs.

Sophi Kravitz : @Jac Goudsmit can you tell us the basics of what the Digital Compact Cassette is?

Jac Goudsmit : Then for a while I worked at the greatest job I ever did, in the Motion Control group of ASML, where I worked on the motion control software for the Atlas machines (later renamed TwinScan AT). Those machines have 23 degrees of freedom and each degree of freedom was updated 2000 times per second by a rack of DSP's, very complicated, very challenging. Very interesting, I truly felt like I was surrounded by genius and I learned a lot about safe C programming.

Jac Goudsmit : Then I worked for what's now known as K&S Assembleon, on a pick-and-place machine. Also interesting but slightly lower scale: only 3 degrees of freedom :)

Frank Buss : why would you need 23 degrees? can't you reach anything with like 6 degrees?

Sophi Kravitz : I was going to ask something similar- what does 23 degrees mean?

Jac Goudsmit : @Frank Buss Good question!

Frank Buss : sounds like a snake :-)

Jac Goudsmit : So you've probably all seen pictures of lithography machines. There's a big marble slab in the bottom, a giant 6 million dollar lens in the middle, and a reticle (basically a slide) at the top.

There's a DUV (Deep Ultraviolet) laser as big as a desk in a room next door which shines light through the top, through the reticle, through the lens and onto the wafer that's on top of the slab.

Jac Goudsmit : The things that our device controlled were the slab and the reticle. Each of those has an X, Y and Z.

Jac Goudsmit : But they had a course and fine for X and Y

Jac Goudsmit : And they also have a rotation around each axis

Jac Goudsmit : So Slab X course/fine/rotation, Y c/f/r, Z f/r times two

Jac Goudsmit : Then there was a device under the reticle that makes it so that only a slice of light is lit at one time, otherwise you get too much distortion.

Jac Goudsmit : So that adds up to 20 degrees of freedom, and then there were 3 more, which are eluding me at the moment :)

Jac Goudsmit : It's unbelievable how many things you have to take into account if you want to make a machine that can move a 30kg slab around at speeds that can destroy the machine, and at precisions to make 180nm chips.

Jac Goudsmit : For example even though it uses a linear motor to move the slab and reticle around, it still has to take cogging into account: the magnetic field gets stronger and weaker as the slab moves on the track

Jac Goudsmit : I think it even took into account that the cables attached to the slab would move around and cause slight variations in the acceleration

Jac Goudsmit : Anyway...

Jac Goudsmit : I emigrated to the USA in 2000 but before that, I was very interested in DCC. I wrote a DCC-FAQ page which was the main source fo information about the format for a long time. I also wrote most of the English Wikipedia page about digital compact cassette

Jac Goudsmit : So how does a DCC record up to 48kHz audio to a tape that runs the same speed as analog cassettes? With magic :)

Jac Goudsmit : The magic is in a chipset in the recorder. The audio starts off as analog signal or S/PDIF signal and gets changed into I2S.

Robert Marosi : Can you tell us a bit about the techniques you used to reverse engineer the cassette systems?

Jac Goudsmit : @Robert Marosi There is a lot of information in the service manuals of the recorders which I gathered at digitalcompactcassette.github.io.

Jac Goudsmit : There is also a lot of information in the datasheets of the later chipsets. There were never any public data sheets for the earlier chipsets.

Sophi Kravitz : We've got a few questions from @Greg Kennedy in the sheet as well

Sophi Kravitz : Here's the spot for questions/ discussion (scroll down to comments):: https://hackaday.io/event/28313-reverse-engineering-the-digital-compact-cassette

Frank Buss : not much change needed for S/PDIF to I2S, both are digital

Jac Goudsmit : There are 3 generations of recorders: The first was basically all the recorders that were based on the DCC900.

Jac Goudsmit : The second generation was based on the same chips but the schematic is much cleaner: much fewer extra logic ports and stuff

Jac Goudsmit : The third generation introduced a new chipset which was well documented and was clearly intended for third parties to develop their own DCC recorders.

Jac Goudsmit : @Frank Buss Correct. They used S/PDIF to I2S codecs that already existed. The D/A converter in the DCC900 is the same as they used in many CD players. The first generation Marantz recorders are known for their even-better audio quality and htat's mostly because they used TDA1547 DACs which have a good reputation but need a chip that was already in the DCC900 design, as a helper for timing and oversampling.

Jac Goudsmit : The PCM data on the I2S bus is converted to frequency-domain data by dividing the signal into 32 subbands.

Jac Goudsmit : Then a chip called the Subband Allocator and Filter looks into the audio data and decides which parts you can't hear anyway.

Jac Goudsmit : The allocator decides the precision at which to encode each subband. When you hear a loud high tone, for example, you won't hear a soft lower tone at the same time. So the louder tone is encoded with more precision than the quieter one

Sophi Kravitz : How did you figure all of this out? seems very detailed for a service manual.

Jac Goudsmit : This is called PASC encoding and it's basically the same (or very similar to) MPEG-1 layer 1.

Jac Goudsmit : @Sophi Kravitz While I was working on the DCC-FAQ page, I was contacted by someone at Philips who worked for the MPEG competence team.

Jac Goudsmit : The DCC-175 is the only recorder that can be connected to the computer and I owned one of those. It writes files in "PASC format" to the hard disk. The guy who contacted me told me that PASC was basically MPEG-1 layer 1 with a small change

Jac Goudsmit : He didn't tell me what the difference was at that time. But I found the IEEE11172 standard for MPEG online, and noticed something

Sophi Kravitz : @Greg Kennedy are you still here?

Jac Goudsmit : It describes how, when 44.1kHz audio is encoded at 384kbps, the blocks of MPEG data aren't always the same because the number of bits doesn't multiply evenly into a block of bits. So there's a provision in the standard that defines a padding bit

Jac Goudsmit : When the padding bit is set, the MPEG frame has 32 extra bits to make up for the jitter induced by the encoding. Most MPEG decoders (if not all) on computers don't use the padding bit because the description is kind of vague

Jac Goudsmit : But the files from the DCC-175 software uses the bit

Jac Goudsmit : Anyway, once you have that sub-band PASC bitstream, it gets error-detection and error-correction added, just like CD. I was familiar with CD thanks to my work at Codim

Jac Goudsmit : I don't know the exact parameters but basically it works by putting the bits of a block in a table and calculating the parity of each row and column of the table. If you play it back and one column and one row don't match the actual bits, you know which bit is wrong.

Jac Goudsmit : After adding error correction/detection code, the signal is almost ready to record for tape. But you must introduce some entropy.

Jac Goudsmit : If you would try to record a binary stream and you would encode each bit as a "blip" or "no blip", it would be very difficult to read if the bitstream has long sequences of ones or zeroes.

Jac Goudsmit : A guy called Kees Schouhamer Immink invented a way to fix this for CD, and he was also involved in DCC.

Jac Goudsmit : It's called 8-to-10 encoding meaning that each value of 8 bits is encoded as a 10-bit value. And the bit patterns are designed to be clearly recognizable and distinguishable. THere's information about this on Wikipedia.

Sophi Kravitz : We're about out of time, although everyone is welcome to stay.

anfractuosity : intriguing, i was just gonna ask if it used something like manchester coding, but that 8-to-10 sounds far more optimal i think

Sophi Kravitz : I wondered if anyone had questions for @Jac Goudsmit before we wrap up officially?

James Lewis : Is that the same 8B/10B encoding that IBM (i think) came up with? and used in things like PCI-Express?

Jac Goudsmit So with the error correction/detection and the 8-to-10 modulation you end up with a data stream at about 768 kbits per second. This is multiplexed into 8 heads each doing 96kbps.

Jac Goudsmit : @James Lewis I don't know but it's possible.

Jac Goudsmit : I'll be here for a while longer, probably another hour or so.

James Lewis : @Jac Goudsmit Great Job! Really cool stuff.

Jac Goudsmit : So that's how the music is encoded; that's all pretty well documented. It's possible to tap into the I2S PASC bitstream and theoretically record it. I'm thinking of doing that with a Raspberry Pi or something (they have I2S interfaces)

Sophi Kravitz : @Jac Goudsmit awesome that you're sticking around, I know that @Greg Kennedy had some questions

Sophi Kravitz : thank you so much for hosting too!

Jac Goudsmit : Thanks for coming everyone!

Discussions

Jac Goudsmit wrote 12/01/2017 at 22:31 point

After this, I went into a couple of details about the Auxiliary channel, ITTS (interactive text) and the things that I would like to do with DCC that Philips might have done if they wouldn't have discontinued the format.
See https://cdn.hackaday.io/files/283131211343392/additional_transcript.txt

  Are you sure? yes | no