Page 2 of 2

Re: Question about updating the firmware on the DM42 calc.

Posted: Tue Sep 08, 2020 10:15 pm
by ijabbott
HPMike wrote:
Mon Sep 07, 2020 11:38 pm
ijabbott wrote:
Mon Sep 07, 2020 10:33 pm
I think whichever state file was last saved or loaded before an update gets reloaded automatically after an update.
The STATE.f42 file that has been saved is automatically loaded after an update. State files saved with other names are NOT loaded.
That doesn't seem to agree with the source code. From what I can tell it does the following when you save the state:
  1. Saves the state file name via a DMCP syscall.
  2. Saves the state to the state file.
  3. Forces a system reset via DMCP syscall.
Then on reloading DM42PGM:
  1. Gets the current state file name via a DMCP syscall.
  2. Loads the state file (if it exists).
(Some details skipped, obviously.)

Re: Question about updating the firmware on the DM42 calc.

Posted: Tue Sep 08, 2020 11:33 pm
by HPMike
ijabbott wrote:
Tue Sep 08, 2020 10:15 pm
HPMike wrote:
Mon Sep 07, 2020 11:38 pm
ijabbott wrote:
Mon Sep 07, 2020 10:33 pm
I think whichever state file was last saved or loaded before an update gets reloaded automatically after an update.
The STATE.f42 file that has been saved is automatically loaded after an update. State files saved with other names are NOT loaded.
That doesn't seem to agree with the source code. From what I can tell it does the following when you save the state:
  1. Saves the state file name via a DMCP syscall.
  2. Saves the state to the state file.
  3. Forces a system reset via DMCP syscall.
Then on reloading DM42PGM:
  1. Gets the current state file name via a DMCP syscall.
  2. Loads the state file (if it exists).
(Some details skipped, obviously.)
I've never delved into the source code, but I can see how you would be correct. I have several state files saved with different names, but always save one with the default STATE.f42 name just prior to a firmware update and this is the one that is automatically loaded after the update is complete. It never prompts me to choose from a list of names, so I assumed incorrectly that it would not load an alternatively named state file. Thanks for the clarification.

Re: Question about updating the firmware on the DM42 calc.

Posted: Wed Sep 09, 2020 8:54 pm
by DA74254
Yes, that is what I meant too.
I started to write a reply this morning, but couldn't doublecheck, sp cancelled.

But if I recall correctly, it'll load last active statefile. My files are called "one", "two", "three", etc and none of them "STATE". So always last loaded when updated. I checked, and my current statefile is "four". (Which means I've had 4 updates since statefiles emerged)

Re: Question about updating the firmware on the DM42 calc.

Posted: Thu Sep 10, 2020 5:48 pm
by svarre69
Works like a charm!! Thank you. :lol:

All the best
Peter.