Post Reply 
How to export HP-41 programs to PC
04-27-2020, 04:17 PM
Post: #1
How to export HP-41 programs to PC
Dear community,
I am looking for advice.

I am still using my 1983 purchased HP-41CX. Over the recent years I built up a little collection (HP-41 CX, HP-41CV, Printer 82143A, 82160A HP-IL Module, Cassette Drive 82161A, PILbox, 82104A Card Reader, Math I, Circuits I), just for the fun of it.

Everything works just fine (apart from some trouble with the printer pinch rollers, but that’s a different story.).
With JFG PILBOX and the ILPER 2.4 SW I can transfer files to real tapes or virtual mass storage. So far so good.

But I haven’t been able to transfer my own programs to the PC in order to upload them into one of the emulators(PC version from W. Furlow, Android go41CX from Olivier de Smet)-

What I can use on the PC is the disc-image file provided by the ILPER tool, HDRIVE1.dat
I can use this file in the EMU41 program and read the programs with the READP command. So far so good.

But how to get the programs out of HDRIVE1.dat in form of single program files, let’s say prog1.raw, prog2.raw, … . on the PC. (Or .text or any other format I can use in an emulator HP41UC.EXE).

I tried the following (HPIL Module, PILBOX and PC (ILPER, Dosbox installed)):
1. Hp41UC.exe program

The hp41UC conversion program complains, when I try to convert the HDRIVE1.date file.
hp41uc.exe /d=HDRIVE1.dat / t<=HDRIVE1.txt

(Error: invalid ASCII hex-digit in 4 byte header [60])
HDRIVE1.dat s an image file, with multiple files on it, not a single program file. I assume, that is the reason.
I successfully converted a prog_xy.dat file I copied from Warren Furlows DVD. That works just fine. [Does that mean two different file types share the same .dat file extension?]

2. EMU41
Alternatively, I tried the OUTP command in EMU41, but it doesn’t work. What do I need to do exactly for this command?
Is it even the right command with my setup? I read the emu41eng.pdf doc, but I found no hint how to export programs.


3. DOSLINK
With the DOSLING device in ILPer I tried to print a program into a text file, like prog1.txt, but it never worked.
I selected DOSLINK with 4 SELECT as current device.
I stored an empty prog1.txt file (only 1 empty line) in the ILPer directory and selected it as output file in the DOSLINK device.
Then I put ‘prog1 as active program in the hp41, by rolling through CAT1 , etc.
Then I typed LIST 020 … -> no data were transferred to the prog1.txt file. I closed the file with the C button. It was printed on the ILPER printer, but nothing came into the prog1.txt File.
PRP ‘prog.1’ same result.
[but I managed to read a text file stored in the ILPER directory into ASCII file in the extended memory, with the INA command.]



Can anyone show me a procedure or explain me how I can get my files out of the real or virtual machines into .raw files (or any other filetype, I can work with).
Needless to say that I spend lots of hours for searching the web, forum, etc.
I am convinced the problems sits somewhere between chair and keyboard.. Big Grin

Thanks for your support,
Uli
Find all posts by this user
Quote this message in a reply
04-27-2020, 06:39 PM (This post was last modified: 04-27-2020 06:40 PM by Dave Frederickson.)
Post: #2
RE: How to export HP-41 programs to PC
(04-27-2020 04:17 PM)Drulli Wrote:  But how to get the programs out of HDRIVE1.dat in form of single program files, let’s say prog1.raw, prog2.raw, … . on the PC.

HPDir can do what you're looking for.
https://www.hp9845.net/9845/projects/hpdir/

v3.0 RC1 even recognizes some Series 40/70 LIF file types.

At a Windows command prompt execute something like:
HPDIR -extract HDRIVE1.dat prog1.raw

You may need to add the -c option to convert between DOS and HP text file formats when extracting text files.

Dave
Find all posts by this user
Quote this message in a reply
04-27-2020, 06:53 PM
Post: #3
RE: How to export HP-41 programs to PC
I would try lifutils which contains programs to move files back and forth between a LIF image and the local file system.

