Hi,
I'm a beginner ZX81 user (just built a ZX81+38) that started to play around to learn how the hardware is working, and I currently want to understand the details of how the printer works.
I've read that the ZX printer is connected only to very few pins of the expansion port: A2 for addressing, D0/1/2/6/7 for data I/O and RD/WR/IORQ for control signals. I'm a bit surprised that the M1 pin isn't used -- how does that work? I understand that WR probably isn't active at the same time anyway, but wouldn't RD be active during interrupt acknowledge, and then, wouldn't the printer output a signal on the data bus that could interfere with whatever other data is important at the time?
In general: if building some peripheral that connects to the expansion port, is it important to take M1 into account before sending signals to the data bus, or is there a reason that can be ignored?
Thanks,
Staffan
M1 / printer interface
- 1024MAK
- Posts: 5527
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
- Contact:
Re: M1 / printer interface
The ZX81 uses mode 1 (IM 1) so does not care about what is on the data bus. Hence you don’t need to worry about /M1.
Mark
Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp
Standby alert 
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Spring approaching...
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp


There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb

Spring approaching...
Re: M1 / printer interface
Thanks!
Makes total sense! I've never actually written any Z80 assembler so I didn't know about the modes, and was also didn't know which one the XZ81 is using. The "CPU Response" chapter of the z80 manual is after the pin descriptions so I never got that far:)
Staffan
Makes total sense! I've never actually written any Z80 assembler so I didn't know about the modes, and was also didn't know which one the XZ81 is using. The "CPU Response" chapter of the z80 manual is after the pin descriptions so I never got that far:)
Staffan
-
- Posts: 6
- Joined: Tue Feb 18, 2020 9:05 pm
- Location: Brooklyn, New York, US
Re: M1 / printer interface
Hello Staffan,stu wrote: ↑Sat Apr 13, 2024 2:29 am Hi,
I'm a beginner ZX81 user (just built a ZX81+38) that started to play around to learn how the hardware is working, and I currently want to understand the details of how the printer works.
I've read that the ZX printer is connected only to very few pins of the expansion port: A2 for addressing, D0/1/2/6/7 for data I/O and RD/WR/IORQ for control signals. I'm a bit surprised that the M1 pin isn't used -- how does that work? I understand that WR probably isn't active at the same time anyway, but wouldn't RD be active during interrupt acknowledge, and then, wouldn't the printer output a signal on the data bus that could interfere with whatever other data is important at the time?
In general: if building some peripheral that connects to the expansion port, is it important to take M1 into account before sending signals to the data bus, or is there a reason that can be ignored?
Thanks,
Staffan
The following product is open-source including the code and schematic. Even though it is for an Arduino UNO printing to Timex/Sinclair printers it is probably the most comprehensive documentation available for the ZX81 printer interface.
FOR IMMEDIATE RELEASE
ZX Printer Shield now available
Connects Arduino UNO to Timex/Sinclair Printers
by Stewart Newfeld
November 5, 2024, Brooklyn, NY
Distribution for the ZX Printer Shield designed by New Zealand-based Timex/Sinclair enthusiast Tim Horner is now available. Tim originally designed the ZXPS for his personal use and to satisfy his desire to fully understand the signals the ZX81 and other T/S computer use to print. Stewart Newfeld, who started Zebra Systems, Inc. in March of 1983 as a mail order business for Timex/Sinclair products and who has been selling T/S products on ebay since 1999, learned of Tim's efforts in a Timex/Sinclair Users ZOOM session, and has collaborated with Tim to get the word out about this project and make it easy to obtain ZXPS PCBs and parts in kit form.
The ZXPS allows an Arduino UNO to print to the TIMEX TS2040, ALPHACOM 32, and Sinclair printers that were originally designed for the Sinclair ZX81 and Timex 1000, 1500, and 2060 computers. Tim's open source Arduino Libraries for the ZXPS are on GitHub. They are very well commented and include example Arduino sketches. They serve as the software documentation for using the ZXPS.
A comprehensive support website at www.whattocallit.com/shield includes a review of the software, the schematic and parts list, assembly/soldering instructions, example applications, and more. The website also has links to purchase the ZXPS on ebay.
Re: M1 / printer interface
Hi,
On a ZX81+38, the /m1 is use to refreesh the display in the PORCH generator :

Due to an incomplet address decoding, on the A2 address tag, internals IO with the A2 (in/out $FB) can interact with the display.
ROM printing routine:
https://www.sinclairzxworld.com/viewtop ... f=5&t=5674
To avoid a lag in the IO read and write, the FAST mode is actived during the process.
In SLOW mode, the screen refreesh will slow down the process and will corrupt it.
On a ZX81+38, the /m1 is use to refreesh the display in the PORCH generator :

Due to an incomplet address decoding, on the A2 address tag, internals IO with the A2 (in/out $FB) can interact with the display.
ROM printing routine:
https://www.sinclairzxworld.com/viewtop ... f=5&t=5674
To avoid a lag in the IO read and write, the FAST mode is actived during the process.
In SLOW mode, the screen refreesh will slow down the process and will corrupt it.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)