The Museum of HP Calculators

HP Forum Archive 19

[ Return to Index | Top of Index ]

HP-IL I/F Card on a New(er) PC - Part III
Message #1 Posted by Gerry Schultz on 12 July 2009, 9:24 p.m.

Hello All:

Last week I posted that putting the HP-IL I/F card in 2.66 GHz P4 D845GECL MB PC hangs up during the boot process. I started a new post as last week's entries are pretty far down the page. Earlier this week I cut the IRQ 7 strap on the card and it booted into XP!

I've got EMU41 version 2.40 up and running in a DOS window. I've set up the emu41.ini set up as follows:

[Modules] 0 12 rom41cx.bin 3 4 cxfcn2d.bin 5 8 cxtime2c.bin 6 4 prter1e.bin 7 4 hpil1h.bin

8 12 adv41b.bin 10 4 xiola.bin

[Devices] DISPLAY HDRIVE1 LPRTER1 DOSLINK XIL 300

The 82973A I/F card is set to 300 (revision A) as explained by HP's documentation. I have my 9114B connected to the I/F card with a formatted floppy in it and has a one program stored on the floppy. The directory with EMU41.EXE has the original HDRIVE1.DAT included in the distribution.

What I'm confused about now is that when I use SELECT to access any HP-IL device and try to do a directory (virtual or real), the EMU41 reports NO DRIVE.

Okay, first what's the best and easiest way to test the HP-IL I/F card to see if it can be seen by EMU41? Second, how does EMU 41 assign HP-IL addresses to internal and external devices? I did modify EMU41.INI to indlude FDRIVE1 to see if I could access the 3 1/2 floppy disk drive on the PC from EMU41 without success.

What am I doing wrong?

Gerry

      
Re: HP-IL I/F Card on a New(er) PC - Part III
Message #2 Posted by Marcus von Cube, Germany on 13 July 2009, 6:13 a.m.,
in response to message #1 by Gerry Schultz

Gerry if you enclose your config file citations with PRE tags (in square brackets) the line breaks will be preserved for easier reading:

[Modules]
0  12  rom41cx.bin
3   4  cxfcn2d.bin
5   8  cxtime2c.bin
6   4  prter1e.bin
7   4  hpil1h.bin

8 12 adv41b.bin 10 4 xiola.bin

[Devices] DISPLAY HDRIVE1 LPRTER1 DOSLINK XIL 300

Now to your question: XP does not allow a DOS box to access I/O ports directly. You will need some port redirection device driver (which has been mentioned here in the forum) to make this work.

            
Re: HP-IL I/F Card on a New(er) PC - Part III
Message #3 Posted by Gerry Schultz on 13 July 2009, 5:33 p.m.,
in response to message #2 by Marcus von Cube, Germany

Thank you Marcus for reformatting my EMU41.ini file. I am confused and a little frustrated with what you are saying as it is different from other sources. In Christoph Klug's HP Article 311, "HP41 - PC Gateway & Emulator" and his book do not mention any need for a port redirection device driver to make EMU41 work on XP. What he seems to stress was that the HP-IL I/F card's I/O address needs to be set to 300 hex, which I've done. I have searched for EMU41 and XP restricting Google's search to the HP Museum website and found, so far, no mention of EMU41 needing anything special to run properly on XP.

I went into this little project thinking that the EMU41 software took XP's NT roots into account and that it works correctly under XP. When I ran it under Win98, it worked and responded as expected and I was able to talk to my 9114 floppy drive through EMU41. So, with it responding with NO DRIVE no matter what HP-IL storage device I try and talk to, I thought I had done something wrong. If XP is interfering with EMU41 accessing the hardware, can this be solved? Does EMU41 or for that matter EMU71 run properly under Windows XP with both internal, virtual HP-IL devices and external HP-IL devices connected through the HP82973A HP-IL interface card?

