Dot-Matrix Teletype Simulator Update and Request for Teletype Info

August 23rd, 2008

I recently wrote about wanting to have a teletype. Well, I have since realized that teletypes weigh hundreds of pounds, draw hundreds of watts, and aren’t available on eBay for a reasonable price. Well I knew the hundreds of pounds bit, but still. I pretty well have had to give up on a real teletype.

So, now on to the next best thing: a teletype simulator. Enter the two free dot-matrix printers that found their way to my office earlier this week. One of them even works. I bicycled to the awesome local office supplies store (about 11 miles away) to buy a ribbon for it. This is the place that’s been there since the 1890s. They still stock dot matrix ribbons, typewriter ribbons, and even fanfold paper.

On the project. Linux has its heritage in Unix, which was used with these devices. It can be made to work with them even now. But there’s a trick: teletypes used a bidirectional serial link. Dot matrix printers have no keyboard. So we have to take input from a different device than we send output to.

A simple trick will do for that:

TERM=escpterm telnet localhost > /dev/lp0

Now, here’s the next problem. Dot-matrix printers have a line buffer. They don’t start printing the line at all until they see CR or LF. Makes it annoying for interactive use. So I wrote a quick tool to insert into that pipeline. After a certain timeout after the input stops, it will force the printer to flush its buffer. Took a little while to figure out how to do that, too; turns out there’s a command ESC J that takes an increment for vertical spacing in 1/216 inch, and accepts 0. So I can send \x1BJ\x00 to flush the buffer. I can run it like this:

TERM=escpterm telnet localhost | escpbuf > /dev/lp0

That leaves another problem, though: the printhead is right over the text. (Even though it moves to the right of the printing position, and then moves back left for the next character to print.) I modified the program to roll the paper out a bit, and then reverse feed it to continue printing the line. But that is slow and, I suspect, tough on the stepper motor.

Also, I have crafted a terminfo file for the Epson-compatible dot-matrix printers (which are almost all of them), which can also be found at the above link.

So here’s the question, for anyone that has used a real teletype:

Did the printhead obscure the text there too, or could you see the entire current line at all times?

Categories: Hardware

Leave a comment

