Ensoniq Disk Utilities for Linux

Introduction or Going Back In Time With My Sampler

Older synthesizers can be fascinating technology. They are often used for many years by their owners, long after the original manufacturer no longer supports them. Witness how many people know what a Moog is or who made a DX7. I normally play an Ensoniq ASR-10 in my church band. In it's day, the ASR-10 was Ensoniq's flagship product. Even now it's still quite a capable sampler, as were its older brethren in their day. And even though Creative have successfully removed Ensoniq as a company, I discovered there are still people making new sounds, disks and CD-ROMS for the ASR-10 and its older brother, the EPS 16plus, which I also used to own.

All of Ensoniq's samplers had booted off diskette and used them for storing their sounds and sequences. And many-a-time I'd been attracted by the thought of being able to manipulate these from my PC. Unfortunately, the problem with technology like that from 10 or more years ago is that computer technology has moved on. The EPS used 3.5" double-sided, double-density diskettes, formatted to about 800K. Not only are new DSDD disks difficult to purchase, the humble floppy drive is fast disappearing from modern PCs. Moreover, the format is not DOS compatible, necessitating special software to read and write them.

As it happens, a small industry sprang up around sorting out this sort of problem. For Ensoniq disks, particularly, a company called Giebler Enterprises has been around for a long time and has some versatile utilities for manipulating Ensoniq disks and files. Unfortunately (again!), the utilties are all DOS-mode only. Whilst at the time of writing, I have several PCs, one is a Windows ME laptop with a USB drive, a second runs Windows 2000 with no floppy drives, and two more are running Linux. Whilst I'm familiar with DOS and would be happy to use it again, why should I acquire another PC just to run these utilities?

But what if I could get Linux to work with Ensoniq disks? If I was lucky, I would only need to change some parameters for the floppy drive and then I could cp /dev/fd0 with impunity. If I was lucky...

Accessing the Disks the Lazy Way or How I Proved I Could Do It With Linux

It turns out that armed with a fairly recent fdutils, it is possible to do everything that is required to an Ensoniq disk, except perhaps format them. On Debian v3, apt-get install fdutils will get you version 5.3. This is recent enough.


A shell script that uses fdrawcmd to read an EPS disk a track at a time. It spits the data out to stdout, so redirect it to a file. Warning: It doesn't check the disk is formatted correctly and it reads only from /dev/fd0.

If you give it a parameter of write it instead writes an EPS disk. Redirect a file from stdin. The disk must already be formatted correctly -- it doesn't check that. And again, it also only writes to /dev/fd0.

BTW, there are four minor changes to make to the script so that it reads and writes ASR-10 images. I'll post the alternate script eventually. Especially as I managed to obtain a second-hand ASR-10 recently.


Of course, so many of the downloadable images are in Giebler's EDE format. Fortunately, it has been documented. :-)

edeunpack reads an EDE file from stdin and spits out an image to stdout. (Conceivably, you can pipe it into epsread write.) It checks the format byte, proceeding only if the file appears to be an EPS, ASR-10 or a TS-10/12 disk archive.

You will need Icon or Unicon to run edeunpack. On Debian v3, you can do apt-get install icont iconx to install the former.

I haven't written an EDE packer because I haven't seen a need. As far as file compression goes, there is little point in the way the EDE format skips empty sectors in this day and age. I also haven't made any of my own images available, so haven't encountered people expecting an EDE image...

What about formatting, I hear you ask?

The EPS disk format is 80 tracks of 10 sectors of 512 bytes. The tracks are numbered 0 to 79, the heads 0 and 1 and the sectors 0 to 9 (0 to 18 for the ASR format). PC disks have sectors numbered from 1, not 0, so the Linux floppy driver will not be able to read, write or format an EPS disk as a block device unless you patch it (see below).

I was going to write a shell script that either uses fdrawcmd to format and EPS disk a track at a time, or codes up a few options to superformat. However, I got the patch below working easier than I thought I would, so I never tried this. If you aren't going to patch your kernel, you will have to keep formatting them in your sampler.