I intend to continue working on this and I hope the HP Museum community can shed some light on this to help expedite my efforts. There are a lot of variables in this situation from the PC BIOS to the interface card to EMU41 software. I'm hoping someone has already faced this as I think it related to the EMU41 software and XP. Since I can't get the virtual, internal HP-IL storage devices to work, either it's a configuration issue or an initial setup issue and the EMU41 documentation is not especially clear on how it assigns HP-IL addresses to devices. An example of strange behavior I have noticed is that I could not get EMU41 to save the state of the 41 at first when I shut down using F1. When I changed the name of the mem41.dat file to something else, EMU41 then saved the state of the 41 to a new mem41.dat file and now that file is updated whenever I quit using F1. Do I need to purge the HDRIVE.dat file included with the EMU41 distribution and have it build a new file, then use the new media command to format it? I don't remember doing that with Win98 so that may be a dead end.

Sorry that I'm rambling on so much. I hope you have some suggestions or insights.

Thanks,

Gerry

                  
Re: HP-IL I/F Card on a New(er) PC - Part III
Message #4 Posted by Egan Ford on 13 July 2009, 8:01 p.m.,
in response to message #3 by Gerry Schultz

Quote:
Thank you Marcus for reformatting my EMU41.ini file. I am confused and a little frustrated with what you are saying as it is different from other sources. In Christoph Klug's HP Article 311, "HP41 - PC Gateway & Emulator" and his book do not mention any need for a port redirection device driver to make EMU41 work on XP. What he seems to stress was that the HP-IL I/F card's I/O address needs to be set to 300 hex, which I've done. I have searched for EMU41 and XP restricting Google's search to the HP Museum website and found, so far, no mention of EMU41 needing anything special to run properly on XP.
AFAIK, you cannot access I/O ports directly with XP. I do not have Klug's book with me so I have no idea what trick is used for XP to access the HP-IL ISA adapter.

You may want to give CrackNT a try (http://www.it.hs-esslingen.de/~zimmerma/software/index_uk.html). CrackNT has a tool to unlock I/O port ranges (you should only need to unlock 0x300 - 0x301, however I think on Linux I am unlocking 8 bytes). It may or may not work. As for direct floppy access, same issue.

If you have not already I would suggest booting up a DOS diskette with EMU41 and verify that EMU41 works with your mod card and address 0x300. IIRC, EMU41 enumerates the internal devices before the external devices, however, that may be because XIL is last in the device list. To avoid any ambiguity while testing comment out HDRIVE so that all DIR, WRTP, READP commands will default to the 9114B.

Good luck.

P.S. Ubuntu Linux is not a bad alternative to Windows. DOSEMU has an option to allow direct access to HW. I use Linux/DOSEMU with my ISA adapter. Works great.

                  
Re: HP-IL I/F Card on a New(er) PC - Part III
Message #5 Posted by Howard Owen on 13 July 2009, 9:33 p.m.,
in response to message #3 by Gerry Schultz

I believe JF's documentation mentions that access to modern floppy drives from EMU41 doesn't work due to the smaller sector size on the 9114 disks.

I use DOSEMU on Linux to run EMU41 also. There you have to make provisions to allow the emulators to access the I/O memory directly. DOS is primitive in that way, allowing any old program to bang directly on the hardware.

<humor>

Since Windows up through WinME was really just DOS with an elaborate, broken windowing shell, those versions also took a cavalier attitude toward access to critical hardware resources. It wasn't until Windows NT came along that Microsoft started to make half hearted, ineffectual attempts to write reliabilty into their operating systems. That effort has largely failed, but, one side effect is that you have to make special provisions in order to do dangerous things like writing and reading directly to and from memory mapped hardware. Unlike a real operating system, Windows doesn't provide a standard way to allow such dangerous access, leaving the implementation to third parties who name their software things like "Hack and Slash my Windows Box Until it Rolls Over and Dies." Despite the scary names, these third party programs doubtless do a far better job of implementing the scary access than the clowns in Redmond ever could.

</humor>

Kidding aside, the inability to write directly to memory is a feature of any "real" operating system. You absolutely need some way to get around that to make EMU41 work with the ISA card. If Egan recommends the "Hackomatic" program, you can rest assured the solution is among the better ones available. He's a professional, and is occasionally forced to work with Windows. :)

Regards,
Howard

                        
Re: HP-IL I/F Card on a New(er) PC - Part III
Message #6 Posted by Egan Ford on 14 July 2009, 12:05 p.m.,
in response to message #5 by Howard Owen

Quote:
I believe JF's documentation mentions that access to modern floppy drives from EMU41 doesn't work due to the smaller sector size on the 9114 disks.
I've wondered about that. My HP-IL ISA Box is an old 66/200 Mhz Overdrive circa 1995 mini tower, with 32 MB RAM and Linux. I have no problems using various DOS-based tools to read/write 9114B floppies. However both this old junker and my circa 2004 IBM server have no problem reading and writing 9114B disks using Tony Duell's Linux LIF tools. I have not tested DOS/LIFUTIL/EMU41 on my server, so I cannot confirm that it works with modern floppy drives. If Linux can do it, I'd suspect that DOS can too. Perhaps my server works because it truly is 100% IBM Compatible. :-) BTW, when did modern start?
Quote:
He's a professional, and is occasionally forced to work with Windows. :)
Ha!
                              
Re: HP-IL I/F Card on a New(er) PC - Part III
Message #7 Posted by Howard Owen on 14 July 2009, 5:31 p.m.,
in response to message #6 by Egan Ford

Quote:
However both this old junker and my circa 2004 IBM server have no problem reading and writing 9114B disks using Tony Duell's Linux LIF tools.

Wow, brain fade here. I've used LIF utils to access 9114 floppies too. Of course, the issue here is whether you can do it in EMU41. Here's what JF has to say about that in the EMU41 documentation

Note: This emulation doesn't work on some modern PC. Reason is that this emulation relies on low level BIOS calls to manage LIF formatted discs (256 bytes/sector). These calls are historic (there are not used by DOS/Windows) and seem to have been removed (or at least are no more supported) in modern PC BIOS.

That says he ran into trouble with BIOS calls that used to work for him, presumably under DOS on a "modern" PC. (No idea when "modern" started. :) Tony's source code is available, but may not be easily applicable given the differences in I/O models between DOS and Linux, i.e. Tony is making syscalls into the floppy driver, which in turn makes the low level BIOS calls. The driver source is available too, of course.

Regards,
Howard

                                    
Re: HP-IL I/F Card on a New(er) PC - Part III
Message #8 Posted by J-F Garnier on 15 July 2009, 6:09 a.m.,
in response to message #7 by Howard Owen

Hi,

"Modern" here means OS that came after pure text mode DOS and command line interface :-)

