FAST/SLOW flag/function

The Beta programme is where a device becomes fully formed. If you have any suggestions for features to integrate into the DM41X then feel free to make them here. We can't guarantee that they'll all end up in the final product but we'll certainly consider all sensible proposals.
Peet
Posts: 256
Joined: Tue Sep 29, 2020 12:01 am
Location: Germany

Re: FAST/SLOW flag/function

Post by Peet »

redglyph wrote:
Sun Sep 25, 2022 12:44 pm
I don't understand, you're criticizing a reply to his question - twice now, and you haven't even read it? It's a simple and clear question enough. :roll:
The function in the first post is allready solved with user-programs, I was referring to the following post:

viewtopic.php?p=23575#p23575
My programmable calculators - former: CBM PR100, HP41CV, HP28S, HP11C - current: HP48G(256kB), HP35S, Prime, DM41X, DM42
redglyph
Posts: 177
Joined: Sat Dec 22, 2018 11:45 am

Re: FAST/SLOW flag/function

Post by redglyph »

Boub65 wrote:
Sun Sep 25, 2022 12:15 pm
@bob, the DM41X ROM "must" somehow now in what mode it is running to slow down when in FAST mode 1) the goose 2) functions like CATALOG...

I am wrong? Did I miss something? Or is your answer about he original HP41CX rom?
He already explained the goose part.

There are two main components, the original HP-41 ROM and the emulator for the code contained in the ROM. There must also be a frontend that interfaces with the platform but let's call it part of the emulator to keep it simple. The emulated code runs much faster than on the original calculator, so it's slowing down the process by waiting. The duration of the wait can change, so the emulator is aware of this, but the code being emulated isn't. It's like running an OS and a program on a virtual machine like VirtualBox: the program has no idea it's in a virtual environment, or what the actual hardware is.

1) If users wanted to know the mode, they could write a small subroutine that measure the time to execute a small loop.

2) Otherwise, it could be done with an extra system flags, which I'd expect to be quite difficult:
- find the location of this flag in the virtual memory (I've seen documentation on most of the HP-41 long ago, it's probably not hard to find out),
- modifying the original ROM to allow an extra system flag (or several flags) for that purpose,
- modifying the emulator to set this flag depending on the mode.

I don't even know if the memory mapping allows for extra flags, to be honest.

3) A simpler but dirtier way is for the emulator to overwrite a user flag depending on its mode, which would be simpler because it wouldn't require a modification of the ROM. As I see it, it would require
- find the location of the flag in the virtual memory,
- add an option for the emulator to overwrite the flag with the current setting,
- modify the emulator code to overwrite the flag on a regular basis depending on its mode.

I see the following problems:
- it's not back-compatible with any software using that flag,
- a program doesn't know whether the flag is active or not, since it's not standard.

4) The other question about an additional indicator ]should be easier to solve, since it's managed by the emulator, which also drives the display.

I didn't see any public code for the DM41X emulator and frontend though, I assume it's not been released yet or will never be. So it's hard to go beyond this speculation. :)
redglyph
Posts: 177
Joined: Sat Dec 22, 2018 11:45 am

Re: FAST/SLOW flag/function

Post by redglyph »

Peet wrote:
Sun Sep 25, 2022 12:50 pm
The function in the first post is allready solved with user-programs, I was referring to the following post:

viewtopic.php?p=23575#p23575
I don't see any mention of user programs to solve the original question, and what you are referring to is a continuation of this initial discussion.
Peet
Posts: 256
Joined: Tue Sep 29, 2020 12:01 am
Location: Germany

Re: FAST/SLOW flag/function

Post by Peet »

redglyph wrote:
Sun Sep 25, 2022 1:24 pm
I don't see any mention of user programs to solve the original question, ...
Other Thread, also opend by this TO.
redglyph wrote:
Sun Sep 25, 2022 1:24 pm
... and what you are referring to is a continuation of this initial discussion.
Yes, the word is "continuation" I didn't refer to the first post, but the one I linked in my last post (the one direct above my post we talk about).
My programmable calculators - former: CBM PR100, HP41CV, HP28S, HP11C - current: HP48G(256kB), HP35S, Prime, DM41X, DM42
Boub65
Posts: 231
Joined: Tue Sep 12, 2017 4:34 pm
Location: Rabat, Morocco

Re: FAST/SLOW flag/function

Post by Boub65 »

@redglyph thank you for your explainations and taking time to do it... I somewhat missed Bob's explanations...

I still have an interrogation... the TURBO0 and TURBO50 called to boost/slow the DM41X are in the ROM (ROM2 I believe)... are NOT developped by HP but added (for HP41CL I believe)... so SwissMicros have control on their code... So they "could be" modified to set a FLAG?

