<s>
The	O
SAM	B-Device
Coupé	I-Device
(	O
pronounced	O
/sæm	O
ku:peɪ/	O
from	O
its	O
original	O
British	O
English	O
branding	O
)	O
is	O
an	O
8-bit	O
British	O
home	O
computer	O
manufactured	O
by	O
Miles	O
Gordon	O
Technology	O
(	O
MGT	O
)	O
,	O
based	O
in	O
Swansea	O
in	O
the	O
United	O
Kingdom	O
and	O
released	O
in	O
December	O
1989	O
.	O
</s>
<s>
It	O
was	O
based	O
on	O
and	O
designed	O
to	O
have	O
a	O
compatibility	B-Device
mode	O
with	O
the	O
ZX	B-Operating_System
Spectrum	I-Operating_System
48K	O
with	O
influences	O
from	O
the	O
Loki	B-Device
project	O
and	O
marketed	O
as	O
a	O
logical	O
upgrade	B-General_Concept
from	O
the	O
Spectrum	O
but	O
with	O
increased	O
memory	O
,	O
graphical	O
and	O
sound	O
capabilities	O
,	O
native	O
peripheral	O
support	O
(	O
Floppy	O
disk	O
,	O
MIDI	O
,	O
Joystick	B-Device
,	O
Lightpen/gun	O
and	O
a	O
proprietary	O
Mouse	O
)	O
.	O
</s>
<s>
The	O
inclusion	O
of	O
support	O
for	O
higher	O
graphical	O
modes	O
allowed	O
for	O
80-column	O
text	O
presentation	O
providing	O
a	O
platform	O
to	O
support	O
productivity	B-Application
applications	O
and	O
CP/M	B-Application
applications	O
via	O
additional	O
software	O
.	O
</s>
<s>
Being	O
based	O
on	O
8-bit	O
technology	O
at	O
a	O
time	O
when	O
16-bit	B-Device
home	O
computers	O
were	O
more	O
prevalent	O
coupled	O
with	O
a	O
lack	O
of	O
commercial	O
software	O
titles	O
led	O
to	O
it	O
being	O
a	O
commercial	O
failure	O
.	O
</s>
<s>
When	O
MGT	O
went	O
into	O
receivership	O
in	O
June	O
1990	O
two	O
further	O
attempts	O
were	O
made	O
to	O
restart	O
the	O
computer	O
and	O
brand	O
,	O
firstly	O
under	O
SAM	O
Computers	O
Limited	O
and	O
then	O
in	O
November	O
1992	O
under	O
West	O
Coast	O
Computers	O
,	O
a	O
company	O
spun	O
from	O
Format	B-Device
Publications	I-Device
which	O
lasted	O
until	O
liquidation	O
in	O
2005	O
.	O
</s>
<s>
The	O
SAM	B-Device
Coupé	I-Device
's	O
hardware	O
was	O
designed	O
by	O
Bruce	O
Gordon	O
of	O
Miles	O
Gordon	O
Technology	O
.	O
</s>
<s>
The	O
machine	O
is	O
based	O
around	O
a	O
Z80B	B-General_Concept
CPU	B-General_Concept
clocked	O
at	O
6	O
MHz	O
and	O
a	O
10,000	O
-gate	O
ASIC	O
.	O
</s>
<s>
The	O
ASIC	O
performs	O
a	O
similar	O
role	O
in	O
the	O
computer	O
to	O
the	O
ULA	O
in	O
the	O
ZX	B-Operating_System
Spectrum	I-Operating_System
.	O
</s>
<s>
The	O
Z80B	B-General_Concept
CPU	B-General_Concept
accesses	O
selected	O
parts	O
of	O
the	O
large	O
memory	O
space	O
in	O
its	O
64	O
KB	O
address	O
space	O
by	O
slicing	O
it	O
into	O
16	O
KB	O
banks	O
and	O
using	O
I/O	O
registers	O
to	O
select	O
the	O
memory	O
pages	O
mapped	O
into	O
each	O
16	O
KB	O
bank	O
.	O
</s>
<s>
The	O
basic	O
SAM	B-Device
Coupé	I-Device
model	O
has	O
256	O
KiB	O
of	O
RAM	B-Architecture
,	O
internally	O
upgradable	O
to	O
512	O
KiB	O
via	O
a	O
connector	O
on	O
the	O
main	O
board	O
accessible	O
via	O
a	O
trapdoor	O
underneath	O
,	O
and	O
externally	O
up	O
to	O
an	O
additional	O
4	O
MiB	O
,	O
added	O
in	O
1	O
MiB	O
packs	O
via	O
the	O
"	O
Euroconnector	B-Protocol
"	O
on	O
the	O
back	O
of	O
the	O
system	O
.	O
</s>
<s>
The	O
computer	O
has	O
a	O
direct	O
connection	O
for	O
a	O
cassette	B-Device
recorder	O
for	O
data	O
storage	O
but	O
two	O
3.5inch	O
floppy	O
disk	O
drives	O
can	O
be	O
installed	O
within	O
the	O
case	O
as	O
well	O
or	O
externally	O
using	O
an	O
interface	B-General_Concept
.	O
</s>
<s>
The	O
SAM	B-Device
Coupé	I-Device
was	O
designed	O
primarily	O
for	O
the	O
UK	O
market	O
,	O
and	O
is	O
designed	O
around	O
the	O
PAL	B-Language
television	O
standard	O
,	O
which	O
refreshes	O
at	O
50	O
frames	O
per	O
second	O
.	O
</s>
<s>
Unlike	O
a	O
standard	O
PAL	B-Language
signal	O
which	O
is	O
interleaved	O
,	O
the	O
SAM	O
is	O
designed	O
to	O
emit	O
two	O
identically	O
positioned	O
fields	O
at	O
50FPS	O
,	O
giving	O
something	O
closer	O
to	O
a	O
312	O
lines	O
progressive	B-Device
signal	O
than	O
the	O
625-lines	O
interlaced	O
broadcast	O
television	O
signals	O
common	O
in	O
the	O
UK	O
at	O
the	O
time	O
.	O
</s>
<s>
The	O
character	B-General_Concept
set	I-General_Concept
includes	O
block	B-Data_Structure
graphics	I-Data_Structure
and	O
international	B-General_Concept
characters	I-General_Concept
.	O
</s>
<s>
The	O
colour	O
of	O
this	O
region	O
can	O
be	O
changed	O
in	O
software	O
by	O
using	O
the	O
BORDER	O
port	O
to	O
select	O
a	O
colour	O
from	O
the	O
palette	B-Data_Structure
.	O
</s>
<s>
The	O
SAM	B-Device
Coupé	I-Device
has	O
four	O
display	O
modes	O
:	O
</s>
<s>
The	O
'	O
attribute	O
 '	O
