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

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

USB printer driver project

Postby Perdrix24 » Fri Nov 30, 2018 2:47 am

I made a video of my USB printer driver in development: https://youtu.be/PEdCHE_xrZY

I was happy to see it working! It's a driver in the same family than the existing mouse, keyboard and mass storage drivers for NetUSBee and Lightning VME.

In the video, the driver reads the file output from NVDI or ImageCopy, and transfers it to the USB printer. In the finished product, the printing will be seamless : issue "Print" and the pages are printed. This will be accomplished by polling for the file, transfer it to the printer, then delete it. The driver will be loaded from the AUTO folder, as usual.

User avatar
TheNameOfTheGame
Atari God
Atari God
Posts: 1207
Joined: Mon Jul 23, 2012 8:57 pm
Location: Almost Heaven, West Virginia

Re: USB printer driver project

Postby TheNameOfTheGame » Fri Nov 30, 2018 3:09 am

Very nice!

itaboy
Captain Atari
Captain Atari
Posts: 190
Joined: Sun May 04, 2014 6:24 pm

Re: USB printer driver project

Postby itaboy » Fri Nov 30, 2018 6:41 am

Quite interesting! Very nice work

mpattonm
Hardware Guru
Hardware Guru
Posts: 396
Joined: Mon Oct 21, 2002 8:52 am
Location: Czech republic
Contact:

Re: USB printer driver project

Postby mpattonm » Fri Nov 30, 2018 6:55 am

Incredible!

czietz
Hardware Guru
Hardware Guru
Posts: 918
Joined: Tue May 24, 2016 6:47 pm

Re: USB printer driver project

Postby czietz » Fri Nov 30, 2018 7:36 am

Impressive.

User avatar
frank.lukas
Hardware Guru
Hardware Guru
Posts: 1722
Joined: Tue Jan 29, 2008 5:33 pm
Location: Germany

Re: USB printer driver project

Postby frank.lukas » Fri Nov 30, 2018 7:47 am

A normal GDOS or Speedo would work too, or not?
fancy Atari Musik anDA Dance "Agare Hinu Harukana" 1998 ATARI http://www.youtube.com/watch?v=JX10fxb5eYE

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

Re: USB printer driver project

Postby PeterS » Fri Nov 30, 2018 9:12 am

Fantastic, one of the things on my most desired list.

Can I do any Milan "testing" ? :-)

dbsys
Captain Atari
Captain Atari
Posts: 384
Joined: Fri Aug 31, 2012 6:11 am
Location: Germany

Re: USB printer driver project

Postby dbsys » Fri Nov 30, 2018 9:37 am

Wonderful!

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

Re: USB printer driver project

Postby Kroll » Fri Nov 30, 2018 9:49 am

Fantastic !

User avatar
Atarieterno
Atari God
Atari God
Posts: 1051
Joined: Mon Jan 18, 2016 3:40 pm
Location: Spain

Re: USB printer driver project

Postby Atarieterno » Fri Nov 30, 2018 9:54 am

Finally someone accepted the challenge! excellent job, congratulations. :cheers:
ST/fm/e, STacy, Mega ST/e, TT, Falcon, C-Lab MKX... and more music tools.

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

Re: USB printer driver project

Postby wongck » Fri Nov 30, 2018 11:50 am

Wow great news just in time for Christmas. :thumbs:
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
simonsunnyboy
Moderator
Moderator
Posts: 5080
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Re: USB printer driver project

Postby simonsunnyboy » Fri Nov 30, 2018 12:05 pm

This is a great project and finally something to give the Netusbee more credibility on its USB part.
The driver seems to be for TOS. Will it also work for smaller systems, e.q. 1MB STF?

Even if it is without NVDI, would a passthrough for PCL or ESC/P to the USB port be feasible so that any TOS application could print? (Not only VDI based ones)
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
dhedberg
Atari God
Atari God
Posts: 1025
Joined: Mon Aug 30, 2010 8:36 am
Contact:

Re: USB printer driver project

Postby dhedberg » Fri Nov 30, 2018 12:58 pm

Great initiative!
Daniel, New Beat - http://newbeat.atari.org. Like demos? Have a look at our new Falcon030 demo MORE.

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

