Like all good retro enthusiasts I have some old Windows Laptop/Desktop that runs some ancient Windows program(s) that use a parallel port. In my case I have an old Thinkpad T42 running Windows XP. It has a parallel port and I have an old Willem EPROM/Flash/Whatever programmer that uses a parallel port. I am not even sure which PCB version it is. I just know v0.97j of the software works with it. I also occasionally use the atfblast software for programming GALs (though there is a really nice looking Arduino alternative these days). As this laptop gets older, I was looking at some more modern alternative that would work without having to use Windows.
I have some more modern desktop systems and their motherboards have a 26 pin parallel port connector, so with the requisite connector and DB25 I have a parallel port on these ones. They run linux (Fedora) and the idea was to see if I could get WINE to run the Willem software. There are a few guides on the net about how to do this, but all the guides are really old now. I tried most of them and had lots of trouble, so here is ‘what worked for me in 2023’
- My starting point was Fedora 36 (which is only 64 bit I think) on a modern-ish system
- I can’t remember how I installed wine (probably ‘sudo dnf install wine’). That gives me wine 7.22 according to the rpm list.
- Do something like this to create a 32 bit WINE directory in your home dir (ie. this will be a completely seperate WINE setup to anything else you might be using).
WINEARCH=win32 WINEPREFIX=~/.wine-32bit winecfg
In winecfg make sure to change the Windows type to ‘Windows 95’ (or 98).
- In my case I had to get the 0.97j version of the Willem software (you might need to hunt around the wayback machine to find it). Mine is called ‘setup97j.exe’.
- If the setup exe is in your ~/Downloads dir then:
WINEPREFIX=~/.wine-32bit wine ~/Downloads/setup97j.exe
Follow the prompts and get it installed. You should end up with this directory
- Now, I looked at lots of references online that included regedit’s and setcap and compiling DLLs and I could not get any of it to work. What worked for me was to build a small wrapper program called wineio. It essentially does some ioperm stuff as root to allow access to the IO ports used by the base 0x378 parallel port, then calls wine. So it’s a ‘wine wrapper’ so to speak. It is very tiny, and is shown in this wine mailing list thread . You just need to cut out the C code between the ==== signs and save it as wineio.c and then
gcc -o wineio wineio.c
- Now you need to move wineio to somewhere in your user’s PATH. I’ll choose ~/bin in the following example. We’re going to make the binary setuid which is often not great from a security perspective, so if you are super paranoid, just remember to sudo chmod the file after you run the Willem software to turn off setuid.
mv wineio ~/bin cd ~/bin sudo chown root wineio sudo chmod 4750 wineio
- Now shut down the computer, plug in the Willem, attach power to the Willem, power up the computer.
- I’ll make an assumption that the linux parport driver auto loaded and you have a /dev/parport0 (I am also assuming in this whole page that you are using a builtin parallel port and not an extra card. ie. You are using 0x378 as your parallel port).
- Under Windows XP, when I power up the T42 the red LED on the Willem will stay on until you first start the Willem EPROM3 program. ie. that’s a good test to confirm that there is at least some communication between the computer and the Willem programmer.So now run the EPROM3 program under wineio
wineio C:\\Program\ Files\\EPROM3\\EpromM51.exe
If all goes to plan the red LED goes out. If you have an old EPROM handy you can try putting that in and reading it as a simple test.
So this all works for me. I also tried the atfblast software as well and it works fine too. I am using the version that uses inpout32.dll.