Emulating line printer output

while this isn’t exactly retro-computing, I wrote a python utility that produces mainframe-like printouts on bar lined paper (remember the old fan-fold stuff?)

it even produces a banner page…

it is written in python, I have it running on my Mac. Feel free to use the code and change it. I’m not putting any restrictions on it.

it is in this git repository: GitHub - Dorobuta/BarPaper: Emulate bar lined line printer paper

3 Likes

Nice! Could you perhaps copy/paste a photo of the output? I did at one time try to get some CSS to render barred paper (and holes) so I could print the HTML and get a result. At least I think I did. Here’s a snap:

Could you adapt it to use 6 bit character codes? There are a lot a vintage computer emulators,
but I don’t think you can get a hard copy with them.


it’s not perfect, but I like it. (I thought about drawing holes, but decided against it)

you can select to print line numbers, truncate or wrap lines, and if you want to keep the PDF that is generated.

it currently works for MAC OS and Linux, two changes would be required for windows - how it gets the user name and the print command issued. (it currently uses lpr)

LOL, I just realized there’s a bug in the code in the listing…it’s since been fixed. (line 70 - “::”)

1 Like

It isn’t really set up for use inside an emulator - I’m just building a PDF with the bars and sending it to the printer.

It’s a linux / unix command line utility more than anything else.

if an emulator allowed calls to the underlying operating system, it might be possible.

I think a six bit char mapping is (relatively) easily doable in python

Nice project! It’s certainly cheaper than tracking down real green-bar/music ruled continuous paper.

Python requires manual effort when characters don’t fit into regular bytes. I was a little surprised that none of the character set re-encoding tools I could find (iconv, recode, enca, cstocs, konwert) knew how to handle characters packed into words, either. Then again, when was the last new (not compatible) commercial computer released that used 6-bit characters? 50+ years ago?

1 Like

I’d brute force it and build a dictionary using byte values for the six bits as the keys, with the ASCII as the value returned…

sometimes it IS about the nostalgia…

But the charm of 6 bits it is not ASCII, with record marks,algol symbols,and other strange symbols like $ and ¢ 's

1 Like

Lovely. Someone should add GIF animation output of the text being printed and the appropriate sound effects!

1 Like

If there isn’t an appropriate encoding I.e.: like utf-8, you could use a font editor and create a font with the glyphs and then use them in the PDF generated

Harder to do, as it requires more steps, but that is part of the strength of using PDF for printing with modern operating systems.

I haven’t had to struggle with 6 bit chars, yet. I may be a little naive, but think it may be doable with some tedious coding thrown at it.

You’d still have to do a dictionary in the form of
{sixbit code : ASCII}

And then set the font in the PDF so the mapping to the right character symbol is handled by the font.

That’s two levels of indirection.

Just a thought.

1 Like

looks like at least one Algol font is available for free - https://fontesk.com/algol-revived-typeface/#google_vignette

Yes, you have to either resort to bit masking or shifting to unpack "weird’ character encodings.

I sort of do that when producing the banner text. I use a byte to represent one line of an 8 x 8 character. (eight bytes to define one large character) if a bit is set, I print a character. If it isn’t set, a space.

each character is defined in a list of 8 one byte values.

The Burroughs systems continued to use their BCL 6-bit code into the early 1980s. It was dropped in the systems after that. I still occasionally run into a file with the old encoding, which requires a lot of bit-banging to convert to ASCII or EBCDIC.

I think the descendants of the Sperry Univac 1100-series systems still support their FieldData 6-bit code.

Both companies merged to form Unisys in the mid-80s, which still produces systems using their respective high-end architectures, although it’s all emulated on Intel chips now.

1 Like

My Burroughs B5500, Burroughs 220, ElectroData/Burroughs 205, and IBM 1620 emulators will optionally output greenbar on their emulated line printers. The emulators run in a web browser and the printer output goes to an <iframe>, from which it’s possible to send it to a physical printer or create a PDF. No holes, though – I gave up on that a long time ago. Here’s a shot of the B5500 printer:

4 Likes

How you input text for the emulators?

Looking at the tables of the various 6-bit codes, lookup tables might be easier that bit arithmetics, so much irregularity.

Or did you mean the “stream of bits” to/from 6-bit characters conversion? Yes, then bit arithmetics… not unlike the arithmetics when doing base-64 conversions.

2 Likes

Look up tables and/or bit arithmetic. Some systems would pack three characters into two bytes, requiring some bit masking to get the look up value you want to use.

I have not done much (any) work in this space for decades…

Back in the day, I had to interface a variety of systems with a PDP-11 and had to deal with not only character sets, but endian issues as well. (Before there were libraries to deal with such). I’m glad those days are all but forgotten.