modes	O
borrow	O
their	O
design	O
from	O
the	O
ZX	B-Operating_System
Spectrum	I-Operating_System
,	O
where	O
a	O
bitmap	O
is	O
used	O
to	O
select	O
between	O
a	O
paper	O
and	O
ink	O
colour	O
from	O
two	O
groups	O
of	O
eight	O
colours	O
.	O
</s>
<s>
All	O
modes	O
use	O
palette-based	O
Colour	B-Data_Structure
look-up	I-Data_Structure
tables	I-Data_Structure
,	O
selecting	O
from	O
a	O
palette	B-Data_Structure
of	O
128	O
colours	O
.	O
</s>
<s>
The	O
palette	B-Data_Structure
values	O
consist	O
of	O
2	O
bits	O
for	O
each	O
of	O
the	O
red	O
,	O
green	O
and	O
blue	O
components	O
as	O
well	O
as	O
an	O
extra	O
bit	O
which	O
increases	O
the	O
intensity	O
of	O
all	O
three	O
components	O
by	O
a	O
half-step	O
(	O
a	O
'	O
brightness	O
 '	O
bit	O
)	O
.	O
</s>
<s>
The	O
Motorola	O
MC1377P	O
RGB	O
to	O
PAL/NTSC	O
video	O
encoder	O
creates	O
a	O
composite	O
video	O
signal	O
from	O
the	O
machine	O
's	O
RGB	O
-	O
and	O
Sync-signals	O
(	O
output	O
by	O
the	O
ASIC	O
)	O
for	O
the	O
RF	O
modulator	O
.	O
</s>
<s>
The	O
non-standard	O
SCART	B-Protocol
display	O
connector	O
includes	O
both	O
composite	O
and	O
RGB	O
output	O
,	O
as	O
well	O
as	O
signals	O
to	O
drive	O
a	O
16-colour	O
TTL	B-General_Concept
monitor	O
.	O
</s>
<s>
Access	O
to	O
internal	O
RAM	B-Architecture
was	O
shared	O
between	O
the	O
display	O
and	O
the	O
CPU	B-General_Concept
,	O
with	O
CPU	B-General_Concept
accesses	O
incurring	O
a	O
speed	O
penalty	O
(	O
memory	O
contention	O
)	O
as	O
it	O
was	O
forced	O
to	O
waited	O
for	O
isochronous	O
ASIC	O
memory-accesses	O
to	O
complete	O
.	O
</s>
<s>
As	O
a	O
result	O
,	O
the	O
SAM	B-Device
Coupé	I-Device
's	O
CPU	B-General_Concept
effectively	O
ran	O
only	O
around	O
14%	O
faster	O
than	O
the	O
ZX	B-Operating_System
Spectrum	I-Operating_System
CPU	B-General_Concept
,	O
yet	O
was	O
required	O
to	O
do	O
much	O
more	O
work	O
in	O
SAM	O
's	O
high-resolution	O
modes	O
to	O
produce	O
a	O
similar	O
movement	O
on	O
the	O
display	O
.	O
</s>
<s>
A	O
Mode	O
3	O
or	O
Mode	O
4	O
screen	O
uses	O
four	O
times	O
as	O
much	O
RAM	B-Architecture
as	O
a	O
ZX	B-Operating_System
Spectrum	I-Operating_System
Mode	O
1	O
display	O
,	O
so	O
four	O
times	O
the	O
work	O
had	O
to	O
be	O
done	O
in	O
the	O
same	O
time	O
when	O
updating	O
it	O
.	O
</s>
<s>
A	O
small	O
compensation	O
was	O
the	O
straightforward	O
arrangement	O
of	O
colour	O
pixels	B-Algorithm
in	O
this	O
memory	O
,	O
instead	O
of	O
the	O
ZX	B-Operating_System
Spectrum	I-Operating_System
's	O
more	O
limited	O
display	O
and	O
attributes	O
memory	O
.	O
</s>
<s>
The	O
penalty	O
of	O
memory	O
contention	O
delay	O
applied	O
to	O
all	O
memory	O
accesses	O
to	O
RAM	B-Architecture
,	O
and	O
not	O
just	O
to	O
memory	O
associated	O
with	O
the	O
video	O
circuitry	O
(	O
as	O
in	O
the	O
case	O
of	O
the	O
ZX	B-Operating_System
Spectrum	I-Operating_System
)	O
.	O
</s>
<s>
Hardware	O
sprites	O
and	O
scrolling	O
would	O
have	O
greatly	O
improved	O
the	O
performance	O
of	O
games	O
,	O
unfortunately	O
there	O
was	O
insufficient	O
wafer	B-Architecture
space	O
on	O
the	O
VLSI	O
ASIC	O
to	O
include	O
such	O
circuitry	O
.	O
</s>
<s>
Code	O
running	O
in	O
ROM	B-Device
or	O
external	O
RAM	B-Architecture
was	O
unaffected	O
by	O
contention	O
,	O
though	O
any	O
RAM	B-Architecture
accesses	O
they	O
performed	O
to	O
shared	O
internal	O
RAM	B-Architecture
would	O
still	O
be	O
affected	O
.	O
</s>
<s>
Six	O
channels	O
of	O
8-octave	O
stereo	O
sound	O
are	O
provided	O
by	O
a	O
Philips	O
SAA1099	O
sound	O
generator	O
chip	O
.	O
</s>
<s>
This	O
sound	O
chip	O
can	O
also	O
produce	O
four	O
3-bit	O
sampled	O
sound	O
channels	O
allowing	O
playback	O
of	O
Amiga	B-Device
Tracker	O
Modules	O
,	O
and	O
generate	O
noise	O
.	O
</s>
<s>
To	O
provide	O
backwards	O
compatibility	B-Device
with	O
the	O
ZX	B-Operating_System
Spectrum	I-Operating_System
,	O
the	O
SAM	O
also	O
provides	O
a	O
single-bit	O
'	O
beeper	O
 '	O
