Insides of a VTX5000 modem.

With the design spec in hand, Prism Microproducts contracted O.E. Ltd - a UK electronics manufacturer - to implement and produce the VTX5000 as a self-contained Prestel terminal that sat beneath the rubber-keyed Speccy and plugged straight into the edge connector at the back meaning no extra hardware and no extra power supply.

At £99.95 including VAT (immediately discounted to £79.95 in practice), it undercut most of the competition that required multiple pieces and came with a free quarter's subscription to Micronet 800 to sweeten the deal.

Flip the VTX5000 upside down, undo four screws and you're greeted by two PCBs doing three completely different jobs:

Insides of a VTX5000 modem.
  1. Serial communication — the Spectrum needs a UART/serial interface
  2. Modem — the data needs to travel down a phone line
  3. Viewdata display — the Spectrum needs to emulate the SAA5050

The Intel 8251 Serial Interface

The chip interfacing with the Spectrum is an NEC D8251AC — a second-source clone of the Intel 8251 USART (Universal Synchronous/Asynchronous Receiver/Transmitter). The 8251 is classic, widely-used 1970s silicon in the same vein as the NEC µPD765A floppy controller and General Instruments AY-3-8910 sound chips that would turn up on later Spectrums.

The 8251 handles all the fiddly bit-level work of serial communication: start bits, stop bits, parity, baud rate timing. The Z80 just reads and writes bytes; the 8251 does the rest. This is a significant step up from Sinclair's own Interface 1, where the Z80 had to manage individual bits in software. While Zilog had their own Z80-SIO/DART, the 8251 was significantly cheaper and more than capable for the job given it could easily clock 19,200 bps.

The presence of a "2400" pad on the board makes me wonder if they planned on re-using this board in other designs if it was successful. The 8251 could go up to 19,200 easily enough but whether the Speccy could keep up with that is another matter. That might be a fun experiment for another day.

The VTX5000 maps the 8251 onto two I/O ports, decoded using address line A7:

PortA78251 RegisterAccess
$7F0DataRead: received byte / Write: transmit byte
$FF1Control/StatusRead: status / Write: mode or command

This is minimalist address decoding — they're only looking at a single address bit, so the 8251 will respond to any I/O address with A7 high (for control) or A7 low (for data). In practice this doesn't matter. The Spectrum's ULA only uses port $FE, and the expansion bus was rarely contested — it's the kind of shortcut you could get away with on a machine where most people had exactly one thing plugged in. Crucially, the VTX5000 included a pass-through cable to let you daisy-chain another device so there was always a chance the address decoding could be problematic.

The 8251's status register tells the Z80 everything it needs to know:

Bit 0: TxRDY   — Transmit buffer empty, ready for next byte
Bit 1: RxRDY   — Received data available
Bit 2: TxEMPTY — Transmitter completely idle
Bit 3: PE      — Parity error
Bit 4: OE      — Overrun error (data arrived before previous byte was read)
Bit 5: FE      — Framing error (bad stop bit)
Bit 6: SYNDET  — Break detected
Bit 7: DSR     — Data Set Ready

The Texas Instruments TCM3101 Modem

The modem half is built around a Texas Instruments TCM3101 — a single-chip V.23 modem. It supports 1200/75, 300/300, and oddly 75/1200 (for those moments when you want to be the host end of a 1200/75 connection — handy for direct file transfers between two VTX5000 owners).

V.23 is the ITU standard that defined Prestel's physical layer, and it's deliberately asymmetric: 1200 baud downstream (Prestel to you) and 75 baud upstream (you to Prestel). For a service where you mostly read pages and occasionally tap a key, this made perfect sense. The downstream channel uses FSK at 1300Hz/2100Hz; the upstream channel at 390Hz/450Hz — which is why, if you ever recorded a Prestel session, the audio sounds slightly peculiar. Two completely different frequency pairs running simultaneously.

I'd always wondered why it couldn't do 1200/1200, and only when researching this post did I discover the reason - echo! To avoid the signal cancelling each other out at 1200/1200 they switched from FSK (Frequency Shift Keying) to PSK (Phase Shift Keying) and then QAM (Quadrature Amplitude Modulation) for 2400/2400 - the same mechanism we still use today for WiFi!

The TCM3101 requires an external clock source and in a nice bit of British pragmatism, uses a 4.433MHz crystal — the PAL colour burst frequency. Every colour television set in the country used one, so they were cheap and plentiful. It also divided down cleanly to generate the modem clock frequencies, making it an obvious choice.

The brown PCB in the photo above carries all the analogue circuitry: the line transformer for electrical isolation from the phone network (a BT requirement), the DAA (Data Access Arrangement) for voltage protection and impedance matching, and the TCM3101 itself. Those coloured wires lead to a 6-pin 631A UK phone jack. If you ever wanted to remember what those looked like, simply look at the AUX or RS-232 ports on a 128K machine and imagine the retention clip on the opposite side!

The Prism Onboard ROM

The BBC Micro had the SAA5050 on its motherboard allowing it to simply feed viewdata frames into the chip straight onto the display (if we ignore the complexity in the Beeb's Video ULA on deciding when to use the SAA5050's RGB instead of generating its own video signal).

Here, we need to emulate the SAA5050 entirely in software. Every character cell, every mosaic graphics block, every colour change, every control code — all handled by Z80 machine code running at 3.5MHz, rendering into the Spectrum's 192×256 bitmap display and 32×24 colour cells. It's not too difficult, however especially if we ignore the innovative video upscaling on the SAA5050.

Micronet 800 home launch on the VTX5000.

O.E. utilised a company called Scion Ltd. to develop the on-board software. Hardware companies employing software companies was, and still is, a common arrangement. After all, even the Spectrum ROM was outsourced this way to Nine Tiles.

What's curious is that O.E. supplied the on-board software not on tape but rather on a ROM within the device. This is a great instant-on experience for users but undoubtedly added several pounds to the manufacturing costs not just for the EPROM chip itself but the time to burn each one. It also meant that any updates would be expensive which showed confidence in the quality of the software but they at least socketed it for a few pence... just in case!

I suspect the decision to target the 16KB Speccy played into the decision to use a ROM. 16KB of RAM sounds a lot until you remember that the screen takes 6KB of that and this ROM is 8KB... leaving just 2KB for the stack, variables, buffers etc.

Included in the on-board software is a 5×8 pixel character font, stored at $1B20–$1CFF: 96 characters covering ASCII $20 to $7F, each defined as 5 columns of 8 pixels mostly looking like the SAA5050 font with a few minor differences. The mosaic graphics are curiously missing in the font and we'll come back to that in part 3 when we disassemble the code.

The Spectrum's notoriously low colour resolution is the source of its infamous colour clash and that could easily have been a problem given teletext is 40×24 but luckily for the Speccy a colour change in Viewdata takes up a whole cell so it scrapes through.

The full Viewdata state machine is faithfully implemented: foreground colour, background colour, alpha versus graphics mode, double-height state, flash state. All maintained per-row, left-to-right, exactly as the SAA5050 would do it — because the Prestel service was designed around that chip's behaviour and every single page on the system assumed it.

One final elegant trick: rather than include a dedicated chip to handle ROM paging, O.E. repurposed the RTS line of the 8251. Normally used for hardware flow control and surplus to requirements here, toggling it pages the VTX5000's ROM in and out of the Spectrum's address space — saving a chip and a few more pence off the bill of materials (BOM).

In part 3 we'll dig into the software.

0 responses

  1. Avatar for

    Information is only used to show your comment. See my Privacy Policy.