Post Reply 
newRPL: Now for 39GS and 40GS! [June 29-2017]
06-29-2017, 05:16 PM (This post was last modified: 06-29-2017 05:16 PM by Claudio L..)
Post: #1
newRPL: Now for 39GS and 40GS! [June 29-2017]
Please flash and try the new official ROMs for the 39gs and 40gs family:

Download the 39gs firmware: https://hpgcc3.org/downloads/newrpl39.bin
Download the 40gs firmware: https://hpgcc3.org/downloads/newrpl40.bin

And of course, the "classic" for the 50g: https://hpgcc3.org/downloads/newrplfw.bin
** NOTE **: For users upgrading from previous version: this ROM had major memory reorganization, backup all your data because it will require a memory wipe. Sorry about that, the reason is below.

As far as changes from the last release, there are a couple of bug fixes but nothing visible to the user. The main change is that the transcendental functions in the math library were completely rewritten from scratch, replaced mostly with table-free algorithms, but 2 of them needed a small table to precondition the arguments, needed perform at a decent speed. All in all, the performance at the default 32 digits precision is about 30 to 50% faster, at 12 digits precision it's about the same. At higher precisions, the old routines were faster, new ones are about 3x slower at 2000 digits. New routines use mostly multiplications, which grow in complexity with n^2 (n=digits), while the old routines used CORDIC style methods growing linearly with n.
The new routines also need some expanded precision, to produce accurate results, which means more memory had to be allocated for the real number registers. This unfortunately is a serious change and causes the need for a memory wipe (only affecting users using previous versions of newRPL).
On the positive side, those huge compressed tables were eliminated, now there's only about 80 kbytes in 2 small tables. The total firmware size now is about 720 kbytes, which fits nicely on the HP39GS 1 MB of flash.

I'm interested to get feedback on:
* Screen glitches at 64 pixels screens (39 and 40 series)
* Proposed keyboard mappings for use on the 39gs and 40gs. Right now the roms are probably not even usable due to the lack of one shift key on those calcs.
* Check power consumption on the 39 and 40.

And of course, any bug reports/comments!
Find all posts by this user
Quote this message in a reply
06-29-2017, 06:15 PM
Post: #2
RE: newRPL: Now for 39GS and 40GS! [June 29-2017]
Flashed my 39gs.

A few initial comments:
- On first boot the contrast is very low.
- Very high contrast is required to read the key character in menus but it looks ok.
- The ON+F4 combination to get to the testing (and then reflashing) menus no longer works.

BTW these units are being sold at about $15 over Aliexpress. It just became the lowest cost RPN calc AFAIK.. :-)
Find all posts by this user
Quote this message in a reply
06-29-2017, 06:29 PM
Post: #3
RE: newRPL: Now for 39GS and 40GS! [June 29-2017]
(06-29-2017 06:15 PM)yoeljacobsen Wrote:  Flashed my 39gs.

A few initial comments:
- On first boot the contrast is very low.
- Very high contrast is required to read the key character in menus but it looks ok.
- The ON+F4 combination to get to the testing (and then reflashing) menus no longer works.

BTW these units are being sold at about $15 over Aliexpress. It just became the lowest cost RPN calc AFAIK.. :-)

The initial contrast is set to 7 on a scale from 0 to 15. On my 50g it's a bit light too, but nothing that a couple of On-Plus / On-Minus can't solve.
Regarding the diagnostics menu, its code is not on the bootloader, but in the ROM we replaced so it gets wiped out of the calculator. This happens on all targets and it's normal. You can still get to flashing by using Plus and Minus simultaneously during reset, that part remains in the bootloader.

I'm interested in how the keys are mapped in hardware, is the ALPHA key working as a left shift? and the tick mark working as Alpha?
Find all posts by this user
Quote this message in a reply
06-29-2017, 06:35 PM
Post: #4
RE: newRPL: Now for 39GS and 40GS! [June 29-2017]
More 39gs feedback:

The keyboard is a mess:

