Regarding port setting for parallel port drivers

Hi,

The Resources Tab for LPT1 in device Manager shows that the I/O Addr Range is 3BC-3BE. On some other computers, it shows as 378-37F. Both the computers have just one parallel port interface at the back. So my sample parallel port driver (that internally used 378 as port address )worked on some computers and not on others.

So if I write a “non-WDM” parallel port driver, do i need to have two versions of .sys - one that uses port 3BC, and one that uses 378 ?

Also just changing the settings in the Resources tab of Hardware wizard for LPT1 does not help. Because in one case, even though I changes the I/O range manually from 3BC to 378, the sample parallel port driver (that internally used port 3BC) worked smoothly. So as conclusion, I cannot write a driver that uses 378 port and ask the users to change the settings manually to 378.

How to handle this problem ? I think the port address should be standaridized right ?

Can someone please help me on this ?

Many thanks

Kiran


Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Write a WDM / pnp based LPT port driver and all your problems will go away b/c the resources will be dynamically assigned to your driver during start device. Or better yet, leave the resource management to parport.sys and use the IOCTLs it supports to talk to the port.

d


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Kiran Bacche
Sent: Monday, August 29, 2005 11:33 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Regarding port setting for parallel port drivers

Hi,
? The Resources Tab for LPT1 in device Manager shows that the I/O Addr Range is 3BC-3BE. On some other computers, it shows as 378-37F. Both the computers have just one parallel port interface at the back. So my sample parallel port driver (that internally used 378 as port address )worked on some computers and not on others.
So if I write a “non-WDM” parallel port driver, do i need to have two versions of?.sys - one that uses port 3BC, and one that uses 378 ?
Also just changing the settings in the Resources tab of Hardware wizard for LPT1 does not help. Because in one case, even though I changes the I/O range manually from 3BC to 378,? the sample parallel port driver (that internally used port 3BC) worked smoothly. So as conclusion, I cannot write a driver that uses 378 port and ask the users to change the settings manually to 378.
How to handle this problem ? I think the port address should be standaridized right ?
Can someone please help me on this ?
Many thanks
Kiran


Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com To unsubscribe send a blank email to xxxxx@lists.osr.com

Unfortunately, I need to write a non-WDM driver only and cannot use the services of parport.sys either.

I think from BIOS area we can find out the address of the first parallel port. I am not sure if it is a correct way for a driver to read this in the driver start routine, and use the address accordingly.

I think there should a better elegant solution for this problem.

Thanks

Kiran

Doron Holan wrote:
Write a WDM / pnp based LPT port driver and all your problems will go away b/c the resources will be dynamically assigned to your driver during start device. Or better yet, leave the resource management to parport.sys and use the IOCTLs it supports to talk to the port.

d

________________________________________
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Kiran Bacche
Sent: Monday, August 29, 2005 11:33 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Regarding port setting for parallel port drivers

Hi,
The Resources Tab for LPT1 in device Manager shows that the I/O Addr Range is 3BC-3BE. On some other computers, it shows as 378-37F. Both the computers have just one parallel port interface at the back. So my sample parallel port driver (that internally used 378 as port address )worked on some computers and not on others.
So if I write a “non-WDM” parallel port driver, do i need to have two versions of .sys - one that uses port 3BC, and one that uses 378 ?
Also just changing the settings in the Resources tab of Hardware wizard for LPT1 does not help. Because in one case, even though I changes the I/O range manually from 3BC to 378, the sample parallel port driver (that internally used port 3BC) worked smoothly. So as conclusion, I cannot write a driver that uses 378 port and ask the users to change the settings manually to 378.
How to handle this problem ? I think the port address should be standaridized right ?
Can someone please help me on this ?
Many thanks
Kiran
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

---------------------------------
Start your day with Yahoo! - make it your home page

Why ever do this? Non-WDM hardware drivers are long ago obsolete, since 2000 at least. They, for instance, disable all power management on the machine.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: Kiran Bacche
To: Windows System Software Devs Interest List
Sent: Tuesday, August 30, 2005 10:33 AM
Subject: [ntdev] Regarding port setting for parallel port drivers

Hi,

The Resources Tab for LPT1 in device Manager shows that the I/O Addr Range is 3BC-3BE. On some other computers, it shows as 378-37F. Both the computers have just one parallel port interface at the back. So my sample parallel port driver (that internally used 378 as port address )worked on some computers and not on others.

So if I write a “non-WDM” parallel port driver, do i need to have two versions of .sys - one that uses port 3BC, and one that uses 378 ?