channel	O
which	O
can	O
be	O
used	O
to	O
emit	O
simple	O
tones	O
by	O
toggling	O
the	O
bit	O
on	O
and	O
off	O
as	O
per	O
the	O
original	O
Spectrum	O
.	O
</s>
<s>
In	O
order	O
to	O
match	O
the	O
processing	O
speed	O
of	O
the	O
ZX	B-Operating_System
Spectrum	I-Operating_System
(	O
3.5MHz	O
)	O
,	O
the	O
SAM	B-Device
Coupé	I-Device
introduces	O
extra	O
wait	O
states	O
in	O
display	O
mode	O
1	O
(	O
the	O
ZX	O
Spectrum-compatible	O
graphics	O
mode	O
)	O
to	O
slow	O
down	O
the	O
CPU	B-General_Concept
to	O
roughly	O
match	O
the	O
rate	O
of	O
that	O
system	O
.	O
</s>
<s>
The	O
machine	O
shipped	O
with	O
32	O
KB	O
of	O
ROM	B-Device
containing	O
code	O
to	O
boot	O
the	O
machine	O
and	O
a	O
BASIC	O
interpreter	O
(	O
SAM	O
BASIC	O
)	O
written	O
by	O
Andrew	O
Wright	O
and	O
heavily	O
influenced	O
by	O
his	O
earlier	O
Beta	B-Language
BASIC	I-Language
for	O
the	O
ZX	B-Operating_System
Spectrum	I-Operating_System
.	O
</s>
<s>
The	O
ROMs	O
contained	O
only	O
the	O
bootstrap	O
code	O
and	O
the	O
DOS	B-Operating_System
was	O
instead	O
loaded	O
from	O
disk	O
using	O
the	O
BOOT	O
command	O
,	O
or	O
the	O
F9	O
key	O
.	O
</s>
<s>
The	O
majority	O
of	O
disks	O
shipped	O
with	O
SAMDOS	O
,	O
the	O
system	O
's	O
first	O
DOS	B-Operating_System
,	O
on	O
them	O
so	O
that	O
they	O
could	O
be	O
directly	O
booted	O
.	O
</s>
<s>
Like	O
IDE	B-Protocol
hard	O
disks	O
,	O
these	O
enclosures	O
contained	O
not	O
just	O
the	O
drives	O
but	O
also	O
the	O
drive	O
controllers	O
,	O
a	O
WD1772-02	B-Device
,	O
with	O
the	O
effect	O
that	O
the	O
SAM	O
could	O
use	O
both	O
drives	O
simultaneously	O
.	O
</s>
<s>
The	O
double	B-Device
density	I-Device
disks	O
used	O
a	O
format	O
of	O
2	O
sides	O
,	O
80	O
tracks	O
per	O
side	O
and	O
10	O
sectors	O
per	O
track	O
,	O
with	O
512	O
bytes	O
per	O
sector	O
.	O
</s>
<s>
Files	O
were	O
stored	O
in	O
the	O
same	O
structure	O
as	O
MGT	O
's	O
original	O
+D	B-Device
interface	B-General_Concept
,	O
but	O
with	O
additional	O
codes	O
used	O
for	O
SAM	B-Device
Coupé	I-Device
file	O
types	O
.	O
</s>
<s>
The	O
disk	O
encoding	O
(	O
NRZ	O
)	O
,	O
encoding	O
strategy	O
(	O
linear	O
angular	O
velocity	O
)	O
,	O
and	O
track	O
and	O
sector	O
header	O
formats	O
were	O
compatible	O
with	O
those	O
used	O
on	O
the	O
IBM	O
PC	O
and	O
Atari	O
ST	O
,	O
and	O
programs	O
were	O
available	O
to	O
read	O
FAT	B-Application
formatted	O
disks	O
.	O
</s>
<s>
Two	O
internal	O
drive	B-Device
bays	I-Device
.	O
</s>
<s>
Non-standard	O
SCART	B-Protocol
connector	I-Protocol
offering	O
composite	O
video	O
and	O
digital	O
and	O
linear	O
RGB	O
as	O
well	O
as	O
power	O
input	O
.	O
</s>
<s>
64-pin	O
Euroconnector	B-Protocol
for	O
general	O
purpose	O
hardware	O
expansions	O
.	O
</s>
<s>
Light	B-Device
pen	I-Device
/	O
Light	B-Device
gun	I-Device
and	O
Stereo	O
sound	O
output	O
via	O
5-pin	O
DIN	B-Architecture
connector	I-Architecture
.	O
</s>
<s>
Network	B-Architecture
using	O
the	O
MIDI	O
port	O
(	O
up	O
to	O
16	O
machines	O
could	O
be	O
interconnected	O
)	O
.	O
</s>
<s>
Atari-style	O
9-pin	O
joystick	B-Device
port	O
(	O
dual	O
capability	O
with	O
a	O
splitter	O
cable	O
although	O
due	O
to	O
a	O
flaw	O
the	O
two	O
joysticks	B-Device
would	O
interfere	O
with	O
each	O
other	O
)	O
.	O
</s>
<s>
3.5mm	O
mono	O
Cassette	B-Device
jack	O
(	O
dual	O
use	O
for	O
loading	O
and	O
saving	O
)	O
.	O
</s>
<s>
Up	O
to	O
four	O
devices	O
could	O
be	O
connected	O
to	O
the	O
Coupé	O
's	O
Euroconnector	B-Protocol
port	O
,	O
through	O
the	O
use	O
of	O
the	O
SAMBUS	O
,	O
which	O
also	O
provided	O
a	O
built-in	O
clock	O
.	O
</s>
<s>
The	O
SAM	O
's	O
Power	O
Supply	O
was	O
a	O
modified	O
Amstrad	B-Device
CPC	I-Device
unit	O
,	O
with	O
the	O
RF	O
modulator	O
built	O
in	O
and	O
connected	O
via	O
a	O
joint	O
power/TV	O
socket	O
to	O
the	O
computer	O
.	O
</s>
<s>
Emulation	O
of	O
the	O
ZX	B-Operating_System
Spectrum	I-Operating_System
was	O
limited	O
to	O
the	O
48K	O
and	O
was	O
achieved	O
by	O
either	O
using	O
a	O
supplied	O
utility	O
and	O
a	O
skeleton	O
ROM	B-Device
image	O
(	O
containing	O
no	O
original	O
code	O
)	O
or	O
by	O
loading	O
a	O
complete	O
copy	O
of	O
the	O
ZX	B-Operating_System
Spectrum	I-Operating_System
ROM	B-Device
(	O
obtained	O
from	O
a	O
ZX	B-Operating_System
Spectrum	I-Operating_System
)	O
and	O
switching	O
to	O
display	O
MODE	O
1	O
,	O
which	O
mimicked	O
the	O
ZX	B-Operating_System
Spectrum	I-Operating_System
display	O
mode	O
and	O
approximated	O
that	O
machine	O
's	O
processor	O
speed	O
.	O
</s>
<s>
The	O
128K	O
model	O
's	O
memory	O
map	O
was	O
incompatible	B-Device
with	O
the	O
Coupé	O
's	O
memory	O
model	O
and	O
the	O
machine	O
featured	O
an	O
entirely	O
different	O
sound	O
generator	O
.	O
</s>
<s>
This	O
led	O
to	O
the	O
development	O
by	O
MGT	O
of	O
a	O
special	O
hardware	O
interface	B-General_Concept
called	O
the	O
Messenger	O
which	O
could	O
capture	O
the	O
state	O
of	O
a	O
connected	O
ZX	B-Operating_System
Spectrum	I-Operating_System
to	O
SAM	B-Device
Coupé	I-Device
disk	O
for	O
playback	O
later	O
without	O
the	O
Spectrum	O
connected	O
.	O
</s>
<s>
The	O
Messenger	O
plugged	O
into	O
the	O
Coupé	O
's	O
network	B-Architecture
port	O
,	O
and	O
the	O
Spectrum	O
's	O
expansion	O
slot	O
.	O
</s>
<s>
Due	O
to	O
unsuitable	O
onboard	O
break	O
(	O
NMI	B-General_Concept
)	O
buttons	O
(	O
needed	O
to	O
activate	O
the	O
Messenger	O
software	O
)	O
,	O
a	O
de-bounced	O
break-button	O
card	O
was	O
also	O
provided	O
,	O
which	O
plugged	O
into	O
the	O
Coupé	O
's	O
expansion	O
slot	O
.	O
</s>