The main point regarding this subject is that it's not a hardware limitation; when booting a "modern" PC with a DOS disk (or a Win9x if you wish), LIF disc can be read using the PC internal floppy. This question by itself is almost obsolete since laptops don't have a floppy drive anymore...

Of course, LIF discs can still be read using a 9114 connected with the HPIL ISA board or the PILBox (to anticipate the next question: no, there is not yet a LIFutil-like software to do that with the PILBox - but it is possible).

J-F

                  
Re: HP-IL I/F Card on a New(er) PC - Part III
Message #9 Posted by Marcus von Cube, Germany on 14 July 2009, 8:51 a.m.,
in response to message #3 by Gerry Schultz

Here is an article describing the problem and methods around it. Linux seems to be the better choice. BTW, OS/2 is a possible option, too. Its DOS box is closer to a real PC than Windows'. I will have to try it out one day. There is an old OS/2-PC somewhere around here. :)

By far the best way would be a custom device driver for the HP-IL card which does all the hardware and timing sensitive stuff. This could then emulate a serial port for access through any application, including emulated DOS. The new USB-HP-IL box works in this way. But instead of providing a custom driver, it uses a standard Serial-USB chip and its corresponding driver and does all the tricky stuff with an embedded controller. What's left is a modification to EMU41's HP-IL code to make use of a (pseudo) serial device.

Edited: 14 July 2009, 8:54 a.m.

                        
Re: HP-IL I/F Card on a New(er) PC - Part III
Message #10 Posted by Gerry Schultz on 14 July 2009, 1:20 p.m.,
in response to message #9 by Marcus von Cube, Germany

Egan, I've never thought about not trusting your writings (a double negative in this case seems correct). I've already downloaded CrackNT and read the documentation. It is the perfect answer to having direct access o the hardware but I'll have to experiment with how large the I/O window should be.

