# Sinclair QL

The Sinclair QL (for Quantum Leap) is a personal computer launched by Sinclair Research in 1984, as an upper-end counterpart to the ZX Spectrum.
The QL was the last desktop microcomputer aimed at the serious home user and professional and executive users markets from small to medium-sized businesses and higher educational establishments, but failed to achieve commercial success.
While the ZX Spectrum has an 8-bit Zilog Z80 as the CPU, the QL uses a Motorola 68008. The 68008 is a member of the Motorola 68000 family with 32-bit internal data registers, but an 8-bit external data bus characteristic of microcomputers.

## History
### Development

The QL was conceived in 1981 under the code name ZX83, as a portable computer for business users, with a built-in ultra-thin flat-screen CRT display similar to the later TV80 pocket TV, printer and modem. As development progressed it eventually became clear that the portability features were over-ambitious and the specification was reduced to a conventional desktop configuration.
The electronics were primarily designed by David Karlin, who joined Sinclair Research in summer 1982. The industrial design was done by Rick Dickinson, who already designed the ZX81 and ZX Spectrum range of products.
The QL was designed to be more powerful than the IBM Personal Computer, and comparable to Apple's Macintosh. While the CPU clock speed is comparable to that of the Macintosh, and the later Atari ST and Amiga, the 8-bit databus and cycle stealing of the ZX8301 gate array limit the QL's performance.
Sinclair had commissioned GST Computer Systems to produce the operating system for the machine, but switched to Domesdos, developed by Tony Tebby as an in-house alternative, before launch. GST's OS, designed by Tim Ward, was later made available as 68K/OS, in the form of an add-on ROM card. The tools developed by GST for the QL would later be used on the Atari ST, where GST object format became standard.

### Launch

At the time of the rushed launch, on 12 January 1984, the QL was far from being ready for production, with no complete working prototype. Although Sinclair started taking orders immediately, promising delivery within 28 days, first customer deliveries only started, slowly, in April. This provoked criticism of the company and the attention of the Advertising Standards Authority.
Because of its premature launch, the QL was plagued by a number of problems from the start. Early production QLs were shipped with preliminary versions of firmware containing numerous bugs, mainly in SuperBASIC. Part of the firmware was held on an external 16 KiB ROM cartridge also known as the "kludge" or "dongle", until the QL was redesigned to accommodate the necessary 48 KiB of ROM internally, instead of the 32 KiB initially specified.
The QL also suffered from reliability problems of its Microdrives. These problems were later rectified, by Sinclair engineers, especially on Samsung produced models, as well as by aftermarket firms such as Adman Services and TF Services, to the point where several QL users report the Samsung Microdrives in particular working perfectly even after almost 17 years of service; but in any case too late to redeem the negative image they had already created.

### Reception