Comments Feed15 Comments

  1. Jonas

    IBM built typewriters that could be used as printers. With some soldering it should be possible to use the keyboard as input, too.

    Reply

    John Goerzen Reply:

    Do you have any names/model numbers on this? IBM had, well, unique names for stuff and I find it hard to google for their equipment. I know they made true teletype-style devices too, as consoles for their machines, but can’t track down the right terms to google for.

    Reply

  2. geekosaur

    The printhead on the KSR33 that used to be [code]ncoast.uucp[/code]‘s console back in the day would move to the right out of the way after a second or two idle, then move back for the next character.

    Reply

  3. Benjamin Seidenberg

    May I also suggest trying to use one of those old TTYs that hearing impaired people use with the telephone… you put a headset on top of it and it does some audio-coupling to let you type and receive text…

    Reply

  4. John Goerzen

    Thanks, geekosaur. That is perfect kind of information to have. I think I can emulate that. It will take a bit of fiddling with the right margin, but I think it is doable. Especially since the printer I am using is a 14″ job.

    Bejamin, thanks for that suggestion too. I poked around on eBay, but it seems that most of those used a 2.25″ wide thermal tape. Won’t cut it for 80-column adventure sessions, unfortunately.

    Reply

  5. Jeremy Shaw

    At around 1:07 you can see a close up of the teletype in action. It appears the print head moves out of the way:

    [url]http://www.youtube.com/watch?v=akvSE5Z474c[/url]

    Also, there is currently a decwriter for sale on eBay, but you have to be able to pick it up in person.

    [url]http://cgi.ebay.com/Decwriter-III-LA120-printing-terminal_W0QQitemZ370019604975QQcmdZViewItem?_trksid=p3286.m20.l1116[/url]

    Reply

  6. Ralph Aichinger

    I have never used a Teletype myself, have seen various models still standing in computer rooms, unused (or used as slow printers).

    I cannot believe that it should be hard to get a real teletype. I saw one in an electronics surpulus store as recently as five years ago.

    I think your best bet is to ask Radio Amateurs. In Ham Radio there are various uses for teletypes, and people tend to lovingly conserve this stuff. Maybe if you get in contact with a RTTY (Radio Teleletype) group or association, they can help you get a unused one. Estate sales of old HAM radio equipment (of “silent keys”) are relatively common.

    Reply

  7. John Hughes

    On a real ASR-33 teletype the typehed jumps up to type (like an IBM “golfball” selectric typewriter). When it’s not typing you can see all the text.

    I’ve also seen wierd TI thermal printers where the print head moved to the (left? right? margin when not typing),

    Fun trick with ASR-33 – when the carriage returns it flies to the left at high speed, a sort of piston enters a cylinder with a small hole in it to bring the carriage to a smooth halt. By moving a flap you configure how hard the carriage stops – leave the hole too open then it goes CRASH! and the machine might break. Close the hole completely and the carriage bounces back out to the right and back again a few times, Oh what a laugh we used to have.

    Reply

  8. Gerhard Horecky

    Perhaps you will find it interesting to look at this page: http://www.pdp8.net/asr33/asr33.shtml
    A Video of operating a PDP-8 with the teletype is under: http://www.pdp8.net/asr33/videos/teletype_print.avi

    Reply

  9. Bob Proulx

    In classic ribbon type printers the print head would jump up, print, return down, such that if typing slowly you could see every character once the striker cleared. There was a small delay in the return such that if more characters were available to print then the head would remain over the text and strike the next character. This would repeat until the buffer was exhausted. The IBM selectric typewriter operates this way and the up and down motion seems normal.

    In a dot-matrix printer model that I used the print head always remained on the line and instead of jumping up to print it would jump to the right to clear. It would move just enough to clear the last character printed so that you could see it. Again, if there was a continuous flow of characters it would print continuously left to right without jogging the head out of the way. I forget the exact model now.

    But when using this latter model and typing in characters if you typed slowly it would move the dot-matrix print head left, print, right to clear, left print, right to clear, in a most annoying way. This left-right back and forth motion would shake the entire table, especially if it had shaky wooden legs. These later models were smaller and simply sat on any table surface. The left-right motion would work the wooden tables used at my university loose over time and make them very shaky. And it was very annoying. I learned that I must type in the next character very quickly, before the head moved to the right to clear the last character, to avoid that back and forth table shaking motion. But any mistakes were permanently marked on the paper. This taught me to type fast and furious but at the same time very carefully. Such a lesson about life from a dot-matrix paper printing terminal.

    Reply

  10. vaporland

    On a teletype the typebar moves out of the way immediately after each character is printer. You can see what you are typing as you type it, just like a typewriter.

    Reply

  11. cliff

    John, the comment I left on the previous post belongs up here. Sorry.

    Reply

  12. Arnt Richard Johansen

    On a Decwriter IV, the print head usually obscures the last couple of characters before the text. There is a special key that moves the print head temporarily to the right while you hold it down.

    Reply

  13. taupist

    About 12 years ago I dug a portable teletype out of a dumpster. It was actually smaller than most portable typewriters. Basically just a typewriter with a thermal printer instead of all of the mechanics. I don’t have it anymore, although . . . “the truth is out there”

    Reply

  14. taupist

    A quick Google search leads me to this page, which contains a link to a very poor image that appears to be the same model that I had.
    http://www.publiceye.org/aboutpra/pe_bbshist.html
    You can see the image here:
    http://www.publiceye.org/gallery/Amnet/Terminal.jpg

    Happy hunting!

    Reply

Leave a comment

 

Feed

http://changelog.complete.org / Dot-Matrix Teletype Simulator Update and Request for Teletype Info