I have also polished the "showport" utility created by Kirk Wallace.
Now one can set and read all 8 parallel port modes from on-board and PCI/PCIe cards.
Instead of showing only the numeric (decimal) value of each register, now it shows the mode name and respective binary value.
Command line is back compatible with original version, but now it is also possible to reference the modes by index.
Compile "sudo gcc -O2 -o showport showport.c"run with "sudo ./showport (base1) (extended1) (mode) (base2) (extended2) (mode) ...
For example - "sudo ./showport 21D0 21C8 1 21C0 21B8 4"
Modes Indexes:
0 = Standard Mode
1 = PS/2 Mode
2 = Parallel Port FIFO Mode
3 = ECP FIFO Mode
4 = EPP Mode
5 = Reserved
6 = FIFO Test Mode
7 = Configuration Mode
s = PS/2 Mode
e = EPP Mode
n = No change
For terminology reference:
wearcam.org/seatsale/programs/www.beyondlogic.org/ecp/ecp.htm
It is not always like this, but for a Sunix SUN2212 these are the addresses I've got. You have to search for two 8 byte addresses.