Post Reply 
Transferring programs to and from an HP41CL
11-23-2017, 01:03 PM
Post: #1
Transferring programs to and from an HP41CL
Hi,

What is the best way to transfer programs to and from the HP41CL using the serial port, and a Macintosh (no PC, no Linux).
I have downloaded the Ruby script to no success so far.
It would be nice to be able to use the Mac (or any other PC) as a virtual printer (print to file), like an HP82162A for example.
Maybe this is totally feasible, and has been done. I’m a newbie at this or with a CL for that matter.
Aside from the Ruby Script, I haven’t found any other info on this.

Thanks

Engineer & Senior IT Executive
2x HP41CL, HP41CX, HP48GX, HP50g, 2x82162A Printer, 2x82143A Printer, 2x HP-IL, 2x Card-Readers, PIL-BOX.
Find all posts by this user
Quote this message in a reply
11-23-2017, 01:46 PM (This post was last modified: 11-23-2017 01:48 PM by Sylvain Cote.)
Post: #2
RE: Transferring programs to and from an HP41CL
(11-23-2017 01:03 PM)Neve Wrote:  What is the best way to transfer programs to and from the HP41CL using the serial port, and a Macintosh (no PC, no Linux).
By using the clupdate program of course Wink

Extract from the clupdate-1.0.0-readme.txt included in the clupdate-1.0.0.zip file.
Code:
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
H) loading UPDAT-2B.ROM ROM image into the 41CL  /////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

This section will show you how to load the UPDAT-1G.ROM image into the 41CL

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::​::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

1) you must find which communication port your 41CL serial cable is connected to
2) once found, replace the SERIAL_PORT tag by its appropriate value.
   Windows: find your serial port name with DeviceManager and use that name instead of the SERIAL_PORT tag. (ex.: COM4)
   Linux..: find your serial port name in /dev folder and use that name instead of the SERIAL_PORT tag. (ex.: /dev/ttyUSB0)
   macOS..: find your serial port name in /dev folder and use that name instead of the SERIAL_PORT tag. (ex.: /dev/tty.usbserial)
3) start a shell (aka command line)
4) go to the working folder
5) load the update ROM image into the 41CL

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::​::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Type_on_CL: MMUDIS                                                               // disable 41CL memory management unit
Type_on_CL: MMUCLR                                                               // clear 41CL memory management unit configuration

Type_on_CL: "YFNX"                                                               // enter in ALPHA the 41CL Extreme Functions rom image ID
Type_on_CL: PLUG1L                                                               // plug it to the lower address of port 1 (page 8)

Type_on_CL: MMUEN                                                                // enable 41CL memory management unit

Type_on_CL: SERINI                                                               // initialize the serial port
Type_on_CL: BAUD then 48                                                         // set communication speed to 4800 bauds

Type_on_CL: ON                                                                   // (optional) deactivate calculator sleep mode
Type_on_CL: CF 26                                                                // (optional) deactivate calculator sound

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::​::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Type_on_CL: "80F000-0FFF"                                                        // Physical destination address 0x80F000 and length 0x0FFF in RAM where the ROM image will be loaded
Type_on_CL: [XEQ][ALPHA]YIMP                                                     // Here we need to prepare the next function by pressing [XEQ] [ALPHA] [Y] [I] [M] [P]

Type_on_PC: java -jar clupdate-1-0-0.jar --upload UPDAT-2B.ROM SERIAL_PORT 4800 [ENTER] // WARNING: see SERIAL_PORT comment above 

Disp_on_PC: HH:MM:SS --upload   [fileName: UPDAT-2B.ROM] [portName: SERIAL_PORT] [baudRate: 4800]
Disp_on_PC: HH:MM:SS File       UPDAT-2B.ROM loading ...  done [YCRC=0x158BFD51 Rev:2017-08-14]
Disp_on_PC: HH:MM:SS Serial     SERIAL_PORT opened.
Disp_on_PC: HH:MM:SS Sleeping   5 seconds before starting file transfer

