Salvaging and Printing Paperclip64 Word Processing Files from the Commodore 64

As mentioned earlier, I set up a system for recovering data from old Commodore 64 floppy disks. Once you use this equipment to copy a disk (quite quickly - under half a minute), you end up with a .d64 disk image file, usually 175 kilobytes big, which is trivially small on today's computers, though painfully large at the original 400 bytes per second transfer rate between drive and computer.

[Commodore 1541 Floppy Disk Drive copying a disk using the ZoomFloppy USB adapter with a custom parallel data ribbon cable]

Then you can use that .d64 file in a Commodore 64 emulator (I like VICE (VersatIle Commodore Emulator) since it works well, simulates all sorts of auxiliary hardware and runs under Linux or Windows, and even supports ZoomFloppy if you want to work live with real floppy disks).

Or you can extract individual files from the .d64 disk image; I use D64Lister under Windows since it can also do PETSCII to ASCII character set conversion, besides making directory listings. By the way, the file extraction and conversion is hidden in the BAM display function - right click on the file name in the BAM listing to bring up the conversion window, and then fiddle with the options to get it looking right before saving your words as a modern text file.

I was pleased to find my old Anthropology 258 essays on one of the floppies. They're written using the Paperclip64 word processor, which cost me $127.45 plus tax back in the day when that was a lot of money, and buying software from the Classic Bookshops (now part of Chapters) bookstore at Rideau Centre Ottawa was a new thing, to the store too.

[Classic Bookshops Software Return Notice]

It certainly seemed to be a full featured word processor. But for dot matrix printers with fixed size fonts. Variable sized letters weren't yet a mainsteam thing, until 1984 when the Macintosh came out. Though from my very faded receipt, it seems I bought this in December 1984.

[Rear of Paperclip64 Box with all the selling points]

First Trick - Save as Text File

Anyway, the initial trick to get text out of the old files was to save a document as a sequential file (rather than the binary dump Paperclip64 usually uses) and then use D64Lister to extract that file and convert it to ASCII. Though some things get approximated, like the little square root or checkmark symbol that marks the start of a command becomes a lower case "v", so you get "vlm5:rm75" which is a command to set the left margin to 5 and right margin to 75. Fine if you happen to have the Paperclip64 manual handy, but distracting to ordinary folk.

vfp:ma+0
also had long working weeks, with almost no time for leisure. After peaking at about 70 hours per week (6 twelve hour days)+3+ the time spent working started declining in this century. It went down to 49.8 hours per week in 1955 in West Germany+4+ and now it is at about 40 hours per week. This decline is quite significant and it is still happening. Note that this is in Europe, the average in the U.S.A. dropped to 40 hours per week and has been relatively constant since World War II+5+. People are now working a little over half as much as they worked a century ago.

vcn1
The History of the Work Ethic
vcn0:tb:The History of the Work Ethic

