Parallel Port not working; are interrupts functional?

Discussions about using Windows guests in VirtualBox.
Post Reply
jmb
Posts: 2
Joined: 20. Sep 2012, 15:41

Parallel Port not working; are interrupts functional?

Post by jmb »

Hi,

I am using a Windows XP host and Windows XP guest, with VirtualBox 4.2 r80737. I'm trying to get the parallel port to work with a dongle that is used to control an industrial machine. I have been unsuccessful so far, and I suspect the problem is related to the requirement for hardware interrupts to be passed to the virtual machine. Does VirtualBox properly pass hardware interrupts in version 4.2? I know VMware does not, so I figure there must be a good reason why. Can anyone enlighten me?

Other Things, Possibly Unrelated

1. In Device Manager, the parallel port lists both I/O ranges 0x378-0x37F and 0x778-0x77F, which is not correct. The base address should only be 0x378. My machine definition has this entry (which I set with VBoxManage.exe):

Code: Select all

<LPT>
  <Port slot="0" enabled="true" IOBase="0x378" IRQ="7" path="LPT1"/>
  <Port slot="1" enabled="false" IOBase="0x378" IRQ="7"/>
</LPT>
Everything else is correctly configured (IRQ, etc).

2. I also installed VirtualPC with the same setup. I could not get it to work either. However, if I run the equipment diagnostic software on both the Host (where it always works) and the Guest (where I want it to work), the Guest will cause the Host diagnostic software to fail. Which probably means that in VirtualPC, some data is getting through to the physical parallel port. I can't think of any other reason the Host software would be affected. In VirtualBox, the guest software does not affect the host.

3. The parallel port must (for my application) be configured as follows: In Device Manager, under Printer Port Properties, the Port Settings tab needs to show "Use any interrupt assigned to the port" and "Enable legacy Plug and Play detection" should be checked.

4. In the BIOS, I have the parallel port mode set to EPP. I also tried "EPP+ECP", but neither has worked. Theoretically, this application does not require anything specific.

Thanks for your ideas!
jmb
Posts: 2
Joined: 20. Sep 2012, 15:41

Re: Parallel Port not working; are interrupts functional?

Post by jmb »

I'm going a bit nuclear on this.

I downloaded the source code and looked at how the parallel port was being accessed. Seems that on Linux hosts, VB opens a thread that polls the interrupt. But not on Windows; Windows seems only to allow reads and writes without an interrupt. So that explains why my code isn't working properly.

But that doesn't explain why. Why is the Windows code written without a interrupt polling thread, like Linux? The best I can come up with, is the Windows code is just new, and a VB parallel port driver would have to be written to get at the real hardware. Maybe it's possible, but isn't easy?

Are there any developers out there (Alexander Eichner!) that can answer this?
Post Reply