Accessing the Disks the Elegant Way or Working With Linux Instead Of On Top Of It

If you would instead prefer to use commands like cp /dev/fd0 disk.img you will need to patch and compile a few things. The first thing you need is the zero sector patch off the fdutils page. This patches the floppy driver in the Linux kernel, so you will need to recompile it. The 2.4.25 patch will patch 2.4.18, BTW (this is the kernel in Debian v3). It had been submitted to linux-kernel for inclusion in the kernel proper, but it appears to have fallen through the cracks. The fdutils maintainter has re-submitted it.

(If you are fortunate enough to be using a distro where the floppy driver is a module, then you only need to recompile the module and re-load it. I was not so lucky.)

Secondly, you will need fdutils v5.4 and the patch off the page mentioned above. This patch will undoubtedly make it into v5.5 of fdutils. Amongst other things, it adds options to setfdprm and getfdprm to let you set and get the zero-sector setting with the option zerobased. You will need to copy the patched fd.h from the kernel source tree into include/linux/ before you compile the patched fd-utils.

The advantage of this approach is two-fold. Firstly, reading and writing EPS disks is much easier and quite a bit quicker. And secondly, you can use fdformat to format your disks. This won't lay down an EPS file system, however. To do that, you need to write a blank image. To make one of those, format a disk in your EPS, then copy the image off this disk. Now you have a blank image for formatting on your PC.


If you need a little more assistance in doing this bit, here's what you do. These instructions should work for you if you've installed Debian v3 (aka "Woody") with the 2.4 kernel (install option "bf24") or any distro based on Debian v3 with kernel 2.4. They assume you are familiar with the command line, and some assumptions have been made about directory locations.

It is assumed that you have downloaded all required files into /usr/src.

apt-get install kernel-source-2.4.18
apt-get install kernel-package
Install the kernel sources and the Debian tools for making a .deb file of the kernel image.
cd /usr/src/
tar xvfj kernel-source-2.4.8.tar.bz2
Unpack the kernel archive and put it into the directory /usr/src/kernel-source-2.4.18
cd kernel-source-2.4.18
patch -p1 < ../zeroBased-2.4.patch
Put the zero-based patch in. It took me a bit of figuring out to get this command right.
make menuconfig
Configure your kernel. This will fail if you haven't got ncurses installed.

I simply cannot guide you any more than that. Sorry. I found a lot of defaults that seemed to match my hardware, but there were a few that were wrong and a few more I wanted changed. So you may be able to simply save and exit without changing anything.
make-kpkg --revision=some.useful.string kernel_image
This does the work of compiling. You will need GCC installed.

The revision number is hard to explain. Something like custom.1.0 is a good idea. Perhaps zerofdsector.1.0 would be good, too. It can't have dashes or underscores; letters, numbers and full-stops only.
cd ..
dpkg -i lernel-image-2.4.18_some.useful.string_i386.deb
Install it. It will probably ask you about updating LILO. I did this manually, but I don't see why it shouldn't work to let dpkg do it.
shutdown -r now

Now we can build fdutils.

cp kernel-source-2.4.18/include/linux/fd.h /usr/include/linux/
The kernel patch modified an include file that needs to be copied for everything else to use.
cd /usr/src
tar xvfz fdutils-5.4.tar.gz
Extracts the fdutils archive.
gunzip fdutils-5.4-20040228.diff.gz
patch -p0 < fdutils-5.4-20040228.diff
Patches fdutils. The patch date may not be the same.
cd fdutils-5.4
make install
Builds the patched fdutils. You will need flex installed. If you want the updated info pages, you will need a utility called makeinfo installed. The make will fail on the last step if you don't but the binaries have been built by this point.

Okay, your new fdutils are now setup! To change the floppy drive to be EPS compatible, do setfdprm /dev/fd0u800 ds dd sect=10 zerobased. I suggest that device because it's closest to the EPS's capacity, but you can choose any other or even make your own node, if you like (mknod /dev/fd0eps b 2 120, for example). Once that's done, you can cat and dd to and from /dev/fd0u800 (or /dev/fd0eps) with no problems. And fdformat even works. :-)