[visionegg] Re: parallel code update: works fine...but

Hi,

Regarding the problem Christoph had with a parallel port at a "non
standard" addess, the following info (extracted from
http://www.lvr.com/files/ibmlpt.txt) can be useful:

3. Addresses, naming, BIOS and DOS

IBM defined three standard port base addresses (in 80x86 IO address
space). The Printer Adaptor could use base address 0x378, or later 0x278,
while the Monochrome Display and Printer Adaptor used base address 0x3BC.

The IBM BIOS defines RAM space for 4 parallel printer port base addresses,
stored as 4 16 bit words starting at main memory address 0x408.  During
bootup, the BIOS will check for parallel printer ports at base addresses
0x3BC, 0x378, and 0x278, in order, and store the base addresses of any
that are found in consecutive locations in this table.  Unused entries
may be 0, or some BIOSes fill them with the first port address found.
Some software may ignore this table, but it is used by at least the BIOS
itself (eg: INT 17, Printer I/O), and by DOS, as described below.

The BIOS detects these ports by writing 0xAA to the Data Out register (at
I/O address Base+0), reading the Data Feedback register (same address),
and deciding there is a port installed if it reads 0xAA.  This could be
confused if any lines are externally pulled up or down (or if the port
defaulted to tristate, or if there is another readback device register at that
address).



-------------

So if VisionEgg could read the content of memory at 0x408,
it could find the addresses of the parallel port(s).

I do not know if it is possible for a user process to read
at an absolute address in real memory (?)

Another possibility is to let the user specify the address.


Christophe Pallier



======================================
The Vision Egg mailing list
Archives: http://www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html

Other related posts: