WP43 Bug Reports and Maintenance

This area is for discussion about these families of custom high-end Scientific Calculator applications for SwissMicros devices.
dlachieze
Posts: 613
Joined: Thu May 04, 2017 12:20 pm
Location: France

Re: 43S Bug Reports and Maintenance

Post by dlachieze »

VARMNU issue

On the WP43 VARMNU is the equivalent of the HP-42S VARMENU, however I don’t see how I can get on the WP43 the name of the variable softkey pressed to calculate it's value (this name is returned in the Alpha register on the 42S).

The HP-42S manual states page 126:
To continue program execution:
• Press a menu key.
• Or, press R/S.
If you continue by pressing a menu key, the name of the corresponding variable is stored into the Alpha register.
Your program can use this information to determine which key was pressed.
If you continue by pressing R/S, the Alpha register is not altered.
As an example of VARMENU usage here is the first program of the HP-42S Electrical Engineering Solutions (Voltage division):

Code: Select all

00 { 148-Byte Prgm }
01▸LBL "V÷" 	@ Defines menu variables
02 MVAR "VT"
03 MVAR "V2"
04 MVAR "Z1"
05 MVAR "Z2"

06 CF 21	@ Sets or clears flag 21 to match flag 55.
07 FS? 55
08 SF 21

09▸LBL 00 	@ Displays the variable menu and stops
10 CLA
11 VARMENU "V÷"
12 STOP

13 ATOX		@ Determines which variable was selected by subtracting the ASCII codes 
14 ATOX		@ of the first two characters in the variable name. For example, when 
15 -		@ you press Z1 to calculate Z1, the program branches to LBL 41 because 
16 XEQ IND ST X	@ the ASCII code of "Z" is 90, the ASCII code of "1" is 49, and 90 - 49 = 41.
17 GTO 00	

18▸LBL 36 	@ Calculates V2
19 RCL "Z2"
20 RCL× "VT"
21 RCL "Z1"
22 LASTX
23 +
24 ÷
25 STO "V2"
26 VIEW "V2"
27 RTN

28▸LBL 02 	@ Calculates VT
29 RCL "Z1"
30 RCL+ "Z2"
31 RCL× "V2"
32 RCL÷ "Z2"
33 STO "VT"
34 VIEW "VT"
35 RTN

36▸LBL 40 	@ Calculates Z2
37 RCL "V2"
38 RCL× "Z1"
39 RCL "VT"
40 LASTX
41 -
42 ÷
43 STO "Z2"
44 VIEW "Z2"
45 RTN

46▸LBL 41 	@ Calculates Z1
47 RCL "Z2"
48 RCL× "VT"
49 RCL÷ "V2"
50 RCL- "Z2"
51 STO "Z1"
52 VIEW "Z1"
53 END
At step 13 I don’t know where I can find the name of the variable pressed for resolution as there is no Alpha register on the WP43.
Furthermore pressing a variable soft key without entering a value in X before doesn't resume the program execution after the STOP instruction as it does on the HP-42S.
DM42: 00425 - DM41X: β00066 - WP43: 00042
dlachieze
Posts: 613
Joined: Thu May 04, 2017 12:20 pm
Location: France

Re: 43S Bug Reports and Maintenance

Post by dlachieze »

A little inconstancy in the manuals related to AGRAPH:
  • OM 0.23.1 page 343: "(valid inputs are 1≤x≤400 and 1≤y≤186)"
  • ReM 0.23.1 page 17: "(valid inputs are 0≤x≤399 and 0≤y≤175, pixel (0; 0) is bottom left)"
I assume ReM is right.
DM42: 00425 - DM41X: β00066 - WP43: 00042
User avatar
Walter
Posts: 3070
Joined: Tue May 02, 2017 11:13 am
Location: On a mission close to DRS, Germany

Re: 43S Bug Reports and Maintenance

Post by Walter »

dlachieze wrote:
Fri Dec 02, 2022 2:26 pm
A little inconstancy in the manuals related to AGRAPH:
  • OM 0.23.1 page 343: "(valid inputs are 1≤x≤400 and 1≤y≤186)"
  • ReM 0.23.1 page 17: "(valid inputs are 0≤x≤399 and 0≤y≤175, pixel (0; 0) is bottom left)"
I assume ReM is right.
Good catch! Actually, mess is worse: valid inputs are 0≤x≤399 and 0≤y≤239, pixel (0; 0) is bottom left - input of numbers beyond this range will crash the calculator. :shock:

We will get that corrected.
WP43 SN00000, 34S, and 31S for obvious reasons; HP-35, 45, ..., 35S, 15CE, DM16L S/N# 00093, DM42β SN:00041
dlachieze
Posts: 613
Joined: Thu May 04, 2017 12:20 pm
Location: France

Re: 43S Bug Reports and Maintenance

Post by dlachieze »

