[HOWTO] - Willem PCB6.0E LPT EPROM Programmer

Share your own howto's etc. Not for support questions!

[HOWTO] - Willem PCB6.0E LPT EPROM Programmer

Postby lkraemer » 2017-11-13 22:47

This HOWTO: will explain how to Install a SYBA PCI NM9805CV Parallel Port, it's Software, and the Willem PCB6.0E Software for Debian 8.x (32 Bit)

The PCI SYBA Parallel Port Card Information:
1. IEEE1284 Compatible Parallel Port
2. Supports SPP, PS2, EPP, and ECP Modes
3. Fast data rate up to 1.5M Bytes/sec
4. Onchip 16-byte FIFO
5. Drivers included for DOS, Windows, and supports Linux.
6. The address for the Parallel port DOES NOT support Legacy Address's of 0x378, 0x278, 0x3BC

1. The Version 6.0E Programmer can be powered by a USB Port (Cable) OR a 5.5mm x 2.5mm Coaxial Barrel Connector.
The Center Pin is the POSITIVE Terminal. Do not use both to power the Programmer.
2. If your Computer requires a Legacy Parallel Port locate a Sunix PAR5008R PCI Card
that allows you to strap the proper Legacy address on the card.

PART 1: - Preparing Debian for Hardware & Windows Software

Typically you need to install build-essential, and the headers for the kernel you are running.
Check what Version of Debian you are running with these commands:
Code: Select all
cat /etc/issue
cat /etc/debian_version
cat /etc/os-release
lsb_release -da

Debian (Ver 8.x - 32 Bit) Packages needed for any Software Compile:
1. Build-Essential
2. Linux Debian 8.x - 3.16.0-4-686-pae Headers (or the Headers for your current Version)
Code: Select all
uname -r

will tell you the kernel you are currently running.
Code: Select all
sudo apt-get install build-essential linux-headers-$(uname -r)

will install the software needed to successfully compile your code.

We will be using the 32 Bit version of Wine to run the (Windows Version) WILLEM PCB6.0E LPT version software, so Wine will also need to be installed.
We will also be building some software with winegcc, so the proper version of winegcc will be required. It is located in some development package. But,
how do we locate what exact package it is in? We can use the following URL to search for the package since we know the parameters of the search
which are: (Jessie (8.x), 32 Bit (i386), package contents (winegcc)).

which gives the following package information:

the proper package to install is: wine32-development-tools

Code: Select all
sudo apt-get install wine wine32-development-tools

Then run winecfg to let it set up the required files and configuration.
Code: Select all

While you are in winecfg, click on the ADD APPLICATIONS, and use the proper path to locate pcb60lpt.exe. Click on pcb60lpt.exe
and set it for Windows 98 version. Then click on "OK" to EXIT winecfg without installing Mono or winetricks, or any other additional
software. Then update the system database. (or you can logout, reboot, and log back in)
Code: Select all
sudo updatedb

winegcc should now be installed, but since it's not in your path you can't locate it to execute it. Try typing winegcc in a Terminal window
and see if it executes. If it doesn't, then edit your path to add the path to winegcc. To find where winegcc is located do the following
in a Terminal window as su- or root.
Code: Select all
#cd /
#find . -iname 'winegcc'

It should be found in some subdirectory. Mine was:

You will be adding this to the path a bit later.

You will be using the Parallel Port so you must have the correct Permissions to use the Port or become Superuser (root) to use lp.

Check what groups you have as a logged in Linux user:
Code: Select all
groups <user>

In my case, I'm in the lp group, as shown here: (Debian has root & lp with rw permissions)
Code: Select all
groups larry

larry : larry dialout cdrom floppy sudo audio dip video plugdev netdev scanner bluetooth lp lpadmin vboxusers

If you are not a member of the group lp, then add yourself to the group. Also add yourself to group sudo.
Code: Select all
adduser <user-name> lp
adduser <user-name> sudo

In my case it would be:
Code: Select all
adduser larry lp
adduser larry sudo

The next step you need to do is to find the "SHELL" and "env" you are using, and how many shells are installed and available.

1. env -- Display the current environment, find what Shell is being used with the following command.....
Code: Select all
env | grep SHELL=

