The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

Repurposing the HP39GII?
Message #1 Posted by Han on 1 Oct 2012, 3:28 p.m.

Has anyone given thought to whether this is feasible? I have yet to get my hands on one, but the thought of an HP48/50 core with a high-res screen sounds appealing.

      
Re: Repurposing the HP39GII?
Message #2 Posted by Walter B on 1 Oct 2012, 4:28 p.m.,
in response to message #1 by Han

Viable for sure, but its footprint is too large IMHO. YMMV

      
Re: Repurposing the HP39GII?
Message #3 Posted by Eric Smith on 1 Oct 2012, 8:27 p.m.,
in response to message #1 by Han

The SoC used in the 39GII doesn't seem to have any real documentation publicly available. There's an SDK that you have to pay big bucks for. Hacking up some replacement firmware is definitely possible, but looks like it would be a lot of work, possibly involving a fair amount of reverse-engineering.

            
Re: Repurposing the HP39GII?
Message #4 Posted by Han on 2 Oct 2012, 12:24 a.m.,
in response to message #3 by Eric Smith

Quote:
The SoC used in the 39GII doesn't seem to have any real documentation publicly available. There's an SDK that you have to pay big bucks for. Hacking up some replacement firmware is definitely possible, but looks like it would be a lot of work, possibly involving a fair amount of reverse-engineering.

How much are we talking for an SDK? And on that note, is it possible to still purchase the SDK kit for older models (HP48, HP50)?

Han

                  
Re: Repurposing the HP39GII?
Message #5 Posted by Eric Smith on 2 Oct 2012, 2:27 p.m.,
in response to message #4 by Han

Quote:
How much are we talking for an SDK?
It's an SDK for the Freescale (formerly SigmaTel) STMP3770 SoC chip, not the calculator, and it reportedly costs $12,000. The chip is intended for use in MP3 players and the like, and the vendor does not want to sell or support it for anything but high-volume products.

According to the Rockbox wiki, the part is functionally similar (but not identical) to the STMP3780/i.MX233, for which there is Linux support. It might be possible to get Linux running on the 39gII hardware, but it would probably drain the batteries too quickly to be useful as a basis for calculator firmware. (Linux power management is more suited to rechargeable Lithium batteries than to disposable alkalines.) However, the Linux device drivers might be useful as an example of how the various blocks in the SoC are programmed.

Quote:
is it possible to still purchase the SDK kit for older models (HP48, HP50)?
There wasn't anything comparable for the chips used in the 48/49g or 49g+/50g. However, the documentation for the Samsung ARM SoC used in the 49g+ and 50g is readily available, unlike the SoC in the 39gII.
                        
Re: Repurposing the HP39GII?
Message #6 Posted by uhmgawa on 2 Oct 2012, 5:09 p.m.,
in response to message #5 by Eric Smith

Quote:
..to the STMP3780/i.MX233, for which there is Linux support.

I'd designed an audio player a few years back based on the imx233. In that application it seems a reasonable contender although the system power budget assumption is considerably beyond what I'd want in a calculator feeding from primary cells. Also the integrated power management controller is specifically designed to interface with a Li ion cell.

Linux support at the time was a little weak, and IIRC unsavory dependencies existed on a windoZe host environment which required hoop jumping to sidestep. From my conversations with both Freescale and Chumby, I had the impression Chumby was "the" beta customer for the product in general and in particular for the Linux tooling subsequently released by Freescale.

Embedded linux as a runtime framework for calculator firmware, although complete overkill, would be quite nice from a more-room-to-swing-the-hammer perspective. But current SoC integration density and resulting power consumption isn't there yet and IMHO you'd essentially end up with a repackaged cell phone or media player. The race then is between the scaling up of deeply embedded SoCs vs. the increasing inefficiency and bloat of the linux kernel, userland libs, and toolchain.

                              
Re: Repurposing the HP39GII?
Message #7 Posted by Paul Dale on 2 Oct 2012, 5:29 p.m.,
in response to message #6 by uhmgawa

Linux for a calculator is complete overkill unless you've got plenty of excess hardware. About the smallest linux port I've heard of is uClinux for the GameBoy Advance. The hardware has 256k of RAM and essentially unlimited ROM. Linux in under a megabyte of ROM/flash is possible but usually requires a compressed image which means RAM is needed to unpack this into -- perhaps not for a calculator.

I'd prefer the resources used to be dedicated to calculating not an operating system.

- Pauli

                                    
Re: Repurposing the HP39GII?
Message #8 Posted by uhmgawa on 2 Oct 2012, 6:54 p.m.,
in response to message #7 by Paul Dale

Quote:
Linux in under a megabyte of ROM/flash is possible but usually requires a compressed image which means RAM is needed to unpack this into -- perhaps not for a calculator.

The kernel image could easily be XIP in flash if need be. However the kernel text is typically a footnote in the overall RWM budget.

Quote:
I'd prefer the resources used to be dedicated to calculating not an operating system.

Agreed. But at some point the inefficiency will become tolerable for good or ill, which is why such hybrids as uClinux have encroached into the problem space. That said I'd suspect we're at least a decade away from a compelling reason to horseshoe a full virtual memory posix api, etc.. in a dedicated pocket calculator.

                                          
Re: Repurposing the HP39GII?
Message #9 Posted by Paul Dale on 2 Oct 2012, 7:01 p.m.,
in response to message #8 by uhmgawa

Quote:
The kernel image could easily be XIP in flash if need be.

From memory it is run this way on the GameBoy.

Quote:
But at some point the inefficiency will become tolerable for good or ill,

Of course. When you've multiple megabytes of RAM and flash, running a linux or similar kernel isn't a problem. You pick up device drivers for USB attachments, SD cards, displays. And lots of software libraries.

- Pauli

                        
Re: Repurposing the HP39GII?
Message #10 Posted by Han on 2 Oct 2012, 10:39 p.m.,
in response to message #5 by Eric Smith

Oh I think I may have misunderstood "SDK" then. I was thinking an SDK kit would basically include the source to the current ROM, and various compilers/linkers and documentation for the current hardware. At $12,000 it appears you probably also get tech support and possibly even hardware for testing.

Since the chip is an ARM chip, I wonder how much we could probably figure out just from opening up the calculator and comparing what we see with the chip datasheet (address lines, data lines, etc)... somewhat like what was done during the hp49g+ emulation days.

As for a compiler, any decent ARM compiler should get us through some of the basics. Maybe I'll have to invest in an HP39GII to open up.

Edit: oh I just realized you said the datasheets are not available =(

Edited: 2 Oct 2012, 10:47 p.m.

      
Re: Repurposing the HP39GII?
Message #11 Posted by bluesun08 on 2 Oct 2012, 7:18 a.m.,
in response to message #1 by Han

Great idea!


[ Return to Index | Top of Index ]

Go back to the main exhibit hall