WP43 Alternative key layout --> C43

This area is for discussion about these families of custom high-end Scientific Calculator applications for SwissMicros devices.
User avatar
Jaymos
Posts: 1633
Joined: Sun Nov 04, 2018 7:03 pm
Location: Cape Town

Re: 43S Alternative key layout --> WP43C

Post by Jaymos »

be.philippe wrote:
Tue Jun 29, 2021 8:42 pm
By the way, how do you debug the sim ?
I debug it manually, with printf's checking progress on the console.
Jaco Mostert
Elec Eng, South Africa
https://47calc.com C47 (s/n 03818 & 06199), WP43 (0015). In box: HP42S, HP32Sii, WP34S&C, HP28C, HP35s, EL-506P, EL-W506, PB700; ex: FX702P, 11C, HP67 & HP85; iOS: 42s Byron, Free42+, WP31S/34S, HCalc.
be.philippe
Posts: 24
Joined: Mon Jun 21, 2021 4:32 pm
Location: Liège Belgium

Re: 43S Alternative key layout --> WP43C

Post by be.philippe »

Jaymos wrote:
Mon Jun 28, 2021 10:59 pm
be.philippe wrote:
Mon Jun 28, 2021 5:39 pm
On C43 106f, both DM42 and simulator, [SHOW] of a "big" small integer can overflow the display.

1234567890#H [SHOW] display the value in bases 16, 10 and 8, with the 3rd line being empty.
12345678#H [SHOW] display the value in bases 16, 4, 8 and 10.

With both on the stack, [SHOW] [Up] tries to display 1234567890#H in base 4, but the end of the line is truncated:
Y: 1 02 03 10 11 12 13 20 21 (the end 004 is missing).
After [x<>y], [SHOW] display both values in bases 16, 10 and 8, although the smaller one is displayable in base 4.
Fixed, thank you.
Silly mistake as most are ...
I confirm this is fixed in 106g.

Another, similar problem:
1234567890123456#H [SHOW] display the value in bases 16, 10 and 8. The value in base 10 overflows from line z to the end of line y. The value in base 8 is truncated.
Philippe Martens
Elec Eng, Software Architect
[HP41C, DM41X, DM42]
User avatar
Jaymos
Posts: 1633
Joined: Sun Nov 04, 2018 7:03 pm
Location: Cape Town

Re: 43S Alternative key layout --> WP43C

Post by Jaymos »

be.philippe wrote:
Wed Jun 30, 2021 12:03 pm
1234567890123456#H [SHOW] display the value in bases 16, 10 and 8. The value in base 10 overflows from line z to the end of line y. The value in base 8 is truncated.
This one is part of a larger question: What bases should we display in SHOW. Currently, for this example, we are more than 32 bit, and therefore my lookup determines that we will display top line:#16, 2nd line: #10 running over to 3rd line, and 4th line #8.

The mistake here is that base 8 does not fit. So the solution is to not display base 8 if there is more than 54 bits.

I can easily change that, but at the same time, have a look at the other decisions to display bases in SHOW. There may be better combinations.


The lookup table currently works as follows for the example stated, look at the bottom row, base 16, right hand group, meaning more than 54 bits:
"Top" of course is the top row and 2,3 and 4 are the 2nd 3rd and 4th rows.

Comments welcome.
Clipboard68.png
Clipboard68.png (136.72 KiB) Viewed 2198 times
Jaco Mostert
Elec Eng, South Africa
https://47calc.com C47 (s/n 03818 & 06199), WP43 (0015). In box: HP42S, HP32Sii, WP34S&C, HP28C, HP35s, EL-506P, EL-W506, PB700; ex: FX702P, 11C, HP67 & HP85; iOS: 42s Byron, Free42+, WP31S/34S, HCalc.
be.philippe
Posts: 24
Joined: Mon Jun 21, 2021 4:32 pm
Location: Liège Belgium

Re: 43S Alternative key layout --> WP43C

Post by be.philippe »

Jaymos wrote:
Wed Jun 30, 2021 1:59 pm
be.philippe wrote:
Wed Jun 30, 2021 12:03 pm
1234567890123456#H [SHOW] display the value in bases 16, 10 and 8. The value in base 10 overflows from line z to the end of line y. The value in base 8 is truncated.
The mistake here is that base 8 does not fit. So the solution is to not display base 8 if there is more than 54 bits.
Interestingly, FF FF FF FF FF FF FF FF#H [SHOW] correctly shows base 8 with a slightly smaller font.
I’d suggest using this smaller font both for base 8 and base 10 above 54 bits.
Philippe Martens
Elec Eng, Software Architect
[HP41C, DM41X, DM42]
be.philippe
Posts: 24
Joined: Mon Jun 21, 2021 4:32 pm
Location: Liège Belgium

Re: 43S Alternative key layout --> WP43C

Post by be.philippe »

Jaymos wrote:
Mon Jun 28, 2021 2:07 am
I fixed most of the recent list of bugs this weekend. That includes:
  • ...
  • [CC] fix stack lift disable during eRPN
  • ...
