View source for HP48 Series RPN Calculator

From Openmoko

Jump to: navigation, search

You do not have permission to edit this page, for the following reasons:

  • The action you have requested is limited to users in the group: Administrators.
  • You must confirm your email address before editing pages. Please set and validate your email address through your user preferences.

You can view and copy the source of this page:

Template used on this page:

Return to HP48 Series RPN Calculator.

Personal tools
In progress: This article or section documents one or more features whose implementation are in progress.
neo1973 emulating a HP 48GX calculator

Eddie C. Dost and Iñigo Serna Robledo wrote an open-source emulator for the HP 48 series of RPN calculators. This code can be used with a ROM image of the code from a specific HP 48 series calculator, to provide a working calculator. The emulator is not fast by any means - running on a neo1973, the emulator is only about 70% faster than an HP 48G. It is definately usable - it is faster than the real calculator after all.

Their original source code, available at will build on standard unix/linux distributions, and displays using the GTK+ toolkit and X11. There are only three things that prevent their original code from being directly usable on an Openmoko phone. First, the image of the calculator the code produces is too large for a VGA display, and the bottom ~3 rows of keys are not displayed. That was fixed by removing some of the protions of the display which were merely cosmetic (showing the HP logo and model number, for example). Secondly, the source code package is not designed for crosscompilation, which is what is usually done for Openmoko code. Thirdly, the default fonts the code uses aren't present in the Openmoko rootfs (at least the 2007.2 family of releases), so they needed to be changed.

Your going to need extremely fine finger control to run this thing without a stylus. I think in practice this device must be considered stylus-based.

Like many programs, the command line options can be seen by executing the program with the argument --help. The most important command line options are -rom, which must be followed by the rom file name (with path, if not in the current directory) and -home, which must be followed by the directory into which the program should store the RAM image.

The emulation of the calculator is exact enough that the calculator will turn itself off after being idle for a few minutes. For some reason, you must press the ON key several times to turn the calculator back on. I will try to fix that bug.

I have done the little changes to the code required to make the calculator image fit on a VGA display, as shown above, and I have gotten the code to crosscompile.

The emulator reproduces the real calculator's power saving feature of turning off after a few minutes with no activity. When the calculator is off, the screen will be blank. To turn it back on, tap the on key twice in rapid succession.

The modified code and/or an opkg package may be found here:

Please send comments, suggestions and questions to