TR-DOS
Whilst it's not made much of an impact in western lands, TR-DOS is about as closely associated with Russian Spectrum clones as tapes are here with the original machine.
First appeared in ZXF issue 6 (Dec 2003)
TR-DOS is one of those pieces of Spectrum esoterica I've always promised myself I'll get around to learning about 'one day.' A bit like going on a diet or learning assembly language, however, days like this do not occur frequently. But so great has become my embarrassment at the blind eye I feel I've turned towards this immensley important disk system within five issue's worth of pages, I have at last gathered up my courage and ventured out onto the net to learn. And guess what - it's really not all that hard at all.
If you're not aware of what TR-DOS is, you might wonder why it's worth the bother. Even the most well known disk formats - the +3 format, the Plus D format, the ZX Microdrive (at a push) - were never anything like as well supported in software as cassette tape was, and now that we have flash loading options for .TAP and .TZX files on emulators, the whole disk thing seems a little pointless - unless you're into real hardware, of course.
Of course, many of the +3 releases were actually available also on cassette, so the main advantage of obtaining a version on disk - or snapshotting your tape versions to disk - was simply faster loading times. And this, let's be honest, is why most of us bought a disk system. Indeed, what better reason could there be?
Take a brief look at the WOS archive and you'll find that there are actually more TR-DOS disk images listed there at the moment than there are +3 disk images. Unlike the +3 disks, however, these are not games you can also get hold of on tape or in tape files. That's 400 odd titles, and titles which won't necessarily load into your favourite emulator either. ZX32 does not support TR-DOS, and neither do vbSpec, SPIN or Spectaculator at the moment, to name just a few.
The TR-DOS format is also very popular within the demo scene, over 350 titles being listed at Demotopia (www.zxdemo.org) at present. You'll also find TR-DOS downloads at such sites as Power of Sound (www.pos.fmshop.ru) and Scenergy (scenergy.natm.ru), including games and disk-based magazines such as Adventurer. And there are literally thousands of TR-DOS downloads at Virtual TR-DOS (http://trd.speccy.cz).
Basically a whole new dimension to Spectrum computing, then. And quite a refreshing one too, because the ideas and presentation in these programs are often quite different from that of the western software with which we are familiar.
TR-DOS, then, is the input system of choice of the vast majority of Russian Spectrum clones - of which there are many. In case you're unaware, these machines came about as a result of two main factors - price (an original Spectrum would have cost several years' salary in Russia) and the technology export controls of the Cold War. A few Spectrums got across the Iron Curtain and then got reverse engineered so functionally equivalent (but cheaper) machines could be built. The results were rarely visually attractive (many of the clones were produced as designs rather than actual computers you could buy off the shelf, so it was up to you what your completed Pentagon looked like, for example), but - rather ironically - often more powerful than the original Spectrum, particularly in terms of memory and storage features. One such feature was the BETA Disk Interface developed by Technology Research Ltd. An English company (based in Middlesex), Technology Research released the interface over here for a pricey £109 in 1985 (this was just for the interface - disk drives you had to buy seperately). It was not a great success over here, but in Russia the interface (or rather - I pressume - a clone of the interface) actually got built in to a number of Spectrum clones, making the floppy disk a much more common form of program storage for the Spectrum than it ever became over here.
So the TR in TR-DOS stands for Technology Research. Easy, see? The operating system itself was stored in the interface's ROM and went through a number of versions, the most recent of which seems to be 6.04.
TR-DOS files come in two formats, both of which can be read by the emulators which do handle TR-DOS (the two I use for this are RealSpectrum and Unreal Speccy): TRD and SCL. .TRD files are dumps of a whole disk image - empty spaces and all - whilst .SCL files are only as big as the actual TR-DOS files they contain (although they still work just the same as regular disk images). The regular capacity of a .TRD file seems to be 640K (equating to a double sided, double density 3.5 inch floppy, although in fact the original Beta Disk interface was designed to be used with a range of drives, including 3 inch and 5.25 inch), so a .TRD file containing a 10K Spectrum program would still be 640K in size, whilst its .SCL equivalent would be just 10K.
Grab yourself a few TR-DOS disk images, save them into the directory of whichever emulator you're going to use and fire it up. For RealSpectrum, TR-DOS is handled no differently than any of the other many formats dealt with by this emulator, but you will need to select, of course, one of the Russian clones for emulation. So hit F3 for hardware configuration and select Pentagon 128K, then press TAB for the Peripherals box below and scroll through the various disc interfaces and operating systems until you get to Beta 128 and TR-DOS. When you now hit ENTER you'll see a new variant on the traditional 128 menu: in the place of the original 'Tape Tester' we now have a TR-DOS option. Scroll down, hit ENTER and you are now at the main TR-DOS command line. Before you start typing, make sure you've first loaded in a disk image (F6 to bring up the Disc Panel, then select a drive - you get four to choose from - and hit ENTER to start browsing your disk files). To get back to Sinclair Basic from the TR-DOS command line, all that's needed is a RETURN command. The single keypress 'tokens' work here, just like 48K mode - even though this is a 128K machine being emulated - therefore the Y key is the one we need here.
So then; the OS commands. This is where the nice surprise comes for someone who thought this was all going to be terribly complicated: the commands are actually very straight forward. We can start with a CAT command to find out what's on our disk, which is a SYMBOL SHIFT + 9 in extended mode (in Real Spectrum, SYMBOL SHIFT equates to the Ctrl key and extended mode is obtained by pressing Ctrl and Shift together). CAT clears the screen and prints up the title of the disk and the number of files it contains, as well as details of the individual files themselves (CAT by itself assumes you are referring to the first drive, if you're using more than one; to look at the contents of other drives, it has to be suffixed with "b:", "c:" or "d:" - that's including the quotation marks). Selecting a particular file for loading is then a simple matter of LOAD "filename" - exactly as though you are dealing with a tape (compare this with Sinclair's own microdrive syntax: LOAD *"m";1;"filename"). This is pretty much how it goes for all the other commands you are used to for dealing with tape - SAVE, MERGE and VERIFY all work in the usual way - a main addition is the RUN command, which you can use with a filename to LOAD and then RUN that program all in one.
TR-DOS Quick Reference
COMMAND FUNCTION
*"a:" set default to drive A
*"b:" set default to drive B
*"c:" set default to drive C
*"d:" set default to drive D
40 inform TRDOS that default drive is 40 track
80 inform TRDOS that default drive is 80 track
CAT display the disk directory
CAT# print the disk directory
CLOSE# closing a serial/random access file
COPY copying files from one drive to another
COPY s copying files in a single drive system
COPY b backup disk in a single drive system
ERASE delete a file from the disk
LIST display details of disk contents
LIST# print details of disk contents
LOAD load a program from the disk
INPUT# read from serial/random access file
MERGE combine BASIC program from disk with one in RAM
MOVE reorganise and pack together the files on a disk
NEW change the existing name of a file
OPEN# opening a stream for a serial/random access file
PEEK read a sector of a file from disk to RAM
POKE store data in RAM to a sector of a file
PRINT# writing a serial/random access file
RETURN return to BASIC from TRDOS
RUN load and run a program from the disk
SAVE save a program to the disk
VERIFY verify a program saved on disk
RANDOMIZE USR 15616 go to TRDOS from BASIC
RANDOMIZE USR 15619 call TRDOS commands from BASIC
Many thanks to Matthew Westcott for his help with this article

