## Ladybug module on the DM41X

Please report issues with the DM41X Beta Firmware in this sub-forum
dlachieze
Posts: 257
Joined: Thu May 04, 2017 12:20 pm
Location: France

### Ladybug module on the DM41X

hth313 wrote:
Sun Nov 08, 2020 3:47 am
rprosperi wrote:
Sun Nov 08, 2020 12:34 am
hth313 wrote:
Sat Nov 07, 2020 11:52 pm
So I will conclude that the modules I write that rely on timing loops in certain situations do not work well on the DM41X.
It's trivial to find out, just install them and give it a try, probably less than 2 minutes start to finish.
OK, then I wait for someone to spend 2 minutes after I release the update a couple of weeks from now.
Well, I did try the Ladybug module. I loaded the latest ladybug.mod, OS4.mod and boost.mod from hp41.org, I did a quick check and it seems to work however I noticed some quirks. If you want me to do more specific checks let me know.

First, the ladybug module assigns SHIFT USER to EXITAPP, however on the DM41X SHIFT USR is used to access the DM41X setup. So this key combination is masked to the ladybug module. Same for SHIFT PRGM, assigned to MASKL by ladybug, but overridden on the DM41X by SIZE.

Then I noticed that the ladybug module has a specific display management to display integers, however on the DM41X we can display more than the X register and so the integer display does not extend to Y, Z or T. The integer numbers are reflected somehow on the exponent and not the mantissa part as shown below with the same integer number in X and Y:

20201109-12055257.bmp (12.31 KiB) Viewed 500 times
Last edited by dlachieze on Mon Nov 09, 2020 4:51 pm, edited 1 time in total.
DM42: 00425 - DM41X: β00066
bernouilli
Posts: 29
Joined: Tue Jun 19, 2018 11:01 am
Location: France

### Re: Ladybug module on the DM41X

The option to display only 1 line, as in the real HP41, would be handy in this case (and some others).
DM15L - DM42 - DM41x
hth313
Posts: 36
Joined: Thu Jun 15, 2017 8:00 pm

### Re: Ladybug module on the DM41X

Looks very promising. Yes, a one line display option would make it look better. Isn't there a mode to show the alpha register instead of Y? The numbers on the stack are actually right aligned binary numbers, or non-normalized numbers. Thank you for the offer, I will get back to you when I getting the Boost module together with some new stuff as it uses several timing loops.
dlachieze
Posts: 257
Joined: Thu May 04, 2017 12:20 pm
Location: France

### Re: Ladybug module on the DM41X

hth313 wrote:
Mon Nov 09, 2020 6:25 pm
Isn't there a mode to show the alpha register instead of Y?
Yes, instead of X and Y you can choose to have X and Alpha, but I wanted to show how integer numbers are displayed in the other stack registers.
DM42: 00425 - DM41X: β00066
hth313
Posts: 36
Joined: Thu Jun 15, 2017 8:00 pm

### Re: Ladybug module on the DM41X

dlachieze wrote:
Tue Nov 10, 2020 7:50 pm
hth313 wrote:
Mon Nov 09, 2020 6:25 pm
Isn't there a mode to show the alpha register instead of Y?
Yes, instead of X and Y you can choose to have X and Alpha, but I wanted to show how integer numbers are displayed in the other stack registers.
It should be like the way NNNs are shown normally. Hardly any surprise as it has no means to run the code needed to get it to look right. It is in theory possible to make it work, but it is not anything I have control over. It would require quite some elaborate analysis of buffers and memory, setting up for running some sandboxed code.
hth313
Posts: 36
Joined: Thu Jun 15, 2017 8:00 pm

### Re: Ladybug module on the DM41X

dlachieze wrote:
Mon Nov 09, 2020 12:26 pm
If you want me to do more specific checks let me know.
I have just released new version of the OS4 and Boost modules. The Ladybug remains unchanged as before.

I think it can worth checking the timing loops on the DM41X, they are as follows.

Catalog 7. You need at least two buffers, having started Ladybug once should give you two buffers, 0 and 15. Just see if you have time to see them when sped up.

RAMED, just start RAMED and should see an animated cursor that you can move using the USER and PRGM keys. Press R/S to leave this mode when done.

The PAUSE function. The best way is to enter a program like the following:

Code: Select all

    LBL 01
PAUSE
1.03
STO 00
LBL 02
0
SIN
ISG 00
GTO 02
GTO 01

Enter INTEGER mode, press and hold R/S to see the next line. This R/S key has been replaced and will visually appears normal. It has its own timeout loop in its key debounce. When you see the line to be executed, release R/S. When the calculator gets to PAUSE you should see an integer number (not default X display) for about a second. You can try to enter a couple of (hex) digits here and it should work the way you expect. Then when it is pausing again, press R/S to terminate (during pause).

I had some issues with PAUSE and stopping it, which is why I made a replacement R/S function.

References:
https://github.com/hth313/boost41/releases/tag/v0B
https://github.com/hth313/OS4/releases/tag/v2A
dlachieze
Posts: 257
Joined: Thu May 04, 2017 12:20 pm
Location: France

### Re: Ladybug module on the DM41X

hth313 wrote:
Sat Nov 21, 2020 10:15 pm
I have just released new version of the OS4 and Boost modules. The Ladybug remains unchanged as before.

