• Please review our updated Terms and Rules here

Emulated parallel printer

voidstar78

Veteran Member
Joined
May 25, 2021
Messages
698
Location
Texas
Has anyone developed a kind of "emulated parallel printer"? You attach it to a vintage/classic parallel port, and perhaps it can emulate a variety of printers (or the protocol of just a few popular ones). But you could "print to" the device -- maybe it has a display (at least 80 col) and a few rows, replicating the speed of the printing. Maybe something an ESP32 could do?

And maybe an option to export the last page to a BMP?

Maybe fun to run ancient versions of WordPerfect or PageMaker and be able to still print - but without having to deal with ink cartridges (but the BMPs would let us export to physical print if desired). It could also have a toggle to replicate the classic dot matrix screech noise.
 
I have not seen a hardware version of what you are describing, although there is DosPrint.

BMP is not a good format for documents. I think it would be better to save to PostScript or PDF. Can't say I miss the dot matrix screech either...
 
If it didn't exist, the hardware would not be such a problem: Something to capture the 8 bits of data, 4 inputs to handle the outgoing signals of the LPT port and 5 outputs that handle the input pins of the port. That could be done with an Arduino or R-Pi (as these guys did). But the big challenge will be interpreting the signals. Not all printers use the protocol as established by IBM in the first PCs. And then you have to find out how the printer deals with the data. Printers use code to change from text mode into graphical mode and that code is not the same for all printers. That's why you already had printer drivers in the DOS era.
Except from the hardware view of point I didn't pay much interest to it; I had no use for it myself. In fact, @Plasma's found is the first working device I ever have seen.
 
Not all printers use the protocol as established by IBM in the first PCs.
IBM didn't establish any special protocols.

The low-level interface was a standard "Centronics" parallel interface as used on many microcomputer systems for more than half decade before the PC came out. You don't need to implement a full set of control lines, either; the minimum is 9 input lines (8 bits of data and STROBE; read the data when the strobe goes low) and one output line (BUSY; bring high when you've read the data, and low when you're ready for another byte).

How you would get boldface, different character pitches, and the like varied with the printer, and each individual program had to deal with that. Word processors generally had a configuration tool that would let you choose from a set of common printer definitions or enter your own definitions. The standard dot-matrix printer that IBM sold was a rebadged Epson MX-80, which was released a year or two before the PC and was extremely popular (allegedly the most popular printer of the early '80s, according to some sources) and which most programs will support. (Printer definitions for its predecessor the TX-80, released in 1978, may also work.)
 
A few years ago I used an Arduino to capture LPT signals from and Olivetti M20 and a Dell 410 laptop to capture print data. This was a pretty unrefined project - but here is a .zip of it just in case it's useful to someone...
 

Attachments

  • ReadCentronics.zip
    66.3 KB · Views: 5
I suggested BMP only since I'm thinking something simple that a small embedded processor (ESP32 maybe) could implement. Dealing with PS or PDFs translates to a lot of firmware to support - but maybe I'm wrong and some suitable package already exists (and easy to license). [edit: looks like the RetroPrinter Module has all that figured out!]

I actually hadn't heard of the parallel port referred to as a Centronics port. I know some early IBMs had 25-pin parallel ports, maybe late 60's/early 70's (maybe inherited from DEC?).
EDIT: Or I see, is Centronics the "big" port with the clamps on the side? As opposed to the more general purpose parallel port?


Well, I figured such a device would be a bit expensive - not for the hardware, but the dev microcode to pull it off. Not seeing many reviews about RetroPrinter (and a new -C version coming) but I'm interested enough to give it a try. And next, an IEC to parallel-port converters to use some old Commodore print programs?
 
Last edited:
I actually hadn't heard of the parallel port referred to as a Centronics port. I know some early IBMs had 25-pin parallel ports, maybe late 60's/early 70's (maybe inherited from DEC?).
I should have linked to the Wikipedia article on "parallel ports" and "Centronics connectors"; it's all described there. And yes, back in the '70s and early '80s, at least in my experience, it was very common to refer to the type of parallel port used for printers that the IBM PC came to use as a "Centronics interface." (It was what we used on my mother's Apple II+, for example, also connected to an Epson MX-80 printer.) The only unusual thing about the IBM PC version of it was the DB-25 used for the computer end; more typically it would have been an edge connector or two-row .1" header on a PCB or a 36-pin micro-ribbon ("Centronics") connector. (On Japanese microcomputers of the early '80s a 14-pin micro-ribbon connector on the computer side was popular; I think this started with the PC-8801.)

