MAME Floppy sound emulation
MAME (or its subproject MESS) shows impressive precision for the emulation of arcade and computer systems. One thing that has been slightly out of scope was the emulation of physical phenomena outside of the computer system, in particular the sounds and noises that occur when you operate these systems.
Motivation
Don't you remember those days when you were listening to your floppy drive? I don't mean those new projects where you play music with a floppy drive, of course. Disk operations took quite some time, compared to the flash drives nowadays. The Commodore 64 was well known for its superb games, but also for its dreadfully slow floppy drive, the C1541. When we dediced to play some of the bigger games, we often put some water in the coffee machine in the meantime, prepared some snacks, or did some other urgent things, and about two minutes later, loading was complete.
Luckily, the TI floppy system was much faster, but when you wanted to work productively, saving long texts or assembling or compiling programs, the floppy operation still was annoyingly slow.
Also, floppy disks were never 100% reliable, and their quality degraded over time. There were often read or write errors that showed up right at the end of loading, or when the program was almost built. These errors did not go unnoticed, though: The floppy drive started to produce uncommon noises when the head moved over the disk several times, while the controller tried to load or to write a sector.
Programs did not run flawlessly in those days either, just like today. Unlike today's operating systems with their powerful process management features, the home computers frequently crashed when something went wrong. In combination with the unreliable disk media, loader programs sometimes crashed, which was not guaranteed to be obvious; it just quietly locked up. You, however, kept waiting for the load process.
This is where the audible floppy drive noises came in handy. You noticed that for some time, nothing could be heard from the drive, no head movement, maybe the spindle motor stopped. In that case it was reasonable to freak out, hitting the case of that stupid old thing, vowing to get a new computer as soon as possible, just because it stopped saving your letter, with no real hope to recover it.
Floppy sounds from an emulation were one of those things that brought me into that emulation business, actually. I was astounded when I heard the UAE (Amiga emulator) loading a floppy disk, just like the real one sounded. I always wanted to have something like this in MAME. In summer of 2015 I added a first implementation for 3.5" drives which already proved to create floppy sounds quite nicely.
This is an update of these works, describing a new concept and the implementation in MAME.