Also just changing the settings in the Resources tab of Hardware wizard for LPT1 does not help. Because in one case, even though I changes the I/O range manually from 3BC to 378, the sample parallel port driver (that internally used port 3BC) worked smoothly. So as conclusion, I cannot write a driver that uses 378 port and ask the users to change the settings manually to 378.

How to handle this problem ? I think the port address should be standaridized right ?

Can someone please help me on this ?

Many thanks

Kiran


Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 You are currently subscribed to ntdev as: xxxxx@storagecraft.com To unsubscribe send a blank email to xxxxx@lists.osr.com

>Unfortunately, I need to write a non-WDM driver only

Sorry, you must rework your product design, looks like it is broken.

Non-WDM hardware drivers in 2005 are by far obsolete.

The amount of support calls you will have from some non-trivial laptop owners
will be huge, so is the amount of calls about “why my computer ceased to
hibernate?”.

Non-WDM hardware driver cannot be implemented reliably on modern Windows and
modern hardware.

I think from BIOS area we can find out the address of the first parallel port.

Write a WDM driver, and ACPI will do this for you. No other standard ways, and
non-standard ways can differ a lot between, say, Dell and Asus laptops.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

Well the idea of non-WDM is to use the same .sys for both win98 and win2k.

So is it that there is no solution for the problem i am facing ? Some sort of hack or so ??

Thanks
Kiran

“Maxim S. Shatskih” wrote:
>Unfortunately, I need to write a non-WDM driver only

Sorry, you must rework your product design, looks like it is broken.

Non-WDM hardware drivers in 2005 are by far obsolete.

The amount of support calls you will have from some non-trivial laptop owners
will be huge, so is the amount of calls about “why my computer ceased to
hibernate?”.

Non-WDM hardware driver cannot be implemented reliably on modern Windows and
modern hardware.

>I think from BIOS area we can find out the address of the first parallel port.

Write a WDM driver, and ACPI will do this for you. No other standard ways, and
non-standard ways can differ a lot between, say, Dell and Asus laptops.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@yahoo.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Not possible. Win9x’s port model is 16 bit and VXD based. NT’s model is 32 bit and SYS based. You will need 2 drivers, it will make your life much much easier.

d


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Kiran Bacche
Sent: Tuesday, August 30, 2005 4:16 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Regarding port setting for parallel port drivers

Well the idea of non-WDM is to use the same .sys for both win98 and win2k.
?
So is it that there is no solution for the problem i am facing ? Some sort of hack or so ??
?
Thanks
Kiran

“Maxim S. Shatskih” wrote:
>Unfortunately, I need to write a non-WDM driver only

Sorry, you must rework your product design, looks like it is broken.

Non-WDM hardware drivers in 2005 are by far obsolete.

The amount of support calls you will have from some non-trivial laptop owners
will be huge, so is the amount of calls about “why my computer ceased to
hibernate?”.

Non-WDM hardware driver cannot be implemented reliably on modern Windows and
modern hardware.

>I think from BIOS area we can find out the address of the first parallel port.

Write a WDM driver, and ACPI will do this for you. No other standard ways, and
non-standard ways can differ a lot between, say, Dell and Asus laptops.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@yahoo.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com To unsubscribe send a blank email to xxxxx@lists.osr.com

So don’t write a WDM driver, but do write a PnP driver that properly acquires resources. A WDM driver would allow you, theoretically to be compatible with Win9X and ME, but if support for those older systems is not needed, then all you need to do is write a PnP driver. I see nothing you have said that says you cannot right a PnP driver and do things the proper way without a crappy hack that is unsafe across service packs, hotfixes or OS releases, and breaks power management.


The personal opinion of
Gary G. Little
“Kiran Bacche” wrote in message news:xxxxx@ntdev…
Hi,

The Resources Tab for LPT1 in device Manager shows that the I/O Addr Range is 3BC-3BE. On some other computers, it shows as 378-37F. Both the computers have just one parallel port interface at the back. So my sample parallel port driver (that internally used 378 as port address )worked on some computers and not on others.

So if I write a “non-WDM” parallel port driver, do i need to have two versions of .sys - one that uses port 3BC, and one that uses 378 ?

Also just changing the settings in the Resources tab of Hardware wizard for LPT1 does not help. Because in one case, even though I changes the I/O range manually from 3BC to 378, the sample parallel port driver (that internally used port 3BC) worked smoothly. So as conclusion, I cannot write a driver that uses 378 port and ask the users to change the settings manually to 378.

How to handle this problem ? I think the port address should be standaridized right ?