Re: USB printer driver project

Postby Perdrix24 » Fri Nov 30, 2018 4:58 pm

Thanks all for your encouragements. The driver will take any printer file that is compatible with the printer language. And that's going to be the greatest challenge, finding current USB printers that are compatible with NVDI 5 or ImageCopy. So I prepared the attached ZIP for you to test on a PC, with printers that you have access.

You can use spool on a PC to easily transfer the test files to a printer: https://www.compuphase.com/software_spool.htm

Here is a list of current HP printers and their PCL5/PCL6 support: https://support.hp.com/gb-en/document/c04324001

I believe PCL5 is the best bet for black and white. However I would like to print in color, but I think the drivers we have are PCL3.

Some questions and answers, correct me if I'm wrong:

Is 3GUI compatible with 3? No, probably.
Is 3enhanced or 3+ compatible with 3? No, probably.
It seems that a PCL5 emulation is best choice. PCL6 may also be compatible if the printer include the PCL 5 backward compatibility.

Files in ZIP:
cmyk_nor.pcl : ImageCopy CMYK Deskjet Normal.
pap6l_bw.pcl : NVDI 5 HP LaserJet 6L black and white 600 dpi.
best_cmy.pcl : ImageCopy CMY best Deskjet.
1200n8c2.pcl : NVDI 5 HP Deskjet 1200 normal 8-color.

If you find a printer that works in color, let me know! On the printer I'm testing on in the video, only best_cmy.pcl will print correctly in color. Anything in black and white with a LaserJet printer driver prints perfectly.
You do not have the required permissions to view the files attached to this post.

User avatar
krupkaj
Captain Atari
Captain Atari
Posts: 295
Joined: Wed Oct 22, 2003 11:00 pm
Location: Olomouc/Czech Republic
Contact:

Re: USB printer driver project

Postby krupkaj » Fri Nov 30, 2018 5:09 pm

this is really great news :-) Thanks for your work

vido
Atari Super Hero
Atari Super Hero
Posts: 671
Joined: Mon Jan 31, 2011 7:39 pm

Re: USB printer driver project

Postby vido » Fri Nov 30, 2018 9:38 pm

This is really great news for Atari community!!! Thank you!
But my standard question ...
Is there a chance this could be working also on the FireBee?

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

Re: USB printer driver project

Postby Perdrix24 » Fri Nov 30, 2018 10:05 pm

Another possibility, if someone knows how to capture the data going to the parallel port, my driver could transfer that data to the USB. I don't know if that would work however.

For the FireBee, I don't know.

RetroMan
Atarian
Atarian
Posts: 4
Joined: Thu Nov 29, 2018 6:49 am

Re: USB printer driver project

Postby RetroMan » Sat Dec 01, 2018 5:50 am

Perdrix24 wrote:Another possibility, if someone knows how to capture the data going to the parallel port, my driver could transfer that data to the USB. I don't know if that would work however.

It is possible to capture data what goes to parallel port. Of course not that simple - need to install new printer driver code what will get data in regular way (TOS) and not writing it out to parallel port, but to your USB driver .

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

Re: USB printer driver project

Postby simonsunnyboy » Sat Dec 01, 2018 10:03 am

Perdrix24 wrote:Another possibility, if someone knows how to capture the data going to the parallel port, my driver could transfer that data to the USB. I don't know if that would work however.

For the FireBee, I don't know.


My idea would be a BIOS intercept routine for the printer port outputs.
That should be compatible with all TOS based software using BIOS or GEMDOS to print.

For FreeMinT probably some special device could be made.

I personally think a GEMDOS/BIOS dropin would be the most compatible for all programs not using NVDI.
Simon Sunnyboy/Paradize - http://paradize.atari.org/

Stay cool, stay Atari!

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

ThorstenOtto
Atari Super Hero
Atari Super Hero
Posts: 582
Joined: Sun Aug 03, 2014 5:54 pm

Re: USB printer driver project

Postby ThorstenOtto » Sat Dec 01, 2018 10:57 am

Perdrix24 wrote:Another possibility, if someone knows how to capture the data going to the parallel port, my driver could transfer that data to the USB. I don't know if that would work however.


