Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox

Here you can discuss the development of patches.

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox 0.65

Postby qv90 » 2007-6-23 @ 15:47

Hi I encountered a bug in original Dosbox code, so I created a new patch definition

Code: Select all
//
// Name: Bug fixes for DosBox itself
// Version: DosBox 0.70 - 0.1
// Last Update: 2007/06/23
// Created by: Florian Daeumling, Jaballa Software
// Description: Fix bugs in original DosBox code
//
#define PATCH_DOSBOX

in Source code and compiled a new .EXE.
Last edited by qv90 on 2012-11-11 @ 09:18, edited 1 time in total.
Jam
Live long and prosper!
http://syncgw.com
User avatar
qv90
Newbie
 
Posts: 65
Joined: 2006-7-01 @ 10:22

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox

Postby qv90 » 2007-7-01 @ 11:15

Hi,
just added a bug fix for "PATCH_GERFILECHAR" - seems I lost some conversion calls when converting to DosBox 0.70.
Jam
Live long and prosper!
http://syncgw.com
User avatar
qv90
Newbie
 
Posts: 65
Joined: 2006-7-01 @ 10:22

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox

Postby qv90 » 2007-7-27 @ 08:13

- New Version 1.74

I updated source as well as EXE file to support Clipboard read/write access with more than 32K (32768 Bytes) of text data (now it's hopefully unlimited :money:)
Code: Select all
//
// Name: Enable CLPBOARD as clipboard device
// Version: DosBox 0.70 - 0.2
// Last Update: 2007/07/25
// Created by: Florian Daeumling, Jaballa Software
// Description: Enable read/write access to Windows Clipboard.
// Exit has some limitations:
// 1. Works only on Windows host operating systems
// 2. Supports only text read/write to/from clip board
//
// Howto test: Test can only be performed, if you've enabled
// "PATCH_RWDEV" patch!
// - start notepad.exe
// - copy z:\autoexec.bat clpboard in DosBox
// - switch to notepad and enter <CTRL><V>
// - you should see content of autoexec.bat
// - modify content and mark block; enter <CTRL><C>
// - switch to DosBox and enter copy clpboard c:\test
// - c:\test should contain copied block
//
#define PATCH_CLIPB
Jam
Live long and prosper!
http://syncgw.com
User avatar
qv90
Newbie
 
Posts: 65
Joined: 2006-7-01 @ 10:22

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox

Postby wd » 2007-7-27 @ 08:24

Hi I encountered a bug in original Dosbox code

There's no bug btw. (at least not at that place that you "fixed").
wd
DOSBox Author
 
Posts: 10818
Joined: 2003-12-03 @ 21:23

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox

Postby Zoomx » 2007-7-27 @ 15:09

Whether it is a patch will support the direct access to LPT ports under XP?
Zoomx
Newbie
 
Posts: 2
Joined: 2007-7-27 @ 15:04

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox

Postby qv90 » 2007-8-19 @ 09:16

Hi wd,

oh sorry, it is indeed a bug.
Code: Select all
*(strrchr(path,'\\')+1)=0;

is a very buggy code: If path does not contain any "\" it will fail resulting in an memory exception.

To expect "path" will always contains an backslash is erroneous - I know many projects failing because the code expects something which reality does not support.

btw - I'm surprised, not to see such an simple bug fixed in 0.71...
Jam
Live long and prosper!
http://syncgw.com
User avatar
qv90
Newbie
 
Posts: 65
Joined: 2006-7-01 @ 10:22

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox

Postby qv90 » 2007-8-19 @ 09:18

Hi zoomx,

no, the patches does not support port access. In the environment we use DosBox there was no necessity :-)
Jam
Live long and prosper!
http://syncgw.com
User avatar
qv90
Newbie
 
Posts: 65
Joined: 2006-7-01 @ 10:22

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox

Postby qv90 » 2007-8-19 @ 09:23

Hi,

I ported patches to DosBox 0.71.

You can download Patched source code and Ready to run Win executable
Jam
Live long and prosper!
http://syncgw.com
User avatar
qv90
Newbie
 
Posts: 65
Joined: 2006-7-01 @ 10:22

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox

Postby wd » 2007-8-19 @ 16:10

is a very buggy code

Um did you look at the code right above that???
wd
DOSBox Author
 
Posts: 10818
Joined: 2003-12-03 @ 21:23

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox

Postby qv90 » 2007-8-20 @ 15:30

Hi wd,

you're absolutely right - I stumbled over my own feet. PATCH_RWDEV skipped some of the code in DOS_Canonicalize()...

Please apologize...

But... I still stick on my opinion: To believe a function does what it should do is risky. I fall into the trap, because I slightly modified DOS_Canonicalize(). Maybe next time someone else of the DosBox project team modifies a function and then your code may fail...
Jam
Live long and prosper!
http://syncgw.com
User avatar
qv90
Newbie
 
Posts: 65
Joined: 2006-7-01 @ 10:22

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox

Postby bijan_alavi » 2007-8-27 @ 16:02

Hi:

How to use parallel port on windows?

on linux : qemu ..... -parallel /dev/parport...
on windows?
bijan_alavi
Newbie
 
Posts: 1
Joined: 2007-8-27 @ 15:58

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox

Postby wd » 2007-8-27 @ 16:10

Maybe ask on a qemu forum?
wd
DOSBox Author
 
Posts: 10818
Joined: 2003-12-03 @ 21:23

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox

Postby qv90 » 2007-8-28 @ 06:50

Hi bijan_alavi,

Jaballa Edition does not access parallel port itself - it uses the OS provided interfaces to the hardware (available in CMD environment).
Jam
Live long and prosper!
http://syncgw.com
User avatar
qv90
Newbie
 
Posts: 65
Joined: 2006-7-01 @ 10:22

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox

Postby qv90 » 2007-9-02 @ 15:54

Hi,

I updated sources to DosBox version 0.72.

- You can find modified sources here
- You can find compiled .exe version here

Please enjoy - and give feedback if something doesn't work :shocked:
Jam
Live long and prosper!
http://syncgw.com
User avatar
qv90
Newbie
 
Posts: 65
Joined: 2006-7-01 @ 10:22

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox

Postby eL_PuSHeR » 2007-9-02 @ 18:19

Wow! It seems to work just fine on my Laserjet 1200. Nice work! :cool:
Intel i7 5960X
Gigabye GA-X99-Gaming 5
8 GB DDR4 (2100)
8 GB GeForce GTX 1070 G1 Gaming (Gigabyte)
User avatar
eL_PuSHeR
Moderator
 
Posts: 6484
Joined: 2003-6-20 @ 16:39

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox

Postby robo456 » 2007-10-19 @ 13:33

This program looks like what I am looking for, but having a little trouble. I have an old GWBASIC program that needs to print to an Okidata ML 320 connected to LPT1.

I downloaded the latest Jaballa Edition 1.81 from your site and used the 'copy %s LPT1 >Nul' as the configuration text. Not sure if that's correct or not for my situation. (running Windows Vista Premium)

If you have any ideas, I'd love to hear them! I really would like to get this program to print!

**EDIT**
I looked at the actual program, and it is trying to use the gwbasic "lprint" command.

--rob
robo456
Newbie
 
Posts: 3
Joined: 2007-10-19 @ 13:28

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox

Postby qv90 » 2007-10-20 @ 08:05

Hi robo456,

to check if your Basic prog prints in a manner my patch can catch it, try to modify the destination of the output by changing configuration to:

"copy %s C:\Test.prn"

Then start your Dosbox app and try printing. If you see the "1 file copied" message in your DosBox console, check "C:\Test.prn" file size. If it's > 0 then you catched the printer output and your problem is somewhere in the OS printer configuration; if it's = 0, then your Basic prog don't use the "access to device name" way to print (may be it uses interrupts or direct port access for printing).

Jam
Jam
Live long and prosper!
http://syncgw.com
User avatar
qv90
Newbie
 
Posts: 65
Joined: 2006-7-01 @ 10:22

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox

Postby qv90 » 2008-1-26 @ 16:19

Hi,

I updated Jaballa Edittion 1.82 source code to support Visual C++ 2008 (V9.0). You can download it here.
Jam
Live long and prosper!
http://syncgw.com
User avatar
qv90
Newbie
 
Posts: 65
Joined: 2006-7-01 @ 10:22

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox

Postby qv90 » 2008-1-26 @ 18:33

Hi,

also added extension to to include the PRN device (it's an alias to LPT1) and enabled mingw32 compilation (thanks to "gams"!).
Jam
Live long and prosper!
http://syncgw.com
User avatar
qv90
Newbie
 
Posts: 65
Joined: 2006-7-01 @ 10:22

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox

Postby mchanna » 2008-2-29 @ 20:33

QV,

Thanks for investing so much effort into enabling printing in DOSBOX. It's nice that someone has put so much effort on this task. I'm looking to use DOSBOX to support an old medical application that has a few old printers to choose from (like the HP deskjet 630c). I'm familiar with DOSBOX, and have downloaded your complied executable for windows that you posted on your site. I'm hoping you wouldn't mind helping me out by answering a few questions:

1: My goal is to replace an ancient printer with a new one . If I get my app running correctly with DOSBOX, and configure it with the printing app correctly, will it print to a specified default printer in windows (like a modern one XP has installed?)?

2: I'm guessing in order to use your version, you have to copy the files in your DOSBOX181 in place of the ones that might come in a DOSBOX .72 install for windows. Correct?

3: The Dosbox.conf file is not included in your zipped up batch of files, how should that look, in order to support printing.



-Thanks in advance for any input you might have.-
User avatar
mchanna
Newbie
 
Posts: 1
Joined: 2008-2-29 @ 20:00

PreviousNext

Return to DOSBox Patches

Who is online

Users browsing this forum: No registered users and 2 guests