DM42 / Free42 state file compatibility

Discussion around the Swiss Micros DM42 calculator.
Thomas Okken
Posts: 970
Joined: Tue May 02, 2017 5:48 pm
Location: The Netherlands
Contact:

DM42 / Free42 state file compatibility

Post by Thomas Okken »

Can Free42 and the DM42 read each other's state files? Has anyone tried?

N.B. The latest DM42 firmware wouldn't be able to read the latest Free42 state, since there's been a state file format change between 3.0.5 and 3.0.6, but it might work with Free42 3.0.5 or earlier. I don't have my DM42 with me at the moment so I can't try this myself, but the issue has come up and I am curious...
rprosperi
Posts: 1190
Joined: Mon Apr 24, 2017 7:48 pm
Location: New York

Re: DM42 / Free42 state file compatibility

Post by rprosperi »

Except for the most recent Free42 change, yes they should be able to read each other's state files, though I've actually not tried doing so since the feature first became available, more than a year ago (IIRC).
Last edited by rprosperi on Tue Nov 02, 2021 1:22 pm, edited 1 time in total.
--bob p

DM42: β00071 & 00282, DM41X: β00071 & 00656, DM10L: 071/100
User avatar
Walter
Posts: 2074
Joined: Tue May 02, 2017 11:13 am
Location: Close to FRA, Germany

Re: DM42 / Free42 state file compatibility

Post by Walter »

rprosperi wrote:
Tue Nov 02, 2021 12:17 am
..., yes they should be able to read each other's state files, though I've actually tried doing so since the feature first became available, ...
? Isn't there a word missing? One at least?
DM42 SN: 00041 β
WP 43S running on this device

HP-35, HP-45, ..., HP-35S; WP 34S & WP 31S for obvious reasons; DM16L
rprosperi
Posts: 1190
Joined: Mon Apr 24, 2017 7:48 pm
Location: New York

Re: DM42 / Free42 state file compatibility

Post by rprosperi »

Not any more! Thanks Walter, for a careful reading and gentle prod...
--bob p

DM42: β00071 & 00282, DM41X: β00071 & 00656, DM10L: 071/100
Thomas Okken
Posts: 970
Joined: Tue May 02, 2017 5:48 pm
Location: The Netherlands
Contact:

Re: DM42 / Free42 state file compatibility

Post by Thomas Okken »

Thanks Bob!

If it worked a year ago, I'd assume it still works now, since nothing significant has changed about Free42 state file handling since then.

When you did try, did you try it in both directions?
rprosperi
Posts: 1190
Joined: Mon Apr 24, 2017 7:48 pm
Location: New York

Re: DM42 / Free42 state file compatibility

Post by rprosperi »

Thomas Okken wrote:
Tue Nov 02, 2021 2:06 pm
Thanks Bob!

If it worked a year ago, I'd assume it still works now, since nothing significant has changed about Free42 state file handling since then.

When you did try, did you try it in both directions?
Yes, using the latest of both at the time, and had no problems. I was using relatively vanilla state files, each with less than a dozen programs, so I would not call it thorough testing, but AFAIK, the structures do not vary widely with a larger number of programs, so assumed it would scale fine.
--bob p

DM42: β00071 & 00282, DM41X: β00071 & 00656, DM10L: 071/100
Thomas Okken
Posts: 970
Joined: Tue May 02, 2017 5:48 pm
Location: The Netherlands
Contact:

Re: DM42 / Free42 state file compatibility

Post by Thomas Okken »

That's good to hear. Thanks!
whuyse
Posts: 167
Joined: Thu Dec 21, 2017 1:23 pm

Re: DM42 / Free42 state file compatibility

Post by whuyse »

Thomas Okken wrote:
Mon Nov 01, 2021 11:28 pm
there's been a state file format change between 3.0.5 and 3.0.6
And encoding, perhaps?
I noticed by chance that the two program lines

Code: Select all

STOx "ABCD"
and the one created with

Code: Select all

CLA
132
XTOA
+"ABCD" @ (why can't the append character just be a '+' instead of the '|-' kludge?)
A2LINE
are different in the latest Free42 (the second one shows as a 5-character text line), but are both decoded as F58441424344 in the DM42 decoder (that admittedly lags behind a couple of versions).

Cheers, Werner
42S #3249S01123
DM42 #00345
DM41X #01215
Thomas Okken
Posts: 970
Joined: Tue May 02, 2017 5:48 pm
Location: The Netherlands
Contact:

Re: DM42 / Free42 state file compatibility

Post by Thomas Okken »

Under the HP-42S encoding, Fn 84 is STO× <alpha>, so it makes sense that both would decode the same. What's happening here is that Free42 uses a different encoding internally, i.e. not the same as "raw" format, so the line created by A2LINE really is a string, and not a STO× call. But if you exit and restart the app, and then do something to cause the display to refresh, you'll find that the "▒ABCD" has turned into STO× "ABCD" after all. This happens because in the state file, programs are written in raw format, so the distinction between "▒ABCD" and STO× "ABCD" disappears.

Fixing this inconsistency would require having A2LINE check if the string in question happens to be one of the HP-42S or Free42 extensions.
whuyse
Posts: 167
Joined: Thu Dec 21, 2017 1:23 pm

Re: DM42 / Free42 state file compatibility

Post by whuyse »

I made an 8x5 font (digits only), and to be able to store it as a file, I created a program that creates the matrix. I had the luminous idea of using the DM42 encoder's hex editor to just create the necessary strings, and ASTO ST X \-> to save them in the matrix (using nnn XTOA would make the program a lot larger). It works for a 7x5 font, but not 8x5 as there you have codes > 127, and the ones starting with a letter (in hex) are not accepted by the decoder at all, and some others (like 84, 85, 86, ..) have been used in commands accepting alpha parameters. Ah well.
Werner
42S #3249S01123
DM42 #00345
DM41X #01215
Post Reply