Printing from the BBC Model B

discuss both original and modern hardware for the bbc micro/electron
Post Reply
BitSeeker
Posts: 64
Joined: Fri Mar 30, 2018 2:18 pm
Contact:

Printing from the BBC Model B

Post by BitSeeker » Sun Apr 01, 2018 3:16 pm

Since parallel interfaces went out of style on printers years ago, I was wondering whether it is still possible to print from a BBC Micro B? Although I may be able to source a printer cable, but is there a way of converting to a modern USB printer? I have a small mono HP Laserjet 1010 that could be used for the occasional printing out of plain text assembler or BASIC code?

(I know I can save to disk and move the memory card into the PC, but it would be much quicker and easier if I didn't have to open the case but just print out directly).

User avatar
lcww1
Posts: 306
Joined: Wed Mar 15, 2017 11:16 pm
Location: Cloud Cuckoo Land
Contact:

Re: Printing from the BBC Model B

Post by lcww1 » Sun Apr 01, 2018 3:29 pm

I’ve been watching this project - http://www.retroprinter.com/retro-print ... received/# - for some time now, and it looks as though it’s nearing completion and may become available in the foreseeable future, and will almost certainly do what you want.

There may be other solutions already available - one possibility, albeit somewhat involved, that springs to my mind would be to print to an econet print server running on a RISC OS computer, which could then print to a modern network printer (this process is explained here - https://www.retro-kit.co.uk/page.cfm/co ... rchimedes/).

Maybe there are easier and more readily available options though?

guesser
Posts: 485
Joined: Mon Jun 26, 2006 10:21 pm
Contact:

Re: Printing from the BBC Model B

Post by guesser » Sun Apr 01, 2018 3:31 pm

RWAP software have been developing a pi based interface for some time: http://www.retroprinter.com/

Edit: Gah Ninja-d :)
A web based teletext editor which can export as Mode 7 screen memory: https://zxnet.co.uk/teletext/editor
Join the Teletext Discord for teletext chat.

User avatar
1024MAK
Posts: 10288
Joined: Mon Apr 18, 2011 5:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Printing from the BBC Model B

Post by 1024MAK » Sun Apr 01, 2018 7:12 pm

In answer to the question of can a modern USB printer be used. Well, as well as the lack of a compatible interface, there is the problem that modern printers are designed to be used with a complex driver running on a modern PC. This driver is a program that controls the printer at a low level. So even if you convert parallel data from a BBC Micro to USB, the ASCII data will be meaningless to the printer. As it will be expecting an image pattern to print, not ASCII data.

Mark

User avatar
richardtoohey
Posts: 3986
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand
Contact:

Re: Printing from the BBC Model B

Post by richardtoohey » Mon Apr 02, 2018 12:43 am

RetroClinic's Datacentre provides USB and I think I got to the stage of making it notice the printer, but then I got distracted.

Obviously it would be an expensive solution (if doable) just for printing!

Still on my TODO list ...

crj
Posts: 846
Joined: Thu May 02, 2013 5:58 pm
Contact:

Re: Printing from the BBC Model B

Post by crj » Mon Apr 02, 2018 1:55 am

The BBC Micro can print via serial as well as parallel. That's almost certainly a better bet for bodging through to a modern printer.

And I may be out of touch, but a few years ago, printers used to auto-detect between Postscript, PCL and plain text depending on the preamble of whatever you sent them. (Remember all those times you got page after page of gibberish because your printer driver and printer were talking at cross purposes - that was your printer in plain-text mode!)

It seems what you really want is a "reverse serial to USB adapter". That is, a thing that connects to a serial port and presents a USB host you can connect to a peripheral that speaks serial over USB. But I don't know precisely what such a thing would be called, so Google isn't helping. Maybe you just fake it with a Raspberry Pi and a USB-to-serial adapter?


Alternatively, there is that tantalising UPTV, the "user print vector". That opens the possibility of implementing a printer driver that does whatever you want. It might be possible to achieve something using the USB port on a RetroClinic DataCentre, for example. I'm hoping to make a more modern interface for the Beeb, and supporting printers is on the wish list for that. It's a long way down the wish list, but it's there. (-8

User avatar
1024MAK
Posts: 10288
Joined: Mon Apr 18, 2011 5:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Printing from the BBC Model B

Post by 1024MAK » Mon Apr 02, 2018 11:56 am

Yes, some printers can receive and process Postscript, PCL or plain text / ASCII etc. But the problem is that unless the printer has a parallel or RS232 serial port, or the manufacturer includes the details in the documentation, it's hard to tell.

I use a HP Laser printer, the model I have also has a IR receiver, so that works okay if you send it Postscript, PCL or plain text.

But that information is of little use to a user who wants to use their existing modern USB ink jet or USB laser printer. Many of these modern ink jet and laser printers are produced with the minimum electronics in order to keep the cost down.

With regards to the Beebs serial interface, it's perfectly possible to print to the serial port. So if you have a suitable DIN connector (or do a Colin and make one using Blu-tac), a lead can be made up. Then connect to a PC (via a RS232 to USB converter) and use a communications terminal application on the PC to capture the incoming data and save it to a file. You can then import said data into a text editor or a word processor :wink:

There are of course many other ways of handling the PC end.

For the slightly more adventurous, you could use an Ardunio or other suitable micro-controller to capture the Beebs parallel printer port data and convert it to serial data...

Mark

jjthacker
Posts: 33
Joined: Mon Dec 10, 2012 11:32 pm
Location: Reading, Pennsylvania
Contact:

Re: Printing from the BBC Model B

Post by jjthacker » Mon Apr 02, 2018 1:33 pm

I have a Brother HL5250DN laser printer that comes with an old-school parallel port and emulates an Epson printer. Works a treat with the beeb. Not sure if they are still available (I have had it for a few years), but you may be able to get one on eBay.

BitSeeker
Posts: 64
Joined: Fri Mar 30, 2018 2:18 pm
Contact:

Re: Printing from the BBC Model B

Post by BitSeeker » Mon Apr 02, 2018 4:58 pm

Some interesting points to consider. I can't be sure at the moment whether the LJ1010 will accept normal text. The idea of using the serial interface seems interesting though. I have a couple of PL2303 adapters and I have just 'won' a pile of cables for the BBC for 99p which does include a serial cable. This one has a 25pin serial connector, but it would be easy enough to change to a 9 pin or use an adapter and then connect to a PC and collect and save the data in a terminal.

To implement a serial adapter in reverse would require some challenges to be overcome. It would need power from somewhere and the necessary handshaking and I'm not sure that the square socket on the printer provides either. There is such a thing as a USB host shield for the Arduino so an Arduino project might be a possibility I guess.

User avatar
jgharston
Posts: 4118
Joined: Thu Sep 24, 2009 12:22 pm
Location: Whitby/Sheffield
Contact:

Re: Printing from the BBC Model B

Post by jgharston » Mon Apr 02, 2018 11:38 pm

I've got some test code working printing via the DataCentre USB port, but I'm currently hung up with a problem of "seeing" through a USB hub - needed in order to be more useful than just being able to plug one thing in!

My *USBDevices command successfully enumerates everything on the other side of the hub, but I can't get the Vinculum to talk to anything other than device number 0 - which is the first thing plugged in, so either a single item or the hub itself. I've started to wonder if it's my USB hub that's the problem, I've tried half a dozen different keyboards, meeces, joysticks and one printer.

If you want to test for yourself, build a USBKBD command with KBDSEL.src. Plug a USB keyboard into a hub plugged into the DataCentre. Try selecting the keyboard with *USBKBD 1 or *USBKBD 2 or *USBKBD 3 etc, and tinkling on the keyboard to see if anything happens. You need to press Break between each selection. *USBKBD 0 will select a keyboard plugged directly into the DataCentre.

PS: This is what I've spent my Easter weekend doing :)
crj wrote:The BBC Micro can print via serial as well as parallel. (...)
It seems what you really want is a "reverse serial to USB adapter".
No, you'd want a forwards serial to USB adapter. Serial... to..... USB. So the stuff goes from the serial port, goes through and adapter, and goes to a USB port. Stuff starts at the serial end, and as time advaces in the direction that time advances, it becomes USB stuff. A backwards serial to USB adapter woult be a USB to serial adapter. USB... data flows as time passes... to.... serial.
1024MAK wrote:In answer to the question of can a modern USB printer be used. Well, as well as the lack of a compatible interface ...
Somebody was posting on here a simple bitbanged USB interface, I think ending up with something based on this.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.32
(C) Copyright J.G.Harston 1989,2005-2020
>_

crj
Posts: 846
Joined: Thu May 02, 2013 5:58 pm
Contact:

Re: Printing from the BBC Model B

Post by crj » Tue Apr 03, 2018 1:42 am

jgharston wrote:No, you'd want a forwards serial to USB adapter. Serial... to..... USB. So the stuff goes from the serial port, goes through and adapter, and goes to a USB port. Stuff starts at the serial end, and as time advaces in the direction that time advances, it becomes USB stuff. A backwards serial to USB adapter woult be a USB to serial adapter. USB... data flows as time passes... to.... serial.
Either kind of adapter would support bidirectional (whether or not that was useful for a printer). By "reverse", I mean that a forwards one - the normal thing - presents as a USB peripheral one side and RS232 the other, where a "reverse" one therefore would therefore present as a USB host one side and RS232 the other.

User avatar
tricky
Posts: 4665
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: Printing from the BBC Model B

Post by tricky » Tue Apr 03, 2018 8:23 am

Wasn't duikkie making a basic USB adapter?

I have a "pile" of parallel printers, including three laser jets (in need of servicing) that I am looking for uses/homes for.

BitSeeker
Posts: 64
Joined: Fri Mar 30, 2018 2:18 pm
Contact:

Re: Printing from the BBC Model B

Post by BitSeeker » Tue Apr 03, 2018 12:09 pm

I had a look at that Datacentre board on the Retroclinic website, but I am still unclear as to its functions. I see that it adds an IDE and USB interfaces. There is no onboard SD card reader although the video demonstrates an externally plugged in USB stick so it does seem to overlap the functionality of TurboMMC or other similar storage solution, but at considerably greater cost. I am also unclear about whether it has sideways RAM or not? There is a reference to " the full 1MB of RAM for your own application" so is this sideways RAM, shadow RAM or what? It is a very expensive solution just for a printer interface but if provides sideways RAM it might just be worth a look at. I am considering two other options for that though.

User avatar
danielj
Posts: 8411
Joined: Thu Oct 02, 2008 5:51 pm
Location: Manchester
Contact:

Re: Printing from the BBC Model B

Post by danielj » Tue Apr 03, 2018 12:13 pm

The data centre allows you to use ssd/dsd images on a USB stick and load them into ram drives (housed in the 1mb),then save them back to USB. The IDE interface allows you to use an ide solution (eg cf-ide) as a Winchester drive with a patched version of adfs.
There's no ram in there that can be used as sideways ram.

It differs from the turbo MMC in that you don't have to add images to an mmb file.

The USB socket can be used for other things, but it's up to the end user to code them!

The other option for USB, for disk images, is the gotek with something like the flashfloppy firmware. For under £20 you can have something that is 100% compatible with everything and doesn't require patched filesystems.

BitSeeker
Posts: 64
Joined: Fri Mar 30, 2018 2:18 pm
Contact:

Re: Printing from the BBC Model B

Post by BitSeeker » Tue Apr 03, 2018 12:31 pm

danielj, thanks for that clear explanation. I guess as is implied in its name, it is designed to provide an array of storage solutions but also USB interfaces if one wants to experiment. It might be interesting to have a play with, but quite what I am looking for at this time.

RobC
Posts: 2994
Joined: Sat Sep 01, 2007 10:41 pm
Contact:

Re: Printing from the BBC Model B

Post by RobC » Tue Apr 03, 2018 1:15 pm

Just for completeness, the 1MB RAM in the DataCentre can be used in your own programs (I use it in my Pacland demo) but it's paged into JIM (0xFD00 - 0xFDFF) 256 bytes at a time. So, it's nothing like sideways or shadow RAM but does have its uses.

beatkamp
Posts: 42
Joined: Fri Mar 01, 2019 4:58 am
Contact:

Re: Printing from the BBC Model B

Post by beatkamp » Sun Jul 26, 2020 2:41 pm

Has anyone tried one of those ultra cheap serial/RS-232 thermal printers on the Beeb yet?

This is an example:

https://www.sparkfun.com/products/14970

I would like to get one of these going for fun so I wonder if anyone has already
gone through the process.

User avatar
scruss
Posts: 275
Joined: Sun Jul 01, 2018 4:12 pm
Location: Toronto
Contact:

Re: Printing from the BBC Model B

Post by scruss » Sun Jul 26, 2020 6:45 pm

Not directly with a Beeb, no, but on many other "small" systems, yes.

These printers work well, are often surprisingly well made (and powerful: they've typically got an ARM Cortex-M0 inside doing the clever stuff) but woefully under-documented by suppliers. There are many variants, and you typically get whatever the supplier has in stock. My experience:
  • get a good power supply. Most of these printers accept 5 - 9 V. At 5 volts you'll need a roughly 3 amp power supply to drive the motor and print head smoothly. Some models can accept higher voltages and just print faster, but you'd need to feed it data faster than a Beeb can send it to make use of this
  • check the interface you got on the printer. This is most often TTL (5 V) serial. Sometimes, however, they come with RS-232 level inputs. More rarely, they come with USB input. Sometimes you get one that can do all three
  • the printers usually come with JST connectors for power and data with a bare-wire flying lead set for you to make the connections, so it's up to you to bodge a power connector and data port
  • You'll probably want a USB-TTL Serial adapter if your device comes configured for a baud rate that your Beeb can't easily support. They usually come with a test report stuffed inside the paper roll bay
  • The printers all (or almost all) talk a subset of ESC/POS, Epson's point-of-sale printer language. This bears a striking resemblance to ESC/P, the language of the Epson FX-80. Text with CR-LFs should print without problem, but the printer's only something like 32 characters wide
  • The printer will physically emit 384 dots across a 48 mm wide print head (so 8 dots/mm). There's a hard margin of around 2 mm left and right of the output
  • Replacement printer rolls are cheap as long as you don't buy them from an electronics supplier. They're all 58 mm / 2¼" standard thermal rolls. For some reason SparkFun call these 57 mm rolls
  • It's fairly easy to print simple bitmaps to these printers, and the square pixels come out quite crisp. Just mind you've only got 384 pixels to play with, so don't expect miracles. A collage of my pointless samples: https://scruss.com/wordpress/wp-content ... rinter.pdf
There are also 80 mm printers, but I've never seen them with anything but hardwired USB.

Post Reply

Return to “8-bit acorn hardware”