Free42 — An HP-42S Calculator Simulator

What it is

Free42 is a re-implementation of the HP-42S calculator and the HP-82240 printer.
It is a complete rewrite, not using any HP code, and it does not require an HP-42S ROM image.
Free42 is an Open Source project. The executables and source code are released under the terms of the GNU General Public License, version 2.
All third-party code used in Free42 is either in the public domain, or licensed under terms compatible with GPLv2, or used with the authors' permission.

Project Status

The latest release is 1.4.70, dated September 18, 2011.
If you're interested in what's been going on with Free42 in the past, see the project history.
For my thoughts about future improvements, check my to-do list.

NOTICE
There have been several bug reports in recent times, mostly relating to skin scaling in the Android version, but also in a few other areas, and I have been saying I would implement on-screen printing in the Mac OS X and iPhone versions, plus some other missing functionality here and there... and yet I have made very little progress of late.
Please be advised that I am still listening, keeping track of bug reports and other feedback, and I have not abandoned the Free42 project, but I haven't had enough time to really work on it in recent months, and it looks like that situation will not improve until early 2012.
Thank you for your understanding and patience!

Donations

If you like Free42 and use it regularly, or if you simply want to sponsor the Free42 project, please make a donation.
You can donate any amount you wish. All donations, large or small, will help keep Free42 going.
Donations are processed by PayPal.

Thank you for supporting the continued development of the Free42 project!

Downloads

Free42 for Windows

Download: Free42Windows.zip
Requires Microsoft Windows 98 or later.

Free42 for Pocket PC and Windows Mobile

Download: Free42PocketPC.zip
Requires Pocket PC 2002 or 2003 (ARM) or later, or Windows Mobile for Pocket PC 5 or 6.
I have received reports that this version can also be used on some Windows CE devices.
This version does not run under Windows Phone 7.

Free42 for PalmOS