Can someone please help me on this ?

Many thanks

Kiran

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Kiran Bacche wrote:

Well the idea of non-WDM is to use the same .sys for both win98 and win2k.

So is it that there is no solution for the problem i am facing ? Some
sort of hack or so ??

You already described the hack: read the BIOS data area to find the I/O
address range of the parallel port. The address is settable in the BIOS
setup routine. However, even with this hack, things are complicated.
That will get you the I/O address of LPT1. Are you going to assume that
your device is always plugged into LPT1? An internal debug tool could do
that, but no publicly-released product could ever afford to do so.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Win98 is a WDM OS.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: Kiran Bacche
To: Windows System Software Devs Interest List
Sent: Tuesday, August 30, 2005 3:15 PM
Subject: Re: [ntdev] Regarding port setting for parallel port drivers

Well the idea of non-WDM is to use the same .sys for both win98 and win2k.

Ports (both COM and LPT) are not (and never were) WDM binary compatible across win9x and NT. Same for keyboard and mouse drivers.

d


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
Sent: Tuesday, August 30, 2005 1:03 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Regarding port setting for parallel port drivers

??? Win98 is a WDM OS.
?
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: Kiran Bacche
To: Windows System Software Devs Interest List
Sent: Tuesday, August 30, 2005 3:15 PM
Subject: Re: [ntdev] Regarding port setting for parallel port drivers

Well the idea of non-WDM is to use the same .sys for both win98 and win2k.
?


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Hi Tim,

I tried to read the register address from 0000:0408 memory address. But it always points to 0x03BC. Even if I change the port seeting for parallel port to 0x0378 in BIOS Setup, the memory address 0000:0408 points to the same port 0x03BC.

Is there a different place in BIOS to look at ?

Many Thanks
Kiran

Tim Roberts wrote:
Kiran Bacche wrote:

> Well the idea of non-WDM is to use the same .sys for both win98 and win2k.
>
> So is it that there is no solution for the problem i am facing ? Some
> sort of hack or so ??

You already described the hack: read the BIOS data area to find the I/O
address range of the parallel port. The address is settable in the BIOS
setup routine. However, even with this hack, things are complicated.
That will get you the I/O address of LPT1. Are you going to assume that
your device is always plugged into LPT1? An internal debug tool could do
that, but no publicly-released product could ever afford to do so.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@yahoo.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

---------------------------------
Start your day with Yahoo! - make it your home page

What is the task you want to achieve? Why not use the OS-provided parallel driver?

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: Kiran Bacche
To: Windows System Software Devs Interest List
Sent: Wednesday, August 31, 2005 10:02 AM
Subject: Re: [ntdev] Regarding port setting for parallel port drivers

Hi Tim,

I tried to read the register address from 0000:0408 memory address. But it always points to 0x03BC. Even if I change the port seeting for parallel port to 0x0378 in BIOS Setup, the memory address 0000:0408 points to the same port 0x03BC.

Is there a different place in BIOS to look at ?

Many Thanks
Kiran

Tim Roberts wrote:
Kiran Bacche wrote:

> Well the idea of non-WDM is to use the same .sys for both win98 and win2k.
>
> So is it that there is no solution for the problem i am facing ? Some
> sort of hack or so ??

You already described the hack: read the BIOS data area to find the I/O
address range of the parallel port. The address is settable in the BIOS
setup routine. However, even with this hack, things are complicated.
That will get you the I/O address of LPT1. Are you going to assume that
your device is always plugged into LPT1? An internal debug tool could do
that, but no publicly-released product could ever afford to do so.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@yahoo.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

------------------------------------------------------------------------------
Start your day with Yahoo! - make it your home page — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 You are currently subscribed to ntdev as: xxxxx@storagecraft.com To unsubscribe send a blank email to xxxxx@lists.osr.com

The device isn’t a typical parallel port device used for data communication.
I need my own proprietary interrupt handling routines and read routines.
So I have to write my own driver.

Please let me know if there are some ways to solve this problem without going in for WDM or PnP approach.

Many Thanks
Kiran

“Maxim S. Shatskih” wrote:
What is the task you want to achieve? Why not use the OS-provided parallel driver?

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: Kiran Bacche
To: Windows System Software Devs Interest List
Sent: Wednesday, August 31, 2005 10:02 AM
Subject: Re: [ntdev] Regarding port setting for parallel port drivers

Hi Tim,

I tried to read the register address from 0000:0408 memory address. But it always points to 0x03BC. Even if I change the port seeting for parallel port to 0x0378 in BIOS Setup, the memory address 0000:0408 points to the same port 0x03BC.

