Post Reply 
HP-41CL self-update via HP-IL
11-30-2017, 04:09 AM (This post was last modified: 11-30-2017 09:40 AM by Sylvain Cote.)
Post: #61
RE: HP-41CL self-update via HP-IL
(11-30-2017 02:42 AM)rprosperi Wrote:  Does anyone have practical experience with these tools and could offer advice if this is a viable approach to migrate this solution to windows?
Congratulation to Geir and Håkan for their nice work.
I did not participate on this thread because I did not have any free time left to contribute.
Running Python, Ruby, Perl, etc is pretty easy on any platform.
It normally involve installing the language interpreter, then the package manager and installing the packages used by the user program.
Once I release the next version of clupdate, who should be any time now, I will setup a Windows VM and make it work there.
Sylvain
Find all posts by this user
Quote this message in a reply
11-30-2017, 09:33 AM (This post was last modified: 11-30-2017 09:36 AM by jsi.)
Post: #62
RE: HP-41CL self-update via HP-IL
(11-30-2017 02:42 AM)rprosperi Wrote:  
(11-29-2017 08:34 PM)mfleming Wrote:  I have a patched Windows version of the python script working but it needs a bit more testing. Key changes needed for Windows:

Does anyone have practical experience with these tools and could offer advice if this is a viable approach to migrate this solution to windows?

It is pretty easy to have this program run under Windows in a single source:
  • build path with os.path.join in a platform independend way
  • use input redirection instead of cat or type
  • the "touch" command is not needed

Code:

output_image=os.path.join(basedir,"cl_update.lif")
...
        input_file=os.path.join(romdir,filename)
        if hepax:
            os.system("rom41hx "+romname+" < "+input_file+" | lifput "+output_image)
...

Interpreter languages like Python are very well suited to write platform independent code because they have very powerful libraries that handle the platform specific issues. If you use python then please use Python 3 because Python 2 is "end of life".

Interpreter languages behave different as compiled languages like C. Transformation of more complex applcations introduces side effects that are difficult to discover and to handle. Therefore this approach never became generally accepted.
Find all posts by this user
Quote this message in a reply
11-30-2017, 07:53 PM
Post: #63
RE: HP-41CL self-update via HP-IL
(11-30-2017 09:33 AM)jsi Wrote:  It is pretty easy to have this program run under Windows in a single source:
  • build path with os.path.join in a platform independend way
  • use input redirection instead of cat or type
  • the "touch" command is not needed

I've incorporated Joachim's suggestions and a few other tweaks. I've tested for hepax equal to True and False but haven't tried the condition of more than 256 ROMs (that would be a trial to set up!) It works under Windows 10 and I'll try the Python program on an Ubuntu VM later.

The attached Python script has "_W10" appended to the name to distinguish it from the regular distribution file. The file had to be zipped to get it past the upload filter Smile

Hope this helps all us Windoze users,
~Mark


Attached File(s)
.zip  HP-41CL_update_W10.zip (Size: 2.17 KB / Downloads: 8)

"Don't assume quotations pulled from the Internet are genuine."
-- George Washington
Find all posts by this user
Quote this message in a reply
12-01-2017, 11:31 AM
Post: #64
RE: HP-41CL self-update via HP-IL
Fixed with the latest release (v. 0.6)

Also introduced HFUPDAT on the HP-41 side to read in HEPAX compressed ROMs via READROM.
Find all posts by this user
Quote this message in a reply
12-01-2017, 04:54 PM
Post: #65
RE: HP-41CL self-update via HP-IL
(12-01-2017 11:31 AM)Geir Isene Wrote:  Fixed with the latest release (v. 0.6)

Also introduced HFUPDAT on the HP-41 side to read in HEPAX compressed ROMs via READROM.

URL link plz. ?
Find all posts by this user
Quote this message in a reply
12-01-2017, 05:12 PM
Post: #66
RE: HP-41CL self-update via HP-IL
https://github.com/isene/hp-41cl_update
Find all posts by this user
Quote this message in a reply
12-02-2017, 03:49 PM (This post was last modified: 12-02-2017 03:51 PM by Geir Isene.)
Post: #67
RE: HP-41CL self-update via HP-IL
Joachim,

I'm getting some really weird results with TEXTLIF now (after latest update) - I take a simple file like z.txt (see github repo) and do:

Code:
cat roms/z.txt | textlif -r 0 Z | lifput cl_update.lif

When I then do:

Code:
lifget cl_update.lif Z | liftext

... I get garbage out.

Could you take a look at this?
Find all posts by this user
Quote this message in a reply
12-02-2017, 11:41 PM
Post: #68
RE: HP-41CL self-update via HP-IL
Additional data:

Code:

$ echo "ABC" | textlif -r 0 A | lifput cl_update.lif ; lifget cl_update.lif A | liftext
liftext: Unexpected end of file 
        %9 ABCÿÿ
Find all posts by this user
Quote this message in a reply
12-03-2017, 08:26 AM
Post: #69
RE: HP-41CL self-update via HP-IL
See my comment on GitHub for an explanation.
Find all posts by this user
Quote this message in a reply
12-03-2017, 11:39 AM
Post: #70
RE: HP-41CL self-update via HP-IL
The problem is deeper than that - when I do GETAS from the HP-41, the file "Z" is garbage. So it isn't just about the lifget part.
Find all posts by this user
Quote this message in a reply
12-03-2017, 12:37 PM
Post: #71
RE: HP-41CL self-update via HP-IL
Could you please post (or make available for download) the LIF image with the file "Z"? Than I can investigate that.
Find all posts by this user
Quote this message in a reply
12-03-2017, 03:25 PM
Post: #72
RE: HP-41CL self-update via HP-IL
Here: https://github.com/isene/hp-41cl_update/...roms/z.txt
Find all posts by this user
Quote this message in a reply
12-03-2017, 04:58 PM
Post: #73
RE: HP-41CL self-update via HP-IL
Did on UNIX:
Code:

cat z.txt | textlif -r 0 Z | lifput cl_update.lif
On the HP-41:
Code:

"Z"
10
XEQ CRFLAS
XEQ GETAS
0
SEEKPTA
GETREC
with no problems. The alpha register shows "5".
Could you please make the image file available that you mounted with pyILPER?
Find all posts by this user
Quote this message in a reply
12-03-2017, 05:27 PM
Post: #74
RE: HP-41CL self-update via HP-IL
Hold on - it seems there is a problem with my Python script i particular (Ruby script works fine).
Find all posts by this user
Quote this message in a reply
12-03-2017, 10:49 PM
Post: #75
RE: HP-41CL self-update via HP-IL
Yup. Your LIFUTILS are not to blame. My lame Python skills are.

I removed the Python script from the repo. Waiting only for Håkan to include FUPDATE in the CLILUPD rom and we're on release v. 1.0
Find all posts by this user
Quote this message in a reply
12-05-2017, 01:05 AM
Post: #76
RE: HP-41CL self-update via HP-IL
I think I may have discovered the underlying issue here. I switched HDRIVE while the HP-41CL was on and hooked to the PILbox. The calc doesn't like that and doesn't retreive the ascii file correctly. It works fine when I turn the calc off, and then switch the HDRIVE (or change the target LIF image) before I turn the calc on again.
Find all posts by this user
Quote this message in a reply
12-08-2017, 08:10 PM
Post: #77
RE: HP-41CL self-update via HP-IL
In case someone watching this thread missed the release thread - I am hoping for some Windows users to test the version 1.0 release: http://www.hpmuseum.org/forum/thread-9632.html
Find all posts by this user
Quote this message in a reply
Post Reply 




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