Sinclair QL

From Classic Console Upscaler Wiki
Revision as of 23:22, 10 September 2021 by Sam-can (talk | contribs)
Jump to navigation Jump to search

The Sinclair QL (for Quantum Leap) is a personal computer launched by Sinclair Research in 1984. Intended as an upper-end counterpart to the ZX Spectrum, the QL was aimed at the serious home user and professional and executive users markets. Although it succeeded in becoming the first home computer based on a 32-bit CPU, the Motorola 68008, the rush to market resulted in it being plagued by many problems at the start. After commercial disappointment, UK production was suspended in 1985 and finally discontinued in April 1986.

Using an appropriate QL-to-SCART cable, an OSSC can process the QL RGB and video synchronization signals to generate digital video for displays offering HDMI input. It can achieve this without any significant configuration despite the unusual QL screen layout. When operating correctly with a QL, the OSSC will display AV1_RGBS 312-p 15.62kHz 50.08Hz i.e. on AV1, using RGB+sync, with a horizontal frequency 15.62kHz and frame frequency of 50.08Hz.

Machine Models

For the approximately 140,000 QLs manufactured, there were approximately 20 build standards and approximately 16 PCBs. The version of a particular machine can usually be determined by inspecting the first few characters of the serial number on the underside of its case. There are also geographic variants for the European (PAL) and North American (NTSC) markets. There is nothing about variations in these models that should affect operation with an OSSC.

Display Modes

The QL provides two video display modes, based on a fixed RGB palette:

QL Video Modes
Mode Resolution Colours Pixels Pixel Aspect Ratio Designation Notes
4 512 x 256 Black Red Green White 131,072 Appx 0.667 0.13M3 Supports 25 lines of 85 solid characters, although requires over-scanning TV safe area by about 24 pixels either side.
8 256 x 256 Black Blue Red Magenta Green Cyan Yellow White 65,536 Appx 1.466 (4.4:3) 0.07M3 Supports per-pixel flashing, TV compatible.

Display Selection

At start-up, after a RAM check, the QL prompts the user to select their display device. Selection is necessary since the QL can, in its higher resolution mode, produce images compatible with the capabilities of a computer monitor however beyond the typical capabilities of an analogue television.

Back in the 1980s when the QL was produced, offering television compatibility was advantageous due to their ready availability. Manufacturing tolerance and other production and operational issues did however cause variation in analogue television capabilities. So, while the lower resolution QL mode 8 could be viewed on a television of the time, unfortunately selecting the higher resolution mode 4 would result in a display image that most televisions were incapable of displaying completely.

Around that time, monitors were starting to become common place for computers - particularly those for small to medium-sized businesses. The QL therefore offers monitor compatibility, as this was its primary target market. However its particular display layout means that the higher display resolution mode requires generating video signals that overscan about 24 pixels (3 characters) either side of the television safe (i.e. guaranteed visible) area. Therefore a monitor was required to ensure the correct display when operating in high resolution mode.

QL Display Selection
Key Press Display Device Initial Screen Mode Initial Window Sizes TV Compatibility Notes
F1 Monitor 4 Channel 2 on left, Channel 1 on right, Channel 0 across lower Uses full width, over-scanning about 24 pixels either side of the TV safe width. Over-scanning can lengthen the screen, so a bottom line or two may drop off e.g. OSSC can occasionally report 311-p instead of the expected 312-p.
F2 Television 8 Channels 1 & 2 are overlayed, Channel 0 across lower Uses less than full width of the over-scanned screen; should display on 1980s domestic TV. -

Of note is that over-scanning can lengthen the screen, resulting in a bottom line or two being cut off. This can be occasionally observed as the OSSC reporting 311-p instead of the typical 312-p.

On the official Sinclair Vision QL 12" colour monitor, the picture was made narrower so that all 512 horizontal pixels fitted the screen as well as all the vertical lines.

Video Circuitry

Internally, the TV picture generation section of the ZX8301 IC operates in conjunction with the 32K memory mapped picture display area to produce five signals suitable for driving a colour monitor. These signals, red, green and blue (RGB), CSYNCL (composite sync) and VSYNCH (vertical sync) are routed to an 8-pin DIN female connector. Certain issues of the ZX8301 are very fragile, and even unplugging the RGB connection whilst in use has been known to damage the IC.

The ZX8301 generates the following:

  • Vertically: 28 blank lines, 256 image lines and 28 blank lines making for a total of 312 lines high in a single progressive scan per frame. Frames are generated at 50.08Hz. This can be seen on the OSSC as "312-p". Strictly speaking, it is not really 312-p as that would require 555 pixels horizontally. Moreover only some PAL 576/2=288 lines i.e. not all 312 were displayed on TVs.
  • Horizontally: 640 pixels (64us) wide where the QL's 256 pixels needs 51.1us. This is slightly over the 48us where PAL guarantees visibility (i.e. the image extends into the horizontal overscan area of a TV) which is why some 512-480=32 pixels might be missing when using a TV display.

Video Connectors

From the factory, the QL offers two video output connectors: RF and an 8-pin DIN connector with monochrome and colour composite output as well as the lines necessary for RGB.

A modification sometimes seen is a composite output tap cable, identified as a cable appearing from inside the computer with a coaxial cable terminated with a local connector e.g. in Belling-Lee connector in the UK.

SCART Cable

QL-to-SCART cables are available commercially. It is also possible to make a cable that works with an OSSC according to the following table. The QL pin numbers are per the QL User Guide / Concepts / Monitor diagram: be careful, there are multiple diagrams out there. Resistances are in series, and can be readily fitted inside the SCART connector. The resistances are necessary: the QL may be damaged if you have the RGB lines directly drive the low impedance (75 ohm) input expectations of the OSSC without the resistors. The SCART numbering assumes connection to a non-Japanese SCART (JP21), which used different connections.

OSSC-Compliant QL-to-SCART Cable
QL Name QL Level QL Pin In-Line SCART Pin SCART Level Impedance Notes
RED TTL Pin 6 680 Ω Pin 15 0.7 V 75 Ω Red
GREEN TTL Pin 8 680 Ω Pin 11 0.7 V 75 Ω Green
BLUE TTL Pin 7 680 Ω Pin 7 0.7 V 75 Ω Blue
VSYNC TTL Pin 4 10 Ω Pin 16 1-3 V 75 Ω Using blanking signal to indicate RGB selection
CSYNC /TTTL Pin 3 1.2 kΩ Pin 20 0.3 V sync 75 Ω Composite horizontal and vertical sync pulses provided via composite video input
GROUND - Pin 2 and shield - Pins 4, 5, 8, 13, 17, 18, 21 - - Various grounds

The 680 Ω resistors gets from TTL 5V to 0.7 Vpp. The 10 Ω resistor drops the 5 V to about 2 V, which is between the 1-3 V required to indicate RGB rather than composite 0-0.4 V. The 1.2 kΩ resistor drops the 5 V to about 0.3 V.

The OSSC does not require the SCART Status & Aspect Ratio up Pin 8 to be connected, unlike some older TVs which required 0 to 2 V → off, +5 to 8 V → on/16:9, +9.5 to 12 V → on/4:3.

The QL offers no readily accessible audio signal, so these connections simply ground the audio in the SCART connector.

OSSC-Specific Settings

The OSSC should be on AV1 (RGB-SCART) for the QL, as this input supports video in RGBS i.e. taking the RGB digital output from the QL and using its composite sync as a sync source.

OSSC-Experiments

Test equipment:

  • A pre-Issue 6 QL.
  • A RGB and sync cable as described above.
  • OSCC V1.6 board (i.e. HDMI) with version 0.88a firmware.
  • The input was identified as AV1_RGBS 312-p 15.62kHz 50.08Hz.
  • A Toshiba L621 4K UHD television

The target: the best fit should be double wide and triple high pixels to target a 1024x768 display.

Preliminary experiments were with LineMult mode. The OSCC defaults to mode 1. It would seem mode 3 results in no cropping and so is the best for now.

LineMult Experiments
LineMult IMode Info TV Resolution TV Ratio Notes
1 Preset 288p, IMode 312-p 50.08Hz, 539072/frame 720x288@50Hz 16:9 Edges and bottom exceed screen
Line2x Preset 288p, IMode 312-p 50.08Hz, 539073/frame 720x576@50Hz 4:3 Edges cropped, bottom exceeds screen
Line3x Preset 960x288, 312-p 50.08Hz, 539073/frame 1280x864x50Hz 4:3 Image visible, horizontally compressed
Line4x Preset 1280x288, IMode 312-p 50.08Hz, 539072/frame 1280x1152@50Hz 16:9 Edges exceed screen
Line5x Preset 1600x240L, IMode 312-p 50.08Hz, 539072/frame 1080p 16:9 Top and bottom exceed screen

Other Information

Inside the QL, the RGB and /CSYNC signals are also input to a RGB-to-PAL converter which produces composite PAL which was originally used to drive a domestic TV receiver. The same signals are mixed to produce a composite video signal to drive a standard monochrome monitor. When connected to a normally-adjusted TV or monitor, the video output would overscan horizontally. This was 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 computer.

Further Reading

External Links