Post Reply 
HP-41CL Remote Keyboard / Scripting
04-19-2021, 11:45 PM
Post: #21
RE: HP-41CL Remote Keyboard / Scripting
(04-19-2021 10:29 PM)rocket.scientist Wrote:  Ugh. Why did I get a "(sic)" on using the word "elaborated"? According to Google my use was entirely appropriate. :-)

My choice of using the CL update process was only as an example of a well known process where actions on the 41C are coordinated with actions on a PC. I personally enjoy the degree of interaction during the update, and agree your degree of feedback and protective features are remarkable.

Sorry if I struck a cord here, Monte. It was not my intention.

-Pat (KG5YPQ)

I apologize. I assumed that you meant to say "elaborate" and responded to that. I should know better than to make such an assumption.
Visit this user's website Find all posts by this user
Quote this message in a reply
04-19-2021, 11:55 PM
Post: #22
RE: HP-41CL Remote Keyboard / Scripting
(04-19-2021 11:45 PM)Monte Dalrymple Wrote:  
(04-19-2021 10:29 PM)rocket.scientist Wrote:  Ugh. Why did I get a "(sic)" on using the word "elaborated"? According to Google my use was entirely appropriate. :-)

My choice of using the CL update process was only as an example of a well known process where actions on the 41C are coordinated with actions on a PC. I personally enjoy the degree of interaction during the update, and agree your degree of feedback and protective features are remarkable.

Sorry if I struck a cord here, Monte. It was not my intention.

-Pat (KG5YPQ)

I apologize. I assumed that you meant to say "elaborate" and responded to that. I should know better than to make such an assumption.

I was just having a bit of fun, Monte, feigning horror at having made a language faux pas. I have to confess I did Google it after your post. Yep. It was edgy.

-Pat (KG5YPQ)
Find all posts by this user
Quote this message in a reply
04-20-2021, 04:51 PM (This post was last modified: 04-20-2021 04:52 PM by PeterP.)
Post: #23
RE: HP-41CL Remote Keyboard / Scripting
(04-17-2021 07:50 PM)rocket.scientist Wrote:  Both SF 11 and mag card would be an excellent option for fully autonomous operation of the 41C. Instead what I am thinking is a way to have the operation of a 41C coordinated with some other asynchronous process.

The updating of a 41CL is a good example, and fairly well known. There is an elaborated dance that needs to happen between a PC and a 41CL to manage the periodic updates, with commands at the PC coordinated with commands on the 41CL. While Sylvain and Monte (and others I am sure) have developed the excellent "clupdate" tool to facilitate, there is still a lot of manual coordination between PC and calc. It would be nice, since the full process is so well known, to have the PC more fully automate the process.

**BIG GOTCHA HERE** This highly automated approach does not accomodate any error conditions that may arise. I am not sure it is possible to permanently brick a 41CL, but I do not want to find out.

-Pat (KG5YPQ)

I have been thinking along the above lines and how to use HP-IL and the amazing PIL-BOX and I think in theory there is a pathway to this.

One could write a program (I am not 100% sure if it can be in FOCAL or would need to be in MCODE) where the HP-IL is sending over Op-Codes. Each Op-Code would relate to a specific function or program in memory which then would be performed, before control is passed back to the HP-IL listening for OpCodes. One Op-Code could be special in that it signifies the start of sending over bytes to be executed. These bytes could then be placed into Alpha where they could be executed with a Sto b into Alpha. This limits the amount of program bytes which can be done to around 23 given that we need a RTN to come out of the Alpha register into main memory again.

But with the ability to perform a)single commands from a) (quasi) unlimited list, b) pre-programmed sequences of steps, and c) ability to perform arbitrary 23 byte program sequences I think one could do a lot of remote scripting from the PC via PIL-Box and HP-IL.

Cheers,

PeterP
Find all posts by this user
Quote this message in a reply
04-20-2021, 10:51 PM
Post: #24
RE: HP-41CL Remote Keyboard / Scripting
(04-20-2021 04:51 PM)PeterP Wrote:  
(04-17-2021 07:50 PM)rocket.scientist Wrote:  Both SF 11 and mag card would be an excellent option for fully autonomous operation of the 41C. Instead what I am thinking is a way to have the operation of a 41C coordinated with some other asynchronous process.

The updating of a 41CL is a good example, and fairly well known. There is an elaborated dance that needs to happen between a PC and a 41CL to manage the periodic updates, with commands at the PC coordinated with commands on the 41CL. While Sylvain and Monte (and others I am sure) have developed the excellent "clupdate" tool to facilitate, there is still a lot of manual coordination between PC and calc. It would be nice, since the full process is so well known, to have the PC more fully automate the process.

**BIG GOTCHA HERE** This highly automated approach does not accomodate any error conditions that may arise. I am not sure it is possible to permanently brick a 41CL, but I do not want to find out.

-Pat (KG5YPQ)

I have been thinking along the above lines and how to use HP-IL and the amazing PIL-BOX and I think in theory there is a pathway to this.

One could write a program (I am not 100% sure if it can be in FOCAL or would need to be in MCODE) where the HP-IL is sending over Op-Codes. Each Op-Code would relate to a specific function or program in memory which then would be performed, before control is passed back to the HP-IL listening for OpCodes. One Op-Code could be special in that it signifies the start of sending over bytes to be executed. These bytes could then be placed into Alpha where they could be executed with a Sto b into Alpha. This limits the amount of program bytes which can be done to around 23 given that we need a RTN to come out of the Alpha register into main memory again.

But with the ability to perform a)single commands from a) (quasi) unlimited list, b) pre-programmed sequences of steps, and c) ability to perform arbitrary 23 byte program sequences I think one could do a lot of remote scripting from the PC via PIL-Box and HP-IL.

That sounds like a reasonable approach. Also see my "since I am completely unfamiliar with a number of skills necessary here" comment above as a disclaimer on the value of my opinion. There are people here vastly more competent than me, many of them already posting on this thread.
Find all posts by this user
Quote this message in a reply
04-21-2021, 03:41 PM
Post: #25
RE: HP-41CL Remote Keyboard / Scripting
I think you are underselling yourself given that you immediately put the idea of a button-pushing robot on your To-Do list ;-)

Cheers,

PeterP
Find all posts by this user
Quote this message in a reply
04-21-2021, 05:36 PM
Post: #26
RE: HP-41CL Remote Keyboard / Scripting
With the following configuration you could have a starting point using FOCAL

Hardware & software:
Code:
HP-41   → calculator
82160A  → HP-IL module
82183A  → Extended I/O module
PIL-Box → HP-IL-to-USB interface
        → Any HP-IL peripherals emulator that has a console/keyboard emulator (I will use pyILPER for my example)

My HP-IL loop config:
Code:
loop address 0 : HP-41 controller
loop address 1 : pyILPER terminal emulator
loop address 2 : pyILPER printer emulator
               : pyILPER scope configured to see incoming and outgoing HP-IL frames to see the polling and the responses

HP-41 Input from remote keyboard example:
Code:
AUTOIO    // reconfigure the loop
1         // keyboard address
SELECT    // select device
65        // stop character, here ASCII 65 or 'A'
INAC      // Ext-I/O function, activate loop polling and ALPHA filling until full or until stop character received
AVIEW     // show received data

In pyILPER terminal windows type:
Code:
QWERTYA

On the HP-41, ALPHA should contains:
Code:
DQWERTY

There are several HP-IL input functions in Extended-I/O ROM, read the manual and use your imagination to surprise us ! Cool

Sylvain
Find all posts by this user
Quote this message in a reply
04-25-2021, 10:03 PM
Post: #27
RE: HP-41CL Remote Keyboard / Scripting
(04-14-2021 10:37 PM)rocket.scientist Wrote:  So I am afraid I already know the best answer is "get a HP-XX instead". I am looking for a facility, likely using HP-IL to do keyboard entry remotely on a HP-41CL. Doing a bit of searching, I am not finding any good options, so I have come to the Oracles for a vision.

This topic came back to mind as I was going through the update process for my CL. After fat fingering a few entries it became evident that this was going to be interesting, with a couple of restarts along the way.

So here is my question. Is remote scripting / remote keyboard entry possible with a 41C class machine?

Thanks for the wisdom.

-Pat (KG5YPQ)

Quick answer, not easily. The keyboard is polled and there are several places where it is checked, even in the OS code. Not to mention that plug-in ROMS do not have to use the OS routines to check the keyboard.

To do this in software would require identifying all of the the places where you might want to inject a virtual keycode/flag and instead call a special subroutine that allowed a poll of the serial port to be substituted.

Doing it in hardware would be much simpler, although that would mean reprogramming the FPGA. All that would be required is the ability to substitute the UART buffer for the keyboard buffer and the receive data available flag for the keyboard flag. This would work no matter where the keyboard scan code resided. It's a fairly trivial change given that the two flags operate essentially the same way relative to data or keycode.
Visit this user's website Find all posts by this user
Quote this message in a reply
06-05-2021, 09:17 PM
Post: #28
RE: HP-41CL Remote Keyboard / Scripting
(04-25-2021 10:03 PM)Monte Dalrymple Wrote:  
(04-14-2021 10:37 PM)rocket.scientist Wrote:  So I am afraid I already know the best answer is "get a HP-XX instead". I am looking for a facility, likely using HP-IL to do keyboard entry remotely on a HP-41CL. Doing a bit of searching, I am not finding any good options, so I have come to the Oracles for a vision.

This topic came back to mind as I was going through the update process for my CL. After fat fingering a few entries it became evident that this was going to be interesting, with a couple of restarts along the way.

So here is my question. Is remote scripting / remote keyboard entry possible with a 41C class machine?

Thanks for the wisdom.

-Pat (KG5YPQ)

Quick answer, not easily. The keyboard is polled and there are several places where it is checked, even in the OS code. Not to mention that plug-in ROMS do not have to use the OS routines to check the keyboard.

To do this in software would require identifying all of the the places where you might want to inject a virtual keycode/flag and instead call a special subroutine that allowed a poll of the serial port to be substituted.

Doing it in hardware would be much simpler, although that would mean reprogramming the FPGA. All that would be required is the ability to substitute the UART buffer for the keyboard buffer and the receive data available flag for the keyboard flag. This would work no matter where the keyboard scan code resided. It's a fairly trivial change given that the two flags operate essentially the same way relative to data or keycode.

Thank you for that, Monte. I agree with your wisdom that there are advantages to doing this in hardware. While I have possessed the best of intentions to begin digging into your excellent CL FPGA solution, reality always intervenes. Maybe once I decide to fully and truly retire will I have the time to do this. Smile

There has been a lot of good dialog here, and I appreciate the discussion. My take-away is that it is possible to remote control the HP-41, both by bodge and by elegance. And that there is no in-place solution, so we get to be first.

Cool!

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




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