Type_on_CL: [ALPHA]                                                              // Pressing [ALPHA] within the time allowed, executes the YIMP function and start the CL serial importation
Disp_on_CL: "RECEIVING"                                                          // see the clupdate execution result below

Disp_on_PC: HH:MM:SS Sending    8192 = 8192 bytes sent
Disp_on_PC: HH:MM:SS Serial     /dev/tty.usbserial closed.

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::​::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Type_on_CL: "80F"                                                                // Selecting RAM page 0x80F000
Type_on_CL: YCRC                                                                 // Validating CRC of the RAM page

Disp_on_CL: WORKING
Disp_on_CL: 158BFD51                                                             // Expecting YCRC=0x158BFD51 for UPDAT-2B.ROM

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::​::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Type_on_CL: "-80F 9"                                                             // Map UPDAT-2B.ROM image at RAM physical address 0x80F000 to port address 9
Type_on_CL: PPLUG                                                                // Activate the virtual module

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::​::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Type_on_CL: CAT 2                                                                // Validating configuration

Disp_on_CL: -TIME 3A                                                             // Time module
Disp_on_CL: -CL TIME                                                             // CL Time module
Disp_on_CL: -YFNX 2C                                                             // CL Extreme Functions module - MMU functions
Disp_on_CL: -SYS FNS                                                             // CL Extreme Functions module - System functions
Disp_on_CL: -SER FNS                                                             // CL Extreme Functions module - Serial functions
Disp_on_CL: -MISC FNS                                                            // CL Extreme Functions module - Miscellaneous functions
Disp_on_CL: UPDAT 2B                                                             // CL Update Functions module
Disp_on_CL: -EXT FCN 3B                                                          // Extended Functions module
Disp_on_CL: -CL EXT FCN                                                          // CL Extended Functions module

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::​::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Assuming YFNX is mapped and activated, the minimum do to is ...
Code:
calculator: SERINI
calculator: BAUD then 48
calculator: "820000-0FFF"           // physical destination address and length in RAM where the ROM image will be loaded, you can choose another address if you want
calculator: [XEQ][ALPHA]YIMP        // not pressing the last [ALPHA] will leave the 41CL in wait state 
computer..: java -jar clupdate-1.0.0.jar --upload YOUR_ROM_FILENAME /dev/tty.usbserial 4800 [RETURN]
                                    // wait until you see -> HH:MM:SS Sleeping   5 seconds before starting file transfer
calculator: [ALPHA]                 // this activate the YIMP function, you should see "RECEIVING" on the LCD
calculator: "820"                   // physical address to CRC
calculator: YCRC                    // calculating the CRC of the module, you should see the same CRC displayed on the computer of the file transfered 
calculator: "-820 9"                // physical address and port to activate
calculator: PPLUG                   // activating the module

Sylvain

edit: typo
Find all posts by this user
Quote this message in a reply
11-23-2017, 01:51 PM
Post: #3
RE: Transferring programs to and from an HP41CL
Sylvain,

I was talking about RPN programs, not ROM images.
Or did I miss something....?

Engineer & Senior IT Executive
2x HP41CL, HP41CX, HP48GX, HP50g, 2x82162A Printer, 2x82143A Printer, 2x HP-IL, 2x Card-Readers, PIL-BOX.
Find all posts by this user
Quote this message in a reply
11-23-2017, 02:08 PM (This post was last modified: 11-23-2017 02:10 PM by Neve.)
Post: #4
RE: Transferring programs to and from an HP41CL
(11-23-2017 01:24 PM)Geir Isene Wrote:  What is the problem you encounter with the Ruby script?

I think my Ruby is not compatible with MacOS 10.13.2 High Sierra.
I'll figure it out.

Engineer & Senior IT Executive
2x HP41CL, HP41CX, HP48GX, HP50g, 2x82162A Printer, 2x82143A Printer, 2x HP-IL, 2x Card-Readers, PIL-BOX.
Find all posts by this user
Quote this message in a reply
11-23-2017, 02:22 PM
Post: #5
RE: Transferring programs to and from an HP41CL
(11-23-2017 02:14 PM)Geir Isene Wrote:  Please do tell me what you figure out ☺️

Will do.
But I don’t think it has anything to do with the script.
I may just not have installed Ruby correctly.

Engineer & Senior IT Executive
2x HP41CL, HP41CX, HP48GX, HP50g, 2x82162A Printer, 2x82143A Printer, 2x HP-IL, 2x Card-Readers, PIL-BOX.
Find all posts by this user
Quote this message in a reply
11-23-2017, 02:38 PM (This post was last modified: 11-23-2017 02:39 PM by Neve.)
Post: #6
RE: Transferring programs to and from an HP41CL
(11-23-2017 02:35 PM)Geir Isene Wrote:  Do you have a PILbox?

Nope. An HP41 CL with the serial port.

Engineer & Senior IT Executive
2x HP41CL, HP41CX, HP48GX, HP50g, 2x82162A Printer, 2x82143A Printer, 2x HP-IL, 2x Card-Readers, PIL-BOX.
Find all posts by this user
Quote this message in a reply
11-23-2017, 02:58 PM
Post: #7
RE: Transferring programs to and from an HP41CL
(11-23-2017 01:51 PM)Neve Wrote:  Sylvain,

I was talking about RPN programs, not ROM images.
Or did I miss something....?
Sorry, I did not get that, my mistake.
Find all posts by this user
Quote this message in a reply
11-23-2017, 06:23 PM
Post: #8
RE: Transferring programs to and from an HP41CL
I guess I’m gonna have to get myself a PIL box then...

Engineer & Senior IT Executive
2x HP41CL, HP41CX, HP48GX, HP50g, 2x82162A Printer, 2x82143A Printer, 2x HP-IL, 2x Card-Readers, PIL-BOX.
Find all posts by this user
Quote this message in a reply
11-23-2017, 06:24 PM
Post: #9
RE: Transferring programs to and from an HP41CL
(11-23-2017 02:58 PM)Sylvain Cote Wrote:  
(11-23-2017 01:51 PM)Neve Wrote:  Sylvain,

I was talking about RPN programs, not ROM images.
Or did I miss something....?
Sorry, I did not get that, my mistake.

No sweat. Wink

Engineer & Senior IT Executive
2x HP41CL, HP41CX, HP48GX, HP50g, 2x82162A Printer, 2x82143A Printer, 2x HP-IL, 2x Card-Readers, PIL-BOX.
Find all posts by this user
Quote this message in a reply
11-23-2017, 09:32 PM
Post: #10
RE: Transferring programs to and from an HP41CL
Maybe this is a dumb question, but other than updating the CL board, what can the serial port be used for for an average user like me? Any usefulness to it at all?

Engineer & Senior IT Executive
2x HP41CL, HP41CX, HP48GX, HP50g, 2x82162A Printer, 2x82143A Printer, 2x HP-IL, 2x Card-Readers, PIL-BOX.
Find all posts by this user
Quote this message in a reply
11-23-2017, 09:39 PM (This post was last modified: 11-23-2017 09:39 PM by Neve.)
Post: #11
RE: Transferring programs to and from an HP41CL
(11-23-2017 09:35 PM)Geir Isene Wrote:  Well, updating the ROMs in your CL is a pretty big deal, though.

You can also go the other way - if you want to backup your HEPAX RAM for instance, it's a neat way of doing just that.

Of course!! I’m not saying it’s not a big deal, I’m just asking what it can be used for other than that.
I don’t have an HEPAX RAM.

Thank you.

