Showing posts with label TR-626. Show all posts
Showing posts with label TR-626. Show all posts

Saturday, October 10, 2015

TR-626 ROM

The 626's ROM is entirely audio data. Its data bus is wired directly to an R2R DAC and nothing else.

The audio is encoded as 8bit, mono, linear PCM @ 25KHz. This is a standard used by a few Roland machines: 707, 505, etc.

It's the simplest audio encoding and the ROM is effectively a WAV file without the header. Audacity can import it as an 8bit, unsigned, mono "raw binary". If you try this you'll find some recognizable drum sounds, but lots of static and strange noises.

The trouble comes from how the address lines are ordered and manipulated. First off, address lines 6 & 8 are swapped. Since the board is single sided, this was probably done for layout purposes.

The rest of the problems stem from the fact that two gate arrays control different portions of the address bus. IC14 (MB63H114) handles lines 1-12(A1-A12). IC13(MB671189PF) has A0 and A13-A17.

Some of the shorter samples are "interleaved", one sample on the odd addresses, the other on the even. IC13 forcing A0 constantly low(or high), while A1-A12 count normally, will select one of the two samples.

The longer samples (cymbals) are fragmented into 8k chunks. With some experimenting, I found that these chunks are just the opposite of the interleaved samples. They are ordered like dealt cards: 1 card(byte) for hand(chunk) A, 1 byte for chunk B, 1 for A, 1 for B, etc.
So, if you pick the bytes alternately, you'll get the original sample.

The service manual actually explains that this is the result of a kind of "retcon". IC13 is there to give IC14 access to a larger ROM. IC14 was not designed with this in mind. IC14 stops counting up once it reaches its max value of 2^12. IC13 gets around this by assuming the role of the least significant bits(the bits that count up the fastest) and making IC14 count the more significant, "slower" bits. By the time IC14 counts up to 2^12 the combination of IC13 and IC14 has actually counted up to, say, 2^14.

The service manual also gives us a nice table with some confusing naming conventions. The negative address lines indicate that you shift all the other lines left to make room. The A0 column serves to show if a sample is on the odds or evens.

Monday, October 5, 2015

ROM unscramblers

A set of python scripts for decoding and/or unscrambling various drum machine ROMs. 
They have been tested with python 3 in Windows.

TR-505 unscrambler assumes the ROM binary already has the address and data lines in the correct order.
It fixes the inverted address line, recombines the cymbals and separates the short, interleaved samples.

By special request, I've uploaded a 505 re-scrambler. Again, this doesn't take into account the jumbled address/data lines. You'll need to use a tool like EPROM pin swapper to reorganize things. Even then, the replacement EPROM will need to be rewired a bit. I touch on it in my TR-505 post.

TR-626 unscrambler accounts for the swapped address lines.
All interleaved samples are separated. All cymbals are recombined.

626 scrambler accepts a WAV file as a command line argument. Outputs a bin file ready to burn to an EEPROM.

DR 220 expander takes the 220's 8bit mu-law encoded ROM and converts it to a 16bit PCM binary: effectively a headerless WAV file.

Mu-Law expander takes most mu-law encoded ROMs (eg. DMX, Linn Drum, Drumtrax) and outputs a 16bit PCM binary.