Transferring programs to and from a HP41
|
04-12-2024, 12:43 PM
(This post was last modified: 04-12-2024 12:45 PM by ThomasF.)
Post: #1
|
|||
|
|||
Transferring programs to and from a HP41
Hi all,
Long story in short format: I can now send a program from my 41 that is saved as a RAW file on my PC - ready to be used in an emulator or in the DM41X without any translation - in shorter time then it takes to read this line! Just as a teaser and because it could be done ... I have always been looking for a simple way to down- and up-load programs to my 41. As can be found in other posts I have e.g. implemented the Wand in my Tiny41 board, so I can "scan" any barcode on my PC and directly download it to the 41 by emulating the Wand (i.e. I don't need a Wand - i just transfer the bytes in the same format as from the real 82153A into the 41). I got inspired by another thread dealing with the 41CL and started to look into the other way, ie. how to save programs from the 41 into the PC? Well, printing can't be used, since some information is lost in the process (i.e. synthetic string etc). Then I thought of making the Tiny41 as a new peripheral to the 41, and send data to it. So I implemented some new instructions to handle the bytes in the Pico and a program to save the file on the PC. To receive the file on my PC I start the program stating a file name to save the program into: Code: $ getraw my_prog.raw Then on the 41 I execute the new command SENDP: Code: XEQ ALPHA SENDP ALPHA Done - that's it! The file is transferred! For anyone interested, below is the complete MCODE program in the 41 to send the file. It finds the start and length of the given program, then sends all bytes to the Tiny41 board. In the Tiny41 the bytes are extracted and just sent over USB to a virtual COM-port on the PC, which the getraw program reads and then stores the bytes in the named raw file. The IR-led on the board could also be used so that the program could be transmitted that way instead, having a program looking at the IR-receiver on the PC instead - or another 41 with a similar board (with an IR-receiver) receiving the file - and voila: easy file-transfer between two 41's! The trick I use is some new instructions which are interpreted by the Tiny41 board, right now I use 3 instructions:
In this example I use command 002 to init the transfer (program size is in M): Code: C=0 ALL Sending a complete program to the PC is now as easy as printing it and it just takes a second or two ... Happy coding! Cheers, Thomas Note - this is just a proof of concept and there are room for improvements, e.g. I have not dealt with FOCAL code in ROM. But it works as an example for the flexibility and the power of the Tiny41 (Pico) module and what could be done with it! Code: #090 ; "P" [35/45/55/65/67/97/80 21/25/29C 31E/32E/33E|C/34C/38E 41C|CV|CX 71B 10C/11C/12C/15C|CE/16C 32S|SII/42S 28C|S 48GX/49G/50G 35S 41X] |
|||
04-12-2024, 01:55 PM
Post: #2
|
|||
|
|||
RE: Transferring programs to and from a HP41
Thomas, amazing stuff!
I just searched but was not able to find a description for building the Tiny41 etc - will you release that at some point maybe? Or should I look under a different thread name than Tiny41? What would be great is to extend this to send a full module / page to the PC and back (SaveMod GetMod) for those 41Cs that have a RamBox/Clonix/NovD/etc installed. I think that would be quite cool. Cheers, PeterP |
|||
04-12-2024, 02:08 PM
Post: #3
|
|||
|
|||
RE: Transferring programs to and from a HP41
(04-12-2024 01:55 PM)PeterP Wrote: Thomas, amazing stuff! Hi Peter, Start here: https://www.hpmuseum.org/forum/thread-20...light=pico (Or just search for Pico or RP2040 in the forum.) The Tiny already have all modules and Extended memory in it's flash memory, so these can be copied back and forth already. But a program that reads other modules should already be available I think (for other ramboxes or Clonix modules etc) and should be easy to adopt. Tiny41 is my own device, which is a development board I made, which I could share info about, but nothing I'm producing. But, maybe there will be something coming ... Cheers, Thomas [35/45/55/65/67/97/80 21/25/29C 31E/32E/33E|C/34C/38E 41C|CV|CX 71B 10C/11C/12C/15C|CE/16C 32S|SII/42S 28C|S 48GX/49G/50G 35S 41X] |
|||
04-13-2024, 11:30 AM
Post: #4
|
|||
|
|||
RE: Transferring programs to and from a HP41
(04-12-2024 02:08 PM)ThomasF Wrote: But, maybe there will be something coming ...Not a maybe, something will be coming for sure Regards, Meindert |
|||
04-13-2024, 05:42 PM
Post: #5
|
|||
|
|||
RE: Transferring programs to and from a HP41
(04-13-2024 11:30 AM)MeindertKuipers Wrote:(04-12-2024 02:08 PM)ThomasF Wrote: But, maybe there will be something coming ...Not a maybe, something will be coming for sure Looking forward to it! "To live or die by your own sword one must first learn to wield it aptly." |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)