- Alpha keys are not mapped to the printout on the calc ('A' is on F1 and not on VARS)
- ALPHA is left shift and ',' is ALPHA
- SIN is ^
- COS is square root
- TAN, LN, LOG are SIN, COS, TAN

And so on..
Find all posts by this user
Quote this message in a reply
06-29-2017, 06:46 PM
Post: #5
RE: newRPL: Now for 39GS and 40GS! [June 29-2017]
(06-29-2017 06:35 PM)yoeljacobsen Wrote:  More 39gs feedback:

The keyboard is a mess:

- Alpha keys are not mapped to the printout on the calc ('A' is on F1 and not on VARS)
- ALPHA is left shift and ',' is ALPHA
- SIN is ^
- COS is square root
- TAN, LN, LOG are SIN, COS, TAN

And so on..

Thank you, that confirms the hardware is connected identical to the 50g hardware.
Regarding layout, I didn't change anything, so for the time being you'll have to look at a picture of a 50g to know where things are. The idea is to get proposals to organize things better on this machine.
For example, in Alpha mode in newRPL you can type numbers and letter at the same time, so having the letters on the numbers is a no. Also, there's one letter on the Alpha key (the comma, or tick mark whatever that key is), this cannot be there, needs to be a separate key.
Ideas welcome.
Find all posts by this user
Quote this message in a reply
06-29-2017, 09:14 PM
Post: #6
RE: newRPL: Now for 39GS and 40GS! [June 29-2017]
(06-29-2017 05:16 PM)Claudio L. Wrote:  Please flash and try the new official ROMs for the 39gs and 40gs family:

[...] The main change is that the transcendental functions in the math library were completely rewritten from scratch, replaced mostly with table-free algorithms
I applaud these efforts to target multiple platforms and to shrink the size of the firmware. IMHO, on a calculator, optimizing for size is more important than optimizing for speed.

Do you still target the 39g+ as well?

Besides the larger flash of the 40gs, the only other hardware differences I am aware of are that the 39g+ supports IrDA, the 39gs supports IrDA and 4-pin serial and the 40gs supports only 4-pin serial. Also, the 39g+ is powered by three AAA batteries only, whereas the other two calculators are powered by four AAA batteries, which might require minor adjustments in power management.

Greetings,

Matthias


--
"Programs are poems for computers."
Find all posts by this user
Quote this message in a reply
06-29-2017, 10:30 PM
Post: #7
RE: newRPL: Now for 39GS and 40GS! [June 29-2017]
(06-29-2017 09:14 PM)matthiaspaul Wrote:  Do you still target the 39g+ as well?

Besides the larger flash of the 40gs, the only other hardware differences I am aware of are that the 39g+ supports IrDA, the 39gs supports IrDA and 4-pin serial and the 40gs supports only 4-pin serial. Also, the 39g+ is powered by three AAA batteries only, whereas the other two calculators are powered by four AAA batteries, which might require minor adjustments in power management.

Greetings,

Matthias

The 39G+ is supported as well (sorry, I forgot to mention that one). Its hardware is similar to the 49g+, while the 39/40GS have the hardware improvements of the 50g.
I wonder if the 39G+ has the same power drain issues with newRPL as the 49G+, since it's basically the same hardware. Anyone out there can please test the power drain?

Regarding speed vs size: I was aiming for both! On the PC the new algorithms are 3 times faster than the old ones at 32 digits, but when I finally tested on real hardware it was very disappointing to find gains that were much less. I think it's because the PC can multiply in one cycle, while the small ARM chips take a few cycles per multiplication, but they always add in 1 cycle (so it favors CORDIC). Can't always get what you want, but still the Savage benchmark went from 31 seconds to 20.5 seconds at the default 32 digits.
Find all posts by this user
Quote this message in a reply
06-30-2017, 12:01 AM
Post: #8
RE: newRPL: Now for 39GS and 40GS! [June 29-2017]
There is the possibility to implement conventional routines for the default 32 digits precision.
NewRPL is noticeably faster than RPL, but I think it still doesn't do justice to the ARM processor for 99.9% of calculations, when more than 32 digits are not required.