Although the computer was hyped as being advanced for its time, and relatively cheap, it failed to sell well, and UK production was suspended in 1985, due to lack of demand. After Amstrad acquired Sinclair's computer product lines in April 1986, the QL was officially discontinued.
Apart from its reliability issues, the target business market was becoming wedded to the IBM PC platform, whilst the majority of ZX Spectrum owners were uninterested in upgrading to a machine which had a minimal library of games (with only about 70 titles, compared to the Spectrum's more than 4700). Sinclair's persistence with the non-standard Microdrive and uncomfortable keyboard did not endear it to the business market. Clive Sinclair later maintained that the Microdrive was "a marvellous approach", also claiming that he had really wanted to base the QL on the Z80, that others in the company had persuaded him to use the 68000, and that "there was nothing you could do on the 68000 that you couldn't do on the Z80". Software publishers were also reluctant to support the QL because Microdrive cartridges were the only available distribution medium for the QL, and the unfavourable pricing of the medium (production costs being given as over six times that of compact cassette) impacted profitability and made QL-based products uncompetitive.
Dedicated magazines were published for the system, such as QL World (published from 1985 to 1994), QL User (published from 1984 to 1985), or QL Today (published from 1996 to 2013).

## Design

Based on a Motorola 68008 processor clocked at 7.5 MHz, the QL included 128 KiB of RAM, which is officially expandable to 640 KiB and in practice, 896 KB.
It can be connected to a monitor or TV for display. Sinclair recommended the "SINCLAIR VISION-QL" RGB monitor for usage with the QL. When connected to a normally-adjusted TV or monitor, the QL's video output overscans horizontally. This is reputed to have been due to the timing constants in the ZX8301 chip being optimised for the flat-screen CRT display originally intended for the QL.
Two video modes are available, 256 × 256 pixels with 8 primary RGB colours and per-pixel flashing, or 512 × 256 pixels with four colours: black, red, green and white. Both screen modes use a 32 KiB framebuffer in main memory. The hardware is capable of switching between two different areas of memory for the frame buffer, thus allowing double buffering. However, this would use 64 KB of the standard machine's 128 KiB of RAM and there is no support for this feature in the QL's original firmware. The alternative and improved operating system Minerva provides full support for the second frame buffer.
Internally, the QL comprises the CPU, two ULAs (ZX8301 "Master Chip" and ZX8302 "Peripheral Chip") and an Intel 8049 microcontroller known as the IPC, or "Intelligent Peripheral Controller".
The ZX8301 implements the video display generator and also provides DRAM refresh. The ZX8302 interfaces to the RS-232 ports (transmit only), Microdrives, QLAN ports, real-time clock and the 8049 via a synchronous serial link. The 8049 runs at 11 MHz and provides a keyboard/joystick interface, RS-232 serial receivers and an audio generator. The 8049 was added at a late stage in the QL's design, as the ZX8302 was originally intended to include its functions.
Two built-in Microdrive tape-loop cartridge drives provide mass storage, in place of the more expensive floppy disk drives found on similar systems of the era. Microdrives had been introduced for the ZX Spectrum in July 1983, although the QL uses a different logical tape format.
Interfaces include an expansion slot, ROM cartridge socket, dual RS-232 ports, proprietary QLAN local area network ports, dual joystick ports and an external Microdrive bus. The QL uses British Telecom type 631W plugs of similar design to British telephone sockets for serial cables except for QLs built by Samsung for export markets, which have DE-9 sockets. Joysticks connect to the QL with similar type 630W plugs.
Physically, the QL is the same black colour as the preceding ZX81 and ZX Spectrum, but introduced a new angular styling theme and keyboard design which would later be seen in the ZX Spectrum+.
QDOS, a pre-emptive multitasking operating system primarily designed by Tony Tebby, is included on ROM, as is an advanced structured BASIC interpreter, named SuperBASIC designed by Jan Jones, which is also used as the command-line interpreter. The QL is bundled with an office suite, consisting of a word processor, spreadsheet, database, and business graphics written by Psion.
According to Sinclair Research, it was the first mass-market computer with an OS featuring pre-emptive multitasking and a Windows-style operating system, predating Microsoft Windows 95 by 11 years, and Apple Computer Macintosh launch by a month.

## Legacy
### ICL One Per Desk

The QL's CPU, ZX8301 and ZX8302 ASICs and Microdrives form the basis of One Per Desk (OPD). Built by International Computers Limited (ICL), it was also marketed by British Telecom as the Merlin Tonto and by Telecom Australia as the Computerphone.
The result of a three-year collaboration between Sinclair Research, ICL and British Telecom, the One Per Desk adds a telephone handset at one end of the keyboard, and rudimentary Computer-Telephony Integration (CTI) software. This machine interested a number of high-profile business customers, including certain divisions of the former UK Customs and Excise Department, but its success was generally limited. In the late 1980s they were used in bingo halls to allow a country-wide networked bingo game.

### Linux

Linus Torvalds has attributed his eventually developing the Linux kernel, likewise having pre-emptive multitasking, in part to having owned a Sinclair QL in the 1980s. Because of the lack of support, particularly in his native Finland, Torvalds became used to writing his own software rather than relying on programs written by others. In part, his frustration with Minix on the Sinclair led years later to his purchase of a more standard IBM PC compatible on which he would develop Linux. In Just for Fun, Torvalds wrote, "Back in 1987, one of the selling points of the QL was that it looked cool", because it was "entirely matte black, with a black keyboard" and was "fairly angular". He also wrote he bought a floppy controller so he could stop using microdrives, but the floppy controller driver was bad, so he wrote his own. Bugs in the operating system, or discrepancies with the documentation, that made his software not work properly, got him interested in operating systems. "Like any good computer purist raised on a 68008 chip," Torvalds "despised PCs", but decided in autumn 1990 to purchase a 386 custom-made IBM PC compatible, which he did in January 1991.

### Clones

After Amstrad abandoned the QL in 1986, several companies previously involved in the QL peripherals market stepped in to fill the void. These included CST and DanSoft, creators of the Thor line of compatible systems; Miracle Systems, creator of the Gold Card and Super Gold Card processor/memory upgrade cards and the QXL PC-based hardware emulator; and Qubbesoft, with the Aurora, the first replacement QL mainboard, with enhanced graphics modes.
In the late 1990s, two partly QL-compatible motherboards named Q40 and Q60 (collectively referred to as Qx0) were designed by Peter Graf and marketed by D&D Systems. The Q40 and Q60, based on the Motorola 68040 and 68060 CPUs respectively, are much more powerful than the original QL and have the ability among other things (such as multimedia, high resolution graphics, Ethernet networking etc.) to run the Linux operating system.
In 2013 Peter Graf announced that he was working on the Q68, a FPGA based QL compatible single board computer. The Q68 was first presented to the public in April 2014 and became available in autumn 2017. It is produced and marketed by Derek Stewart (of former D&D Systems).
Hardware add-ons such as new developments like the QL-SD (designed by Peter Graf) and reengineered or even expanded 1990s designs such as QubIDE interfaces (by José Leandro Novellón). Trump, Gold & Super Gold Cards (by Tetroid) are still being produced for the original QL.
RWAP Software supplies various hardware and software upgrades and spare parts.

### Operating systems

Patched or reengineered versions of QDOS were produced, most notably Minerva which gradually evolved into a completely rewritten operating system, offering improved speed, with multitasking SuperBASIC interpreters. Tony Tebby went on to produce another updated operating system, SMSQ/E, which has continued to be developed for the Sinclair QL and emulators, offering many more features.

### Emulators, virtual QLs and distributions

Several emulators and virtual QLs became available over time, of which Q-emuLator (Windows/Mac), QPC2 (Windows), SMSQmulator (Java), ZEsarUX (Windows/Mac/Linux) and sQLux (Windows/Mac/Linux) are actively maintained.
Several distributions of emulators, applications and information have been produced, of which Black Phoenix and QL/E are the most actively maintained.