Qdos - The Quantum Leap?
Simon N Goodwin emulates the British operating system
Emulators for QdosQdos is popular with programmers and has more than its fair share of emulators. Many are out-classed by Amiga-specific programs, but some deserve attention as they mimic machines which cannot otherwise be emulated on an Amiga.
Xtricator is a Sinclair ZX81 emulator from the Netherlands. It runs well on Amiga Qdos. You can adjust the priority of the screen and Z80 interpreter to get it working at a sensible speed on most Amiga systems from A1200 upwards. On a 68060 system it ran almost 26 times faster than the real thing, albeit at considerably more expense...
It runs just right on A4000/030s if you reduce the main Xtricator task priority to half that of the XTR_IO screen-update task, and gobble up some CPU time by boosting the Qdos screen:
BLIT_OFF : ACE_ON : ACE_PRIORITY 8,1
Sinclair's ZX81 was the first home computer mass-marketed at a price below £100, and sold millions worldwide. It was very slow, as the processor was used to generate the display, and had just 1K of memory, but it's fondly regarded by many for whom it was the first step into home computing. Xtricator is the only ZX81 emulator that runs on the Amiga, and it requires Amiga Qdos - but that's no problem as both work well and are freely distributable.
Xtricator has enormous advantages over the real thing, like fast disk loading and saving, multi-tasking and support for up to 48K RAM. CBI, an extended BASIC toolkit, is built in, and it even runs 'hires' games which re-programmed the ZX81 display on the fly to get around the limitations of simple character graphics. A substantial library of ZX81 programs is available in Xtricator format from the author Carlo Delhez, on registration of the shareware version.
Spectator is a Sinclair Spectrum emulator from the same stable. It's slower than Amiga ZX emulators, but more compatible as it emulates the later Spectrum 128 and Interface 1 (serial port and microdrive expansion) as well as the basic 48K Spectrum. It supports three file formats - the compressed Z80 format, used by many Spectrum emulators, its own microdrive image format, since adopted by Gerton Lunter's Z80 for PCs, and SPT tape format. Files are readily available on CD and the net, particularly as Z80 snapshots.
The main weakness of Spectator is its sloth, particularly in 128K mode, and lack of emulation of Spectrum 128 sound, which does not translate well to Qdos BEEPs. If that's a priority you're better off with the Amiga-specific ZXAM, which emulates Spectrum 128 sound well, but doesn't support more than 48K of RAM yet.
The shareware version of Spectator on the AF CD runs about 2.5 times the speed of the real thing on a 68060 Amiga, but substantially slower on an A4000/030. You can boost it by switching from the CPU-intensive eight colour display to a four colour blitter version, with these commands:
ACE_OFF : BLIT_ON
On a 68060, in 48K mode, the problem is an excess of speed, rather than a dearth. I dragged it down to 100 per cent Spectrum speed with these commands:
MODE 8 : ACE_ON : BLIT_OFF : ACE_PRIORITY 16,1
Bizarrely, Spectator 1.52 thinks it's running on a machine with a German keymap, transposing the letters Z and Y. You can get around that, perversely, by selecting a German map for Amiga Qdos with the command KEYDT - which means everything gets swapped twice, back to the UK format. Use KEYUK to swap back when you're in SuperBASIC.
ZM/HT is currently the only emulator that TRANSLATES programs as it runs, reading Z80 code and generating corresponding 68000 routines. This means that it's potentially much the fastest Z80 emulator; Spectrum program speeds increase as ZM/HT compiles them into native 68000 code, to the point where a 16 MHz 68000 can out-run a real Spectrum! Given plenty of disk space you can save compiled code along with the original, for a quick start when you reload.
ZM/HT avoids the overhead of decoding and looking up each Z80 instruction whenever it is encountered. At first it's slow because it must generate new 68000 routines as well as execute them, but later it can run pure 68000 code, only returning to the Z80 interpreter when it runs out of space for 68000 code or hits an instruction that it has not yet translated.
Put that way ZM/HT sounds simple, but it has to be fiendishly clever to cope with self-modifying programs, which may poke their own code at any time. It keeps a table with an entry for every byte of emulated memory, marking routines for re-compilation when they are modified. It's complicated but if it can be done in Qdos, an Amiga version is surely possible.
This is probably the only way we'll see fast PC emulation on current Amigas. In practice it's a technique more suited to eight bit than 16 bit emulation, because it demands several bytes of emulation memory for every byte emulated. The compiled code is much longer than the Z80 original, as 68000 code is relatively verbose and optimised for speed, rather than size. But the speed is so impressive, compared with a processor interpreter, that compiling emulators are surely the way of the future.
There are many more emulators for Qdos, both commercial and freely distributable. CPMulator, Solution, Success and Conqueror emulate business bogey-systems CP/M and MSDOS. Other Spectrum emulators include William James' Speculator 93, interesting as it's the parent of Amiga Speculator, with full 68000 source code. ZM/1, ZM/2 and ZM/3 come from Ergon of Italy, authors of ZM/HT; they are feature-packed but relatively slow Z80 interpreters, rather than compilers.
Qdos QlassicsThere are far too many PD Qdos programs to list them all here,
let alone discuss them in detail - but here are a few highlights from the AF cover CD.
Psion's Xchange suite was one of the great strengths of the QL. It comes on the support disk and works nicely under Amiga Qdos. It's well-organised, with menus and context sensitive help, and well-integrated for moving data between packages. The Archive database is powerful but sluggish. Archive programs resemble Psion's later OPL (Organiser Programming Language). Easel is a quick way to boil up convincing bar and pie charts. Abacus is a friendly spreadsheet with powerful functions. Cells can have meaningful names like Sales.July rather than AC21.
Quill is a WYSIWYG word-processor, but only supports monospaced text. It uses its own proprietary _DOC format, which you can convert to RTF (Rich Text) which Final Writer 5 can read, using Aminet's UTIL/CONV/DOC2RTF tool or QL code on the support disk: DOC2RTF_BAS and DOC2RTF_TASK, the much taster multi-tasking compiled version. QL programs and plain text files are easily readable from the Amiga as the line-ends correspond, although foreign accent codes differ.
Mark Knight's Molecular Graphics is a 3D animation package with a database of over a hundred interesting molecules which you can tumble in colour around the screen. It's a great way to understand the 3D structure of chemicals, which can be hard to picture from two-dimensional drawings. The package includes a molecule editor so you can add to its database and admire your own designer drugs. It's a simple program, well-implemented and fun to use. It's freely distributable, and surprisingly nothing like it is available on the Amiga. But it runs fine with Amiga Qdos, so who cares?
C68 is a freely-distributable Qdos C compiler and development system. Full source code is available - in C, naturally - plus lots of useful utilities. C68 generates code for all 68000-series processors, and has been used to compile many PD and commercial Qdos releases. If you're interested in C, but cannot afford one of the commercial Amiga packages, C68 lets you try the full language at no cost.
Fleet Tactical Command
If Elite was the game that made the BBC Micro, Fleet Tactical Command is the Qdos equivalent. The graphics are simple 3D wire-frames, but they belie the depth and complexity of the game. FTC has been described as 'a real -time simulator where you play the entire navy', in an ocean a million square kilometres in size.
Vessels include tankers, submarines and supply ships as well as cruisers and destroyers. All the ships move simultaneously and send messages which flash up as you play. You steer, fire weapons and issue detailed guidance from the keyboard. You can swap ships at any time, and see the others in a 3D view or on your radar screen. Courses can be set by dead reckoning or using the 'IFF computer' which tells you the range and bearing between vessels. The game simulates crew activities, damage control, docking and re -supply as well as combat.
Tides, currents and weather all play their part, and it takes a while just getting the whole fleet heading the same way without collisions, let alone engaging the enemy - but it's great fun, especially as a two player game. A demo version of Fleet Tactical Command, limited to 90 minutes playing time, is on the AF Cover CD. Full versions run on Qdos and Msdos-compatibles.
SJPD, 36 Eldwick Street, Burnley, Lancashire BB10 3DZ, UK; 01282 451854. Qubbesoft PD, Brunwin Road, Rayne, Braintree, Essex CM7 5BU, UK; 01376 347852.
Both stock Amiga Qdos 3.23 (3 disks, £3.50) and hundreds of disks of PD. International QL User Group: Quanta, 213 Manor Road, Benfleet, Essex SS7 4JD, UK.
TF Services: 01344 890987
Nene Valley: 01933 460538
General Sinclair: comp.sys.sinclair
Qdos discussion: maus.sys.ql.int
C68 compiler: maus.sys.ql.c68-int