No? Do I still miss something?
Last edited by Boub65 on Sun Sep 25, 2022 2:55 pm, edited 1 time in total.
Sincèrement, Sincerely, 73,
Boubker

DM15L, DM41L, DM42 #00855 (domes upgraded), DM41X #00707
HP48SX (with dark screen), HP42s, HP32SII (1990 with fraction bug), HP41C/CV
TI-89 titanium, CASIO fx-cg50 and Numworks (to play with micropython)
rprosperi
Posts: 1698
Joined: Mon Apr 24, 2017 7:48 pm
Location: New York

Re: FAST/SLOW flag/function

Post by rprosperi »

Well then... there are no plans to implement this feature.

As has been explained, and clarified by redglyph (thanks) the emulator knows the current speed but the OS does not. There were a tiny handful of essential commands added into the CX functions portion of the ROM, such as FAST and SLOW, as there is no other way to achieve that, but such tweaks were utterly minimized due to both space constraints and not disturbing the OS code.

Hope that settles that. Thanks to all for both making a 41X improvement suggestion and also discussing possible workarounds to accomplish the OP's goal.
--bob p

DM42: β00071 & 00282, DM41X: β00071 & 00656, DM10L: 071/100
dlachieze
Posts: 613
Joined: Thu May 04, 2017 12:20 pm
Location: France

Re: FAST/SLOW flag/function

Post by dlachieze »

Boub65 wrote:
Sun Sep 25, 2022 1:45 pm
I steel have an interrogation... the TURBO0 and TURBO50 called to boost/slow the DM41X are in the ROM (ROM2 I believe)... are NOT developed by HP but added (for HP41CL I believe)... so SwissMicros have control on their code... So they "could be" modified to set a FLAG?

No? Do I still miss something?
Two things to add on what bob said just above:
  • The flag register on the HP-41 contains 56 flags and they are all used, so there is no flag available with the standard HP-41 ROM for the slow/fast mode.
  • The HP-41 ROM used on the DM41X is full as mentioned in the DM41X manual:
    3.9. Patched mainframe ROMs
    Changes to the original NUT-CX.MOD - 30.08.2019, by Ángel M. Martin

    Fitting all these into the ROMS wasn’t terribly difficult, although there were numerous restrictions both in available space and FAT sizes. The ROMS are totally full now.
So there is no simple and easy solution to add a function reporting the FAST/SLOW status as this would mean significant changes on how the HP-41 flags work and removal of some of the DM41X features added to the Mainframe ROMs to fit the required code, it it can fit. Btw I don't know if it would be possible at all.
DM42: 00425 - DM41X: β00066 - WP43: 00042
Boub65
Posts: 231
Joined: Tue Sep 12, 2017 4:34 pm
Location: Rabat, Morocco

Re: FAST/SLOW flag/function

Post by Boub65 »

Thank you @Bob for your clarification.

It is normal for our community to want always more features and to try to understand the difference between :
1) impossible "technically speaking" to implement
2) feasible technically but not worth the difficluties of implementations and risks of disturbing a working calculator
3) feasible technically and worth a try someday when the current backlog's of bugs and developments are reduced
4) feasible technically and is planned soon

Most of my questions are just to try to rate the improvement suggestions on this scale.
Sincèrement, Sincerely, 73,
Boubker

DM15L, DM41L, DM42 #00855 (domes upgraded), DM41X #00707
HP48SX (with dark screen), HP42s, HP32SII (1990 with fraction bug), HP41C/CV
TI-89 titanium, CASIO fx-cg50 and Numworks (to play with micropython)
redglyph
Posts: 177
Joined: Sat Dec 22, 2018 11:45 am

Re: FAST/SLOW flag/function

Post by redglyph »

Good point about the ROM2 @Boub65, I missed that part of your post. :) Maybe the modifications could have been changed to add an extra command which pushes the mode on the stack or sets a specific user flag, indeed, if the information was available from there, which I honestly don't know.

Anyway, as dlachieze said, the ROM is pretty full so no luck (I didn't know that, thanks for the info).


Does anyone know if SM plans to release the DM41X sources on GitHub or elsewhere, like they did for the DM42?
rprosperi
Posts: 1698
Joined: Mon Apr 24, 2017 7:48 pm
Location: New York

Re: FAST/SLOW flag/function

Post by rprosperi »

redglyph wrote:
Sun Sep 25, 2022 4:39 pm

Does anyone know if SM plans to release the DM41X sources on GitHub or elsewhere, like they did for the DM42?
No, no plans to do that for the DM41X. DM42 is based on Free42, which is GPL2, so the DM42 release was essential.
--bob p

DM42: β00071 & 00282, DM41X: β00071 & 00656, DM10L: 071/100
Post Reply