Engineer & Senior IT Executive
2x HP41CL, HP41CX, HP48GX, HP50g, 2x82162A Printer, 2x82143A Printer, 2x HP-IL, 2x Card-Readers, PIL-BOX.
Find all posts by this user
Quote this message in a reply
11-23-2017, 11:02 PM
Post: #12
RE: Transferring programs to and from an HP41CL
Assuming I've understood the original post correctly, he's after a way to get FOCAL programs (not whole ROM images) into his 41CL using his serial cable. Is there no way to do this aside from purchasing yet another piece of hardware (PILbox)?

(Post 132)

Regards, BrickViking
HP-50g |Casio fx-9750G+ |Casio fx-9750GII (SH4a)
Visit this user's website Find all posts by this user
Quote this message in a reply
11-23-2017, 11:57 PM
Post: #13
RE: Transferring programs to and from an HP41CL
(11-23-2017 11:02 PM)brickviking Wrote:  Is there no way to do this aside from purchasing yet another piece of hardware (PILbox)?

My short answer is no. (knowing there is no better way to get someone to come up with one than to say it can't be done...).

Keep in mind that the 41 was popular before PCs were widely used, so serial ports, cables, baud rates, etc. were still years and many $$ away. In recent years, JF Garnier's PIL-Box has IMHO enabled a whole new 2nd life of interest in the 41 (as well as 71B, 75C, etc.), by simulating the original peripherals with modern and cheap hardware; since they exactly simulate the original HP-IL, all the original tools, ROMs, programs, accessories, etc. work as they originally did, so the need for serial comm. is not so important.

Also, hardly any PCs come with serial ports any more, and USB/Serial converters are often plagued by driver issues, cheap clone chipsets that don't work on all machines, and other small but highly annoying issues which frustrate many users. USB (by comparison) just works.

If you really like to tinker and get deep with the tools, Geir's answer is totally correct and great advice, you can do this with Serial transfers to RAM blocks and use HEPAX to move it to Expanded memory, etc. but it's a 37-step process to move a single FOCAL program. With a PIL-Box, it's 1 or 2 steps. Which is not to say one is "better" than the other, it's just a matter of how you want to spend your time - moving the FOCAL program, or using it once moved.

Short recommendation: Get a PIL-Box. It's a decision you will never regret.

Small factoid to consider: Have you ever seen an add to sell a PIL-Box in the classifieds, or seen a post complaining that the PIL-Box isn't worthwhile?

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
11-24-2017, 01:28 AM
Post: #14
RE: Transferring programs to and from an HP41CL
(11-23-2017 11:57 PM)rprosperi Wrote:  Short recommendation: Get a PIL-Box. It's a decision you will never regret.
Small detail left out of the PILBox discussion (I have one and can attest to its great value). Without an HP-IL interface for the 41 and at least one HP-IL cable, the PILBox is little more than a paperweight you get to assemble yourself. Unless you already have those accessories, count on spending at least as much for them as for the PILBox. Not to discourage getting one, just pointing out the prerequisites. As Bob says, once acquired, you won't regret having one.

I have also gone through the "37-step process" to transfer a HEPAX image, disassemble it, assemble other code and merge, then package with MLDL2K into a ROM image that can be transferred back. Quite a pain, yes, but instructive. And free.

Another possibility might be to use go41cx or go41cxt to create the HEPAX image and transfer that to the 41CL. You may (or may not) find it easier to key in a FOCAL program with an emulator on a PC or tablet. The go41cxt program on a tablet is well worth the small coin to acquire, and really, really useful all by itself.

~Mark

Remember kids, "In a democracy, you get the government you deserve."
Find all posts by this user
Quote this message in a reply
11-24-2017, 01:42 AM (This post was last modified: 11-24-2017 01:49 AM by Dave Frederickson.)
Post: #15
RE: Transferring programs to and from an HP41CL
(11-23-2017 11:57 PM)rprosperi Wrote:  Small factoid to consider: Have you ever seen an add to sell a PIL-Box in the classifieds, or seen a post complaining that the PIL-Box isn't worthwhile?

First, I'm a strong proponent of the PIL-Box. I have two.

Second, yes, I have seen one for sale here in the Classifieds by a strong proponent of the 41CL (you bought it Smile ). I was baffled by the sale.

Dave
Find all posts by this user
Quote this message in a reply
11-24-2017, 03:28 AM
Post: #16
RE: Transferring programs to and from an HP41CL
(11-24-2017 01:42 AM)Dave Frederickson Wrote:  Second, yes, I have seen one for sale here in the Classifieds by a strong proponent of the 41CL (you bought it Smile ). I was baffled by the sale.

LOL, you got me.

He had two, so was selling one. Now, I have two, too.

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
11-24-2017, 11:00 AM
Post: #17
RE: Transferring programs to and from an HP41CL
(11-23-2017 11:02 PM)brickviking Wrote:  Assuming I've understood the original post correctly, he's after a way to get FOCAL programs (not whole ROM images) into his 41CL using his serial cable. Is there no way to do this aside from purchasing yet another piece of hardware (PILbox)?

(Post 132)

That’s exactly that. You understood correctly.

Engineer & Senior IT Executive
2x HP41CL, HP41CX, HP48GX, HP50g, 2x82162A Printer, 2x82143A Printer, 2x HP-IL, 2x Card-Readers, PIL-BOX.
Find all posts by this user
Quote this message in a reply
11-24-2017, 02:32 PM
Post: #18
RE: Transferring programs to and from an HP41CL
(11-24-2017 10:40 AM)Geir Isene Wrote:  Why would I want two? Sell me on the idea of a second one ☺️

Basically for convenience. My original unit is mounted in the desktop stand I made for use with 71B machines; the adapter is under the angled platform that holds the machine, and the wires extend out each side, USB to the PC and HP-IL leads to my loop next to and above the desk. I use the 71B many times a week.

But I also use a 75C often and every now and then a 41C (and occasionally an HP-110 Portable Plus) for other side HP-IL trips, and it was a hassle to disconnect/reconnect the whole setup, so a 2nd PIL-Box is used for these machines.

I suppose one could also use both PIL-Boxes together to provide even more virtual devices, but I'd assume they would need to be connected to different PCs... hmmm.... some interesting things to check out here coming to mind, so thanks for the question Geir.

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
11-24-2017, 06:18 PM
Post: #19
RE: Transferring programs to and from an HP41CL
(11-24-2017 10:40 AM)Geir Isene Wrote:  Why would I want two? Sell me on the idea of a second one ☺️
I have 2 x PIL-Box and 2 x PIL-IO.

In the case of the PIL-Box ...

When I am doing IL device testing, I put one PIL-Box before and one PIL-Box after the device under test.
It allow me to see in the Virtual-IL Scope the exact messages the device is consuming and the response message it is producing.

Controller <--HPIL--> PIL-Box-1 <--HPIL--> DeviceUnderTest <--HPIL--> PIL-Box-2 <--HPIL--> Controller

On Windows: PIL-Box-1 <--USB--> Computer (USB port 1) running: ILPilBox-1 <--TCP--> ILScope-1
On Windows: PIL-Box-2 <--USB--> Computer (USB port 2) running: ILPilBox-2 <--TCP--> ILScope-2

On Linux/macOS: PIL-Box-1 <--USB--> Computer (USB port 1) running: pyILPER-1 with the scope tab
On Linux/macOS: PIL-Box-2 <--USB--> Computer (USB port 2) running: pyILPER-2 with the scope tab

Sylvain
Find all posts by this user
Quote this message in a reply
11-24-2017, 07:28 PM
Post: #20
RE: Transferring programs to and from an HP41CL
(11-24-2017 10:40 AM)Geir Isene Wrote:  You guys...

Why would I want two? Sell me on the idea of a second one ☺️

Two excellent responses! I have a second one because it was free. Smile

Dave
Find all posts by this user
Quote this message in a reply
Post Reply 




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