USB printer driver project

Troubles with your machine? Just want to speak about the latest improvements? This is the place!

Moderators: Mug UK, Zorro 2, Greenious, spiny, Moderator Team

User avatar
lp
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2376
Joined: Wed Nov 12, 2003 11:09 pm
Location: GFA Headquarters
Contact:

Re: USB printer driver project

Postby lp » Fri Dec 07, 2018 5:50 pm

I made a plugin for zView that outputs a PCL5 file. Would this be useful for testing as well?

Perdrix24
Atari freak
Atari freak
Posts: 50
Joined: Mon Feb 26, 2018 1:47 pm

Re: USB printer driver project

Postby Perdrix24 » Tue Dec 11, 2018 3:08 pm

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.

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 5039
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Re: USB printer driver project

Postby simonsunnyboy » Tue Dec 11, 2018 4:19 pm

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.
Simon Sunnyboy/Paradize - http://paradize.atari.org/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

Perdrix24
Atari freak
Atari freak
Posts: 50
Joined: Mon Feb 26, 2018 1:47 pm

Re: USB printer driver project

Postby Perdrix24 » Thu Dec 13, 2018 2:10 am

lp wrote:I made a plugin for zView that outputs a PCL5 file. Would this be useful for testing as well?

Yes. Can you post or send me and example of such a file?

Perdrix24
Atari freak
Atari freak
Posts: 50
Joined: Mon Feb 26, 2018 1:47 pm

Re: USB printer driver project

Postby Perdrix24 » Thu Dec 13, 2018 2:19 am

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.

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.

Perdrix24
Atari freak
Atari freak
Posts: 50
Joined: Mon Feb 26, 2018 1:47 pm

Re: USB printer driver project

Postby Perdrix24 » Tue Dec 18, 2018 2:52 am

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.

Rustynutt
Atari Super Hero
Atari Super Hero
Posts: 595
Joined: Wed Mar 21, 2012 7:38 am
Location: Oregon
Contact:

Re: USB printer driver project

Postby Rustynutt » Tue Dec 18, 2018 6:27 am

catmando wrote:Not strictly related to this project, but has anyone tried one of these https://www.lpt2usb.net/ with their ST?


A long long time ago... wait wrong website :)

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.

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 5039
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Re: USB printer driver project

Postby simonsunnyboy » Tue Dec 18, 2018 6:30 am

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

User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 12541
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: USB printer driver project

Postby wongck » Tue Dec 18, 2018 1:57 pm

great!!
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

Perdrix24
Atari freak
Atari freak
Posts: 50
Joined: Mon Feb 26, 2018 1:47 pm

Re: USB printer driver project

Postby Perdrix24 » Tue Dec 18, 2018 2:31 pm

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.

Do you know if the current ESC/P-R used nowadays is compatible with the old ESC/P ?

Rustynutt
Atari Super Hero
Atari Super Hero
Posts: 595
Joined: Wed Mar 21, 2012 7:38 am
Location: Oregon
Contact:

Re: USB printer driver project

Postby Rustynutt » Tue Dec 18, 2018 3:20 pm

Perdrix24 wrote:
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.

Do you know if the current ESC/P-R used nowadays is compatible with the old ESC/P ?


I sure don't. I'm a thrift store buyer, anything I find will be dated to the early Epson printer.

sashapont
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 129
Joined: Sat Jun 03, 2017 9:40 pm

Re: USB printer driver project

Postby sashapont » Sun Dec 23, 2018 7:51 pm

wongck wrote:great!!
this works for CTPCI & FB as well ??


I tried but it is not work on my FireBee and hp printer
Atari Falcon, Firebee

User avatar
Kroll
Captain Atari
Captain Atari
Posts: 469
Joined: Fri Mar 09, 2012 10:07 am

Re: USB printer driver project

Postby Kroll » Sun Dec 23, 2018 8:48 pm

wongck wrote:great!!
this works for CTPCI & FB as well ??


I have just tested and It is working on my Falcon with CTPCI under TOS on my HP DeskJet Printer

User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 12541
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: USB printer driver project

Postby wongck » Mon Dec 24, 2018 2:51 am

Rustynutt wrote:I sure don't. I'm a thrift store buyer, anything I find will be dated to the early Epson printer.

Just went to the local thrift store "Cash Converters" and bought a USD$1.40 brand-less wireless mouse, works on Windows.
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

User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 12541
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: USB printer driver project

Postby wongck » Mon Dec 24, 2018 2:53 am

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

sashapont
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 129
Joined: Sat Jun 03, 2017 9:40 pm

Re: USB printer driver project

Postby sashapont » Mon Dec 24, 2018 7:52 am

If it will be work, please write manual how I can do this.
Atari Falcon, Firebee

Galvez
Captain Atari
Captain Atari
Posts: 244
Joined: Fri Oct 19, 2007 7:49 am

Re: USB printer driver project

Postby Galvez » Mon Dec 24, 2018 8:14 am

Kroll wrote:
wongck wrote:great!!
this works for CTPCI & FB as well ??


I have just tested and It is working on my Falcon with CTPCI under TOS on my HP DeskJet Printer

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 is :-). I must ask: sure is the printer attached to the PCI USB card and not the NetUSBee?

User avatar
Kroll
Captain Atari
Captain Atari
Posts: 469
Joined: Fri Mar 09, 2012 10:07 am

Re: USB printer driver project

Postby Kroll » Mon Dec 24, 2018 11:17 am

Sorry, my mistake :(, It is working but with Netusbee, I dont test it with CTPCI, I can make after the Christmas

User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 12541
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: USB printer driver project

Postby wongck » Mon Dec 24, 2018 2:41 pm

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

Galvez
Captain Atari
Captain Atari
Posts: 244
Joined: Fri Oct 19, 2007 7:49 am

Re: USB printer driver project

Postby Galvez » Wed Dec 26, 2018 8:32 am

Kroll wrote:Sorry, my mistake :(, It is working but with Netusbee, I dont test it with CTPCI, I can make after the Christmas

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.

User avatar
Kroll
Captain Atari
Captain Atari
Posts: 469
Joined: Fri Mar 09, 2012 10:07 am

Re: USB printer driver project

Postby Kroll » Fri Dec 28, 2018 1:03 am

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.

Perdrix24
Atari freak
Atari freak
Posts: 50
Joined: Mon Feb 26, 2018 1:47 pm

Re: USB printer driver project

Postby Perdrix24 » Sat Dec 29, 2018 3:39 am

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.

PeterS
Captain Atari
Captain Atari
Posts: 221
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: USB printer driver project

Postby PeterS » Mon Dec 31, 2018 5:24 pm

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.

PeterS
Captain Atari
Captain Atari
Posts: 221
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: USB printer driver project

Postby PeterS » Wed Jan 02, 2019 12:44 pm

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.



What is the highest resolution and colour depth that can be achieved ?

Perdrix24
Atari freak
Atari freak
Posts: 50
Joined: Mon Feb 26, 2018 1:47 pm

Re: USB printer driver project

Postby Perdrix24 » Wed Jan 02, 2019 2:58 pm

PeterS wrote:
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.



What is the highest resolution and colour depth that can be achieved ?


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.

I'll do more tests later and report what I achieved.


Social Media

     

Return to “Hardware”

Who is online

Users browsing this forum: No registered users and 7 guests