HP-IL ISA Card + EMU41 + Linux! Message #1 Posted by Howard Owen on 25 June 2005, 5:03 p.m.
It works! It works!
I purchased one of Cristoph's HPIL/PC boards because I wanted to transfer programs to my HP-41CX. I also wanted to look at the possibility of writing a Linux driver for the card, since DOS is not my favorite program loader.
I purchased an old Compaq P5 desktop, loaded it up with RAM, and stuck FreeDOS on one partition, and Slackware 10.1 on the rest of the 600MB disk. After confirming that the HP-IL card worked under native FreeDOS, I loaded the DOSEMU virtual machine on Slack. I already knew that EMU41 would run under DOSEMU (and FreeDOS) but the question remained: would it work with DOSEMU's primitive I/O port access? This just allocates a range of addresses and hands them to the virtual machine. I wasn't sure how many addresses to give DOSEMU, although I knew they would start at the base address of the ISA card, 0x700. The HP-IL chip docs said their were 8 8bit registers, but since I didn't know how they were mapped into the PC's memory (1 for 1?) I allocated 17 8bit addresses, 0x700 - 0x710 for the card in ~/.dosemurc. I also passed on IRQ 7 to the virtual machine. (Before doing this, I confirmed that neither the addresses, nor the IRQ were allocated in Linux.)
I connected my 41CX to the PC via the HP-IL, and fired up DOSEMU. I had the FreeDOS partition mounted at /dos, and mapped from autoexec.bat to drive E:. I changed to E:\EMU41 and fired up my (HP-IL enhanced copy of) EMU41. I turned on my 41CX, and saw the listing for Cristoph's HDRIVE1.DAT! I confirmed that I could transfer files between the PC and the 41CX.
So now I'm ready to start looking at a Linux driver for the card. I can use the debug facilities in DOSEMU to snoop on the communication between EMU41 and the real part of the loop through the card. Together with the copius docs from HP and others available for the chip and for the HP-IL protocol, that should help me write the Linux driver. I've never written one before, so this will be a fun challenge in itself. I'm already deeply into Linux Device Drivers, both the 2nd edition, covering 2.4 and the third edition, covering 2.6. Since Slack 10.1 runs 2.4.27, I'll probably start with that version.
I'll be adding a more extensive writeup to the articles area, but I wanted to report this success here, and engage discussion with all of you about the upcoming work.
Edited: 25 June 2005, 10:49 p.m. after one or more responses were posted
|