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, spiny, Greenious, Moderator Team

Perdrix24
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 127
Joined: Mon Feb 26, 2018 1:47 pm

USB printer driver project

Post by Perdrix24 »

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: 1442
Joined: Mon Jul 23, 2012 8:57 pm
Location: Almost Heaven, West Virginia

Re: USB printer driver project

Post by TheNameOfTheGame »

Very nice!
itaboy
Captain Atari
Captain Atari
Posts: 196
Joined: Sun May 04, 2014 6:24 pm

Re: USB printer driver project

Post by itaboy »

Quite interesting! Very nice work
User avatar
mpattonm
Hardware Guru
Hardware Guru
Posts: 518
Joined: Mon Oct 21, 2002 8:52 am
Location: Czech republic
Contact:

Re: USB printer driver project

Post by mpattonm »

Incredible!
czietz
Hardware Guru
Hardware Guru
Posts: 1246
Joined: Tue May 24, 2016 6:47 pm

Re: USB printer driver project

Post by czietz »

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

Re: USB printer driver project

Post by frank.lukas »

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: 324
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: USB printer driver project

Post by PeterS »

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

Can I do any Milan "testing" ? :-)
dbsys
Captain Atari
Captain Atari
Posts: 470
Joined: Fri Aug 31, 2012 6:11 am
Location: Germany

Re: USB printer driver project

Post by dbsys »

Wonderful!
User avatar
Kroll
Atari Super Hero
Atari Super Hero
Posts: 535
Joined: Fri Mar 09, 2012 10:07 am

Re: USB printer driver project

Post by Kroll »

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

Re: USB printer driver project

Post by Atarieterno »

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: 12930
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: USB printer driver project

Post by wongck »

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
simonsunnyboy
Moderator
Moderator
Posts: 5235
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Re: USB printer driver project

Post by simonsunnyboy »

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: 1200
Joined: Mon Aug 30, 2010 8:36 am
Contact:

Re: USB printer driver project

Post by dhedberg »

Great initiative!
Daniel, New Beat - http://newbeat.atari.org.
Like demos? Have a look at our new Falcon030 demo It's that time of the year again, or click here to feel the JOY.
Perdrix24
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 127
Joined: Mon Feb 26, 2018 1:47 pm

Re: USB printer driver project

Post by Perdrix24 »

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: 302
Joined: Wed Oct 22, 2003 11:00 pm
Location: Olomouc/Czech Republic
Contact:

Re: USB printer driver project

Post by krupkaj »

this is really great news :-) Thanks for your work
vido
Atari Super Hero
Atari Super Hero
Posts: 720
Joined: Mon Jan 31, 2011 7:39 pm

Re: USB printer driver project

Post by vido »

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
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 127
Joined: Mon Feb 26, 2018 1:47 pm

Re: USB printer driver project

Post by Perdrix24 »

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

Post by RetroMan »

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 .
simonsunnyboy
Moderator
Moderator
Posts: 5235
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Re: USB printer driver project

Post by simonsunnyboy »

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 God
Atari God
Posts: 1196
Joined: Sun Aug 03, 2014 5:54 pm

Re: USB printer driver project

Post by ThorstenOtto »

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: 374
Joined: Mon Aug 10, 2009 8:00 pm

Re: USB printer driver project

Post by Atari74user »

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: 298
Joined: Fri Oct 19, 2007 7:49 am

Re: USB printer driver project

Post by Galvez »

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
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 127
Joined: Mon Feb 26, 2018 1:47 pm

Re: USB printer driver project

Post by Perdrix24 »

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 God
Atari God
Posts: 1020
Joined: Tue Jan 24, 2006 9:56 pm
Location: London, UK

Re: USB printer driver project

Post by catmando »

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 God
Atari God
Posts: 1196
Joined: Sun Aug 03, 2014 5:54 pm

Re: USB printer driver project

Post by ThorstenOtto »

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

Return to “Hardware”