HP Forums
WP-34s port to DM42 - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not quite HP Calculators - but related (/forum-8.html)
+--- Thread: WP-34s port to DM42 (/thread-16510.html)



WP-34s port to DM42 - Nigel (UK) - 03-21-2021 04:01 PM

If you like your WP-34s with buttons there's now a new option available, to those of you with a Swissmicros DM42 calculator.

This port of the WP-34s calculator to the DM42 is adapted to the DM42's keyboard layout, but otherwise tries to preserve the original's look and feel. It's not an upgrade of the original, except for the lack of stickers!

[Image: Screen2.bmp?raw=1]

Here are a couple of screenshots. It's not as colourful as Pablo's excellent Android version, but I still like it! Using menus allows all functions present on the original keyboard to be accessed without going into catalogues. (The catalogues are still there, of course - the help file explains where.)

[Image: Screen1.bmp?raw=1]

The port is a vanilla WP-34s. There is no WP34C version yet; I'd like to get this one debugged first.

Here is the gitlab page for the project, which includes instructions for getting this running on your calculator.

(Note that this project uses DMCP version 3.20.)

Please let me know if you find any bugs! I've also posted this on the Swissmicros forum.

Have fun!

Nigel (UK)


RE: WP-34s port to DM42 - mfleming - 03-22-2021 01:04 AM

Humm, you may have just given me the final nudge that tips me over into buying a DM42. I'll wait a day to see if I can talk myself out of it Smile


RE: WP-34s port to DM42 - Nigel (UK) - 03-22-2021 11:23 AM

(03-22-2021 01:04 AM)mfleming Wrote:  Humm, you may have just given me the final nudge that tips me over into buying a DM42. I'll wait a day to see if I can talk myself out of it Smile
I won't try to talk you out of it! The DM42 is certainly a nice calculator, but the ability to write your own alternative firmware makes it pretty much unique. I don't think you'll be sorry.

Nigel (UK)


RE: WP-34s port to DM42 - Ángel Martin - 03-22-2021 04:21 PM

(03-21-2021 04:01 PM)Nigel (UK) Wrote:  Please let me know if you find any bugs! I've also posted this on the Swissmicros forum.

Looks very worthwhile checking... here's a thought (feel free to ignore it): why emulating the limited HP-30 display instead of using a proper line for the Y-reg?
IMHO this was one of the weaknesses of the HP-34 so this is a good chance to avoid it...

ÁM


RE: WP-34s port to DM42 - Nigel (UK) - 03-22-2021 09:10 PM

(03-22-2021 04:21 PM)Ángel Martin Wrote:  Looks very worthwhile checking... here's a thought (feel free to ignore it): why emulating the limited HP-30 display instead of using a proper line for the Y-reg?
IMHO this was one of the weaknesses of the HP-34 so this is a good chance to avoid it...

ÁM

First, ease of coding! Getting the WP34s code to compile and run on the DM42 hardware and keyboard has been a challenge. (The hardest part, surprisingly, has been the keyboard - parts of the original code rely on the letters X, Y, Z, T being on non-numeric keys, and the numbers 0 and 1 being on non-alphabetic keys, and I'm still not sure that I've worked around this correctly.) I initially meant to get the basic WP34s running first and only then move onto enhancements.

But then I thought - why? There's (almost) already an enhanced WP34s - the WP43s, and I couldn't begin to compete with that! I realised that I'm happy with the WP34s as it is. I don't view the menus as an enhancement - the single shift key makes them a necessity. I did add the ability to save and load individual programs, but that's about the only new feature. I really admire the original calculator and with all its limitations I find it perfectly usable.

Having said that, it wouldn't be hard to extend the second line from 39 pixels to the width of the screen. The annunciators could be moved up and out of the way. However, the creators of the WP34s have made brilliant use of the small amount of space available and I rarely feel restricted by it. Do you think that a longer second line would be worth having? I suppose the super-small font would then be used less often.

As for making the second line into something printed properly rather than pixel blocks - no! Many characters would have to be designed from scratch, and it would spoil the "retro" look that I love so much.

Many thanks for your suggestion. It has been interesting to think about.

Nigel (UK)


RE: WP-34s port to DM42 - Paul Dale - 03-23-2021 06:21 AM

(03-22-2021 09:10 PM)Nigel (UK) Wrote:  Having said that, it wouldn't be hard to extend the second line from 39 pixels to the width of the screen. The annunciators could be moved up and out of the way. However, the creators of the WP34s have made brilliant use of the small amount of space available and I rarely feel restricted by it. Do you think that a longer second line would be worth having? I suppose the super-small font would then be used less often.