To get a list of available shells on your system, look in the /etc/shells file. This will list the available shells with their complete
path names. You can see the list of available shells by running:
Code: Select all
cat /etc/shells

Additional shells may be available in your distribution's software repositories. Performing a search for the term "shell" in your
package manager should provide you with a list of alternative command line shells.

If you want to experiment with a shell, just for now, you can launch a shell from within the existing shell. For example, if you
ant to run the tcsh shell, you can run:
Code: Select all

When you are finished exploring tcsh you can type exit to return to the default shell. Once you have found a shell you want to continue using
you can switch to the default shell by running the chsh command. For example, if you want to switch to using the tcsh shell, you can run
Code: Select all
chsh -s /usr/bin/tcsh

Please note that you must provided the full directory path to the new shell.

2. locate .*rc -- Find the current logged in user's home shell Configuration file (*rc)... use:
Code: Select all
locate .*rc

Bourne shell (sh)
Almquist shell (ash)
Bourne-Again shell (bash)
Debian Almquist shell (dash)
Korn shell (ksh)
Z shell (zsh)
C shell (csh)
TENEX C shell (tcsh)
other shells..............

There may be a .bash_profile file in /home/loginuser along with .bashrc file. You can put configurations in either file,
and you can create either if it doesn’t exist. But, why two different files? What is the difference?

According to the bash man page, .bash_profile is executed for login shells, while .bashrc is executed for interactive non-login shells.

If .bash_profile exists in /home/user with the following information already inserted:
Code: Select all
export PATH

just append your path modifications here instead of the .bashrc file. (ie. CentOS 6)

You need to list the *rc file to verify the contents and set the PATHS. I'm ASSUMING a Bash shell......Your may be different!

3. cat .bashrc -- List the configuration file, then append the proper search paths for the users shell with edit.
Code: Select all
export LD_LIBRARY_PATH=????????????????????????????????
export LIBRARY_PATH=???????????????????????????????????
export C_INCLUDE_PATH=?????????????????????????????????
export CPATH=??????????????????????????????????????????

Mine happens to now be:
Code: Select all
export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib
export LIBRARY_PATH=/usr/lib:/usr/local/lib:/usr/local/lib64
export C_INCLUDE_PATH=./:/usr/include:/usr/local/include
export CPATH=./:/usr/include:/usr/local/include:/usr/include/i386-linux-gnu
export PATH=./:/usr/lib/i386-linux-gnu/wine-development:${PATH}

But, your's may vary accordingly. You won't be able to cut & paste mine, unless your system is built exactly like mine. It's up to you to locate
exactly where all the libs and includes are located. That is what all the previous commands should have helped you do. Just because you have
/usr/lib & /usr/local/lib included....doesn't mean your needed lib is in that path.

That is where your detective work comes to play. SEARCH and use grep to locate the libs.

Add the path by editing the .bashrc file to add /usr/lib/i386-linux-gnu/wine-development as a path.
Now, try the winegcc command in a Terminal window:
Code: Select all

gcc: fatal error: no input files
compilation terminated.
winegcc: gcc failed

Telling you winegcc executed, but had no file to compile. It's now in your path, and functional.

Once you have the env set either reboot or reset the env. Once again, your system command for this can/may be different.

4. source .bashrc -- Reset the environment to what we need for Compiles, assuming the SHELL is bash. This may not be available on your system.....
Code: Select all
source .bashrc

PART 2: - Installing the SYBA PCI Parallel Port Card and copying the 32 Bit software to Linux

Install the SYBA PCI Parallel Port Card in a slot where no Capacitors are sticking up in the way, preventing the card from being installed.
I had to look over three PCI slots to locate one with enough clearance to allow the PCI card to fully seat in the PCI Connector. This PCI
Parallel Port card DOES NOT have typical Legacy Parallel Port. LPT1: is typically at 0x378 with LPT2: at 0x278. This card has the
Ports in the 0x9400 range. We will be locating that information a bit later as we probe the PCI card.

The Documentation in the SYBA box states, "Please refer to installation document on the CD for installing these Operating systems."

Download the DLL source code that will be used to monitor reads and writes to 0x378, and sending those to the new PCI Parallel Port location:


