HP-IL I/F Card on a New(er) PC - Part III
#1

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

#2

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.

#3

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

#4

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.

#5

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

#6

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.

#7

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!
#8

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

#9

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

#10

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

#11

Hmm. Wonder why WinMe doesn't work.

#12

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

#13

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

#14

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.

#15

Keep us posted!

#16

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

#17

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

#18

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

#19

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

#20

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



Possibly Related Threads…
Thread Author Replies Views Last Post
  The HP Prime saga - Part II Michael de Estrada 21 5,746 11-30-2013, 01:04 PM
Last Post: Michael de Estrada
  9014B Sony Part Number Compatibility aj04062 0 941 11-08-2013, 05:59 AM
Last Post: aj04062
  HP Prime - part selection bluesun08 7 2,318 10-29-2013, 09:31 PM
Last Post: CompSystems
  How to move lexfiles from PC to 71 w/o HP-IL? Joe Horn 9 3,202 10-18-2013, 03:50 PM
Last Post: Christoph Giesselink
  Hand Held Products RS232 to HP-IL aj04062 11 3,367 08-31-2013, 07:12 PM
Last Post: Paul Berger (Canada)
  HP 32s LCD part Trisnadi Sutrisno 2 1,374 08-27-2013, 02:12 PM
Last Post: Han
  HP IL over wifi ... (ILPer & go71b) Olivier De Smet 12 4,004 08-20-2013, 05:44 AM
Last Post: Olivier De Smet
  HP 39gII considered annoying, part 1 Pete Wilson 6 2,201 05-22-2013, 05:08 AM
Last Post: Gilles Carpentier
  HP 39gii Programming Tutorial Part 7 Eddie W. Shore 0 958 04-05-2013, 11:10 PM
Last Post: Eddie W. Shore
  HP 39gii Programming Tutorial Part 6: Interactive Programs Eddie W. Shore 0 873 04-01-2013, 06:00 PM
Last Post: Eddie W. Shore

Forum Jump: