Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 6, 2009, 10:25 AM   #1
pmworden
macrumors newbie
 
Join Date: Sep 2007
Need help getting DOS program to print from Boxer

Hello! I AM NOT a programmer but have tried to get this to work with no luck so far. I want to avoid doing this within Parallels/Vista although I've gotten that to work. Situation is that I have an old DOS estimating program still used here and someone wants to use it on a new 13-inch MacBookPro. This person is very technically challenged so jumping between Parallels and OS X would be an invitation to lots and lots of frustration. The program works except printing. I've tried editing the config file changing the "serial1=" (many variations), putting a redirect line in the config file, all to no avail. I'm thinking that "serialx" is "COMx" in the DOS program and that perhaps an Applescript that would change "cu.modem" or "Internal Modem" to a USB printer would work. As you can see, one of the problems I've had is that I really don't know the verbage that either the DOS program uses or the Mac uses to specify a device. Any takers?

More detail
Following is a snippet of the config file for Boxer (DOSBOX) where the serial port is used. From my understanding so far, DOS doesn't use Parallel (LPT) but rather Serial (COM) for printing.
________
FROM CONFIG FILE:

[serial]

serial1=dummy
serial2=dummy
serial3=disabled
serial4=disabled
# Set the type of device connected to serial port:
# disabled, dummy, modem, nullmodem, directserial.
# Additional parameters are supplied on the same line as
# parameter:value pairs. All types use the irq parameter.

# For directserial: realport (required), rxdelay (optional)
# For modem: listenport (optional)
# For nullmodem: server, rxdelay, txdelay, telnet, usedtr,
# transparent, port, inhsocket (all optional)

# Example: serial1=modem listenport:5000
_______
ALSO FROM CONFIG FILE, AREA FOR SETTING UP AN AUTOEXEC.BAT PORTION TO LOAD:

[autoexec]
# Any DOS commands you put under this heading will be executed
# when DOSBox emulation starts.
________