Extract the files. If your parallel port is at an address other than 0x378, edit the io_main.c and update the LPT_BASE_ADDR define near the top
of the code to match your parallel port address. Now, try the make command from the subdirectory containing the source code:
Code: Select all
cd /path/to/your/source/code

winegcc -c -mno-cygwin -m32 -I. -D__WINESRC__ -o io_main.o io_main.c
In file included from io_main.c:18:0:
io_dll.h:13:24: fatal error: wine/debug.h: No such file or directory
#include "wine/debug.h"
compilation terminated.
winegcc: gcc failed
Makefile:87: recipe for target 'io_main.o' failed

I searched for debug.h from the root directory. It was found at: /usr/include/wine-development/debug.h
I just needed to add this path to the .bashrc file, or add it to the two source files: (I used the latter)

In both files, I changed #include "wine/debug.h" to:
#include "/usr/include/wine-development/debug.h"

and it built properly.
Code: Select all

winegcc -c -mno-cygwin -m32 -I. -D__WINESRC__ -o io_main.o io_main.c
winegcc -shared io.spec -mno-cygwin -m32 -o io.dll.so io_main.o -lodbc32 -lole32 -loleaut32 -lwinspool -lodbccp32 -luuid

Install the DLL:
Now, we’re going to put the io.dll.so file in a place where Wine can find it, and change the permissions of io.dll.so to 774.
User and Group have READ, WRITE, and EXECUTE Permissions and Other has READ ONLY.
Code: Select all
sudo cp io.dll.so /usr/lib/i386-linux-gnu/wine/wine/
cd /usr/lib/i386-linux-gnu/wine/wine/
sudo chmod 774 io.dll.so

Check to see if the permissions are correct:
Code: Select all
ls -alt io.dll.so

-rwxrwxr-- 1 root root 77448 Oct 25 20:43 io.dll.so

Execute the software with the wine command:
Code: Select all
cd ~
cd ~/Downloads/Willem-Programmer/ver6/PCB6.0LPTsoftware/
larry@debian:~/Downloads/Willem-Programmer/ver6/PCB6.0LPTsoftware$ wine pcb60lpt.exe

ioperm: Success

The Willem PCB6.0E LPT software Executes properly and looks correct, but I was fooled by the message. It's really two messages
the first being ioperm, meaning "IO PERMISSIONS PROBLEM", then the second message stating "Success" for something.
Exit the software, and and continue to VERIFY the Parallel Printer Port.

PART 3: - Parallel Port Setup and Verification

Make sure that the KEE Willem PCB6.0E LPT EPROM Programmer is connected to your systems Parallel Port, and powered on.
I used the USB cable for power, but later plan on using a separate LAB Power Supply with a Barrel connector. Follow the guide
that is on the CDR that came with the SYBA PCI Parallel Port.

Installation Guide for SYBA PCI Parallel Ports on Linux.

This installation guide describes the procedure to install the Nm9705CV, Nm9735CV, Nm9805CV, Nm9715CV, Nm9835CV,
Nm9755CV PCI parallel ports in a Linux platform.

Linux kernel provides a 'parport' code to support the parallel port (/dev/lp0, /dev/lp1, /dev/lp2). This code provides
the ability to share one port between multiple devices. And it is loadable when kernel is running.

The 'parport' code is split into two parts : generic (which deals with port sharing) and architecture-dependent
eg. X86, SPARC. (which deals with actually using the port). Thus, please take the following steps to install 'parport' module!

Check the on-board parallel port's hardware resources. Most likely each motherboard has a built-in parallel port, and its hardware
resources are settable with BIOS utility.

Enter the commands more /proc/pci, more /proc/bus/pci/devices, cat /proc/bus/pci/devices or lspci -v to get information on the
PCI Parallel Port Card. (Some commands are not correct for Debian 8.x)

The response is similar to the following

Bus 0, Device 11, function 0:
Serial controller : Unknown vendor Unknown device (rev 01).
Vendor id=9710, Device id=9705
Device id=9735
Device id=9805
Device id=9815
Device id=9835
Device id=9855

Medium devsel. Fast back-to-back capable. IRQ 11