This fixes the problem of using [CC] in NIM state to create a complex number, but the stack lift should'nt be disabled outside of NIM state, when it is used to convert back and forth between a complex number and it's two components (WP43S Owner's Manual, p. 160-161).
Philippe Martens
Elec Eng, Software Architect
[HP41C, DM41X, DM42]
be.philippe
Posts: 24
Joined: Mon Jun 21, 2021 4:32 pm
Location: Liège Belgium

Re: 43S Alternative key layout --> WP43C

Post by be.philippe »

Jaymos wrote:
Tue Jun 29, 2021 9:00 pm
I see you did fix the [RCL] problem, but not [LAST x] nor any other command pushing some value on the stack ([MEM?], [WSIZE?], ...).
Yes, I did exactly that. I made an exception for ITM_RCL. I seem to recall that I checked the LASTx as well, but apparently not. I will re-look at that. If only a few, exceptions can work the same way, otherwise I need to figure another way. The eRPN is a real challenge to implement trying to not change too much from the 43S code.
Something bugs me !
[ENTER^] handling in WP43S and in C43 without [eRPN] is something like

Code: Select all

if (NIM) {
  closeInput();
}
pushStack();
With [eRPN], should'nt it just become (without any other change anywhere) ?

Code: Select all

if (NIM) {
  closeInput();
}
else {
  pushStack();
}
What am I missing ?

EDIT:
I've built a new version based on that hypothesis (essentially reverting all the code relating to eRPN (except UI), and implementing the else above).

It seems to work quite well. I'll do quite more extensive checks.

Next question will probably be, how do I send you my code ?
Philippe Martens
Elec Eng, Software Architect
[HP41C, DM41X, DM42]
User avatar
Jaymos
Posts: 1633
Joined: Sun Nov 04, 2018 7:03 pm
Location: Cape Town

Re: 43S Alternative key layout --> WP43C

Post by Jaymos »

I was about to suggest that you try a new version from scratch, then I saw that you did an edit.

Let me first jump back 3 steps, FYI, after eRPN was initially done, Martin changed around the 43S system about a year ago which I then fixed, then Benjamin did some more serious changes on the 43S affecting eRPN earlier this year, which I fixed again. Those were major changes. There are constantly small things changing. These ‘fixes’ though have covered all the bases, and in fact I think it was not properly done. So from that point of view it really needs an overhaul now.

I am very happy you try from scratch. As said, it is really needed.

Code mods: working directly on Gitlab using either command line or a client, works very effectively on the same project from different sides of the globe. We do it all the time. My suggestion is to follow the instructions to build a dev system, and that includes connecting via Gitlab.https://gitlab.com/Over_score/wp43s/-/wikis/Build-setup, and I found more instructions from Google of how to make a branch, and push the changed code back into your new branch, then I merge your code back into the main project.

Until that works, you are welcome to zip the src folder and email to me and I will load it. Very important: You have to tell me exactly which SHA your mods are based on otherwise there will be clashes. Send to jaymos at classic43 dot com.

(Example, the SHA of the latest C43-106-g is 77225b34a92b31de95d509e57b11c3154185fe42, or for short 77225b3)
Jaco Mostert
Elec Eng, South Africa
https://47calc.com C47 (s/n 03818 & 06199), WP43 (0015). In box: HP42S, HP32Sii, WP34S&C, HP28C, HP35s, EL-506P, EL-W506, PB700; ex: FX702P, 11C, HP67 & HP85; iOS: 42s Byron, Free42+, WP31S/34S, HCalc.
be.philippe
Posts: 24
Joined: Mon Jun 21, 2021 4:32 pm
Location: Liège Belgium

Re: 43S Alternative key layout --> WP43C

Post by be.philippe »

I've now re-executed almost all examples in the Owner's Manual up to page 130, both with and without [eRPN] enabled.

I'll commit my changes and push a new branch this evening. Any convention for the branch name ?
Philippe Martens
Elec Eng, Software Architect
[HP41C, DM41X, DM42]
User avatar
Jaymos
Posts: 1633
Joined: Sun Nov 04, 2018 7:03 pm
Location: Cape Town

Re: 43S Alternative key layout --> WP43C

Post by Jaymos »

Thank you for the testing!

We normally use the branch name which was used as source, and add an arbitrary identifier. Then let me know when to test or merge. Example: C43-106g-JM1-eRPN.
Jaco Mostert
Elec Eng, South Africa
https://47calc.com C47 (s/n 03818 & 06199), WP43 (0015). In box: HP42S, HP32Sii, WP34S&C, HP28C, HP35s, EL-506P, EL-W506, PB700; ex: FX702P, 11C, HP67 & HP85; iOS: 42s Byron, Free42+, WP31S/34S, HCalc.
be.philippe
Posts: 24
Joined: Mon Jun 21, 2021 4:32 pm
Location: Liège Belgium

Re: 43S Alternative key layout --> WP43C

Post by be.philippe »

I can't access the repository at all with SSH:
> git clone git@gitlab.com:Jaymos/wp43c.git ./wp43c --progress
Cloning into './wp43c'...
git@gitlab.com: Permission denied (publickey,keyboard-interactive).
fatal: Could not read from remote repository.

Nor can I push to it with HTTPS:
> git push -u origin C43-106g-PHM-eRPN
remote: You are not allowed to push code to this project.
fatal: unable to access 'https://gitlab.com/Jaymos/wp43c.git/': The requested URL returned error: 403

I guess you have to give some authorization to my account (be-philippe).
Philippe Martens
Elec Eng, Software Architect
[HP41C, DM41X, DM42]
Post Reply