UberCassette development page!

by Ian Gledhill ()

DOWNLOAD V0.04 (16/3/2011) NOW
Contains source and binaries for:
AmigaOS 3.x     AmigaOS 4.x     AROS x86     AROS PPC     Linux X86     MorphOS     Windows
and supports tape formats for
Commodore C16/+4     Commodore C64     Commodore VIC-20     Acorn Electron     Acorn BBC     Sinclair Spectrum     Amstrad CPC464 and soon many other formats!

What is UberCassette?
NOTE: I've noticed my program has actually been mentioned on quite a few websites. Someone's even created a OS X archive (I'm looking at you Xad at http://www.nightfallcrew.com :) ) but I've had very little feedback. If anybody does use it I'd really appreciate just a quick email to say you're using it, and if you've got reports (success or failure) it'd be great to hear them.
Certainly if anyone makes changes please let me know and I can merge your changes into the codebase. Better that than having different archives floating around the 'net.

UberCassette is my solution for the archival and restoration of programs on cassette tapes for 8-bit machines from the 80's - I want it to archive just about any format's tapes.
There are many programs out there for doing this, some of them work, some don't so well. Many of them work as long as you have an old enough machine to run them on. No other program does many different types, though.
While trying to archive my copies of Manic Miner and Jet Set Willy, I found that none of the established programs would archive my Commodore tapes. Apparently the normal program to use requires special hardware to connect the (Commodore-specific) cassette deck to a PC.
Currently the program is only a command line application... I may well add a GUI at some point, but I'm working on the back-end (functionality) first.

Incidentally, the program requires a lot of memory as it deals with raw cycles and raw tape images. If you're running on a memory-limited platform, such as Classic Amigas, you may have trouble unless you have enough RAM. I'll take down the memory requirement once it's more stable.

I figured there had to be a better way - so here it is. I've already been busy writing Amiga Catweasel drivers to archive disks of many formats from this era - this is my take on the cassettes. As the version number shows, though, this is a very early version. Hence I need as much feedback as possible, and don't expect it to work stably and flawlessly.

Regarding the advert at the top of the page...

I run a very small games company here in Aberystwyth, called Mutant Caterpillar Games.
We've just released an Android game for free called Numerix and it's rather funky, so please check it out and tell your friends!
I've also included a PayPal donate button in case anyone is feeling generous.
Please let me know if you use the program and how you find it - what should change, what works and what doesn't, that sort of thing. Got a particular format you want supported? Let me know. Need a version compiled for a platform? Same applies, ask me. It's written in ANSI C (POSIX) so is very portable.
Any feedback at all is useful! Please drop me a mail if you use it, and how you find it.

Thanks!



Overview of using UberCassette
  • Record a mono WAV file of the cassette you wish to make an image of. Use 96KHz if you have the hardware. We'll call this ManicMiner.wav for now. It's a Commodore 64 tape.
  • Run "UberCassette ManicMiner.wav ManicMiner.tap -machine C64"
  • Load your emulator and load your ManicMiner.tap!


  • Why should I use UberCassette?
  • It requires no dedicated hardware!
  • It's open source. It can be compiled on just about anything. It auto-detects endianness and adjusts accordingly.
  • It will be the single program that can archive many computers' formats. Currently only CBM and Acorn systems are supported, but this will also change.
  • As tapes deteriorate with time, it's good to have different methods of extracting the data. To this end UberCassette supports more than one method of wave recognition.
  • It uses interpolation of waveforms to estimate the actual crossing point of the signal, so even a low resolution signal can give good results.
  • It supports 96KHz WAV files for extra-tricky cassettes!
  • On the Spectrum, supports ROM loaders and Speedlock I loaders.... more will come but require specific coding.


  • What can it do?
    At the moment it's quite limited, it can only read mono WAV files, and output T64 and TAP files for Commodore 8-bit machines, or UEF files for Acorns. However, it's managed to archive just about every tape I've tried so far (though I've not tried too many!).
    Most tapes can be read with the right parameters, as long as the tape isn't too badly damaged, but even some quite bad tapes will read correctly.



    How do I use it?
    UberCassette is run with the following parameters:
    UberCassette <input filename> <output filename> [<-parameter> <value>]

    You may well not need any parameters at all - just the file names and the machine type; don't be put off by the amount of parameters available.

    Input filename and output filename are the file names for the input and output - the extension of the file name decides what format to use.
    Input file types are CSW, TAP (C64) and CSW.
    The output file types supported are .T64, .TAP (C64), .UEF, .CSW, .TZX, .CDT

    The parameters available are:
    -machine: C64 (default), C16, VIC20, BBC, ELECTRON, SPECTRUM, AMSTRAD
    -algorithm: TRIGGER (default), WAVE
    -video: PAL (default), NTSC
    -threshold1 or -threshold2: On file formats which are not RAW data (i.e. TAP file is raw, T64 and UEF are not), this specifies the ranges to use for a short bit, a long bit or (if necessary) a very long bit. Default is 0.5.
    -thresholds: Set both thresholds.
    -audio: LEFT, RIGHT or BOTH for stereo samples; pick the better channel or the average of the two!
    -normalise: ON (default), OFF: amplify the input wave. -minsignal: - set the minimum amplitude (0-255) of a valid cycle. Cycles quieter than this will be ignored.

    The machines are self explanatory. Be sure to specify if the tape is NTSC format too.
    The algorithm switch decides on how the file is parsed. Algorithms available are:
    WAVE algorithm works by extrapolating the waveform from the entire wave. This means that tapes which have deteriorated such that the signal is offset away from zero can still work, as the zero point is not used in calculating the wavelengths. This method is quite slow.
    TRIGGER algorithm works in the same way as the actual CBM cassette deck - that is the wavelength is taken from the wave crossing the zero point. This will usually be less reliable, but may work better with square waves or over-amplified tape dumps. It's also quite fast, and is closer to how the real hardware operates.


    Hints and Tips

  • Try and use 96KHz WAVs if your cassette is causing trouble, especially on CBM tapes.
  • Use default settings at first. If they don't create a working image, try using alternate algorithms.
  • If that still doesn't work, and you're using a binary format instead of a raw one, use -threshold1 and -threshold2 to alter the bit sizes.
  • Try different -minsignal settings. If your tape has very quiet points, lower the value (less than 8). If your tape is noisy, raise it (more than 8, 32 often is good.)
  • Most cassettes have the program on both sides!

  • Development Log
    V0.06 30/03/2011
    Just an internal update for now... I'll do a full build when I'm happy that it's tested.
    The current version now supports Atari 800, Dragon 32, MSX and TRS-80 too!
    I'm trying to get the memory footprint down, it's getting too big. Watch this space for the next version, shouldn't be long now.

    V0.04 16/03/2011
    New version! V0.02 archived here.
    Many new parameters, and including Spectrum and Amstrad modes!
    Also changed the internals for better wave detection.
    Added error retrying for Spectrum ROM loaders, using the XOR byte at the end of the block.

    V0.02 08/03/2011
    Acorn Electron and BBC formats now work as UEF files.
    Various changes and fixes to the wave detection. Added more info to this webpage.

    V0.01 03/03/2011
    Development is started!
    I've made successful dumps now of my three WAV files, even the slightly corrupted JSW one on the C64.