Jean-Charles
Find all posts by this user
Quote this message in a reply
06-30-2017, 02:52 AM
Post: #9
RE: newRPL: Now for 39GS and 40GS! [June 29-2017]
(06-30-2017 12:01 AM)Helix Wrote:  There is the possibility to implement conventional routines for the default 32 digits precision.
NewRPL is noticeably faster than RPL, but I think it still doesn't do justice to the ARM processor for 99.9% of calculations, when more than 32 digits are not required.

True, next time I decide to spend 2 months rewriting those routines, I'll take that into account and code a special case for 32 digits. For now the objective was achieved: 20 sec vs. 31 sec is a decent improvement at 32 digits (1.5x), and those huge tables (900 kbytes) are gone for good.
The comparison at 12 digits precision isn't that meaningful due to overhead and lack of tuning (why would you use 16 guard digits at 12-digit precision?) It does the benchmark in 15 seconds, but at 32 digits you get 2.7x digits at only 33% more time.
Find all posts by this user
Quote this message in a reply
06-30-2017, 06:54 PM (This post was last modified: 06-30-2017 06:55 PM by Luigi Vampa.)
Post: #10
RE: newRPL: Now for 39GS and 40GS! [June 29-2017]
(06-30-2017 02:52 AM)Claudio L. Wrote:  (why would you use 16 guard digits at 12-digit precision?) It does the benchmark in 15 seconds, but at 32 digits you get 2.7x digits at only 33% more time.

Outstanding, specially taking into account the challenge / Molto ben fatto, "Aquila non capit muscas" ;O)

"It is the mark of an educated mind to rest satisfied with the degree of precision which the nature of the subject admits, and not to seek exactness where only an approximation is possible."
Aristotle

Saludos Saluti Cordialement Cumprimentos MfG BR + + + + +
Luigi Vampa +
Free42 BlackviewA7 '<3' I + + +
Find all posts by this user
Quote this message in a reply
06-30-2017, 11:45 PM
Post: #11
RE: newRPL: Now for 39GS and 40GS! [June 29-2017]
(06-29-2017 06:15 PM)yoeljacobsen Wrote:  BTW these units are being sold at about $15 over Aliexpress. It just became the lowest cost RPN calc AFAIK.. :-)

Never heard of Aliexpress, is that a reliable dealer? Will I get a new unit?

Does the 39GS come with a clock chip and ability to wake on alarms?

Sounds like an interesting offer for repurposing... what is the catch (apart from not having a proper ENTER key)?

HÃ¥kan
Find all posts by this user
Quote this message in a reply
07-01-2017, 01:47 AM
Post: #12
RE: newRPL: Now for 39GS and 40GS! [June 29-2017]
(06-30-2017 11:45 PM)hth Wrote:  Never heard of Aliexpress, is that a reliable dealer? Will I get a new unit?

Wow, you are in for a surprise. Aliexpress is a LARGE website which is a front / shell for many smaller dealers in China (a bit like Amazon is in US) . LOTS of stuff. It's hard to generalize about how reliable it is, as "it" is really many companies, sorta like eBay.

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
07-01-2017, 11:26 PM (This post was last modified: 07-01-2017 11:27 PM by Luigi Vampa.)
Post: #13
RE: newRPL: Now for 39GS and 40GS! [June 29-2017]
If you check http://www.taobao.cn for an HP39gs, you will find a $2.95 offer =:'O
Unfortunately, it is a domestic trading platform, so that you need to know someone travelling to&from China and willing to do a favor. So far, I have never tried some trade agents that can be easily found in Google. It would be great to know whether any forum member has already bought from TaoBao by means of such traders.

Saludos Saluti Cordialement Cumprimentos MfG BR + + + + +
Luigi Vampa +
Free42 BlackviewA7 '<3' I + + +
Find all posts by this user
Quote this message in a reply
07-07-2017, 07:10 PM (This post was last modified: 07-07-2017 07:11 PM by Claudio L..)
Post: #14
RE: newRPL: Now for 39GS and 40GS! [June 29-2017]
(06-29-2017 10:30 PM)Claudio L. Wrote:  Regarding speed vs size: I was aiming for both! On the PC the new algorithms are 3 times faster than the old ones at 32 digits, but when I finally tested on real hardware it was very disappointing to find gains that were much less. I think it's because the PC can multiply in one cycle, while the small ARM chips take a few cycles per multiplication, but they always add in 1 cycle (so it favors CORDIC). Can't always get what you want, but still the Savage benchmark went from 31 seconds to 20.5 seconds at the default 32 digits.