https://github.com/bug400/lifutils
Find all posts by this user
Quote this message in a reply
04-27-2020, 07:41 PM (This post was last modified: 04-27-2020 09:00 PM by Dave Frederickson.)
Post: #4
RE: How to export HP-41 programs to PC
(04-27-2020 06:53 PM)hth Wrote:  I would try lifutils which contains programs to move files back and forth between a LIF image and the local file system.

https://github.com/bug400/lifutils

pyILPER works as a front-end for lifutils when the drive is not enabled. Right-clicking the mouse on a file brings up a menu that allows selection of utilities that can be run. Selecting Export will export the file to the local PC hard drive. Selecting the Import button on the right will allow importing of a number of different file types with conversion.

https://github.com/bug400/pyilper

[Image: uc?export=view&amp;id=1lvvMOJqkG7JHU...DOPU6vnMGZ]
Find all posts by this user
Quote this message in a reply
04-28-2020, 08:42 AM
Post: #5
RE: How to export HP-41 programs to PC
Hello Dave, hth
thanks for the hint. Lifutils shall do the work.Sounds good, theoretically.
I downloaded the Win64 installation file.

Unfortunately windows defender popped up with a Virus Warning
Trojan:Win32/Zpevdo.A

I filed an issue on github.

Otherwise it looks promising.

Is pyIlper meant to replace the ILPER 2.5 SW? I mean, can it work in the HPIL Loop providing virtual devices, with export functions? That sounds pretty convenient.
Find all posts by this user
Quote this message in a reply
04-28-2020, 03:15 PM
Post: #6
RE: How to export HP-41 programs to PC
(04-28-2020 08:42 AM)Drulli Wrote:  Unfortunately windows defender popped up with a Virus Warning
Trojan:Win32/Zpevdo.A

I don't know what happened. Generally I do a VirusTotal scan of the image before upload to check for serious scanner diagnostics. The installers for the release 1.7.10 on Github were removed immediately. You can use the installer of the previous release which passes the test of windows defender. I regret this issue deeply. Although offline scans of my Windows environment did not show any suspicious facts I'll provide installers of release 1.7.10 only after a clean reinstall of my Windows environment.

(04-28-2020 08:42 AM)Drulli Wrote:  Is pyIlper meant to replace the ILPER 2.5 SW? I mean, can it work in the HPIL Loop providing virtual devices, with export functions? That sounds pretty convenient.

Yes.
Find all posts by this user
Quote this message in a reply
04-28-2020, 06:29 PM
Post: #7
RE: How to export HP-41 programs to PC
Hi Uli,

In the meantime, pyILPER v1.8.2 and lifutils v1.7.9 work fine.

As Joachim stated, pyILPER is an alternate to ILPer. I use both. ILPer has DOSLINK features and pyILPER has more virtual peripherals including a 7470 plotter emulation and a 2225 emulation complete with graphics, so I grab whichever hammer works best for the given task. In pyILPER you can undock the windows which is very nice.

Dave
Find all posts by this user
Quote this message in a reply
05-04-2020, 03:38 PM
Post: #8
RE: How to export HP-41 programs to PC
Hi all, I'm trying to run for the first time pyILPER v1.8.2 and lifutils v1.7.9 , I worked before with the ILPER., my PIL-BOX is a 2.1 release.
My difficult is in connecting the PIL-BOX..

I've configured pyilper choosing the COM9 (virtual serial used by the PIL-BOX USB adapter), the same used with ILPER, with a BAUD RATE of 9600, but the program cannot open the serial device, where am I wrong?
Find all posts by this user
Quote this message in a reply
05-04-2020, 04:36 PM
Post: #9
RE: How to export HP-41 programs to PC
(05-04-2020 03:38 PM)aurelio Wrote:  Hi all, I'm trying to run for the first time pyILPER v1.8.2 and lifutils v1.7.9 , I worked before with the ILPER., my PIL-BOX is a 2.1 release.
My difficult is in connecting the PIL-BOX..