Board with Nm9705CV part
I/O at 0xc000 [0xc001] printer port
0xc008 [0xc009] ECP/EPP config registers

Board with Nm9735CV part
I/O at 0xc000 [0xc001] not used
0xc008 [0xc009] not used
0xc010 [0xc011] printer port
0xc018 [0xc019] ECP/EPP config registers

Board with Nm9805CV part
I/O at 0xc000 [0xc001] printer port
I/O at 0xc400 [0xc401] ECP/EPP config registers
I/O at 0xc800 [0xc801] not used
I/O at 0xd000 [0xd001] not used
I/O at 0xd400 [0xd401] not used
I/O at 0xd800 [0xd801] not used

Board with Nm9715CV part
I/O at 0xc000 [0xc001] printer port 1
I/O at 0xc400 [0xc401] ECP/EPP config registers 1
I/O at 0xc800 [0xc801] printer port 2
I/O at 0xd000 [0xd001] ECP/EPP config registers 2
I/O at 0xd400 [0xd401] not used
I/O at 0xd800 [0xd801] not used

Board with Nm9835CV part
I/O at 0xc000 [0xc001] not used
I/O at 0xc400 [0xc401] not used
I/O at 0xc800 [0xc801] printer port
I/O at 0xd000 [0xd001] ECP/EPP config registers
I/O at 0xd400 [0xd401] not used
I/O at 0xd800 [0xd801] not used

Board with Nm9755CV part
I/O at 0xc000 [0xc001] printer port 1
I/O at 0xc400 [0xc401] ECP/EPP config registers 1
I/O at 0xc800 [0xc801] printer port 2
I/O at 0xd000 [0xd001] ECP/EPP config registers 2
I/O at 0xd400 [0xd401] not used
I/O at 0xd800 [0xd801] not used

Remove any existing parallel port configurations:
# rmmod lp
# rmmod ppdev
# rmmod parport_serial
# rmmod parport_pc
# rmmod parport

Install 'parport' module

To locate the generic 'parport' code, Open a Terminal window as root:
Code: Select all
$su -

Code: Select all
#cd /
#find . -iname 'parport.o'

Code: Select all
#find . -iname 'parport.ko'
#uname -r

3.16.0-4-686-pae = uname -r

It's located at:

Code: Select all
#cd /
#cd /lib/modules/3.16.0-4-686-pae/kernel/drivers/parport/
#insmod parport.ko

To load the architecture-dependent code to tell 'parport' code
Code: Select all
#find . -iname 'parport_pc.ko'


Code: Select all
#cd /
#cd /lib/modules/3.16.0-4-686-pae/kernel/drivers/parport/
#insmod parport_pc.ko io=0x9400 irq=17

Code: Select all
#insmod parport_pc.o  io=0x378,0xC000,0xC800 irq=7,11,none

You will have three PC-style ports, one at 0x378 with IRQ 7, one at 0xC000 with IRQ11, one at 0xC800 with no IRQ.

Code: Select all
#ls -alt /dev/lp* /dev/parp*

crw-rw---- 1 root lp 6, 0 Nov 2 05:23 /dev/lp0
crw-rw-r-- 1 root lp 99, 0 Nov 2 05:22 /dev/parport0

/dev/lp0, /dev/parport0 are ready for service

PART 4: - Final Software tweeks, and Execution!

Check if the kernel detected the parallel port during bootup:
Code: Select all
dmesg | grep par
sudo lpinfo -v
sudo lsmod
lspci -v
lspci -vv

[ 0.000000] Booting paravirtualized kernel on bare hardware
[ 0.016153] AppArmor: AppArmor disabled by boot time parameter
[ 3.274862] PM: Hibernation image partition 8:4 present
[ 7.197966] ppdev: user-space parallel port driver
[ 9.767198] parport0: PC-style at 0x9400, irq 17 [PCSPP,TRISTATE,EPP]
[ 9.856176] lp0: using parport0 (interrupt-driven).
[ 9.856186] parport_serial 0000:04:09.0: 0000:04:09.0: unknown NetMos/Mostech device
[ 361.555942] parport1: PC-style at 0x9400, irq 17 [PCSPP,TRISTATE,EPP]
[ 361.652987] lp1: using parport1 (interrupt-driven).
[ 547.632709] parport0: PC-style at 0x9400, irq 17 [PCSPP,TRISTATE,EPP]
[ 547.636031] ppdev: user-space parallel port driver
[ 563.354304] lp0: using parport0 (interrupt-driven).

network socket
network ipp14
network http
network lpd
network ipp
network ipps
network https
direct usb://Brother/HL-2140%20series?serial=M9J181811
serial serial:/dev/ttyS0?baud=115200
direct hp
direct parallel:/dev/lp0
direct hpfax

Module Size Used by
lp 12766 0
ppdev 16686 0
parport_pc 26004 1
parport 35213 3 lp,ppdev,parport_pc

04:09.0 Communication controller: MosChip Semiconductor Technology Ltd. PCI 9835 Multi-I/O Controller (rev 01)
Subsystem: LSI Logic / Symbios Logic Device 0010
Flags: medium devsel, IRQ 17
I/O ports at 9c00 [size=8]
I/O ports at 9800 [size=8]
I/O ports at 9400 [size=8]
I/O ports at 9000 [size=8]
I/O ports at 8c00 [size=8]
I/O ports at 8800 [size=16]

04:09.0 Communication controller: MosChip Semiconductor Technology Ltd. PCI 9835 Multi-I/O Controller (rev 01)
Subsystem: LSI Logic / Symbios Logic Device 0010
Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Interrupt: pin A routed to IRQ 17
Region 0: I/O ports at 9c00 [size=8]
Region 1: I/O ports at 9800 [size=8]
Region 2: I/O ports at 9400 [size=8]
Region 3: I/O ports at 9000 [size=8]
Region 4: I/O ports at 8c00 [size=8]
Region 5: I/O ports at 8800 [size=16]

Check what Modules should be added, to be loaded on startup:
Code: Select all
cat /etc/modules

# /etc/modules: kernel modules to load at boot time.
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
/lib/modules/3.16.0-4-686-pae/kernel/drivers/parport/parport_pc.ko io=0x9400 irq=17

also check if the LPT port was setup properly during bootup.
Code: Select all
lsmod | grep lp
lsmod | grep ppdev
lsmod | grep parport
lsmod | grep parport_serial
lsmod | grep parport_pc

lp 12766 0
ppdev 16686 0
parport 35213 3 lp,ppdev,parport_pc
parport_pc 26004 2
parport 35213 3 lp,ppdev,parport_pc

ls -alt /dev/lp0
crw-rw---- 1 root lp 6, 0 Nov 2 05:23 /dev/lp0

ls -alt /dev/parport0
crw-rw-r-- 1 root lp 99, 0 Nov 2 05:22 /dev/parport0


Code: Select all
cd /usr/lib/i386-linux-gnu/wine/wine
sudo setcap cap_sys_rawio+ep /usr/lib/i386-linux-gnu/wine/wine/io.dll.so
sudo getcap io.dll.so

io.dll.so = cap_sys_rawio+ep


Code: Select all
cd ~/Downloads/Willem-Programmer/ver6/PCB6.0LPTsoftware/
sudo setcap cap_sys_rawio+ep ~/Downloads/Willem-Programmer/ver6/PCB6.0LPTsoftware/pcb60lpt.exe
sudo getcap pcb60lpt.exe

pcb60lpt.exe = cap_sys_rawio+ep

You should be ready to execute the programming software. But, to get it to run correctly it MUST BE run as sudo.
I know this is a problem, but I've not found a way to get around it, except for using a Legacy Parallel Port. It is
because ioperm(), located in io.dll.so, must be executed as root. I haven't found a way to elevate the user
privileges with a .dll.so file.

Code: Select all
sudo wine pcb60lpt.exe

NOTE: If you download the software or copy the tutorial, make sure you check back for the next several weeks for updates.
I'll go through a complete install on a clean Dell Box, with Debian ?.? (32 Bit) and see if it the tutorial is 100% correct.
If you're working on 64 Bit, there may be some problems, I'm not familiar with 64 Bit installs. Nov 21 2017


Posts: 171
Joined: 2011-02-09 05:02

Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 3 guests