On this topic, I have a question related to the WP43/C43 display, is it possible to have the pixel details for each area:
- menu section origin (I suppose it's 0,0) and height
- origin and height for each of the four rows above
- origin and height of the status bar
DM42: 00425 - DM41X: β00066 - WP43: 00042
gmac42
Posts: 103
Joined: Fri Jun 01, 2018 11:30 am

Re: 43S Bug Reports and Maintenance

Post by gmac42 »

Sorry, I don't have the exact dimensions either, but you can always make a screenshot and measure it yourself.
DM41X #542, DM42 #650, DM41L #801, HP 41CX, HP 41CV, HP 50G, HP11C, TI 89
User avatar
Walter
Posts: 3070
Joined: Tue May 02, 2017 11:13 am
Location: On a mission close to DRS, Germany

Re: 43S Bug Reports and Maintenance

Post by Walter »

Walter wrote:
Sat Dec 03, 2022 10:50 am
dlachieze wrote:
Fri Dec 02, 2022 2:26 pm
A little inconstancy in the manuals related to AGRAPH:
  • OM 0.23.1 page 343: "(valid inputs are 1≤x≤400 and 1≤y≤186)"
  • ReM 0.23.1 page 17: "(valid inputs are 0≤x≤399 and 0≤y≤175, pixel (0; 0) is bottom left)"
I assume ReM is right.
Good catch! Actually, mess is worse: valid inputs are 0≤x≤399 and 0≤y≤239, pixel (0; 0) is bottom left - input of numbers beyond this range will crash the calculator. :shock:

We will get that corrected.
The bug crashing the simulator disappeared after resetting. :D Valid input range is correct as stated in my last post.

And about display segments, please look at pp. B-7f in the ReM - it may help.
WP43 SN00000, 34S, and 31S for obvious reasons; HP-35, 45, ..., 35S, 15CE, DM16L S/N# 00093, DM42β SN:00041
dlachieze
Posts: 613
Joined: Thu May 04, 2017 12:20 pm
Location: France

Re: 43S Bug Reports and Maintenance

Post by dlachieze »

Walter wrote:
Sun Dec 04, 2022 11:35 pm
And about display segments, please look at pp. B-7f in the ReM - it may help.
Perfect, that’s exactly what I was looking for.
DM42: 00425 - DM41X: β00066 - WP43: 00042
dlachieze
Posts: 613
Joined: Thu May 04, 2017 12:20 pm
Location: France

Re: 43S Bug Reports and Maintenance

Post by dlachieze »

Walter wrote:
Sat Dec 03, 2022 10:50 am
Good catch! Actually, mess is worse: valid inputs are 0≤x≤399 and 0≤y≤239, pixel (0; 0) is bottom left - input of numbers beyond this range will crash the calculator. :shock:

We will get that corrected.
One point to consider: according to the ReM 0.23.1 for PIXEL and AGRAPH : "The location of the pixeI is given by IP(x) and IP(y)."
However it seems that currently the range test for PIXEL & AGRAPH inputs is done before taking the integer part of x and y. For example 399.1 for x or 239.1 for y will return on the calculator an error message: "Out of range" while these should be valid inputs.
DM42: 00425 - DM41X: β00066 - WP43: 00042
dlachieze
Posts: 613
Joined: Thu May 04, 2017 12:20 pm
Location: France

Re: 43S Bug Reports and Maintenance

Post by dlachieze »

The following sequence crash the calculator:

Reset
f P/R
f LBL
f alpha
S (or any letter)
f up-arrow (or down-arrow)
DM42: 00425 - DM41X: β00066 - WP43: 00042
dlachieze
Posts: 613
Joined: Thu May 04, 2017 12:20 pm
Location: France

Re: 43S Bug Reports and Maintenance

Post by dlachieze »

Slow program execution

While testing the WP43 graphic capabilities I’ve been surprised by it’s speed, or rather by it’s lack of.

So I’ve done a test comparison between my DM42 and my WP43 with the same program drawing a "hat" on the screen.

hat.bmp
hat.bmp (12.31 KiB) Viewed 2964 times

DM42 execution time :
Battery powered : 20"
USB powered : 9"

WP43 execution time :
Battery powered : 7’03"
USB powered : 2’05"

Huge difference ! The WP43 is 14 times slower than the DM42 on USB and 21 times slower on battery.

I don’t know what could explain this speed difference as both calculators are running on the same hardware.
I know that the WP43 is a pilot and I understand that speed optimization has not been on the priority list for the team developing the WP43 software so I’m essentially reporting this to have it logged for when the team will have time to look at code optimizations.

Here is the DM42 program, before running select RAD mode and store 3 to "GrMod" to select the 400x240 screen resolution:

Code: Select all

00 { 114-Byte Prgm }
01▸LBL "Hat"
02 PI
03 180
04 ÷
05 STO 04
06 15
07 ×
08 SIN
09 STO 00
10 LASTX
11 COS
12 STO 01
13 CLLCD
14 1.5
15 STO 02
16▸LBL 01
17 PI
18 54
19 ÷
20 RCL× 02
21 SIN
22 RCL× 02
23 STO 05
24 0.36005
25 STO 03
26▸LBL 02
27 RCL 03
28 IP
29 RCL× 04
30 SIN
31 LASTX
32 COS
33 RCL× 02
34 X<>Y
35 RCL× 02
36 STO 06
37 RCL× 01
38 +
39 200
40 +
41 80
42 RCL 06
43 RCL× 00
44 RCL+ 05
45 -
46 X<>Y
47 PIXEL
48 ISG 03
49 GTO 02
50 1.5
51 STO+ 02
52 99
53 RCL- 02
54 X≥0?
55 GTO 01
56 BEEP
57 END
For the WP43 enter the same program but replace 80 by 160 at line 41, and replace - by + at line 45 to adjust to the different screen pixel origin.

Here is the DM42 state file : hat_dm42.zip

And the WP43 .sav file : hat_wp43.zip
DM42: 00425 - DM41X: β00066 - WP43: 00042
Post Reply