Intercepting the xconout vector(s) for the printer device should work (those starting at address 0x51e in the system variables, for the PRT device that would be 0x55e for output status and 0x57e for character output). If i'm not wrong, that should work even in MiNT, although it might be a bit slow since the program has to go all the way to the lowest level of the BIOS for every character. Writing a separate lp.xdd might be a better choice there.

For the FireBee, I don't know.


I would bet that this attempt works there, too.

User avatar
Atari74user
Captain Atari
Captain Atari
Posts: 321
Joined: Mon Aug 10, 2009 8:00 pm

Re: USB printer driver project

Postby Atari74user » Sat Dec 01, 2018 1:23 pm

Just to add, awesome project!

:cheers:
Atari Falcon 14mb, 68882, Dual 8gb CF, Steinberg FDI & Analog 8
Atari Jaguar, Rotary controller, Skunkboard & Cat Box
Atari 520STFM 4mb, TOS 2.06 switcher, OverScan, GigaFile, PARCP-USB, Unicorn-USB, System Solutions MiniS HD, SyQuest drives, ICD Link II, PhatBoy MIDI Controller, Philip Rees 5M MIDI merge box, SoundPool MO4, Steinberg MIDEX, SMP II, Emagic Log 3, C-Lab Unitor 2, Combiner & Export expanders

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

Re: USB printer driver project

Postby Galvez » Wed Dec 05, 2018 7:51 am

vido wrote:Is there a chance this could be working also on the FireBee?

No with the current FireTOS. To use this printer driver you need MiNT's USB stack or its TOS version, latest FireTOS version has a bug in its PCI-BIOS implementation that avoids to install new interrupt handlers for PCI devices so it's not possible to install MiNT's EHCI driver.

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

Re: USB printer driver project

Postby Perdrix24 » Fri Dec 07, 2018 2:55 am

ThorstenOtto wrote:
Intercepting the xconout vector(s) for the printer device should work (those starting at address 0x51e in the system variables, for the PRT device that would be 0x55e for output status and 0x57e for character output). If i'm not wrong, that should work even in MiNT, although it might be a bit slow since the program has to go all the way to the lowest level of the BIOS for every character. Writing a separate lp.xdd might be a better choice there.



Thanks for this info. And a friend helped me set it up, now I have a function in which I see the output directed at the parallel port. I can now proceed to add in it my code to send that output to the USB printer. And also to handle bcostat. At this point I have:

Code: Select all

#define BCOSTAT0 ((volatile unsigned long *)0x55eL)
#define BCONOUT0 ((volatile unsigned long *)0x57eL)

long
printer_bcostat(ushort dev)
{
   return -1L; // ready
}

long
printer_bconout(ushort dev, ushort ch)
{
   Bconout(2,ch); // All characters displayed on screen OK.
   return 0L; //OK
}

   ret = Super (0L);
   *BCOSTAT0 = (long) printer_bcostat;
   *BCONOUT0 = (long) printer_bconout;
   SuperToUser (ret);

User avatar
catmando
Atari Super Hero
Atari Super Hero
Posts: 987
Joined: Tue Jan 24, 2006 9:56 pm
Location: London, UK

Re: USB printer driver project

Postby catmando » Fri Dec 07, 2018 3:27 pm

Not strictly related to this project, but has anyone tried one of these https://www.lpt2usb.net/ with their ST?
Atari Falcon Tos 4.04 | 14mb | IDE CF 2GB
Atari STE Tos 1.62 | 4mb | HxC Slim SD 8GB
Atari STE Tos 1.62/2.06 | 4mb | Floppy A-B Mod | IDE SD 4GB
Atari STFM
Android Devices (Running Hataroid and SToid)

Atari Forum Wiki - Use it before asking

ThorstenOtto
Atari Super Hero
Atari Super Hero
Posts: 582
Joined: Sun Aug 03, 2014 5:54 pm

Re: USB printer driver project

Postby ThorstenOtto » Fri Dec 07, 2018 4:41 pm

AFAIK the ST printer port does not have all the signals that are needed for this.


Social Media

     

Return to “Hardware”

Who is online

Users browsing this forum: No registered users and 4 guests