WP34S for the DM42

This is where developers can exchange ideas and ask questions relevant to the DM42 firmware.

Please note that Swiss Micros staff are unable to provide answers here as a general rule. This is intended as a community-driven forum.
Nigel (UK)
Posts: 51
Joined: Fri Jul 21, 2017 11:08 pm

Re: WP34S for the DM42

Post by Nigel (UK) »

Just to let you know that the stopwatch, IR printing, and a user menu system are now all working. You can find the usual three versions in the build/ folder of the WP34C branch here. Read the README.md file (displayed on the front gitlab page) for a few more details.

You'll find some notes on the user menu system, the COMPLEX_LOCK mode, and something called 'Entry RPN' in the help/ folder.

Thank you for your continued interest. Enjoy! And please let me know about any bugs or anything that isn't clear.

Nigel (UK)
dlachieze
Posts: 304
Joined: Thu May 04, 2017 12:20 pm
Location: France

Re: WP34S for the DM42

Post by dlachieze »

Great ! This is a major improvement: complex mode, stopwatch, printing and a new user menu system all together !

I'm not using the complex mode, but as it is just another option I can use the standard 34s functions without troubles.
I've quickly tested the stopwatch and the IR printing with my 82240B: the stopwatch works as expected as well as the printing.

I've just noticed one thing with the IR printing: when doing a stack print with Complex Lock Mode disabled (CPXNO), it prints the registers x, y, z, t and l, but also register i. I can understand that l is included but I'm wondering why it prints also the register i. Is it because i is used with l in complex mode? Btw the equivalent function on the HP-42S prints only the registers X, Y, Z and T.

Here is a stack print from the DM42 running the wp34c_top.pgm with CPXNO, the DM42 running Free42 and an HP 42S. For each I have put the name in the Alpha register, some numbers in the stack and then I've done:
  • ⎙On /PRON
  • ⎙α / PRA
  • ⎙Stck / PRSTK
PRST.jpg
PRST.jpg (59.95 KiB) Viewed 416 times
The PRSTK command on the DM42 and the 42S starts with a blank line, but not on the WP 34C.

Note: my WP 34S doesn't have an IR diode nor a crystal installed so I cannot print from it.
DM42: 00425 - DM41X: β00066
Nigel (UK)
Posts: 51
Joined: Fri Jul 21, 2017 11:08 pm

Re: WP34S for the DM42

Post by Nigel (UK) »

I'm delighted that the printer works for someone else too!

Printing L and I in addition to X, Y, Z, T is what the WP34S code does. I guess that these two registers are included because L is Last X, and I is the imaginary part of Last X when a result is complex. It seems reasonable to leave this.

The WP34S print functions only print an initial blank line if trace mode is active (set Flag T for this). I think I prefer this; it's easy to put in a blank line if needed, but harder to take one out if you don't want it.

I'm not sure that there's much left to add! The only new feature that I am intending to include is a minor one - interrupting printing with the keyboard, which can't be done at present. Apart from fixing any bugs that turn up I need to complete the documentation, which is ok at present but is spread across several files and is not entirely up-to-date. I also want to tidy the code and to document it a little more for my own benefit.

Thanks to everyone for your continued interest.

Nigel (UK)
dlachieze
Posts: 304
Joined: Thu May 04, 2017 12:20 pm
Location: France

Re: WP34S for the DM42

Post by dlachieze »

I have prepared a small Quick Reference Guide to summarize the key differences vs. the standard WP 34S, especially the new menus. It is not intended to replace the integrated help, but rather to provide a quick overview of the different menus to easily locate a given function.

Print the following pdf on a double sided sheet of paper, fold it in two and cut it so that it fit in the DM42 case :

Update 05/07: (see here for change description)
QRG-booklet_0.5.pdf


Update 05/06: (see here for change description)
QRG-booklet_0.4.pdf


Update 05/05: (see here for change description)
QRG-booklet_0.3.pdf


Update 05/04: (see here for change description)
QRG-booklet_0.2.zip
(239.67 KiB) Downloaded 17 times
Initial version 05/03:
QRG-booklet.pdf
(191.52 KiB) Downloaded 32 times

Let me know if you think anything else needs to be added.
Last edited by dlachieze on Fri May 07, 2021 11:12 pm, edited 8 times in total.
DM42: 00425 - DM41X: β00066
User avatar
Jaymos
Posts: 701
Joined: Sun Nov 04, 2018 7:03 pm
Location: Cape Town

Re: WP34S for the DM42

Post by Jaymos »

Nigel,

I have two DM42's, both fitted with card labels (temporary until our C43 metal templates are ready) and the point is my DM42 keyboard is not visible at all and it is not easily visible. The yellow labels and blue ones are slightly different than the DM42 menus.

I have not started using the WP34C on the DM42 (I am a little busy now with the C43) but I want it and I will take the trouble to make it work properly (the way you intended) but with my C43 keyplane.

Long story short, I need to modify your keys to fit my customized DM42;-)