We felt very restricted by the dot matrix portion of the display. The first thing I'd have liked was a better display. A second full width row with annunciators elsewhere. Some additional/different annunciators would be good: DEG instead of 360 e.g. We were completely limited by what was there.


Nice work BTW,

Pauli


RE: WP-34s port to DM42 - Paul Dale - 03-23-2021 06:23 AM

(03-22-2021 09:10 PM)Nigel (UK) Wrote:  The hardest part, surprisingly, has been the keyboard - parts of the original code rely on the letters X, Y, Z, T being on non-numeric keys, and the numbers 0 and 1 being on non-alphabetic keys, and I'm still not sure that I've worked around this correctly.

These tradeoffs took us ages. That the stack keys and the 0/1s ended up where they did is a credit to Walter's persistence.


Pauli


RE: WP-34s port to DM42 - Ángel Martin - 03-23-2021 08:46 AM

(03-22-2021 09:10 PM)Nigel (UK) Wrote:  Many thanks for your suggestion. It has been interesting to think about.

Totally understand, no worries. Thank you for your response and congrats on a very nice port to the DM-42


RE: WP-34s port to DM42 - Nigel (UK) - 03-23-2021 10:01 PM

Here's a screenshot showing the longer display:
[Image: screen20.png?raw=1]
It seems to work all right. I haven't uploaded this yet; does anyone prefer it to the original?

Nigel (UK)


RE: WP-34s port to DM42 - Paul Dale - 03-24-2021 06:11 AM

I like it.

Any chance of putting the various bit mapped annunicators onto the top of the display?

I'm thinking of things like the gradian 'g', the integer mode settings, etc.


RE: WP-34s port to DM42 - Nigel (UK) - 03-24-2021 08:54 PM

(03-24-2021 06:11 AM)Paul Dale Wrote:  I like it.

Any chance of putting the various bit mapped annunicators onto the top of the display?

I'm thinking of things like the gradian 'g', the integer mode settings, etc.
I think that this is worth trying. Some annunciators - e.g., "i" and the angle symbol - should probably remain with the number that they are attached to. I'll post again when this is ready.

Nigel (UK)


RE: WP-34s port to DM42 - Nigel (UK) - 04-06-2021 10:39 PM

There are now three versions of the DM42 software - the original, one with a longer alpha display, and now one with a top row specifically for the annunciators as well as the longer display. Bugs have been fixed, and all three seem to be working!

Here are a few screenshots of the "top row" version:
[Image: top01.png?raw=1]

[Image: top02.png?raw=1]

[Image: top03.png?raw=1]

[Image: top04.png?raw=1]

In all three versions I've renamed some of the annunciators to make their meanings clearer.

Here's the link to the gitlab page where the software and source code can be found.

As always, bug reports are welcome! Many thanks for those I have already received.

Nigel (UK)


RE: WP-34s port to DM42 - Jaco@cocoon-creations.com - 04-10-2021 12:08 PM

Fantastic Nigel !!!!

I will check it out !!!!

Well done.


Two questions, before I try saddle the linux horse to compile:

1. Does the SIGFIG option work if enabled in features.h?

2. What would the implications be if I want to include the Complex model that you worked so hard on?


RE: WP-34s port to DM42 - Nigel (UK) - 04-10-2021 09:36 PM

(04-10-2021 12:08 PM)Jaco@cocoon-creations.com Wrote:  Fantastic Nigel !!!!

I will check it out !!!!

Well done.
Thank you!

(04-10-2021 12:08 PM)Jaco@cocoon-creations.com Wrote:  Two questions, before I try saddle the linux horse to compile:
It's quite a friendly horse. I'm using Ubuntu 20.04.2 LTS in a Virtualbox virtual machine running under Windows 10. With a few exceptions, everything just works using the gnu compilers. No need to worry about particular versions of anything!

(04-10-2021 12:08 PM)Jaco@cocoon-creations.com Wrote:  Two questions, 1. Does the SIGFIG option work if enabled in features.h?
Yes. However, see below ....
(04-10-2021 12:08 PM)Jaco@cocoon-creations.com Wrote:  2. What would the implications be if I want to include the Complex model that you worked so hard on?
I'm intending to do this myself before long. It isn't quite trivial - at present, my program is based on the "vanilla" WP34s code. All of my changes are nicely encapsulated in #ifdef DM42 ... #endif tags, so they are easily identifiable, but they will have to be copied across to the WP34c code. In some cases this is easy - for example, storage.c is identical in wp34s and wp34c, so it can simply be replaced - but in other cases it might be a little harder. It might be wiser to let me try first - you seem to be pretty busy elsewhere at present! However, you're welcome to have a go.