I've configured pyilper choosing the COM9 (virtual serial used by the PIL-BOX USB adapter), the same used with ILPER, with a BAUD RATE of 9600, but the program cannot open the serial device, where am I wrong?

The v2.1 PIL-Box doesn't run at 9600. 115k or 230k are the valid options depending on the PIL-Box jumper setting. Just set the Baud rate to Auto.

Dave
Find all posts by this user
Quote this message in a reply
05-04-2020, 04:46 PM
Post: #10
RE: How to export HP-41 programs to PC
(05-04-2020 04:36 PM)Dave Frederickson Wrote:  
(05-04-2020 03:38 PM)aurelio Wrote:  Hi all, I'm trying to run for the first time pyILPER v1.8.2 and lifutils v1.7.9 , I worked before with the ILPER., my PIL-BOX is a 2.1 release.
My difficult is in connecting the PIL-BOX..

I've configured pyilper choosing the COM9 (virtual serial used by the PIL-BOX USB adapter), the same used with ILPER, with a BAUD RATE of 9600, but the program cannot open the serial device, where am I wrong?

The v2.1 PIL-Box doesn't run at 9600. 115k or 230k are the valid options depending on the PIL-Box jumper setting. Just set the Baud rate to Auto.

Dave
and consequently I guess the baude rate of the com9, thank-you Dave.
Find all posts by this user
Quote this message in a reply
05-04-2020, 05:29 PM
Post: #11
RE: How to export HP-41 programs to PC
(05-04-2020 04:46 PM)aurelio Wrote:  
(05-04-2020 04:36 PM)Dave Frederickson Wrote:  The v2.1 PIL-Box doesn't run at 9600. 115k or 230k are the valid options depending on the PIL-Box jumper setting. Just set the Baud rate to Auto.
and consequently I guess the baude rate of the com9, thank-you Dave.

The ILPer Installation Notes2 (2010) need to be updated. It's no longer necessary to manually set the COM port baud rate nor latency timer.
Find all posts by this user
Quote this message in a reply
05-04-2020, 05:36 PM
Post: #12
RE: How to export HP-41 programs to PC
(05-04-2020 05:29 PM)Dave Frederickson Wrote:  
(05-04-2020 04:46 PM)aurelio Wrote:  and consequently I guess the baude rate of the com9, thank-you Dave.

The ILPer Installation Notes2 (2010) need to be updated. It's no longer necessary to manually set the COM port baud rate nor latency timer.
Tnhank-you, Dave for the explanation
Find all posts by this user
Quote this message in a reply
05-05-2020, 10:36 AM
Post: #13
RE: How to export HP-41 programs to PC
Hi all,
just a short feedback about my attempt to export the self-written programs from the hp41cx.
I successfully installed pyILper and LIFUTILS.
pyILPer works really nicely, awesome.

The LIFUTILS are as well quite amazing. However, before I managed to extract a hp program from a LIF Imagefile I had to learn first the basics about the different types of files. A very useful exercise.

Finally I can run my programs in my PC and mobile apps now. Smile

Thanks for supporting, especially Dave and Joachim.
Find all posts by this user
Quote this message in a reply
05-05-2020, 07:12 PM
Post: #14
RE: How to export HP-41 programs to PC
In Germany we say, there are many routes traveling to Rome.

I would have used V41 R9D connected with ILPer or pyILPER over Virtual HP-IL. Then transfering the program from the LIF-file "inside" ILPer/pyILPer to the HP41 emulation and use "File/Put User Code..." on V41 to save a program in a RAW file.

But be careful, V41 R9 allows to select and save more than one program into one RAW file. This is useful when a program may consists of more than one global label. Let's assume that you have two global labels called "A1" and "B1" and "A1" is calling "B1". So it would be nice to save both programs into one RAW file only. V41 R9 allows this like Emu42. But older versions of V41, R8 and before or implementations on other platforms can only read the first program of such a RAW file.
Visit this user's website Find all posts by this user
Quote this message in a reply
05-08-2020, 04:14 PM
Post: #15
RE: How to export HP-41 programs to PC
@Christoph
Quote:I would have used V41 R9D connected with ILPer or pyILPER over Virtual HP-IL. Then transfering the program from the LIF-file "inside" ILPer/pyILPer to the HP41 emulation and use "File/Put User Code..." on V41 to save a program in a RAW file.

