понедельник, 18 декабря 2017 г.

Printing from DOSBox

Printing from DOSBox

Postby Moguera » 2012-8-22 @ 16:29
Some legacy DOS applications will run under Windows, others won't. 64 bit Windows won't run DOS applications at all. Users are increasingly investigating DOSBox as a solution to running their legacy DOS applications. However DOSBox was created for running DOS games and so has no printing support. Fortunately, there is a DOSBox "Megabuild" which does support printing. 

PortTalk must be installed in order to print under Windows 2000 or XP, otherwise attempts to print will generate a Windows error. PortTalk is not required for Windows 9x. I have no idea if PortTalk will work under Vista or 7. 

The default in the DOSBox .conf file for LPT1 is “parallel1=disabled”. One might think that “parallel1=printer” would be correct, but that didn't work for me. What did work was “parallel1=reallpt directlpt:378” for LPT1. This is for a local printer connected to LPT1 and the DOS program set to print to LPT1. Even my embedded HPPCL codes were seamlessly passed through to the printer. Below are the actual, relevant lines from my DOSBox .conf file: 

[printer] 
printer=true 
dpi=360 
width=85 
height=110 
##printoutput=png 
printoutput=printer 
##multipage=false 
multipage=true 
docpath=. 
timeout=0 

[parallel] 
##parallel1=disabled 
##parallel1=printer 
parallel1=reallpt directlpt:378 
parallel2=disabled 
##parallel2=reallpt directlpt:BC00 
parallel3=disabled 

This should work for a printer connected to the LPT port integrated on the motherboard. It will not work with a PCI add-on parallel port card. Since the LPT port integrated on the motherboard appears to software as being on the ISA bus, an ISA add-on parallel port card.MAY work. However, the ISA bus was obsoleted long ago. The last time I searched, a few suppliers of industrial motherboards still offered new motherboards with ISA slots. 

Windows 7 supports the LPT port integrated on the motherboard, but it otherwise will not support the ISA bus. An ISA card will be invisible to it. 

Windows XP supports the ISA bus. Wouldn't it be nice if Microsoft were persuaded to keep offering it for legacy applications? Microsoft's CEO is Steve Ballmer if you care to contact him to lobby for it. 



5 коммент.:

  1. I have the same problem. II have DOS BOS Megabuild, I started to use DOS application and there is a problem with printing. I have Win7 32-bit and I'm wondering why I can't print, I get the same config:

    , and nothing happens..

    [printer]
    printer=true
    dpi=360
    width=85
    height=110
    ##printoutput=png
    printoutput=printer
    ##multipage=false
    multipage=true
    docpath=.
    timeout=0

    [parallel]
    ##parallel1=disabled
    ##parallel1=printer
    parallel1=reallpt directlpt:378
    parallel2=disabled
    ##parallel2=reallpt directlpt:BC00
    parallel3=disabled

    I have virtual printer and from dos box it doesn't work. So i started changing config but still nothig ;(

    ОтветитьУдалить
  2. here's what I did to print from DOSBox:

    - Installed DOSBox Megabuild (D/L from http://home.arcor.de/h-a-l-9000)
    - Settings in dosbox.conf:

    CODE: SELECT ALL
    [printer]
    printer=true
    dpi=360
    width=85
    height=110
    printoutput=printer
    multipage=false
    docpath=.
    timeout=1000

    [parallel]
    parallel1=printer


    With these settings a window will pop up asking you to select a printer. Works without problems here (Windows 7 Pro x64).

    ОтветитьУдалить
  3. You can use one of the patched/forked versions of DOSBox that support printing. There are a few.

    One I've recently started using is Taewoong's enhanced "ykhwong" version (as of writing, it was last updated Oct. 12. 2011):

    Included Patches:

    Direct3D with pixelshaders, OpenglHQ, Innovation, Glide, zip/7z mount, Beep, NE2000 Ethernet, Graphis user interface (menu), Save/Load states, Vertical sync, CPU flags optimization, Various DOS commands (PROMPT VOL, LABEL, MOUSE, etc) and CONFIG.SYS commands (DEVICE, BUFFERS, FILES, etc), Continuous turbo key, Core-switch key, Show details (from menu bar), Nice DOSBox icon, Font patch (cp437), MAKEIMG command, INTRO, Ctrl-break patch, DBCS support patch, Automatic mount, Printer output, MT-32 emulation (MUNT), MP3CUE, Overscan border, Stereo-swap, SDL_Resize, MemSize128, Internal 3dfx voodoo chip emulation, Amstrad & PS/1 sound emulation, Fluidsynth soundfont support, Timidity++ backend support, CGA w/ Monochrome Monitor Support, Improve PC Speaker emulation accuracy patch, etc.
    It allows redirecting LPT1 (through LPT3) to an actual LPT port, a printer file (.prn), or to the virtual printer. The valid options in the Parallel/Dongle dialog are reallpt, printer, file and disabled.

    If you set it up to send to the virtual printer, it can "print" to a graphic file (.PNG, .BMP, .PS), or to a Windows printer on the host (it pops up Windows a print dialog):

    ОтветитьУдалить
  4. DOSBOX MegaBuild from here : http://home.arcor.de/h-a-l-9000


    edit config file DOSBOX Megabuild like this

    #parallel1=file append:C:\Users\user\filename.txt
    change to
    parallel1=file dev:lpt1


    port capturing
    net use LPT1: \\computer-name\printer /persistent:yes

    And you can print on USB Printer in Windows 7 64bit (and any other I think - withou any printfil programs)
    Work like hell for me.

    Good luck.

    ОтветитьУдалить
  5. How do I configure Printfil to capture DosBox print jobs ?

    DOSBOX is a DOS emulator, freely available at http://www.dosbox.com - Some Customers do use it to run their DOS programs; mainly on 64 bit Windows systems (that cannot run 16 bit software, like DOS, natively).
    If instead you're using the vDos DOSBox variant, please see the faq: How to print from vDos.

    How to configure Printfil to capture DOS print jobs run inside DosBox depends mainly by how the DOS program itself produces those jobs:

    The DOS program "prints to file" itself.
    The DOS program prints to a parallel port (LPT1: , LPT2: , LPT3:) or a serial port (COM1: , COM2: , COM3: , COM4:)
    1) The DOS program "prints to file" itself

    In this case you just have to point Printfil to the very same file name produced by the DOS program.

    You can do it by inserting that file name in the "File to check" field at Configuration -> Standard
    There's no need to select any COM Port or LPT port to capture in that configuration dialog.

    As soon as the DOS program finishes printing, Printfil will capture the job-file and will show it on screen, if Preview is enabled at Configuration -> Standard, or will directly send it to the choosen Windows printer.

    2) The DOS program prints to parallel ports (LPT1:, LPT2:, LPT3:) or serial ports (COM1:, COM2:, COM3:, COM4:)

    In this case please note that the Standard DosBox build available at the link above does NOT support parallel port emulation, so, print jobs sent by a DOS program to (say) LPT1: in DosBox simply "disappears" and Printfil receives nothing to capture, even if you've selected the LPT1: port at Configuration -> Standard .

    There are however special DosBox builds (DosBox SVN Daum and DosBox MegaBuild) that DO support parallel port emulation

    NEW: You can use the free DosPrint program that checks your PC configuration, then downloads, installs and configures both the right DosBox emulator and Printfil without having to do those tasks manually. DosPrint is available for free at https://www.DosPrint.com
    If instead you already have DOSBox up and running on your machine, the newer Printfil version automatically detects if DosBox SVN Daum or DosBox MegaBuild is installed on your Windows machine when selecting a LPT port to capture at Configuration -> Standard and asks you if you want to automatically configure DosBox to capture the selected COM port or LPT port.

    So, in order to capture print jobs sent to the LPT1: , LPT2: , LPT3: , COM1: , COM2: , COM3: or COM4: port by a DOS program within DosBox you just have to:

    If it's a parallel port, install DosBox SVN Daum (http://ykhwong.x-y.net) or DosBox MegaBuild (http://home.arcor.de/h-a-l-9000)
    If you're using a previous Printfil version, upgrade your Printfil copy
    Go to Configuration -> Standard and select the LPT port or COM port you want to capture

    ОтветитьУдалить