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.


  1. Would it be possible to do it the other way round for the TR505? I mean to have a scrambler.
    Many thanks in advance!!!!

  2. Yes, of course! I have scramblers written already, I just need to upload them.

  3. I would be very grateful if you could do so!!!!!! Thanks again!!!!

    1. I've updated the post to include my 505 scrambler. It's very basic and could be improved a lot, but I hope you find it useful.

  4. Replies
    1. Added. Let me know if you do anything cool with it!

  5. Thanks Zack :) i will try not to blow my tr-626 ;)

  6. i´m getting an error :

    C:\> TR626Rom.bin

    Traceback (most recent call last):
    File "C:\", line 105, in
    fileout.write(struct.pack('B'*len(buf2), *buf2)) #pack Bytes
    struct.error: cannot convert argument to integer

    1. I think, if you're using Python 3, it might be a string vs bytes problem.
      I can't really debug at the moment, but try inserting this line:
      filetarget = str.encode(filetarget)

      just after line 66 "filetarget.close()"

  7. i was on windows 7 then i boot again on XP and install

    and its working fine without any modification , on XP python 3.4

    well i just changed this but i think thats normal
    #626 unscrambler
    #Zack Nelson
    import struct

    filetarget = open("TR626Rom.bin",'rb')
    fileout = open("TR626RomWave.bin",'wb+')

  8. this days i will desoldering the chip 15 , but i am afraid of it ... lol how much layers it have the pcb tr-626 is it double ?

    1. Yes; It's a double layer PCB.

      It's through hole plated so it take a little heat. Good luck.