Can you give me a headstart to save time? I need to know which files to change and I reckon asking you will save me an hour or longer ;-)
Jaco Mostert
Elec Eng, South Africa
C43 (WP34C) on DM42 sn. 03818 & 06199 for complex math, HP42S; HP32Sii, WP34S&C, HP28C, HP35s, EL-506P, EL-W506, PB700; owned FX702P & 11C; used HP67 & HP85; iOS: 42s Byron, Free42, WP31S/34S, HCalc.
User avatar
Walter
Posts: 1837
Joined: Tue May 02, 2017 11:13 am
Location: Close to FRA, Germany

Re: WP34S for the DM42

Post by Walter »

IIRC, the letters 'x-hat' and ŷ were and are provided in the character sets of the WP34S (just the software of this forum can't display an 'x-hat'). It may look more professional in the respective menus.
DM42 SN: 00041 β
WP 43S running on this device

HP-35, HP-45, ..., HP-35S, WP 34S, WP 31S, DM16L
Nigel (UK)
Posts: 51
Joined: Fri Jul 21, 2017 11:08 pm

Re: WP34S for the DM42

Post by Nigel (UK) »

dlachieze wrote:
Mon May 03, 2021 9:53 pm
I have prepared a small Quick Reference Guide to summarize the key differences vs. the standard WP 34S, especially the new menus. It is not intended to replace the integrated help, but rather to provide a quick overview of the different menus to easily locate a given function.

Print the following pdf on a double sided sheet of paper, fold it in two and cut it so that it fit in the DM42 case :

QRG-booklet.pdf

Let me know if you think anything else needs to be added.
This is brilliant! The first thing that people need to know is where to find all the non-visible functions, and this is a great way of showing them. It looks good, too - your graphic design skills are impressive.

Nigel (UK)
Nigel (UK)
Posts: 51
Joined: Fri Jul 21, 2017 11:08 pm

Re: WP34S for the DM42

Post by Nigel (UK) »

Jaymos wrote:
Mon May 03, 2021 10:54 pm
Nigel,

I have two DM42's, both fitted with card labels (temporary until our C43 metal templates are ready) and the point is my DM42 keyboard is not visible at all and it is not easily visible. The yellow labels and blue ones are slightly different than the DM42 menus.

I have not started using the WP34C on the DM42 (I am a little busy now with the C43) but I want it and I will take the trouble to make it work properly (the way you intended) but with my C43 keyplane.

Long story short, I need to modify your keys to fit my customized DM42;-)

Can you give me a headstart to save time? I need to know which files to change and I reckon asking you will save me an hour or longer ;-)
Ninety percent of what needs to be done is straightforward. I have changed the actual WP34S code as little as possible. The main loop is the function program_main() in console.c. This contains the key-reading code. The keys read have the keycodes listed in dmcp.h. These DM42 keycodes are sent to a function called remap(), also in console.c. Depending on the current shift state remap() converts the DM42 keys into WP34S keycodes and shift states, which are then fed to the function process_keycode in keys.c (via a function called process_keycode_with_shift).

The conversions carried out by remap() are in the file keytran.c. This can either return a straight keycode-shiftstate pair, or other things - K_SETMENU with a menu number sets up a menu, K_OP with an opcode sends an opcode into the WP34S code.

To get the alpha codes to work, you need to look at the functions with names like keycode_to_alpha in keys.c. It shouldn't be too hard to change these. The characters corresponding to the various octal codes can be found in the file font.inc.

The problem comes with the relationship between the alpha plane and the normal keys. The WP34S keyboard was designed so that alpha keys corresponding to stack registers did not appear on numbers. This meant that commands could take numerical arguments or the name of a lettered register with no chance of confusion. This isn't the case on the physical DM42 keyboard and the code changes required to make things work correctly were rather subtle. The fact that the 0 and 1 keys have no letters on them on the WP34S keyboard is also important. Most of this stuff is dealt with in the function process_rarg(), again in keys.c.

See how far you can get (most of it should be fine) and let me know if/when you have problems! Good luck.

Nigel (UK)
Nigel (UK)
Posts: 51
Joined: Fri Jul 21, 2017 11:08 pm

Re: WP34S for the DM42

Post by Nigel (UK) »

Walter wrote:
Mon May 03, 2021 10:58 pm
IIRC, the letters 'x-hat' and ŷ were and are provided in the character sets of the WP34S (just the software of this forum can't display an 'x-hat'). It may look more professional in the respective menus.
You do remember correctly! I did try these characters but I felt that they looked a little small compared to many of the other items in the menu, being only one character wide. The hats in particular were rather small.

Looking at all of the menus together I accept that I might not have been entirely consistent about the use of upper and lower case; improvements are certainly possible!

Nigel (UK)
dlachieze
Posts: 304
Joined: Thu May 04, 2017 12:20 pm
Location: France

Re: WP34S for the DM42

Post by dlachieze »

Nigel (UK) wrote:
Tue May 04, 2021 12:34 am
This is brilliant! The first thing that people need to know is where to find all the non-visible functions, and this is a great way of showing them. It looks good, too - your graphic design skills are impressive.
Thanks, but you are the one doing all the work here !

I've updated the QRG above to version 0.2 with some cosmetic changes, a new page border to help cutting it to the right size, the addition of the Complex and Alpha menus that I missed initially and also a note about SIG and SIG0 in the Display menu.

For those who might wonder how the QRG looks like, here is a picture with my DM42 and the QRG printed on a simple paper sheet:

Image
DM42: 00425 - DM41X: β00066
Post Reply