EDIT: Or I see, is Centronics the "big" port with the clamps on the side? As opposed to the more general purpose parallel port?
That connector is a 36-pin micro-ribbon connector. It's used for a lot of things, printer interfaces and other parallel port applications being only one of them. I'm not sure what you mean by "more general purpose parallel port."

Well, I figured such a device would be a bit expensive - not for the hardware, but the dev microcode to pull it off.
The coding for simply reading the data sent by the microcomputer and passing it on to a host via USB (or serial) should be pretty near trivial. If you want printer emulation to, e.g., produce PDF instead of ASCII output, that's rather more work, but also the kind of thing probably best done on a modern computer, rather than a microcontroller.
 
Turning parallel/centronics data into a serial data stream can be done without any coding using the transmit side of a 6402 or AY-3-1015 UART and (if required) a suitable TTL/RS-232 level shifter. Flow control is easily achieved by tying the appropriate serial handshake line to the appropriate control input pin on the UART.

Those UARTs were designed for use in devices without a CPU - it's worth looking at the datasheet just to see how it was done BITD before the 6850/6551/Z80 SIO devices hit the market.
 
  • Like
Reactions: cjs
Short-haul (< 1km) modems using current-loop serial connections to drive parallel interface printers have been standard fare for at least 40 years. Go dig up an old Inmac catalog for examples.
 
That connector is a 36-pin micro-ribbon connector. It's used for a lot of things, printer interfaces and other parallel port applications being only one of them. I'm not sure what you mean by "more general purpose parallel port."

Ah, from my experience, DB25 was more "general purpose" being involved in non-printer things like data communication, audio devices, data-recording devices ("scientific instruments"), and also a connector used for serial communication (a la 9-pin to 25-pin adapters to focus just on TX/RX pins), in addition to printers.

As some general reference info...

From what I've read, Centronics was a spinoff from Wang c. 1970. And they happen to focus on a printer product and developed the 18x2 row (36-pin) connector style we've been talking about. So while it originated for printers, I see you're saying it ended up used for other things as well. In addition to just the 36-pin arrangement, this Centronics connector is also characterized by the "clamps" at the side - which I imagine make it an easier "quick connect" style that might be convenient for office equipment.

centronic_vs_db25.png

I found I still had one Centronics cable still in storage, imaged above. The earliest system using a DB25 connector (in the bottom one in my image above) I've seen myself was on the 1973 IBM SCAMP prototype, but I think I saw it on IBM System/3 photos also. Another article suggest it was actually Cannon that came up with DB25 in the mid-1950s (not sure if it was initially intended for printer - probably so), with DB25 being characterized by the D-shell, offset row of 13 and 12 pins, secured by bolt-downs.


Here's one pinout reference - not sure if all uses of these connectors follow these conventions.

1708061006072.png


I'm still reading about the RetroPrinter. I think they do offer a device to adapt it over to a serial interface (as a way to let devices without parallel ports to also make use of it).
 
I believe the general connector (sometime called an "Amphenol" connector) in the 50 conductor variety originated on the 1960s 1A2 key system made by Western Electric. I've also sometimes heard them referred to as "blue ribbon" or "micro ribbon" "Champ" or RJ21 connectors.
Centronics may well have specified the 36 conductor variety, but the Amphenol connector itself predates Centronics. The biggest difference is that the RJ21 connector attaches with screws, rather than bails. The 50 pin variety was used on SCSI devices for quite some time.
 