One feature of the WP34s is that programs are stored not as text but as opcodes. So if extra commands are added - for example, by changing features.h - some opcodes may change, unless the new commands are added at the end of the existing opcodes. This risks breaking programs that users currently have stored in RAM or in libraries. Actually, enabling SIGFIG mode doesn't cause a problem. But other commands might. Before I go all-out and turn everything on I want to make sure that as many extra commands as possible go at the end of the basic set of commands already present. If you aren't worried about preserving existing code, or you're happy to use the assembler suite to recompile things, this isn't a problem.

If you do decide to compile it, let me know how it goes! I'm sorry that I didn't do a Windows makefile, but I couldn't get anything to work under Windows at all. I can't even run the WP43s/c demo programs under Windows. (My laptop is OLD.) In any case I find makefiles particularly intellectually challenging; I'll jump on any excuse to make them simpler.

Best wishes

Nigel (UK)


RE: WP-34s port to DM42 - Jaco@cocoon-creations.com - 04-11-2021 08:34 AM

Thanx for the reply.

I will rather wait a bit than try the linux compiler, especially if you are due to do sigfig yourself.


RE: WP-34s port to DM42 - Nigel (UK) - 05-02-2021 07:09 PM

Just to let you know: the WP34C version of the WP34S is now available for the DM42. This includes a "Complex Lock" mode that aims to make the entry and use of complex numbers more straightforward than on the WP34S.

This version also includes:
  • Entry RPN. If you don't want the first press of ENTER to push the x-register into the y-register, this is for you.
  • The stopwatch! I never installed a crystal in my WP34S so this is my first experience of it. It's good!
  • IR printing! This seems to work well on my HP 82240B printer, so it will probably work on yours too. I don't see how my code could harm your printer, but if your printer is particularly precious to you, perhaps you should not try this.
  • A user-defined menu system, based upon the (never-released?) user catalogue code that I found in the WP34S source.

You'll find the WP34C in the wp34c branch of the gitlab project linked to before - here is a link to this branch. The files - wp34c.pgm, wp34c_long.pgm, wp34c_top.pgm - are in the build/ folder. Some information about the user menu system, complex lock mode, and entry RPN is available in the help/ folder.

If you have no use for complex lock mode or for printing or even for entry RPN, don't worry. If you don't activate these features they make no difference to the calculator's operation. The WP34C really is a WP34S, but with extra features there if you want them.

Nigel (UK)


RE: WP-34s port to DM42 - Jaco@cocoon-creations.com - 05-02-2021 07:38 PM

(05-02-2021 07:09 PM)Nigel (UK) Wrote:  Just to let you know: the WP34C version of the WP34S is now available for the DM42. This includes a "Complex Lock" mode that aims to make the entry and use of complex numbers more straightforward than on the WP34S.

Nigel (UK)

Thanks !! Well done!

It is installed and runs already. With the complex lock and eRPN on!

How do I save the settings so next time I load it it does not erase?


RE: WP-34s port to DM42 - Nigel (UK) - 05-02-2021 09:46 PM

Glad it's working! If you leave the calculator through the EXIT function in the SETUP menu a state file is automatically saved, and reloaded the next time the program is run. If you wish to save the state file yourself you can use the SvRAM command, which lets you save a named RAM file.

(If you are simply turning the calculator off and on nothing is saved, as the RAM isn't cleared.)

There's more information about the file commands in the wp34s_help.html file in the help/ folder. You can, for example, save and load the library contents, or even save and load an individual program file.

If you copy the help file into the HELP folder on the calculator you can access it via the HELP function in the SETUP menu.

Nigel (UK)


RE: WP-34s port to DM42 - Jaco@cocoon-creations.com - 05-02-2021 09:48 PM

(05-02-2021 09:46 PM)Nigel (UK) Wrote:  Glad it's working! If you leave the calculator through the EXIT function in the SETUP menu a state file is automatically saved, and reloaded the next time the program is run. If you wish to save the state file yourself you can use the SvRAM command, which lets you save a named RAM file.

(If you are simply turning the calculator off and on nothing is saved, as the RAM isn't cleared.)

There's more information about the file commands in the wp34s_help.html file in the help/ folder. You can, for example, save and load the library contents, or even save and load an individual program file.

If you copy the help file into the HELP folder on the calculator you can access it via the HELP function in the SETUP menu.

Nigel (UK)

Thanks Nigel,


RE: WP-34s port to DM42 - Nigel (UK) - 10-04-2022 09:19 AM

No new features but a bug fix: I discovered the other day that the battery-saving optimisations that were introduced last year (!) broke the stopwatch display. This is now fixed: updated .pgm files can be found in the usual place (i.e., here).

I've also posted this on the thread at the SwissMicros forum. I don't want anyone to find themselves without a stopwatch when they need one!

Nigel (UK)