Understanding ZX81 signals to Timex/Sinclair Printers

Introduce yourself to your fellow forum members - what was your journey into the Sinclair world?
Zebra Systems
Posts: 4
Joined: Tue Feb 18, 2020 9:05 pm
Location: Brooklyn, New York, US

Understanding ZX81 signals to Timex/Sinclair Printers

Post by Zebra Systems »

Hi. My name is Stewart Newfeld. I live in Brooklyn, New York. My company Zebra Systems, Inc. supported Timex/Sinclair computers in the 1980s, but I have not played with them in decades.

I want to start an open source project to understand and document the signals that the ZX81 provides to the AlphaCom 32 and Timex/Sinclair TS2040 printers. That would be Phase I. Putting a logic analyzer on the bus between a ZX81 and a printer would be one approach. Studying the ZX81 ROM code for the printing functions might be another. Or maybe, someone on this forum knows something about this subject.

Phase II would be to generate those signal signals from Arduinos, Raspberry PIs, microbits, etc., to drive the printers from those microcontrollers.

Phase III would be to design an ATMEL or ESP32 based serial to AlphaCom 32 and TS2040 adapter to make it easy to interface almost any comptuer / microcontroller to those old printers.

Everything learned would be open source, software and hardware. If the project ends of with an adapter, the KiCad PCB drawing and schematics, the software ... all completely open source. I am prepared to spend some money to fund prototypes.

If you know anyone who might be interested in this project, please pass on the message.
User avatar
Paul
Posts: 1511
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: Understanding ZX81 signals to Timex/Sinclair Printers

Post by Paul »

I am interested in this development from a different point of view.
I'd like to have a ESP32 doing the opposite. Acting like a Alphacom printer on a ZX81 or Spectrum and offering the printout via it's WiFi server for easy Access.
It will need the same understanding of what goes on on the Zeddy Expansion port including timing.
Kind regards
Paul
In theory, there is no difference between theory and practice. But, in practice, there is.
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: Understanding ZX81 signals to Timex/Sinclair Printers

Post by mrtinb »

A printer emulator as you describe Paul can be achieved with a Memotech Centronics interface and RWAP’s RetroPrinter. https://www.retroprinter.com/

But I assume a ESP32 directly on the ZX81 would make a cheaper interface than Memotech I/F + RetroPrinter + Raspberry Pi.
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
User avatar
1024MAK
Posts: 5102
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Understanding ZX81 signals to Timex/Sinclair Printers

Post by 1024MAK »

The ZX81 (and ZX Spectrum) ROM code is designed to drive the Sinclair ZX Printer. So to fully understand the system used, you really need to see how the ZX Printer works. The ZX Printer burns the conductive metal coating off the ‘paper’ as a stylus moves across the ‘paper’. The stylus is moved by a motor. The same motor also drives the paper forward. The data is not parallel, but ‘bit bashed’ serial to draw an image on the paper as the stylus moves across the ‘paper’.

The AlphaCom 32 and Timex/Sinclair TS2040 printers (which I understand are fundamentally the same device) use the signals intended for the ZX Printer and instead convert the signals into a type that can drive an array of thermal heads. These heat up the thermal paper and this is printed on the paper one dot line at a time.

The ZX Printer also feeds back to the computer on where the stylus is (in a crude way), so that the ROM code synchronises the printing to the same (more or less) horizontal place each dot line.

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
RWAP
Posts: 1348
Joined: Thu May 08, 2008 8:42 am
Location: Stoke-on-Trent, UK
Contact:

Re: Understanding ZX81 signals to Timex/Sinclair Printers

Post by RWAP »

mrtinb wrote: Fri Feb 28, 2020 6:45 am A printer emulator as you describe Paul can be achieved with a Memotech Centronics interface and RWAP’s RetroPrinter. https://www.retroprinter.com/

But I assume a ESP32 directly on the ZX81 would make a cheaper interface than Memotech I/F + RetroPrinter + Raspberry Pi.
Yes, my idea would be to have a very simple interface which sits on the ZX81 bus and passes the printer data to the Retro-Printer.

The problem is that indeed, we need to understand what signals are used to drive the ZX Printer so it can be emulated within the Retro-Printer
User avatar
1024MAK
Posts: 5102
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Understanding ZX81 signals to Timex/Sinclair Printers

Post by 1024MAK »

ZX Printer

This post details the ports and bit data for the ZX printer. The ZX81 and ZX Spectrum ROMs support three BASIC instructions (LPRINT, LLIST, COPY) which access the external printer hardware by these I/O addresses.

Port FBh Read - Printer Status
6D748CB1-A7DB-4ED3-8BFB-477C3E857558.jpeg

Port FBh Write - Printer Output
3711C2A5-61EB-4C9D-9507-ED901CDDAD90.jpeg
Horizontal resolution is 256 pixels (32 characters).

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
Zebra Systems
Posts: 4
Joined: Tue Feb 18, 2020 9:05 pm
Location: Brooklyn, New York, US

Re: Understanding ZX81 signals to Timex/Sinclair Printers

Post by Zebra Systems »

Thanks to everyone above for such good responses, especially to this recent one from 1024MAK with the Port FBh printer function listing.
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: Understanding ZX81 signals to Timex/Sinclair Printers

Post by XavSnap »

Image
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Zebra Systems
Posts: 4
Joined: Tue Feb 18, 2020 9:05 pm
Location: Brooklyn, New York, US

Re: Understanding ZX81 signals to Timex/Sinclair Printers

Post by Zebra Systems »

Thanks XavSnap for the schematic. I think it will be helpful in figuring this out. I see they step up the voltage to 50V to zap the silver paper. I wondered how high a voltage would be needed for that.

Although the AlphaCom 32 /TS2040 printer must be conforming to the same bus interface and should not really provide additional information about the bus, I'd love to see the AlphaCom schematic if anyone can provide that.
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: Understanding ZX81 signals to Timex/Sinclair Printers

Post by XavSnap »

Hi,
Something's wrong in the "official" wiring diagram:
I have not the right Ferranti name to get the datasheet…
1) The "D0" pin name is missing.
2) The "R5" is named twice.
Zxprinter.JPG
[Edit] Redrawed wiring diagram updated in next messages...
Last edited by XavSnap on Fri Mar 06, 2020 8:56 pm, edited 2 times in total.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Post Reply