Is there a different place in BIOS to look at ?

Many Thanks
Kiran

Tim Roberts wrote:
Kiran Bacche wrote:

> Well the idea of non-WDM is to use the same .sys for both win98 and win2k.
>
> So is it that there is no solution for the problem i am facing ? Some
> sort of hack or so ??

You already described the hack: read the BIOS data area to find the I/O
address range of the parallel port. The address is settable in the BIOS
setup routine. However, even with this hack, things are complicated.
That will get you the I/O address of LPT1. Are you going to assume that
your device is always plugged into LPT1? An internal debug tool could do
that, but no publicly-released product could ever afford to do so.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@yahoo.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

---------------------------------
Start your day with Yahoo! - make it your home page — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 You are currently subscribed to ntdev as: xxxxx@storagecraft.com To unsubscribe send a blank email to xxxxx@lists.osr.com

Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

---------------------------------
Start your day with Yahoo! - make it your home page

Use WDM. This is the answer.

Since your device is a not a “parallel port” for Windows, you do not need to use the ports subsystem of Win9x, and so can use WDM on Win9x too.

Forget about non-WDM hardware drivers. Just forget it, this is not a way.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: Kiran Bacche
To: Windows System Software Devs Interest List
Sent: Wednesday, August 31, 2005 4:02 PM
Subject: Re: [ntdev] Regarding port setting for parallel port drivers

The device isn’t a typical parallel port device used for data communication.
I need my own proprietary interrupt handling routines and read routines.
So I have to write my own driver.

Please let me know if there are some ways to solve this problem without going in for WDM or PnP approach.

Many Thanks
Kiran

“Maxim S. Shatskih” wrote:
What is the task you want to achieve? Why not use the OS-provided parallel driver?

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: Kiran Bacche
To: Windows System Software Devs Interest List
Sent: Wednesday, August 31, 2005 10:02 AM
Subject: Re: [ntdev] Regarding port setting for parallel port drivers

Hi Tim,

I tried to read the register address from 0000:0408 memory address. But it always points to 0x03BC. Even if I change the port seeting for parallel port to 0x0378 in BIOS Setup, the memory address 0000:0408 points to the same port 0x03BC.

Is there a different place in BIOS to look at ?

Many Thanks
Kiran

Tim Roberts wrote:
Kiran Bacche wrote:

> Well the idea of non-WDM is to use the same .sys for both win98 and win2k.
>
> So is it that there is no solution for the problem i am facing ? Some
> sort of hack or so ??

You already described the hack: read the BIOS data area to find the I/O
address range of the parallel port. The address is settable in the BIOS
setup routine. However, even with this hack, things are complicated.
That will get you the I/O address of LPT1. Are you going to assume that
your device is always plugged into LPT1? An internal debug tool could do
that, but no publicly-released product could ever afford to do so.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@yahoo.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

--------------------------------------------------------------------------
Start your day with Yahoo! - make it your home page — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 You are currently subscribed to ntdev as: xxxxx@storagecraft.com To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

------------------------------------------------------------------------------
Start your day with Yahoo! - make it your home page — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 You are currently subscribed to ntdev as: xxxxx@storagecraft.com To unsubscribe send a blank email to xxxxx@lists.osr.com

Kiran Bacche wrote:

Hi Tim,

I tried to read the register address from 0000:0408 memory address.
But it always points to 0x03BC. Even if I change the port seeting for
parallel port to 0x0378 in BIOS Setup, the memory address 0000:0408
points to the same port 0x03BC.

Is there a different place in BIOS to look at ?

No, that’s the spot. If you change the port number for LPT1, then 40:8
should change. That’s what it’s for. What about 40:A and 40:C? Do
they always contain 378 and 278?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Yes.

C:\Documents and Settings\Administrator>debug
-d 0000:0408
0000:0400 BC 03 78 03 78 02 C0 9F

Thanks

Kiran

Tim Roberts wrote:
Kiran Bacche wrote:

> Hi Tim,
>
> I tried to read the register address from 0000:0408 memory address.
> But it always points to 0x03BC. Even if I change the port seeting for
> parallel port to 0x0378 in BIOS Setup, the memory address 0000:0408
> points to the same port 0x03BC.
>
> Is there a different place in BIOS to look at ?

No, that’s the spot. If you change the port number for LPT1, then 40:8
should change. That’s what it’s for. What about 40:A and 40:C? Do
they always contain 378 and 278?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@yahoo.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com