I tried a few improvements in the multiplication routine (the new algorithms are heavy on multiplications). Speed of multiplication doubled on the PC. On the other hand, on the calculator it didn't even move the needle, the Savage benchmark went from 20.3 sec to 20.0 seconds. I don't think the compiler will do better, even when taken by the hand. Time to try some hand-optimized assembler... just to prove a point.
Find all posts by this user
Quote this message in a reply
07-28-2017, 09:30 PM
Post: #15
RE: newRPL: Now for 39GS and 40GS! [June 29-2017]
Can i using newRPL to run programs for HP 50G?
Find all posts by this user
Quote this message in a reply
07-29-2017, 06:21 PM
Post: #16
RE: newRPL: Now for 39GS and 40GS! [June 29-2017]
(07-28-2017 09:30 PM)root07 Wrote:  Can i using newRPL to run programs for HP 50G?

With newRPL rom, the 39GS, 40GS and 50G will only differ in the free RAM amount, the size of the screen and the SD card. Other than that, newRPL behaves exactly the same on all targets.
So yes you will be able to run programs for the 50g on a 39/40, at least the part that's already implemented, there's over 300 commands, but far from the close to 800 that the 50g has.
We'll get there eventually.
Find all posts by this user
Quote this message in a reply
08-08-2017, 02:58 PM (This post was last modified: 08-08-2017 06:02 PM by root07.)
Post: #17
RE: newRPL: Now for 39GS and 40GS! [June 29-2017]
How to connect HP 39GS(NewRPL) to Windows 7/10? Calculator won't show up(in Device Manager) on Windows 7/10 when plugged in via USB.
Find all posts by this user
Quote this message in a reply
08-08-2017, 07:37 PM
Post: #18
RE: newRPL: Now for 39GS and 40GS! [June 29-2017]
(08-08-2017 02:58 PM)root07 Wrote:  How to connect HP 39GS(NewRPL) to Windows 7/10? Calculator won't show up(in Device Manager) on Windows 7/10 when plugged in via USB.

You can't. There's no connectivity in newRPL (yet).
Find all posts by this user
Quote this message in a reply
08-08-2017, 07:50 PM
Post: #19
RE: newRPL: Now for 39GS and 40GS! [June 29-2017]
(08-08-2017 07:37 PM)Claudio L. Wrote:  
(08-08-2017 02:58 PM)root07 Wrote:  How to connect HP 39GS(NewRPL) to Windows 7/10? Calculator won't show up(in Device Manager) on Windows 7/10 when plugged in via USB.
You can't. There's no connectivity in newRPL (yet).
HP 39GS doesn't have SD slot, can't connect to PC via USB. -> I can't update NewRPL?
Find all posts by this user
Quote this message in a reply
08-08-2017, 09:19 PM
Post: #20
RE: newRPL: Now for 39GS and 40GS! [June 29-2017]
(08-08-2017 07:50 PM)root07 Wrote:  
(08-08-2017 07:37 PM)Claudio L. Wrote:  You can't. There's no connectivity in newRPL (yet).
HP 39GS doesn't have SD slot, can't connect to PC via USB. -> I can't update NewRPL?

newRPL doesn't have connectivity, but the bootloader does. I assumed you wanted to transfer files and objects into newRPL.
To update newRPL, just press and hold the + and - keys simultaneously, while performing a Reset.
From newRPL, On-A-F, then choose the reset option while pressing any of the shift keys. You have to be quick to release the reset key and immediately press + and -, might take a few tries until you get it right.
A perhaps simpler alternative is to use a paperclip in the reset hole (always while pressing + and -).
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)