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.5.4.

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.
For questions or comments, visit the Free42 forum at Google Groups.

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

Android (ARM)

Get it at Google Play, or if you prefer the manual approach, download Free42Android.apk for side-loading.
Requires Android 1.5 or later.

iOS

Get it from the iTunes App Store.
Requires iOS 4.3 or later.

Windows

Download: Free42Windows.zip
Requires Windows 2000 SP4 or later.

If, when you try to run Free42, Windows says "This application has failed to start because the application configuration was incorrect. Reinstalling the application may fix this problem," then you also need to download and install the Microsoft Visual C++ 2008 Redistributable Package.

OS X

Download: Free42Mac.zip
Requires OS X 10.6 or later.

Linux

Download (x86): Free42Linux-32bit.tgz
Built in Fedora 6, with glibc 2.5, libstdc++ 4.1.2, and GTK+ 2.10.13. It should work on any Linux (x86) with those or similar libraries.

Download (x86_64): Free42Linux-64bit.tgz
Built in Ubuntu 12.04, with glibc 3.2, libstdc++ 4.6.3, and GTK+ 3.4.2. It should work on any Linux (x86_64) with those or similar libraries.


Additional Downloads

Skins

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

Android, contains 11 skins, last updated August 2, 2014;
iOS, contains 10 skins, last updated June 15, 2013;
Windows, Unix, and Mac, contains 22 skins, last updated June 15, 2013.

HP-42S/Free42 programs

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

HP42S Code Editor

A program for editing HP-42S programs on a PC. Offers many helpful features.
Tested on Windows XP and 7.
 

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 package.

Free42 Source Code

Download: free42.tgz
Download for GTK only, no HP logo, for building Linux packages: upstream.

• Building the Android version requires the Android SDK 1.5 and NDK r4b or later.
• For the iOS version, I always use the latest Xcode and iOS SDKs. You may be able to build it with earlier releases, too, but I can offer no guarantees on that.
• For the Windows version, you need Microsoft Visual C++ 2008 or later.
• For the Mac version, you need the OS X SDK 10.6 or later.
• The GTK version requires Linux, or any reasonably Unix-like environment, with X11, GTK+, and the usual development tools and libraries.


Old and No Longer Supported Versions

Pocket PC and Windows Mobile

Download: Free42PocketPC.zip (1.4.71)
Requires Pocket PC 2002 or 2003 (ARM) or later, or Windows Mobile for Pocket PC 5 or 6.
This version does not run under Windows Phone 7 or later. (But this one does.)
Additional skins

PalmOS

Download: Free42PalmOS.zip (1.4.71)
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 here.
The Decimal 68k, Binary ARM, and Decimal ARM versions do not require MathLib.
Additional skins

OS X 10.5

Download: Free42Mac.zip (1.4.74)
Requires OS X 10.5 or later, Intel or PowerPC.

OS X Dashboard

Download: Free42MacDashboard.zip (1.4.70)
Requires OS X 10.4 or later, Intel or PowerPC.

Linux (x86) with Motif

Download: Free42LinuxMotif.tgz (1.4.71)
Built in Fedora 6 with glibc 2.5, libstdc++ 4.1.2, and LessTif 0.95.0. It should work on any Linux (x86) with those or similar libraries.

Source Code for the Old and No Longer Supported Versions

Download: free42old.tgz
• For building the Pocket PC version, you need 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.
• Building Free42 for OS X 10.5 for PowerPC requires the OS X SDK 10.5 (not 10.4 or earlier because the code won't build; not 10.6 or later because those versions won't generate PowerPC code).
• For the Mac OS X Dashboard version, you need the OS X SDK 10.4 or later.
• The Motif version requires Linux, or any reasonably Unix-like environment, with X11, Motif/Lesstif, and the usual development tools and libraries.

Loading and Saving Programs

Loading and saving programs is possible in all Free42 versions except OS X Dashboard. The exact process is pretty straightforward in the desktop versions (Windows, OS X, Linux), but it is a bit more complicated on mobile devices.
For instructions for all versions, see here.

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 iOS and Android versions, which are Decimal only.

Free42 Decimal uses the Intel Decimal Floating-Point Math Library; it uses IEEE 754-2008 quadruple precision decimal floating-point, which consumes 16 bytes per number, and gives 34 decimal digits of precision, with exponents ranging from -6143 to +6144.

Free42 Binary uses the PC's FPU; it represents numbers as IEEE 754 compatible double precision binary floating-point, which consumes 8 bytes per number, and gives an effective precision of nearly 16 decimal digits, with exponents ranging from -308 to +308.

The binary version has the advantage of being much faster than the decimal version; also, it uses less memory. However, numbers such as 0.1 (one-tenth) cannot be represented exactly in binary, since they are repeating fractions then. 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

For questions and feedback, you are encouraged to use the Free42 forum at Google Groups.
If you prefer, you can also contact me, Thomas Okken, via email at thomas_okken@yahoo.com.

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.