Is the "insde" ILPer file the HDRIVE1.DAT or the HP9114B.DAT file? And this file, assuming you meant that one, can be read by V41R9?
V41 needs to be configured with HPIL I assume. I need to check that.


@CY-CL: Thank you for your message and infos. The link to your document doesn't work.
I wrote you a pm reply, but noticed, when I tried to submit it, that I am banned, for whatever reason.
8-/

Uli
Find all posts by this user
Quote this message in a reply
05-09-2020, 07:49 PM
Post: #16
RE: How to export HP-41 programs to PC
(05-08-2020 04:14 PM)Drulli Wrote:  Is the "insde" ILPer file the HDRIVE1.DAT or the HP9114B.DAT file? And this file, assuming you meant that one, can be read by V41R9?

Yep. It's just like acessing the disk inside a HP9114 with a real HP41.
Visit this user's website Find all posts by this user
Quote this message in a reply
02-25-2023, 06:26 PM
Post: #17
RE: How to export HP-41 programs to PC
(04-27-2020 06:39 PM)Dave Frederickson Wrote:  HPDIR -extract HDRIVE1.dat prog1.raw
what would be the command for writing a raw file into a virtual drive?
(on linux)

HP71B 4TH/ASM/Multimod, HP41CV/X/Y & Nov64d, PILBOX, HP-IL 821.62A & 64A & 66A, Deb11 64b-PC & PI2 3 4 w/ ILPER, VIDEO80, V41 & EMU71, DM41X
Find all posts by this user
Quote this message in a reply
02-26-2023, 12:18 AM
Post: #18
RE: How to export HP-41 programs to PC
(02-25-2023 06:26 PM)floppy Wrote:  
(04-27-2020 06:39 PM)Dave Frederickson Wrote:  HPDIR -extract HDRIVE1.dat prog1.raw
what would be the command for writing a raw file into a virtual drive?
(on linux)
Find all posts by this user
Quote this message in a reply
02-26-2023, 02:33 AM
Post: #19
RE: How to export HP-41 programs to PC
As a new 41 acolyte, PIL-Box with pyILPER and lifutils installed is about as painless/perfect as it gets.
Find all posts by this user
Quote this message in a reply
02-26-2023, 12:25 PM
Post: #20
RE: How to export HP-41 programs to PC
Thanks for the advices.

(02-26-2023 02:33 AM)polbit Wrote:  As a new 41 acolyte, PIL-Box with pyILPER and lifutils installed is about as painless/perfect as it gets.
Yes. However, a method for exchanging files between a DM41X and a n HP41 is so far not identified by myself.

Perhaps (I have no DM41X):
- put the raw file of a DM41X into a raspbarry pi or a standard PC (or let a program on the pi retrieving from the DM41X and storing in any area)
- convert the raw file in a lif file https://www.hhcworld.com/files/hpmo/lifu...41lif.html
- put the created lif file into the lif image (I suppose this is the so call virtual drives HDRIVE1.DAT in ilper or pyilper) https://www.hhcworld.com/files/hpmo/lifu...ifput.html
since it will be in the virtual drive, it is accessible by all HP41 or others.

To be verified if ilper connected to the virtual drive HDRIVE1.DAT allow a command of type "lifput" to access this file. If yes, it means an HP41 and a DM41X would access the same drive when both connected to a PC together (I have doubts. most likely, first the DM41X is connected to the PC, the HP41 and ilper are not started as long a lifput file access HDRIVE1.DAT).

HP71B 4TH/ASM/Multimod, HP41CV/X/Y & Nov64d, PILBOX, HP-IL 821.62A & 64A & 66A, Deb11 64b-PC & PI2 3 4 w/ ILPER, VIDEO80, V41 & EMU71, DM41X
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 3 Guest(s)