The SAM Coupé (pronounced /sæm ku:peɪ/ from its original British English branding) is an 8-bit British home computer manufactured by Miles Gordon Technology (MGT), based in Swansea in the United Kingdom and released in December 1989.
It was based on and designed to have a compatibility mode with the ZX Spectrum 48K with influences from the Loki project and marketed as a logical upgrade from the Spectrum with increased memory, graphical and sound capabilities, native peripheral support (floppy disk, MIDI, joystick, light pen/light gun and a proprietary mouse).
The inclusion of support for higher graphical modes allowed for 80-column text presentation, providing a platform to support productivity and CP/M applications via additional software.
Being based on 8-bit technology at a time when 16-bit home computers were more prevalent, coupled with a lack of commercial software titles, led to it being a commercial failure.
When MGT went into receivership in June 1990 two further attempts were made to restart the computer and brand, firstly under SAM Computers Limited and then in November 1992 under West Coast Computers, a company spun from Format Publications which lasted until liquidation in 2005.
Naming
thumb|SAM Coupé profile, illustrating the origin of its car themed name|left
The capitalised SAM is an acronym for 'Some Amazing Micro' according to Alan Miles in an interview with ZAT magazine.
The ‘Coupé’ part has two sources: one being an ice cream sundae called the “Ice Cream Coupé” and the other because the machine resembles a fastback car in profile with the feet as the wheels.
Hardware
The SAM Coupé's hardware was designed by Bruce Gordon of Miles Gordon Technology. The computer included custom silicon to handle display, memory and IO functionality. This was originally prototyped using wire-wrapped 7400-series logic chips, before being produced as a VLSI VGT-200 gate array ASIC.
Processor and logic
The machine is based around a Z80B CPU clocked at 6 MHz and a 10,000-gate ASIC. The ASIC performs a similar role in the computer to the ULA in the ZX Spectrum. The Z80B CPU accesses selected parts of the large memory space in its 64 KB address space by slicing it into 16 KB banks and using I/O registers to select the memory pages mapped into each 16 KB bank.
Memory and storage
The basic SAM Coupé model has 256 KiB of RAM, internally upgradable to 512 KiB via a connector on the main board accessible via a trapdoor underneath, and externally up to an additional 4 MiB, added in 1 MiB packs via the Euroconnector on the back of the system.
The computer has a direct connection for a cassette recorder for data storage but two 3.5 inch floppy disk drives can be installed within the case as well or externally using an interface.
Graphics
The SAM Coupé was designed primarily for the UK market, and is designed around the PAL television standard, which refreshes at 50 frames per second. Unlike a standard PAL signal which is interleaved, the SAM is designed to emit two identically positioned fields at approximately 50.08 FPS, giving something closer to a 312 lines progressive signal than the 625-lines interlaced broadcast television signals common in the UK at the time.
The display is surrounded by a large border area to provide a title-safe display zone for the CRT televisions of that era. The colour of this region can be changed in software by using the BORDER port to select a colour from the palette.
Display modes
The SAM Coupé has four display modes:
- Mode 1 — 256 × 192, non-linear framebuffer, 1 bit per pixel with separate colour attributes for each 8×8 block of pixels = 6.75 KB (arranged to match the display of the ZX Spectrum for backwards compatibility)
- Mode 2 — 256 × 192, linear framebuffer, 1 bit per pixel with separate colour attributes for each 8-wide block of pixels = 12 KB
- Mode 3 — 512 × 192, linear framebuffer, 2 bits per pixel (4 colours) = 24 KB
- Mode 4 — 256 × 192, linear framebuffer, 4 bits per pixel (16 colours) = 24 KB
<gallery mode="packed" caption="SAM Coupé video modes example images">
File:Sam mode 1.png|Mode 1 example image
File:Sam mode 2.png|Mode 2 example image
File:Sam mode 3 alt.png|Mode 3 example image
File:Sam mode4 alt.png|Mode 4 example image
</gallery>The 'attribute' modes borrow their design from the ZX Spectrum, where a bitmap is used to select between a paper and ink colour from two groups of eight colours. The group to use is selected by a 'brightness' flag. The colour block can also be set to 'flash' - that is, alternate between the two colours used for paper and ink.
{| class="wikitable"
|+ Attribute value in-memory layout
|-
! Bit 7 !! Bit 6 !! Bit 5 !! Bit 4 !! Bit 3 !! Bit 2 !! Bit 1 !! Bit 0
|-
| Flash || Bright || Paper 2 || Paper 1 || Paper 0 || Ink 2 || Ink 1 || Ink 0
|}
Hardware palette
thumb|SAM Coupé color paletteAll modes use palette-based colour look-up tables, selecting from a palette of 128 colours. The palette values consist of 2 bits for each of the red, green and blue components as well as an extra bit which increases the intensity of all three components by a half-step (a 'brightness' bit).
{| class="wikitable"
|+ Color palette value bits
|-
! Bit 7 !! Bit 6 !! Bit 5 !! Bit 4 !! Bit 3 !! Bit 2 !! Bit 1 !! Bit 0
|-
| - || Green 1 || Red 1 || Blue 1 || Half-Bright || Green 0 || Red 0 || Blue 0
|}
The ASIC can be configured to generate interrupts when a line on the display is starting to be emitted, allowing video effects to be synchronised with specific display lines with little effort. By default, it will generate an interrupt for every frame. Typically this interrupt is used to double buffer the frame, read the keyboard/mouse state, and output music.
The interrupt state can also be polled directly from the ASIC's status register.
The Motorola MC1377P RGB to PAL/NTSC video encoder creates a composite video signal from the machine's RGB- and Sync-signals (output by the ASIC) for the RF modulator. Users can freely define their own characters by creating User Defined Graphics (UDGs). A large number of character codes (144 to 255) are available for this purpose. Block graphics (code 128 to 143) can be turned off in order free more characters for UDGs.
The following table show the predefined character set arrangement: and 4-bit at 15.625 kHz.
To provide backwards compatibility with the ZX Spectrum, the SAM also provides a single-bit 'beeper' channel which can be used to emit simple tones by toggling the bit on and off as per the original Spectrum.
Firmware and DOS
thumb|SAM Coupé bootup screen
The machine shipped with 32 KB of ROM containing code to boot the machine and a BASIC interpreter (SAM BASIC) written by Andrew Wright and heavily influenced by his earlier Beta BASIC for the ZX Spectrum. The ROMs contained only the bootstrap code and the DOS was instead loaded from disk using the <code>BOOT</code> command, or the key. The majority of disks shipped with SAMDOS, the system's first DOS, on them so that they could be directly booted. An improved replacement, MasterDOS, was also developed offering faster disk access, more files and support for the real-time clock accessory to provide file timestamps amongst many other improvements.
The BASIC was very advanced and included code for sprite drawing and basic vector shapes such as lines and circles. The screen co-ordinate system for these was variable and could be arbitrarily scaled and centred. A provision for "recording" sequences of graphics commands so that they could later be repeated without the speed penalty of a BASIC interpreter in between was provided.
The machine is capable of running CP/M 2.2 using the Pro-Dos software with support for both 720 Kilobyte format disks and IDE drives
Disk drives
thumb|The original MGT SAM Coupé box — all original MGT material pictured a single disk drive inserted into the right hand side as per the prototypes even though the production model required single drive users to use the left-hand bay
The SAM originally used Citizen 3.5 inch slimline drives which slotted in below the keyboard to provide front-facing slots. Like IDE hard disks, these enclosures contained not just the drives but also the drive controllers, a WD1772-02, with the effect that the SAM could use both drives simultaneously.
Due to a flaw in the Coupé's design, resetting the machine while a disk was left in a drive would be liable to cause data corruption on that disk, as while the RESET line is held logic low the ASIC (that generates the 8 Mhz clock) is halted thus no clock signal is sent to the drive's controllers.
The double density disks used a format of 2 sides, 80 tracks per side and 10 sectors per track, with 512 bytes per sector. This gave a total capacity of 800 KB, though the standard directory occupied 20 KB leaving 780 KB free for user files. Files were stored in the same structure as MGT's original +D interface, but with additional codes used for SAM Coupé file types. The disk encoding (NRZ), encoding strategy (linear angular velocity), and track and sector header formats were compatible with those used on the IBM PC and Atari ST, and programs were available to read FAT formatted disks.
Expansion ports
[[File:SAM Coupé rear.jpeg|thumb|Rear view of the system. From left to right: NMI break button, MIDI IN/OUT ports, joystick port, mouse port, reset button, Euroconnector expansion port,
thumb|Expansion card
Power
The SAM's power supply was a modified Amstrad CPC MP1/MP2 modulator unit, with the RF modulator built in and connected via a joint power/TV socket to the computer. This made signal interference from the AC/DC converter common and it was a popular but entirely unofficial modification to remove the modulator and keep it as a separate unit.
ZX Spectrum compatibility
thumb|The Messenger
Emulation of the ZX Spectrum was limited to the 48K and was achieved by either using a supplied utility and a skeleton ROM image (containing no original code) or by loading a complete copy of the ZX Spectrum ROM (obtained from a ZX Spectrum). In order to match the processing speed of the ZX Spectrum (3.5 MHz), the SAM Coupé introduces extra wait states in display Mode 1 (the ZX Spectrum-compatible graphics mode) to slow down the CPU to roughly match the rate of that system.
The 128K model's memory map was incompatible with the Coupé's memory model and the machine featured an entirely different sound generator. It was possible to convert some games and demos by directly hacking the 128K code or by using a software patcher with the 1 megabyte RAM expansion to provide the address space.
Because the Coupé did not run at exactly the same speed as the Spectrum even in emulation mode, many anti-piracy tape loaders would not work on the Coupé hardware. This led to the development by MGT of a special hardware interface called the Messenger which could capture the state of a connected ZX Spectrum to SAM Coupé disk for playback later without the Spectrum connected. The Messenger plugged into the Coupé's network port, and the Spectrum's expansion slot. Due to unsuitable onboard break (NMI) buttons (needed to activate the Messenger software), a de-bounced break-button card was also provided, which plugged into the Coupé's expansion slot.
See also
- List of SAM Coupé games
References
External links
- World of SAM
- Quazar
- Simcoupe emulator
- SAM Coupé Pro-DOS [CP/M 2.2] Resource Pages
- Spectrum Advanced Machine
- SAM Coupé for MiSTer
- SAM Coupé for MIST Board