In non-industrial cultures people worked to stay alive. Work was directly associated with life. The Greeks considered work to be drudgery which ruined the mind. However, the Greek citizens had slaves to do their physical work. Early Christianity thought work was a punishment for the original sin (one didn't have to work in the garden of Eden), but they also thought that work was good if it helped one's needy brothers. Later on in the middle ages work became more desirable and fashionable. Prayer was still considered to be a better way to spend your time.
vln2:ai+0:sp1
3. pp. 25 Leisure and Recreation
4. pp. xv New Patterns of Work
5. pp. 6 The Leisure Market
vfp:ai+3:sp2:ma+0

Second Trick - Print to a Text File

A more readable version for ordinary folk is to print to a file rather than a printer. Typing control, #, 8 will do the trick, then you print as usual with control, o and it will additionally ask you for a file name. The default Paperclip printer type seems to output simple PETSCII so you can convert it with D64Lister to ASCII and have output with plain text, pagination and spacing (each line starts with spaces to make the margin, blank lines are used to get to the next page).

If you're running Paperclip in VICE, you can skip a few steps (no D64Lister) by setting the emulated printer to output raw data to a file on your hard drive and just print. It's much faster than printing to a file on the C64 disk drive at 30 bytes per second and then extracting the file. Though the simulated disk drive does have nice sound effects, really!

The simplest way is to use the "True ASCII" Paperclip printer type (control, w, True ASCII) and have the VICE printer set to: File System Access, Enable IEC Device, Driver Raw, Output mode Text, Output device #1 (file dump), and the Printer text output devices box #1 set to an absolute path to a file (in Linux mine is /home/agmsmith/Downloads/printout). The resulting file will contain your formatted document, with carriage returns at the end of each line. Though beware that VICE's GUI in Linux doesn't set the output mode sometimes; have to manually edit the VICE configuration file to get the right one (see third trick which also talks about that).

                                                                          5


        also had long working weeks, with almost no time for leisure.

        After peaking at about 70 hours per week (6 twelve hour days)3 the

        time spent working started declining in this century.  It went down

        to 49.8 hours per week in 1955 in West Germany4 and now it is at

        about 40 hours per week.  This decline is quite significant and it

        is still happening.  Note that this is in Europe, the average in

        the U.S.A. dropped to 40 hours per week and has been relatively

        constant since World War II5.  People are now working a little over

        half as much as they worked a century ago.



                           The History of the Work Ethic



        In non-industrial cultures people worked to stay alive.  Work was

        directly associated with life.  The Greeks considered work to be

        drudgery which ruined the mind.  However, the Greek citizens had

        slaves to do their physical work.  Early Christianity thought work

        was a punishment for the original sin (one didn't have to work in

        the garden of Eden), but they also thought that work was good if it

        helped one's needy brothers.  Later on in the middle ages work

        became more desirable and fashionable.  Prayer was still considered

        to be a better way to spend your time.



        3. pp. 25 Leisure and Recreation

        4. pp. xv New Patterns of Work

        5. pp. 6 The Leisure Market

It looks better, but fancy formatting (italics, bold, underline, pitch, subscript, etc) don't work.

Third Trick - Print to a Simulated Dot Matrix Printer

VICE does include emulation of a couple of printers. One of which works with Paperclip64. Saving you a few hours of experimentation, it's the "nl10" printer, which is similar to a Star Gemini 10 but with the Pet ASCII character set. The other printers under Paperclip don't work or print one line per page. Fortunately Paperclip64e has a sg10c set of printer drivers for near that variety of printer, the sg10c-p-alf-nlq is the best one (-drf is draft mode, -nlq is near letter quality mode, not that the emulated printer can do nlq). So long as you don't change the print pitch, it's fairly good. You specify printer #4 in VICE as: Emulation type file system access, Enable IEC device, Driver NL10, Output mode Graphics, Output device #1, Printer text output devices #1 set to /home/agmsmith/Downloads/printout (use your own absolute file path here). Of course, the GUI in Linux doesn't work properly so edit ~/.config/vice/vicerc to have these lines in it:

IECDevice4=1
PrinterTextDevice1="/home/agmsmith/Downloads/printout"
Printer4Output="graphics"
Printer4Driver="nl10"
Printer4=1

So start up VICE, run Paperclip64, specify the printer with control, w, sg10c-p-alf-nlq and then load your document and print with control, o. When you're done, exit VICE, otherwise the last page won't be output. You should see picture files on your hard drive named something like printout01.bmp and up, one for each page printed. This is what the example looks like (click on it for the full size version where you can see the little plus signs making up each dot):

[Emulated Dot Matrix Printout of a Page]

It works, and can be used to make a PDF file containing the whole document, if you have the right tools, but it's kind of light. Like a real dot matrix printer where the ribbon is running out of ink.

Enhanced Third Trick - Simulated Dot Matrix Printer with Dark Ink

To make the grayish dot matrix pictures appear more solid, use a technique that Heather "SkydivinGirl" does manually in her GIMP tutorial at https://www.lemon64.com/forum/viewtopic.php?t=31731 or http://www.hookturn.com/files/winviceprint/VICEtoGIMP.zip. She blurs the black and white microdots to get solid gray pixels rather than little plus signs and other shapes, and then map grays to black. She was doing greeting cards, while I have dozens of pages of text to convert, so I've worked out this somewhat more automatic ImageMagick formula for ImageMagick v6.9. The %02d in the output file name means use a two digit number with a leading zero.

convert -verbose printout*.bmp -grayscale Brightness -convolve 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 -threshold 90% printout%02d.png

[Emulated Darkened Dot Matrix Printout of a Page]

Now it's readable! Though the italics don't show up for the footnote numbers.

Fourth Trick - Print to HTML

I'd still like to see some of the other formatting which the emulated printer doesn't do, and with better than dot matrix quality. Being lazy, rather than adjusting the Paperclip printer specification and fixing the VICE printer emulation, I think I can just convert the output to HTML with a special printer specification. Then you can view the document in a modern web browser, with italics and so on (but no font size changes or line spacing changes).

The trick works by noticing that Paperclip64 lets you make your own printer definition, and you can specify the codes for italic on and italic off with up to 5 characters. In HTML, you can do italic with <I> and </I> codes, which take at most 4 characters. Similarly Bold is <B> while underline is <U>. Unfortunately superscript and subscript are <SUP> and <SUB>, where the code to turn them off is 6 characters: </SUP> for turning off superscript, </SUB> for the other. We can work around that by using our own shorter codes like <SP> and <SB> and then manually editing the output to replace them with the proper codes.

There's also a code for starting a new line of text, which we could set to <BR>, but that is unnecessary since I'm preformatting the whole text inside a <PRE> and </PRE> and line breaks will come through as themselves. Also spaces will come through rather than vanishing. So I set the printer initialisation string to <PRE>. There's no printer stopping code, so you'll have to manually edit the output to put one in. Same for the containing HTML body codes. So you need to edit the output in a text editor, fix up SB and SP and manually add the HTML headers and footers:

<HTML>
<BODY>
... insert printout HTML text here ...
</PRE>
</BODY>
</HTML>

The result looks like this. Though I should probably have used superscripts rather than italics for the footnote numbers:

                                       5


        also had long working weeks, with almost no time for leisure.

        After peaking at about 70 hours per week (6 twelve hour days)3 the

        time spent working started declining in this century.  It went down

        to 49.8 hours per week in 1955 in West Germany4 and now it is at

        about 40 hours per week.  This decline is quite significant and it

        is still happening.  Note that this is in Europe, the average in

        the U.S.A. dropped to 40 hours per week and has been relatively

        constant since World War II5.  People are now working a little over

        half as much as they worked a century ago.



                           The History of the Work Ethic



        In non-industrial cultures people worked to stay alive.  Work was

        directly associated with life.  The Greeks considered work to be

        drudgery which ruined the mind.  However, the Greek citizens had

        slaves to do their physical work.  Early Christianity thought work

        was a punishment for the original sin (one didn't have to work in

        the garden of Eden), but they also thought that work was good if it

        helped one's needy brothers.  Later on in the middle ages work

        became more desirable and fashionable.  Prayer was still considered

        to be a better way to spend your time.



        3. pp. 25 Leisure and Recreation

        4. pp. xv New Patterns of Work

        5. pp. 6 The Leisure Market

I've put the Paperclip64 printer specification for HTML on a disk image, you can download HTML_Printer_for_Paperclip64.zip from here, unzip it to get the .d64 disk image, then copy the html-a-alf file inside the disk image onto your Paperclip disk somehow, and use it as your printer definition (use the second trick to get the HTML output into a file).

If you want to read the full essay, it's at B01D12-Work and Leisure.print.html. Sorry about the somewhat mangled formatting; I was printing out select pages and faking the footnotes and then manually assembling it. But it's nice to have it back from the past! Professor William B. Roosa's Anthropology 258 course was fun and interesting (one textbook was Alvin Toffler's The Third Wave). Wish I had had more time to write it; shouldn't have taken that tough C&O course (with zillions of assignments on generating functions) at the same time. I have a slightly more sophisticated writing style now, but that essay from my novice days isn't too bad. My forecasts for 2020 were mixed - YouTube movie making by the masses and Cat videos as predicted. Universal basic income hasn't happened yet. I thought there was going to be more oratory, but we got Twitter instead, and it isn't an Olympic event!

Copyright © 2020 by Alexander G. M. Smith.