Yes, Chuck is right; the micro-ribbon connector long predates printers and was heavily used elsewhere, especially in telephone systems. The reason for the 36-pin micro-ribbon on the first Centronics printers is mentioned on Wikipedia: Wang happened to have a large pile of those connectors, for whatever reason.

The use of DB-25 for Centronics-style parallel printer interfaces started with the IBM PC, as far as I know. I've never seen it used for that purpose on an earlier system. (The IBM 5103 printer used with the 5100 did use two DB-25 connectors and a DA-15 connector, but that's a very different interface from Centronics parallel.)
 
Things got really screwy when the selfsame DB25F was used on some SCSI controllers, probably because it was cheap and readily available. IBM relied on following the standard by employing a male DB25M connector for its async cards, calling the PC DTE. Unfortunately, this convention was probably more commonly ignored than followed.
 
I still have an IBM 5103 printer, which has an annoying dangling bulky "terminator." I haven't yet tried connecting it to the 5100 yet - it needs a lot of space to setup, but somewhere in the IBM manual I read the BASIC command "RUN D=P" should redirect PRINT output from display to printer. Other than that, I haven't read enough on that dialect of its BASIC on how to direct to the printer (maybe through an OPEN file handle?). That DB15 on the 5100/5110 is just to pass thru power to the attached device. Indeed, don't assume the pinout of all DB connectors is the same across systems.

Recall in the 1990s those MicroSolutions "backpack" CD-ROM and ZipDrives operated across the parallel port (I think they both had pass-thru so you could still use a connected printer?). I wonder how far this RetroPrinter might be from emulating one of those (like imagine a CDROM ISO mounted on an old system, through the parallel port - old drivers are here: https://www.minuszerodegrees.net/backpack_cdrom/backpack_cdrom.htm )
 
There are multiple printer-related open-source projects. For example, to decode ESC/P and ESC/P2 to PDF files or SVG images, or to emulate a USB printer on a Raspberry Pi. DOSBox-X also supports printing. Many common protocols (PostScript, PCL, ESC/POS) are still in common use, making software support a non-issue. The parallel port is also easy to interface to, as other have mentioned.

However, driving a sufficiently large, high resolution display is where things get too complicated/expensive for me. These things are expensive and can no longer be driven by a small microcontroller - at which point it is just easier to get a Raspberry Pi and connect it to a TV. At which point it can emulate both the system and the printer easily.
 
How about just an LCD screen? Something that can do at least 80col or maybe 132col (so, 1056 pixel wide?) and just a few rows. Then just an up/down preview arrow.

I have a few RPi's but haven't yet tried them for any kind of emulation of older systems. I just still collect the old physical systems. I've wondered for folks who never experienced the original systems, how they approach those emulations? I suppose >90% of that usage is to play older games, not really run application software where you might produce something that you'd want to print (like old AutoCAD or PageMaker; or the only real "lost art" are those long banners that modern printers can't do very well) or exercise serial-device control.

I use DOSbox and PCemu and navigate around those well enough, since I recall using those actual systems. But I struggled with older emulators, like S/360 and PDP-8's, maybe because I never set those up first hand.
 
How about just an LCD screen? Something that can do at least 80col or maybe 132col (so, 1056 pixel wide?) and just a few rows.
Do you have a good source for it? How expensive is it? Does it have decent documentation? What type of interface does it use, does it need permanent refreshing and how much bandwidth is needed to display a static image? (= Do I need special hardware to drive it, can I use an el-cheapo controller?)

How fast can it update? Is it 5V-tolerant? (= How el-cheapo can my controller be?)

How likely is it that it can still be ordered in a year or five? (= Am I wasting my time developing something nobody else can build?)

These are all questions I don't really have a good answer for, apart from "find yourself a random display and a driver board from China, then spend some time until you get it to work".
 
Those were all the same questions 25 years ago. Crystalfontz is what I used back then, looks like they are still around - but you're right, at a reasonable speed it can only push about 320x240 at best.
 
Back
Top