Howard, when I was reading the humorist entry in your post, I had this image of Yosemite Sam popping up in my mind saying (in his Mel Blanc's voice) "I hate Windows." I too use Windows a lot in my work so I'm very familiar with it. But I cut my teeth on Apple IIs and at home I have two Macs as well as PCs. There are many days when I say "I hate Windows."

Marcus, I'll take a look at the article you recommend when I get some time. What I'm thinking about is a single, integrated PC that I can do all my Windows related work on without having specialized PCs for specific projects, like EMU41. I deal a lot with HP products here at Fox (Fox has a special deal with them) so we have several HP Blade Servers as well as a lot of other printers and desktop PCs. HP is so PC centric, I never think of using Linux or OS X with their products.

I sent an email yesterday to Jean-FranÁois Garnier yesterday to see about purchasing a PILBox. From Egan's postings I'm quite excited about using it. In that email, I asked Jean-FranÁois Garnier about EMU41 running on XP but I haven't heard back from him yet. He will have the definitive answer on this since he wrote EMU41.

Finally, I have a confession to make. I mentioned last weekend that there was another HP-IL I/F card up for auction on that unmentionable website. At the time, with my suspicion of my card having a problem, I won the auction for that newer card. I got it late last week and since it had no IRQ strapping, it confirmed that that was the problem. It's a REV C version of the I/F card and I think it works fine even though I haven't had to test it yet.

Now that the PILBox is shipping, I feel a bit foolish for getting it. I don't know what I'm going to do with it yet. I have a tendency to collect hardware, not get rid of it. Just ask my wife.

Thanks,

Gerry

                              
Re: HP-IL I/F Card on a New(er) PC - Part III
Message #11 Posted by Gerry Schultz on 14 July 2009, 8:10 p.m.,
in response to message #10 by Gerry Schultz

I got a response from Jean-Francois this afternoon. Here is what he said:

And don't throw your HPIL ISA board away! It is still a valuable board, actually with higher performance than my PILBox! I don't use the ISA board with XP, I just know that a special driver for I/O access is needed and Christoph Klug is the right person for advices. Personnaly, I'm keeping an old computer and OS (maximum Win98) for it.

Interesting...

Gerry

                                    
Re: HP-IL I/F Card on a New(er) PC - Part III
Message #12 Posted by Howard Owen on 14 July 2009, 9:00 p.m.,
in response to message #11 by Gerry Schultz

Hmm. Wonder why WinMe doesn't work.

                                          
Re: HP-IL I/F Card on a New(er) PC - Part III
Message #13 Posted by Marcus von Cube, Germany on 15 July 2009, 2:35 a.m.,
in response to message #12 by Howard Owen

WinME should, at least in theory. It's a '9x variant.

                        
Re: HP-IL I/F Card on a New(er) PC - Part III
Message #14 Posted by J-F Garnier on 15 July 2009, 3:18 p.m.,
in response to message #9 by Marcus von Cube, Germany

Hi Marcus,

What's left is a modification to EMU41's HP-IL code to make use of a (pseudo) serial device.

This is an excellent idea! Actually, Emu41 already supports HPIL through a serial port (starting from Emu41 2.47): instead of declaring XIL 300 (for instance), use XIL COM4. This is for the (experimental) support of the PIL-Box.

The problem I'm facing with Emu41 is that it's a DOS application that uses the BIOS INT 14 interface to communicate with the serial port. It works very well on pure DOS systems but it is VERY unreliable in Wondows environment, characters are lost from time to time and I don't know how to solve it. That's why I recommend to use ILPer, a native Wondows program, as a gateway between Emu41 and the PILBox.

J-F

                              
Re: HP-IL I/F Card on a New(er) PC - Part III
Message #15 Posted by Marcus von Cube, Germany on 17 July 2009, 2:45 a.m.,
in response to message #14 by J-F Garnier

J-F, have you tried to access the virtual COM port as a regular file? Or is INT14 just that?

                                    
Re: HP-IL I/F Card on a New(er) PC - Part III
Message #16 Posted by J-F Garnier on 19 July 2009, 4:45 a.m.,
in response to message #15 by Marcus von Cube, Germany

I tested several methods some years ago when I added serial port support to Emu41/71 and got acceptable but not 100% reliable results. This is the limit of the DOS Emu41/71 implementations.

If a driver for the HPIL board through a virtual COM port is developed, main interest will be to a have a common access method for both the ISA board and PILBox, and new software (ILper for instance) could be used for both.

J-F

            
Re: HP-IL I/F Card on a New(er) PC - Part III
Message #17 Posted by Gerry Schultz on 15 July 2009, 8:18 a.m.,
in response to message #2 by Marcus von Cube, Germany

Marcus:

I owe you an apology. I went back to Christoph Klug's post from last week and found this:

Quote:
For WIN XP operating system you need the address setting 300 by dip switches plus the address routing software tool, described in my book.

Last night, for some bedtime reading, I started scouring his book "HP-41 Input/Output Board" to see what I could find. On page XV.18, Christoph talks about installing the UserPort software tool for running the HP-IL/PC Interface Card and Trans41 or EMU41 under WIN2000/NT/XP. It's just like what Egan was talking about with CrackNT and from the picture Christoph includes at the bottom of the page, UserPort has a GUI interface. Also, I now understand why he insists that the I/O range address for the I/F card needs to be changed to 300 hex when used under NT based OSes. The UserPort utility only accepts arguments up to 3FF hex so it can't access 1700 hex. Finally, in UserPort's window graphic, Christoph shows by example that he opens 300 hex through 308 hex for the I/F card to work, just like what Egan was talking about.

I remember reading this but at the time I didn't understand what Christoph was talking about or how it related to running EMU41. I'm feeling pretty sheepish right about now.

I now have a clearer understanding of what I must work on so I will keep working on this. Thanks to everyone for your contributions.

Gerry

Edited: 15 July 2009, 8:36 a.m.

                  
Re: HP-IL I/F Card on a New(er) PC - Part III
Message #18 Posted by Marcus von Cube, Germany on 15 July 2009, 8:37 a.m.,
in response to message #17 by Gerry Schultz

Keep us posted!

                        
Re: HP-IL I/F Card on a New(er) PC - Part III
Message #19 Posted by Gerry Schultz on 20 July 2009, 6:11 p.m.,
in response to message #18 by Marcus von Cube, Germany

Hello All:

A minor update this week. I figured out the problem with the NO DRIVE issue with EMU41 reporting all internal and external devices as NO DRIVE when I SELECTed them and tried to do a DIR. First, I built a bootable floppy and put the 2.40 version of EMU41 in a subdirectory and when I ran it from the floppy, it still reported NO DRIVE for all HP-IL peripherals. So, I cranked up my old P2 233MHz machine with Win98 and it showed the same problem. That machine didnít have the HP-IL I/F card in it since I had moved it over to the P4 machine. So, I grabbed the newer HP-IL I/F card I had recently received and plugged it in. I also added my 9114B disk drive to the external HP-IL loop and it worked as expected. Back on the P4 machine, I commented out the XIL 300 line and that fixed the problem. Apparently, having the XIL 300 line in the INI file confuses EMU41 if it canít find the I/F card in the machine. What I still need to figure out is why EMU41 didnít see the HP-IL I/F card when I booted from a floppy disk running DOS. I wonder if the external loop needs to be complete before EMU will function properly. I will have to try that next.

I didnít have as much time as I expected this weekend so I didnít get to play with modifying XP yet to directly access the hardware. I did install a KVM switch so I can work on either PC from one location. Iíll let you know what I find.

Gerry

                              
Re: HP-IL I/F Card on a New(er) PC - Part III
Message #20 Posted by Gerry Schultz on 20 July 2009, 6:26 p.m.,
in response to message #19 by Gerry Schultz

I would also like to note that J-F did suggest that I disable interrupts on the HP-IL I/F card before I figured it out. In the process of troubleshooting this problem, I lost track of J-F's suggestion and forgot about it. If I had gone back and re-read the posts, I would have saved myself a lot of consternation.

I would like to thank J-F for his help as well as everyone else as you all have a lot more experience than I do with this HP-IL hardware. I will do better in the future at reading your suggestions. I know I can get pretty excited about new hardware and software as well as trying to resolve problems and issues as I run into them. If you notice me getting off track again, please don't hesitate to throw a tomato (gently, please!) at me in the form of a comment. It is fun to be actively involved in this group as I have lurked for years but made few comments until now.

Thank you for your patience.

Gerry


[ Return to Index | Top of Index ]

Go back to the main exhibit hall