I've tried substituting the serial entries like this:
serial1=directserial realportap://*/Accel-a-Writer%204N/LaserWriter
serial2=directserial realportap://*/Accel-a-Writer%204N/LaserWriter
serial3=directserial realportap://*/Accel-a-Writer%204N/LaserWriter
serial4=directserial realportap://*/Accel-a-Writer%204N/LaserWriter
... where the "pap://..." is taken from the name of a printer as it is listed on the Mac in System Preferences, Print & Fax, Options & Supplies..., General tab, URL: (this printer is a networked printer, but I've tried the same method with a USB printer without success)

I've tried substuting the serial entries like this:
serial1=directserial realport:tty.Patti-1
serial2=directserial realport:tty.Patti-1
serial3=directserial realport:tty.Patti-1
serial4=directserial realport:tty.Patti-1
where the USB printer was showing up as tty.Patti-1 through a terminal device search (/dev/tty) - I read that "cu." is incoming and "tty" is the corresponding outgoing - when I typed a unique and simple name for the printer and the location in the Print & Fax menu, the default tty of "tty.modem" was replaced by "tty.Patti-1". I had already tried the default "tty.modem" and also cu.modem.

I realize all of this is not Mac programming and I think if I could use LPT1 or even COM1 in this config file anywhere and if I knew the device name the Mac had for LPT1's destination out of this, then an Applescript could redirect it to any printer. Problem is, this config file lists only "serial..." not "COM..." and no LPT whatsoever. Thanks for any input.
pmworden is offline   0 Reply With Quote
Old Jul 6, 2009, 10:39 AM   #2
robbieduncan
Moderator
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
You can't just use a USB port like it was a serial port. That won't work.
robbieduncan is offline   0 Reply With Quote
Old Jul 6, 2009, 10:56 AM   #3
pmworden
Thread Starter
macrumors newbie
 
Join Date: Sep 2007
Quote:
Originally Posted by robbieduncan View Post
You can't just use a USB port like it was a serial port. That won't work.
Thank you. FYI, I started with this information:
http://vogons.zetafleet.com/viewtopi...5f50091a69bebe

where the final resolution for this user was a line in the config file as:
serial1-directserial realport:tty.usbserial

...where his usb serial adaptor was /dev/tty.usbserial

sounds then like I would need an adaptor then identify the name given to the adaptor by the Mac OS by using /dev/tty in terminal, yes?

Also, the DOS program does list LPT1 as an option for printing which was the selection that worked through Parallels/Vista, but I have no idea how to tell the DOS program what port to use - what it's called by the Mac - and how to put that in a config file for the DOS program in order to get a printout when choosing LPT1.
pmworden is offline   0 Reply With Quote
Old Jul 6, 2009, 11:05 AM   #4
robbieduncan
Moderator
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
That will work as the USBSeriel driver that goes with the adaptor will accept the standard old-school seriel commands, pump them over the USB bus and the adaptor converts them back.

LPT1 is the parallel port normally?
robbieduncan is offline   0 Reply With Quote
Old Jul 6, 2009, 11:07 AM   #5
pmworden
Thread Starter
macrumors newbie
 
Join Date: Sep 2007
Yes. LPT 1 and 2 are both available and are parallel ports.
pmworden is offline   0 Reply With Quote
Old Jul 6, 2009, 11:12 AM   #6
robbieduncan
Moderator
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
Quote:
Originally Posted by pmworden View Post
Yes. LPT 1 and 2 are both available and are parallel ports.
Yes, but unless you are on an ancient Mac you don't have any real parallel ports. So again you'd need some sort of adaptor. I've seen (and have somewhere) a USB->Seriel adaptor. I've never seen a USB->Parallel one.
robbieduncan is offline   0 Reply With Quote
Old Jul 6, 2009, 11:42 AM   #7
pmworden
Thread Starter
macrumors newbie
 
Join Date: Sep 2007
Quote:
Originally Posted by robbieduncan View Post
Yes, but unless you are on an ancient Mac you don't have any real parallel ports. So again you'd need some sort of adaptor. I've seen (and have somewhere) a USB->Seriel adaptor. I've never seen a USB->Parallel one.
I took so long to answer it logged me out. I found a USB to serial adaptor and that looks like the answer. But I still think it's strange. Does plugging in the adaptor change the way the Mac uses the USB or does the "translation" to serial happen after the output hits the adaptor? Here's why I ask: It seems odd that I would type in a line in the config file that in effect redirects the serial output from the DOS program to the USB port in the Mac but then have to use the cable to "translate" it back to serial and then also be sure that the USB printer has a serial connector, which might be tough to find one that has serial. Also seems odd since within Windows, I can use a program that makes serial output work to USB. Weird. So should I assume that if serial is going out from the DOS program the USB would only be able to pass it through as something intelligible if it "translates" it (or keeps it as-is) via a serial adaptor?
pmworden is offline   0 Reply With Quote
Old Jul 6, 2009, 12:16 PM   #8
pmworden
Thread Starter
macrumors newbie
 
Join Date: Sep 2007
I found a Keyspan USB to 2-port serial adaptor and the driver for it, unfortunately a USB printer that I've been using to test is USB only. I'll look through some old stuff and see if I can locate a desktop serial printer. Thanks so much for the help!
pmworden is offline   0 Reply With Quote
Old Jul 6, 2009, 01:52 PM   #9
idelovski
macrumors regular
 
Join Date: Sep 2008
I have some experience with Keyspan adapters. My software uses them to print on POS (Receipt) printers.

You can try with this name: "/dev/tty.USA19QW5b14P1.1", but I think they are changing this from version to version. My software uses some code to search for available serial ports, but you said you're not a programmer. Maybe there's some utility that can help you.
idelovski is offline   0 Reply With Quote
Old Jul 6, 2009, 03:38 PM   #10
pmworden
Thread Starter
macrumors newbie
 
Join Date: Sep 2007
I'll hookup the Keyspan that I found, "USA-28" and install the driver, then check terminal to see what "tty" listing it is, then I'll put that in the config file - maybe it will work. Thanks for the information - every bit helps!

Also, I downloaded the current driver today and believe I have an old printer that's still serial at home; enough for a smoke test.

Last edited by kainjow; Jul 6, 2009 at 09:24 PM. Reason: merged posts
pmworden is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Windows 3.1 with Boxer keblen Windows, Linux & Others on the Mac 2 Dec 12, 2012 07:40 AM
Coward Chinese Boxer. NZed Community Discussion 3 Aug 14, 2012 10:37 PM
Coward Chinese boxer. NZed Wasteland 11 Aug 13, 2012 09:09 PM
Recommendations for a program to create print advertisement? Romeo604 Mac Basics and Help 1 Jul 27, 2012 08:06 AM

Forum Jump

All times are GMT -5. The time now is 07:38 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC