Page 1 of 5

UPDATE: DMCP-3.13 / DM42-3.13

Posted: Fri Mar 15, 2019 12:45 pm
by grsbanks
Image

This latest update to both the DMCP and DM42/Free42 parts of the DM42's firmware brings the following improvements:
  • DMCP-3.13
    • File listing enhancements
    • Clear history buffer when help file changed
    • Fixed hangs on some boards
  • DM42-3.13
    • Update Free42 core to 2.0.24
    • Help file renamed to dm42help.htm
    • Year updated in copyright notices
    • Flag 64 reflects Shift status
File Listing enhancements

File load and save dialogs now support navigating the FAT disk's directory structure.

With a directory listing open, F6 switches between single column and two column display, allowing more items to be shown on screen at the same time. If you're in two-column mode then [X<>Y] allows you to switch between the left and right columns. F5 changes the way the file size is displayed, toggling between bytes and, where applicable, #.#K (e.g. 1.4K).

The DM42 can now handle up to 2000 items in a directory.

Clear history buffer when help file changed

Going back to the previously viewed part of the help file would give unpredictable results if the help file had been changed since it was last viewed. Pointers in the history buffer would point to now invalid locations within the file. This has been resolved by clearing the history buffer whenever the DM42 detects that the help file has been changed.

Fixed hangs on some boards

There was a timing issue affecting a small number of boards that could lead to a hang during operations such as "Firmware update from FAT" or even simply plugging into or disconnecting from the DM42's USB port. This has been fixed.

Please note that if your DM42 is affected by this problem then you will still have to update to this version 3.13 using the "old" dm_tool method. However, once 3.13 is installed on your DM42, you will be able to update from FAT like the rest of us.

Free42-2.0.24

Recent updates to Free42 have been rolled into the DM42. For details see Free42's history page

Help file renamed to dm42help.htm

The HTML file used as a help file by the DM42 has been renamed to "dm42help.htm". If no such file is found then the DM42 looks for the old style index.htm, renames it to dm42help.htm and uses that. Moving forward, the file to download from the SwissMicros site is dm42help.htm.

Flag 64 reflects Shift status

There are a number of so-called "reserved" system flags in the HP-42S that are unused and were reserved for future enhancements of the HP-42S that never actually happened. Free42 takes advantage of Flag 31 to remember whether dates are to be processed as dd.mmyyyy or mm.ddyyyy (as does the HP-41C Time Module from which the time and date functions were borrowed in Free42) and the DM42 has extended Free42 (it's a one-line patch!) to have Flag 64 store the Shift state of the machine just before the last key was pressed.

This works both with KEYG/KEYX instructions to build a custom menu used within a program and with programs called by a CUSTOM menu populated with ASSIGN.

If you test the status of Flag 64 when you enter the program invoked by pressing the menu key or straight after the label jumped to by a KEYG/KEYX instruction, you can tell if the user pressed Shift before pressing the button. This allows you to have your program behave differently depending on whether it was invoked with or without pressing Shift first.

This short program illustrates the principle:

Code: Select all

00 { 33-Byte Prgm }
01▸LBL "FTST"
02 "SHIFT "
03 FC? 64
04 ├"NOT "
05 ├"PRESSED"
06 AVIEW
Now assign it to a menu key:

Code: Select all

ASSIGN "FTST" TO 01
If you just invoke the program by pressing the function key [FTST], you get "SHIFT NOT PRESSED".

If you press [Shift] before pressing [FTST], you get "SHIFT PRESSED"

It also works with XEQ:

[XEQ] [FTST] => "SHIFT NOT PRESSED"

[XEQ] [Shift] [FTST] => "SHIFT PRESSED"

Note that Flag 64 is trashed as soon as you press another key, so you have to examine it as soon as possible.

It works in a similar way with KEYG/KEYX instructions. Take a look at this simple program:

Code: Select all

00 { 40-Byte Prgm }
01▸LBL "KTST"
02 "F1"
03 KEY 1 GTO 01
04 MENU
05 STOP
06 GTO "KTST"
07▸LBL 01
08 CLA
09 FS? 64
10 "Shift-"
11 ├"F1"
12 AVIEW

The method for updating your DM42 is covered in the manual.

The latest firmware binaries are available here.

SHA1 checksums:
  • a77f3d16c0c24b71e4642ed67a7e46171e3e85aa DM42-3.13.pgm
  • bd07c2f96557fb26599a0f936fa7824c50686236 DMCP_flash_3.13.bin
  • 50f0a204c840888748ff84c3cfea93ef28f09bcb DMCP_flash_3.13_DM42-3.13.bin

Re: UPDATE: DMCP-3.13 / DM42-3.13

Posted: Fri Mar 15, 2019 1:08 pm
by revwillie
Combo file FAT update smooth as butter.

Re: UPDATE: DMCP-3.13 / DM42-3.13

Posted: Fri Mar 15, 2019 1:31 pm
by dlachieze
Perfect update with the combo file from 3.12.

The new file management with directories, increased file items and two column display is really cool :)

Just noticed one thing: if you move to the <Parent> directory from the PROGRAMS or STATE directories, then both of them are not listed and you cannot go back.

20190315-13245015.png
20190315-13245015.png (2.48 KiB) Viewed 11119 times

Re: UPDATE: DMCP-3.13 / DM42-3.13

Posted: Fri Mar 15, 2019 1:49 pm
by grsbanks
Hmm... Ça marche comme prévu chez moi…

Image

It works as expected here...

Re: UPDATE: DMCP-3.13 / DM42-3.13

Posted: Fri Mar 15, 2019 2:10 pm
by Thomas_ER
Many thanks for the update.
One calculator was perfect,
but on the second there is no response at

Code: Select all

Load Flash From FAT
...
Press [ENTER] to continue anyway
Only RESET helps to go back.
I used the standard procedure many times, and also did an additional 'Format Flash/FAT',
but the calc does nothing if I press ENTER.

Any hints?

UPDATE: I did start the Bootlader (in the Systems Menu), and used the "old" DM-Tool.
This path worked; uff. ;)
But I don't understand, why there is no response to pressing 'ENTER'.

Re: UPDATE: DMCP-3.13 / DM42-3.13

Posted: Fri Mar 15, 2019 2:36 pm
by grsbanks
So, one hangs when it attempts the update from FAT. If you press RESET does it recover?

If so, then this looks like the fault that 3.13 addresses and you should be able to update using dm_tool.

Re: UPDATE: DMCP-3.13 / DM42-3.13

Posted: Fri Mar 15, 2019 2:41 pm
by David
dlachieze wrote:
Fri Mar 15, 2019 1:31 pm
Perfect update with the combo file from 3.12.

The new file management with directories, increased file items and two column display is really cool :)

Just noticed one thing: if you move to the <Parent> directory from the PROGRAMS or STATE directories, then both of them are not listed and you cannot go back.
That looks very strange. Would it be possible you can make disk image from your calc FAT?
Something like
dd if=/dev/sde of=dm42.fat
and send it to me (david@swissmicros.com)?

Re: UPDATE: DMCP-3.13 / DM42-3.13

Posted: Fri Mar 15, 2019 2:46 pm
by grsbanks
Thomas_ER wrote:
Fri Mar 15, 2019 2:10 pm
UPDATE: I did start the Bootlader (in the Systems Menu), and used the "old" DM-Tool.
This path worked; uff. ;)
But I don't understand, why there is no response to pressing 'ENTER'.
It's the very fault that V3.13 addresses :) There was no response to [ENTER] because the CPU had decided to hang/freeze.

A microsecond was added to the timing of some component state changes involved in addressing the QSPI chip. The timings used until now were probably a bit too close to the tolerance of these chips and giving them a bit of extra time to settle makes them much happier :)

Re: UPDATE: DMCP-3.13 / DM42-3.13

Posted: Fri Mar 15, 2019 3:26 pm
by dlachieze
David wrote:
Fri Mar 15, 2019 2:41 pm
dlachieze wrote:
Fri Mar 15, 2019 1:31 pm
Just noticed one thing: if you move to the <Parent> directory from the PROGRAMS or STATE directories, then both of them are not listed and you cannot go back.
That looks very strange. Would it be possible you can make disk image from your calc FAT?
Something like
dd if=/dev/sde of=dm42.fat
and send it to me (david@swissmicros.com)?
FAT image sent.

Re: UPDATE: DMCP-3.13 / DM42-3.13

Posted: Fri Mar 15, 2019 3:47 pm
by rprosperi
DM42-3.13 Update smooth and quick, no issues encountered (I used combo file).

Presumably creating (and removing/renaming) directories in the PROGRAMS folder can/should only be done via USB-connected PC?

Is there a sense of the 'current' folder being retained, and if so, what happens if that folder is deleted or renamed (remotely) while it is current?

Nice update guys, thanks for the hard work building and testing these mods to improve the DM42