I think it can worth checking the timing loops on the DM41X, they are as follows.
I’ve downloaded and installed on my DM41X the latest Boost and OS4 mod files. Here is my configuration for testing: using the DM41X CONF menu, I have assigned EXITAPP to [Shift] [Alpha], MASKL to [Shift] [Up], MASKR to [Shift] [Down], INTEGER to [CST] [ I ], FAST to [CST] [ F ] and SLOW to [CST] [ G ] (just to be close to FAST).

Here is what I see :
hth313 wrote:
Sat Nov 21, 2020 10:15 pm
Catalog 7. You need at least two buffers, having started Ladybug once should give you two buffers, 0 and 15. Just see if you have time to see them when sped up.
This works fine, I can see the two buffers 0 and 15 in FAST mode. I don’t see any difference in the time they are displayed between SLOW and FAST modes.
hth313 wrote:
Sat Nov 21, 2020 10:15 pm
RAMED, just start RAMED and should see an animated cursor that you can move using the USER and PRGM keys. Press R/S to leave this mode when done.
This seems to work, I can see the blinking cursor and I can move it with USR and PRG key, and I see the leftmost digit of the address on the left being incremented or decremented, but I get a beep if I go to the right and the address changes from 0000 to D000.
In SLOW mode I see the display being refreshed with several digits flashing during the cursor refresh, while the display is smooth and only the cursor blinks in FAST mode.
When there is no user input, there seems to be a timeout of ~13s in FAST mode before RAMED is terminated and returns to the normal display. In SLOW mode the timeout is ~2mn 50s.
One more point is about the execution of RAMED, it works with XEQ ( displayed as XEQ' ) or ASN ( displayed as ASN' ), but not if I assign it with the DM41X CONF menu, in this case it returns NONEXISTENT.
hth313 wrote:
Sat Nov 21, 2020 10:15 pm
The PAUSE function. The best way is to enter a program like the following:

[…]

Enter INTEGER mode, press and hold R/S to see the next line. This R/S key has been replaced and will visually appears normal. It has its own timeout loop in its key debounce. When you see the line to be executed, release R/S. When the calculator gets to PAUSE you should see an integer number (not default X display) for about a second. You can try to enter a couple of (hex) digits here and it should work the way you expect. Then when it is pausing again, press R/S to terminate (during pause).
This also seems to work as expected, pressing R/S I see the first program line, releasing R/S the program starts and pauses for about a second. There I can enter (hex) digits before it resumes execution. The only point is that when it pauses it always displays 0000H.
It works in FAST and SLOW modes (but SLOW is really slow…).
DM42: 00425 - DM41X: β00066
hth313
Posts: 36
Joined: Thu Jun 15, 2017 8:00 pm

### Re: Ladybug module on the DM41X

Thank you for taking the time. It sounds mostly successful, with some glithes.

The beep is to indicate that you move the cursor over the register boundary. Personally, I needed it as an aid and confirmation where you are as I found it not always easy to know as the digits just wraps around, I always felt unsure when I occasionally used RAMED. In retrospect it might have been better to use a colon or dot to indicate the wrap around point.

That RAMED times out in 13 seconds indicates that the timing loop is not working as it should. The timeout is to save battery and should be similar if timing loops was properly detected. Also your description of the display updates confirms it. It sounds like DM41X needs work if it is to work well with display animations

RAMED is a secondary function. XEQ' and ASN' can properly look such up by name using XASRCH in OS4. Assignments are kept in the OS4 system buffer (number 15). There are also routines in OS4 to deal with the keyboard shells (which are like layers) that handles assignments in user mode, so they can find both normal (primary) assignments as well those made of secondary functions. When used on a HP-41 with OS4/Boost installed this is totally transparent, you will not see any difference when using secondary functions from the keyboard, they can be executed, assigned and the talking keys work as expected. With DM41X I assume it handles the additional key assignments in its own firmware on the side and it is not aware of secondary functions and unable to assign them to one of the bonus keys.

With the PAUSE you may want to change the ISG loop counter for slow mode. That it reverts to 0 is because it messes up the stack in the simplistic RPN delay loop. It would be good if you could try and hit R/S while the PAUSE is running (while it shows the hex number). I have a separate pause flag compared to the original to deal with alternative display pauses, which requires a slightly different R/S key implementation. The internal pause delay loop looks the same as the built-in one and DM41X is probably able to detect it as a delay loop.
dlachieze
Posts: 257
Joined: Thu May 04, 2017 12:20 pm
Location: France

### Re: Ladybug module on the DM41X

hth313 wrote:
Mon Nov 23, 2020 6:31 pm
It would be good if you could try and hit R/S while the PAUSE is running (while it shows the hex number). I have a separate pause flag compared to the original to deal with alternative display pauses, which requires a slightly different R/S key implementation. The internal pause delay loop looks the same as the built-in one and DM41X is probably able to detect it as a delay loop.
I pressed R/S while the PAUSE is running and it stops the program as expected. Pressing R/S resumes the program. So nothing different from the standard behavior. Anything else you were expecting?
DM42: 00425 - DM41X: β00066
hth313
Posts: 36
Joined: Thu Jun 15, 2017 8:00 pm

### Re: Ladybug module on the DM41X

dlachieze wrote:
Mon Nov 23, 2020 6:51 pm
I pressed R/S while the PAUSE is running and it stops the program as expected. Pressing R/S resumes the program. So nothing different from the standard behavior. Anything else you were expecting?
No, normal behavior is all that is expected, no surprises wanted, LOL

Thanks!