• Welcome to Circuitbenders Forum.

Alesis HR-16 ROM replacement

Started by Gordonjcp, March 18, 2008, 11:22:06 PM

Previous topic - Next topic

Gordonjcp

I've figured out how to replace the samples and sample names in the Alesis HR16 and HR16B drum machines.

Have a look:
http://www.nekosynth.co.uk/wiki/AlesisHR16

There's an example mp3:
http://www.gjcp.net/~gordonjcp/hr16.mp3

It's not terribly easy to use or well-documented yet.  I will be spending more time on it ;-)
If at first you don't succeed, stick it through a fuzzbox.

Circuitbenders

Is this the same as one the Burnkit site:

http://burnkit2600.com/gear/hr-16-diy-sound-roms/

or is that actually you?
i am not paid to listen to this drivel, you are a terminal fool

Gordonjcp

No, that was someone else.  Have a read of the burnkit HR16 forum - as well as creating new sample data I've disassembled the firmware ROM and been able to replace the sample names and sample start points (the end points are marked in the data).

If at first you don't succeed, stick it through a fuzzbox.

nochtanseenspecht

Great job ! :) i'm very interested ! i gues it would be possible to piggyback as many roms as fit under the hood,
wouldn't it ?

Gordonjcp

Correct.  I'm about to do a dual ROM mod, but I need both clear bench space and some time ;-)

I'm in the IRC channel (#circuitbending on freenode) if you want to discuss it in a slightly more "real-time" way...
If at first you don't succeed, stick it through a fuzzbox.

billywood

Hello.

I'm also hoping to edit the sample names and lengths on my hr16b.

Nekosynth seems to be down, but I've found a copy of Gordonjcp's utilities here: http://git.fuzzle.org/cgit/nekosynth/tree/utilities/hr16utils/ and I've also found the the hr16b OS here: http://lonestar.madtracker.net/OSpack.rar

I do run Linux, but have never compiled anything without a makefile before, so I'm a bit stuck on what to do next.

Thanks in advance for any help.

Gordonjcp

Use "scons" to build those.  I'll try to get some stuff back up on them soon.
If at first you don't succeed, stick it through a fuzzbox.

billywood

Cheers pal.

Okay, I've installed scons and dependencies...

...and successfully flipped the binary and had a look at it in hexedit. Yes, it's decoded! I need to spend some time getting to grips with how to use the utilities (eg, is it sample by sample or batch?). I reckon I'll have it figured out by the time my chips and programmer arrive from Hong Kong though. Any (re)upload of usage tips would be appreciated too.

Thanks again.

Gordonjcp

It's been about two years since I played with it ;-)

IIRC you assemble up a batch of samples and a text file to describe them, then let the sample mangler cook them into a ROM image.  It will then put the start points and names into the firmware ROM.

It was all very much a work-in-progress.  Currently my EPROM programmer is broken so I can't do a lot with it.
If at first you don't succeed, stick it through a fuzzbox.

billywood

#9
What, really?! That's way more than I was expecting.

So as well as converting the names to hex and calculating all the sample addresses for the firmware ROM, it compiles a single raw audio file with negative peaks between the samples? If so, you've automated my xmas break plans.

EDIT (afterthought): I'm assuming that the sample data occupies the same address range on all the firmwares for both the HR16 and HR16b? I only ask because I noticed a windows tool somewhere that was advertised as working only with one specific version.


Gordonjcp

You need the HR16B firmware because the HR16 firmware is wildly different.  I believe there may be a suitable ROM image in there; if not I'll be able to turn one up for you.

In short (and this may be scribbled in the comments in the code somewhere) the sample names are some number of bytes long (can't remember, ten maybe?) and are plain ASCII.  The samples themselves are not addressable by the CPU in any way.  However, the sample playback ASIC is expecting a 16-bit value that represents the sample start pointer *shifted right by a nybble* - so basically you read the sample value from ROM, tack on a zero as the Least Significant Nybble, and that's you got your pointer.  Simple.

Now the 0xff "ticks".  You'll notice that the stock ROMs have samples that look like Christmas trees (strangely appropriate for the time of year).  The valid sample data is -127 to 127, signed 8-bit.  "But it says 16-bit on the lid, Gordon!"  Yes, it does.  It has 16 bits of dynamic range per sample but not 16 bits of resolution.  So, when the sample is loud, it is described by 8 bits with a large jump in between, and when the sample is quiet it is described by 8 bits with a small jump in between.  Great.  Now we have -128, or 255, or 0xff left over, right?  So use that as a marker.

Okay, here's the clever bit.  Take your 8 bits of sample data and latch the D0-D7 from the ROM onto D8-D15 on your DAC - *through a kind of shift register thing*. Every time you see a single 0xff in the data, then it tells the shift register to "change gear" and shift the data, so after the first one D0-D7 from the ROM now maps to D7-D14 on the DAC - but the sample has been multiplied by 2 so it still fits the full range of values!  Neat, eh?

Finally, more than one 0xff signals the end of the sample.  You'll see all the samples finish with at least two 0xff if you open a ROM image with a sample editor.
If at first you don't succeed, stick it through a fuzzbox.

billywood

I'm almost with you. Indeed, it seems a lot more elegant to divide the samples/dynamics with 0xff signals on the code side rather than attempting to fart around in Audacity.

I haven't tried it yet (I've been making music all weekend - heaven forbid!), but am I right in planning to gather together 47* 8-bit samples, totaling 8MB, listing them in samplelist.txt, then running the utility? ...and the utility will inject the list into my hr16b.bin firmware ROM image and cook up two 4MB sample ROM images (one for each sample chip)?

*I read that three of the 49 sounds (hi-hats) use the same sample.

Thanks, and more thanks.

Gordonjcp

Yes, I started working on a way to "christmas tree" the samples automatically but didn't get far - not even to the point of checking in any code, it seems.

I can't remember if it spits out two separate 4Mbit ROM images or just one big one you need to split.
If at first you don't succeed, stick it through a fuzzbox.

lazydog

#13
would be great if you could address the sr16 in this way. it is a much better machine,
with (shitty) sounds. had all of them - and have great love for the grey hr16- but the
sr16 is great wedge: one of the only drum machines that will let you drop into
record without stopping.
one of the great alesis drum features is sticking patterns together, shifting timing on
indiv drums, stacking pads and stuff like that. you can easily work in a a stepthru mode,
or realtime.

dustindustrial

I have just finished an application for generating custom EPROM's for the Alesis HR-16 and HR-16B drum machines. It will allow you to add your own samples and sample names.

A sample package can be downloaded at the link below, which includes the manual, screenshots, and a set of EPROM files created using the application, that will replace the samples in the HR-16/HR-16B with samples from the TR-707, TR-727, TR-808, and TR-909 drum machines.

Sample Package: http://www.mediafire.com/download.php?a99nfarisea908f

Just the Manual: http://www.mediafire.com/view/?x3h3ad1raqdnsbz

Entire Application: http://store.payloadz.com/details/1338640

Feedback is appreciated. Thanks!