Download: Free42PalmOS.zip
Requires PalmOS 3.0 or later.
This package contains 68k and ARM versions of the PalmOS application, and a HotSync conduit that allows you to transfer files between Windows and the Free42 filesystem on your PalmOS device.
The Binary 68k version requires the MathLib floating-point library; in case you don't already have it, you can get it from Rick Huebner's MathLib page. (I noticed that that page had disappeared on 1/5/2012; until it comes back -- or in case it doesn't -- you can download MathLib from this page.)
The Decimal 68k, Binary ARM, and Decimal ARM versions do not require MathLib.

Free42 for Mac OS X

Download: Free42Mac.zip
Requires Mac OS X 10.5 or later, Intel or PowerPC.
This is Free42 built as a Mac OS X application. It does not have a functioning print-out window yet.

Free42 for Mac OS X Dashboard

Download: Free42MacDashboard.zip
Requires Mac OS X 10.4 or later, Intel or PowerPC.
This is Free42 built as a Mac OS X Dashboard widget. It does not support skin switching, printer emulation, and program import/export.

Free42 for iPhone, iPod touch, and iPad

You can get it from the iTunes App Store.
Requires iPhone OS 3.0 or later.
This version does not yet have a functioning print-out window (but printing to files is implemented), and it does not yet support import/export of programs from/to files on the device (but import/export directly from/to a PC or Mac is implemented, see here).

Free42 for Android

You can get it at the Android Market, or if you prefer the manual approach, download Free42Android.apk and install it yourself.
Requires Android 1.5 or later.

Free42 for Linux (x86)

Download: Free42Linux.tgz
Built in Fedora 6 with glibc 2.5, libstdc++ 4.1.2, GTK+ 2.10.13, and LessTif 0.95.0. It should work on any Linux (x86) with those or similar libraries.
This package contains GTK+ and Motif versions of Free42. The only difference between the two is the look and feel of the menu bar and dialog boxes; in all other respects, they are identical.

Free42 Source Code

Download: free42.tgz
The GTK and Motif versions require Linux, or any reasonably Unix-like environment, with X11, GTK+ or Motif/Lesstif, and the usual development tools and libraries. For the Windows version, you need either Microsoft Visual C++ 6.0 or MinGW; for the Pocket PC version, Microsoft eMbedded Visual C++ 3.0; for the PalmOS version, you need PRC-tools (with Ton van Overbeek's multi-segment debugging patches applied); for the PalmOS/Windows Conduit, you need Microsoft Visual C++ 6.0; and for the iPhone version, you need the iPhone SDK 3.0 or later. The Mac OS X Application and Dashboard versions can be built using the development tools that come with OS X; they require OS X 10.4 or later for the Dashboard version, and OS X 10.5 or later for the Application. The Android version requires the Android SDK 1.5 and NDK r4b or later.

Skins

Some skins to use instead of the faceplates built into Free42. Separate packages for:

Windows, Unix, and Mac, contains 20 skins, last updated March 28, 2010;
Pocket PC, contains 21 skins, last updated June 30, 2010;
PalmOS, contains 8 skins, last updated April 4, 2007;
iPhone and iPod touch, contains 9 skins, last updated April 10, 2011.
Android, contains 3 skins, last updated June 11, 2011.

 

HP-42S/Free42 programs

A small collection of HP-42S/Free42 programs.
 

txt2raw.pl

A Perl script that converts HP-42S program listings, such as those generated by the PRP and LIST commands, to Free42/Emu42 compatible "raw" program files.
Written by Vini Matangrano; look here for documentation and the script itself.
 

rom2raw

A C program that converts HP-41 ROM images to Free42/Emu42 compatible "raw" program files.
Download rom2raw.zip; source code and Win32 console executable included.
NOTE: the source code for this program is also included with the Free42 Source Code package.

Documentation

There is no manual for Free42 per se, but since it is an accurate simulation of the HP-42S, the original HP-42S manual should be adequate for most purposes. The functionality that is specific to Free42, e.g. printer emulation, skin switching, etc., is fairly simple and should be self-explanatory -- except perhaps for program import/export, which is documented here, and the accelerometer, GPS, compass, and time/date functions, which are documented here.
You can obtain a copy of the original HP-42S manual, in English, German, or Portuguese, in PDF format, on CD-ROM or DVD-ROM, at The Museum of HP Calculators. Look for the CD/DVD offers here.
If you're looking for something to help you get started without spending any money, I recommend the Alternative HP-42S/Free42 Manual, written by José Lauro Strapasson and Russ Jones; you can get it here, in PDF and Word formats. There is also an EPUB version of this manual, suitable for most e-book readers; provided by Koen De Vleeschauwer.

Binary and Decimal Floating Point

While Free42 originally used Binary math exclusively, all releases starting with 1.4 have come in two versions, Binary and Decimal. The two look and behave identically; the only difference is the way they represent numbers internally.
All the Free42 versions on this site include both the Binary and Decimal versions, except for the iPhone and Android versions, which are Decimal only.

Free42 Binary uses each platform's native floating-point support. On PCs and Macs, this means the hardware FPU, while on hand-helds, it usually means FPU emulation or a floating point library. All platforms supported by Free42 use IEEE-754 compatible floating point, and Free42 uses double precision, which consumes 8 bytes per number, and gives an effective precision of nearly 16 decimal digits, with exponents ranging from -308 to +307. Free42 Binary also supports IEEE-754 denormal/subnormal numbers, so even smaller exponents are possible, but such numbers do not have the full precision of numbers within the normal exponent range.

Free42 Decimal uses Hugh Steers' 7-digit base-10000 BCD20 library, which gives 25 decimal digits of precision, with exponents ranging from -10000 to +9999.

The binary version has the advantage of being much faster than the decimal version; also, it is smaller and uses less memory. However, numbers such as 0.1 (one-tenth) cannot be represented exactly in binary, since they are repeating fractions then: 1/10 is exactly 0.1 decimal, but 0.00011 binary. This inexactness can cause some HP-42S programs to fail.

If you understand the issues surrounding binary floating point, and you do not rely on legacy software that may depend on the exactness of decimal fractions, you may use Free42 Binary and enjoy its speed advantage. If, on the other hand, you need full HP-42S compatibility, you should use Free42 Decimal.

If you do not fully understand the above, it is best to play safe and use Free42 Decimal.

Contact

You can contact me, Thomas Okken, at .

Other HP-42S Emulators/Simulators

NOTE: These links are for informational purposes only; I provide no support for them, but I believe they may be of interest to RPN and HP-42S fans.