USB printer driver project
Moderators: Mug UK, Zorro 2, spiny, Greenious, Moderator Team
- lp
- Fuji Shaped Bastard
- Posts: 2540
- Joined: Wed Nov 12, 2003 11:09 pm
- Location: GFA Headquarters
- Contact:
Re: USB printer driver project
I made a plugin for zView that outputs a PCL5 file. Would this be useful for testing as well?
-
- Obsessive compulsive Atari behavior
- Posts: 138
- Joined: Mon Feb 26, 2018 1:47 pm
- Location: Québec, Canada
- Contact:
Re: USB printer driver project
Printing to USB as if it was the parallel port is going to be possible, but it will be tricky to detect the end of job.
The function printer_bcostat() receives a character at a time. If I transfer that character to USB, one byte at a time, after a while my printer displays an internal error, shuts down and restarts. Anyway, it would be too slow to transfer 1 byte a time.
So I'm buffering the characters in a 1K buffer. When it's full, I transfer it, refill the buffer and so on. That works until the last chunk of data, since the buffer is not full, it's not transferred. The printer waits for a minute, then prints what it had received (correctly).
My plan is to detect a character that could signify the end of a job. For text files, a FF character (0C). However that won't work with PCL, it's used in some escape sequences. For PCL, PJL <ESC>%–12345X can be used, or if not present, the reset <ESC>E. For Canon and Epson, I'll try to handle them later.
I will still retain the print-from-file capability, since it's done and working. Many modern printers accepts PDF, JPEG and/or TIFF as page description languages, so we should be able to print them directly.
The function printer_bcostat() receives a character at a time. If I transfer that character to USB, one byte at a time, after a while my printer displays an internal error, shuts down and restarts. Anyway, it would be too slow to transfer 1 byte a time.
So I'm buffering the characters in a 1K buffer. When it's full, I transfer it, refill the buffer and so on. That works until the last chunk of data, since the buffer is not full, it's not transferred. The printer waits for a minute, then prints what it had received (correctly).
My plan is to detect a character that could signify the end of a job. For text files, a FF character (0C). However that won't work with PCL, it's used in some escape sequences. For PCL, PJL <ESC>%–12345X can be used, or if not present, the reset <ESC>E. For Canon and Epson, I'll try to handle them later.
I will still retain the print-from-file capability, since it's done and working. Many modern printers accepts PDF, JPEG and/or TIFF as page description languages, so we should be able to print them directly.
-
- Moderator
- Posts: 5309
- Joined: Wed Oct 23, 2002 4:36 pm
- Location: Friedrichshafen, Germany
- Contact:
Re: USB printer driver project
Idea: collect one character at at a time and construct the USB printjob internally. Transfer it via USB onbly after after a timeout of 10s when no further updates have been received.
I doubt there are serious applications trying to output at such a slow rate.
I doubt there are serious applications trying to output at such a slow rate.
Simon Sunnyboy/Paradize - http://paradize.atari.org/
Stay cool, stay Atari!
1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee
Stay cool, stay Atari!
1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee
-
- Obsessive compulsive Atari behavior
- Posts: 138
- Joined: Mon Feb 26, 2018 1:47 pm
- Location: Québec, Canada
- Contact:
Re: USB printer driver project
Yes. Can you post or send me and example of such a file?lp wrote:I made a plugin for zView that outputs a PCL5 file. Would this be useful for testing as well?
-
- Obsessive compulsive Atari behavior
- Posts: 138
- Joined: Mon Feb 26, 2018 1:47 pm
- Location: Québec, Canada
- Contact:
Re: USB printer driver project
The print job could take too much memory as it can get quite large. The timeout idea could work for emptying the buffer after a period of inactivity.simonsunnyboy wrote:Idea: collect one character at at a time and construct the USB printjob internally. Transfer it via USB onbly after after a timeout of 10s when no further updates have been received.
I doubt there are serious applications trying to output at such a slow rate.
-
- Obsessive compulsive Atari behavior
- Posts: 138
- Joined: Mon Feb 26, 2018 1:47 pm
- Location: Québec, Canada
- Contact:
Re: USB printer driver project
The driver can now print directly to a USB printer as if it was parallel. There are still problems to be resolved, but if you are interested in testing, send me a private message (those who already expressed their interest don't need to). I"ll send you the driver as it is now.
I tested it on several applications and here are my notes:
Everest: GEMDOS: printer not ready. GDOS: OK.
QED: GDOS: OK.
Papyrus: OK.
CDwriter: OK (without GDOS)
ImageCopy: Output direct or bios: printer not responding.
Pixart 3: OK without GDOS.
AtariWorks: GDOS: OK.
I use NVDI 5 with the HP Laserjet 6L printer driver, which should be PCL5.
A problem to solve is why some programs say the printer is not ready and not others. Are they checking the status of the parallel port in a way other than Bcostat (which is what I'm intercepting)? I know QED uses Cprnos or Cauxos, by looking at its code. But CDwriter is also using Cprnos and it works fine.
At the moment, even if I return -1 from Bcostat these programs say it's not ready.
Later, I'll check the true status of the USB printer (out of paper, error, ready).
Later still, I'll offer the option to print the file output by an application, as was the original plan. I find it's faster to print complex documents.
I tested it on several applications and here are my notes:
Everest: GEMDOS: printer not ready. GDOS: OK.
QED: GDOS: OK.
Papyrus: OK.
CDwriter: OK (without GDOS)
ImageCopy: Output direct or bios: printer not responding.
Pixart 3: OK without GDOS.
AtariWorks: GDOS: OK.
I use NVDI 5 with the HP Laserjet 6L printer driver, which should be PCL5.
A problem to solve is why some programs say the printer is not ready and not others. Are they checking the status of the parallel port in a way other than Bcostat (which is what I'm intercepting)? I know QED uses Cprnos or Cauxos, by looking at its code. But CDwriter is also using Cprnos and it works fine.
At the moment, even if I return -1 from Bcostat these programs say it's not ready.
Later, I'll check the true status of the USB printer (out of paper, error, ready).
Later still, I'll offer the option to print the file output by an application, as was the original plan. I find it's faster to print complex documents.
Re: USB printer driver project
A long long time ago... wait wrong websitecatmando wrote:Not strictly related to this project, but has anyone tried one of these https://www.lpt2usb.net/ with their ST?

Recall reading how to pull out the missing signals for the printer port on an ST, but been years ago since looking into it.
I had an Epson Color Photo printer directly attached to a Falcon, and other than the extremely slow print times, worked perfectly.
If not mistaken, with the below print servers, should be able to send ESC/P files over the printer network.
Have a couple devices to try yet.
Hawking Technology PN7127P
and a
AXIS PrintPoint 1440 For Epson Printers
The Axis looks promising for my use as there are Epson drivers for older ink jet color printers for NVDI as well as support in most other TOS programs.
-
- Moderator
- Posts: 5309
- Joined: Wed Oct 23, 2002 4:36 pm
- Location: Friedrichshafen, Germany
- Contact:
Re: USB printer driver project
That's nice progress on this project already!
Simon Sunnyboy/Paradize - http://paradize.atari.org/
Stay cool, stay Atari!
1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee
Stay cool, stay Atari!
1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee
Re: USB printer driver project
great!!
this works for CTPCI & FB as well ??
this works for CTPCI & FB as well ??
My Stuff: FB/Falcon CT63 CTPCI ATI RTL8139 USB 512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list
-
- Obsessive compulsive Atari behavior
- Posts: 138
- Joined: Mon Feb 26, 2018 1:47 pm
- Location: Québec, Canada
- Contact:
Re: USB printer driver project
Do you know if the current ESC/P-R used nowadays is compatible with the old ESC/P ?Rustynutt wrote:
The Axis looks promising for my use as there are Epson drivers for older ink jet color printers for NVDI as well as support in most other TOS programs.
Re: USB printer driver project
I sure don't. I'm a thrift store buyer, anything I find will be dated to the early Epson printer.Perdrix24 wrote:Do you know if the current ESC/P-R used nowadays is compatible with the old ESC/P ?Rustynutt wrote:
The Axis looks promising for my use as there are Epson drivers for older ink jet color printers for NVDI as well as support in most other TOS programs.
Re: USB printer driver project
I tried but it is not work on my FireBee and hp printerwongck wrote:great!!
this works for CTPCI & FB as well ??
Atari Falcon, Firebee
Re: USB printer driver project
I have just tested and It is working on my Falcon with CTPCI under TOS on my HP DeskJet Printerwongck wrote:great!!
this works for CTPCI & FB as well ??
Re: USB printer driver project
Just went to the local thrift store "Cash Converters" and bought a USD$1.40 brand-less wireless mouse, works on Windows.Rustynutt wrote: I sure don't. I'm a thrift store buyer, anything I find will be dated to the early Epson printer.
Will try it on my Falcon/CTPCI sometime over Christmas/New year week.
My Stuff: FB/Falcon CT63 CTPCI ATI RTL8139 USB 512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list
Re: USB printer driver project
sashapont wrote: I tried but it is not work on my FireBee and hp printer
Kroll wrote: I have just tested and It is working on my Falcon with CTPCI under TOS on my HP DeskJet Printer
Thanks for testing.
I do not have a USB printer connected to my Falcon/CTPCI as I am using network printing.
Great that it works for CTPCI, but I thought it will work with FB as well as these 2 have similar TOS (at least made by Didier).
I will try this hopefully over the Christmas/New Year week.
My Stuff: FB/Falcon CT63 CTPCI ATI RTL8139 USB 512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list
Re: USB printer driver project
If it will be work, please write manual how I can do this.
Atari Falcon, Firebee
Re: USB printer driver project
Really?!?....this is great news, I was expecting this driver to don't work with the CTPCI without installing a MiNT EHCI driver, I must be missing something but I have no idea what it isKroll wrote:I have just tested and It is working on my Falcon with CTPCI under TOS on my HP DeskJet Printerwongck wrote:great!!
this works for CTPCI & FB as well ??

Re: USB printer driver project
Sorry, my mistake
, It is working but with Netusbee, I dont test it with CTPCI, I can make after the Christmas

Re: USB printer driver project
I don't expect it to work with CTPCi actually, but please test it out.
My Stuff: FB/Falcon CT63 CTPCI ATI RTL8139 USB 512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list
Re: USB printer driver project
Test it but it's not going no to work, you need a EHCI driver for MiNT's USB stack or its TOS version. There is one which it has been test it on the Milan but we have only the MiNT module version and the printer driver for now is only for the TOS version of the stack. So we need to make a TOS version of the EHCI driver or a MiNT version of the printer driver. I think there are more chances that the driver works with the CTPCI than with the FireBee, I think the bug in PCI-BIOS in latest FireTOS is not present in the CT60 TOS v2.Kroll wrote:Sorry, my mistake, It is working but with Netusbee, I dont test it with CTPCI, I can make after the Christmas
Re: USB printer driver project
Exactly, The HP Desk Jest is not recognize if I connect to USB card with CTPCI. I run printer.prg normally like for netusbee. If I I try to print from Papyrus with NVDI driver,, no reaction on printer. I do not know what else I could check.
-
- Obsessive compulsive Atari behavior
- Posts: 138
- Joined: Mon Feb 26, 2018 1:47 pm
- Location: Québec, Canada
- Contact:
Re: USB printer driver project
On boxing day, I bought a new Xerox Phaser 6022. It's a LED color printer. It supports PCL5c and PCL6.
After much testing with my USB driver, I can report that it works well.
For printing under Papyrus and NVDI 5, use the HP Deskjet 1200 Color printer in NVDI. Set to Normal, 8-color, 300 dpi. The colors and black are nice.
In ImageCopy, set to Deskjet, CMY, 300 dpi, best quality.
It printed the zView PCL5 file from lp's plugin in color, full page width.
There are still work and discovery to be done, more later.
After much testing with my USB driver, I can report that it works well.
For printing under Papyrus and NVDI 5, use the HP Deskjet 1200 Color printer in NVDI. Set to Normal, 8-color, 300 dpi. The colors and black are nice.
In ImageCopy, set to Deskjet, CMY, 300 dpi, best quality.
It printed the zView PCL5 file from lp's plugin in color, full page width.
There are still work and discovery to be done, more later.
Re: USB printer driver project
You couldn't make this up.
I just plugged in my printer to try to test on the Milan. It's a Canon BJC-2000 (centronics) that I also connect to a linux box via a usb to centronics adapter cable so I wasn't sure if the test would work at all, however...
The printer is dead, not a thing, it doesn't even do it's usual print head moving when powered up.
Checked the mains power and it has 234V, opened up the case and checked the 4 wires from the psu and they show 0V, 0V, 5V and 24V so I think they are ok.
Typical, at least I can see one recommendation for a new printer.
I just plugged in my printer to try to test on the Milan. It's a Canon BJC-2000 (centronics) that I also connect to a linux box via a usb to centronics adapter cable so I wasn't sure if the test would work at all, however...
The printer is dead, not a thing, it doesn't even do it's usual print head moving when powered up.
Checked the mains power and it has 234V, opened up the case and checked the 4 wires from the psu and they show 0V, 0V, 5V and 24V so I think they are ok.
Typical, at least I can see one recommendation for a new printer.
Re: USB printer driver project
What is the highest resolution and colour depth that can be achieved ?Perdrix24 wrote:On boxing day, I bought a new Xerox Phaser 6022. It's a LED color printer. It supports PCL5c and PCL6.
After much testing with my USB driver, I can report that it works well.
For printing under Papyrus and NVDI 5, use the HP Deskjet 1200 Color printer in NVDI. Set to Normal, 8-color, 300 dpi. The colors and black are nice.
-
- Obsessive compulsive Atari behavior
- Posts: 138
- Joined: Mon Feb 26, 2018 1:47 pm
- Location: Québec, Canada
- Contact:
Re: USB printer driver project
I believe it will depend on the application drivers. For color, normally we have HP Deskjet drivers with a maximum of 300 dpi. In black and white, we can use the HP Laserjet drivers with 600 dpi. As for colour depth, it could be up to true color. In addition, the printer accepts JPEGs, PDFs and TIFFs, those should print in all their color and resolution, once my driver has a function to transfer them.PeterS wrote:What is the highest resolution and colour depth that can be achieved ?Perdrix24 wrote:On boxing day, I bought a new Xerox Phaser 6022. It's a LED color printer. It supports PCL5c and PCL6.
After much testing with my USB driver, I can report that it works well.
For printing under Papyrus and NVDI 5, use the HP Deskjet 1200 Color printer in NVDI. Set to Normal, 8-color, 300 dpi. The colors and black are nice.
I'll do more tests later and report what I achieved.