GO9800 Emulator

What is GO9800

GO9800 is intended as a complete emulation of the hardware of the famous first family of Hewlett-Packard desktop calculators, i.e. HP9810A, HP9820A, HP9821A, and HP9830A/B.

The emulator is able to run the complete ROM-based firmware of the above models and the application programs written in the model specific programming language. Moreover the user interfaces (display, keyboard, printer), mass memory devices (magnetic card reader, tape drive, disc drive), and other external devices can be emulated to resemble the complete functionality of the original machine.

To enhance the realism of the emulation part of the outside appearance is graphically displayed and some of the mechanical sounds (beeper, cooling fan, drive motors, etc.) can be output via a sound card.

The emulator is completely written in Java 2 and platform independent.


GO9800 and the project site is in no way associated with the Hewlett-Packard Company.
Hewlett-Packard, HP, and the HP logos are all trademarks of the Hewlett-Packard Company.
This website is intended solely for research and education purposes.

The Project

The objectives of this project where to understand and preserve the firmware of the Hewlett-Packard series 9800 calculators and to create a fully functional real-time simulation of the complete hardware.

The wonderful machines of this series, the HP9810A, HP9820A, HP9821A, and HP9830A where developed in the early 1970s and manufactured from 1971 to 1976. Since long they have exceeded their intended technical lifetime and many of the still existing machines are inoperative. This is due to decay of mechanical components, like rubber rollers and several plastic materials. But also electronic parts show deterioration over the decades. Electrolytic capacitors dry out and tend to explode sometimes and ICs die from recrystallization and migration effects. Data storage media like magnetic tapes lose their content or get sticky and unusable.

The only way to preserve these historic pieces of computer technology and engineering art and keep them operative for a prolonged time is to build an emulator which resembles as much to the original features as possible.

The project began with acquisition of the ROM contents of the HP9810A and HP9820A by means of a logic analyzer. The next step was programming a disassembler in Java to get a deeper understanding of the 9800 CPU instructions. Furthermore by analyzing the disassembled firmware it was possible to understand the I/O procedure and interrupt structure.

One more result was the ability to create my own assembler programs for the 9800 CPU and run them on the real hardware. I discovered undocumented features in the 9810 Peripheral Control ROM which allowed to store and run binary machine programs. The first one was a kind of PEEK function for the HP9810A. By means of this the complete memory contents could be dumped. It was a good verification of the correctness of the logic analyzer read out. The next assembler program was a PEEK function for the HP9830A, whose firmware contents was not available so far. This also succeeded in a complete dump of the system ROM and additional plug-in ROMs.

The last phase of the project was the Java programming of a 9800 CPU emulator. Because of the properties of the display and keyboard I/O devices the HP9830A seemed to be the easiest candidate for emulation of the whole hardware. There where several risks in this phase as it was not sure whether the CPU instructions where completely documented in the various U.S. patents of the series 9800 machines. Also it was difficult to estimate the execution speed of the emulator. The machines should at least run in real time speed. Moreover the I/O principles where very poor documented and difficult to understand in detail.

In fact during the first tests of the emulator it showed that some CPU instructions had to behave different from the available 'documentation'. Esp. the floating point macro instructions took some weeks of debugging and step-by-step analyzing until they produced correct results. Also the stack handling of JSM / RET and the interrupt service routine gave some unexpected surprises. Late in the project, when testing the HP9820A together with the HP9865A, there showed one more anomaly in the IO interface. After many hours of testing, debugging, and re-programming it was only one possible solution left: the handling of the CEO handshake in the instruction STF 1 was wrong. There was only one constellation in the firmware of all three calculators where this special situation occurred.

With the core functionality of the HP9830 and getting the machine up running with a very simple output and input interface, the proof of concept was done. After that I added a simulated keyboard and LED matrix display. Photographs and sound recordings of the original machine where used to resemble a most naturalistic simulation.

In the next steps several peripheral devices where added: the HP9860A marked card reader, the HP9866A thermal printer, and the HP9862A plotter. The device which caused the most work was the HP9865A cassette tape drive, which is available build-in to the HP9830A and as external device. The I/O protocol is very complicated and the timing crucial, since the 9865 reads and writes asynchronously to the main machine. Some tape operations run completely in background and send interrupts to the calculator. JAVA multi threading techniques had to be used intensely. It took several weeks until the 9865 worked satisfactory.

When the HP9830 and the peripherals where completed the next machine to be implemented was the HP9810A. Reusing or extending most of the classes of the HP9830, the 9810 was basically brought up in a few days. Again the display simulation required a special timing logic. Most work had to be spend in the magnetic card reader. It has a similar I/O protocol as the HP9865, but the timing even more critical. Again it took more than two weeks to get a stable solution.

The last one was the HP9820A. With the experience of the first two machines it would have take only a few days to complete the 9820.

In the following years more peripheral devices where added to the project. In 2007 the HP9880A/B mass memory system was realized, in 2008 the HP9861A impact printer, and in 2011 the HP9866B graphics capable thermal printer. At this time the complete printer and plotter output was reworked for scalability and hardcopy to a real printing device. The last major addition and intended finish of the project was the HP9821A in 2011. This was made possible by a acquisition of the original HP9821A system ROMs.

As of May 2012 the project took more than 1000 hours of time for research, design, programming, and testing.


GO9800 project site and download pages: sourceforge.net/projects/go9800

The architecture of the HP9800 series is most completely described in the following patents available from the U.S. patent office (www.uspto.gov):

HP9810A: 3,859,635 Programmable Calculator

HP9820A: 3,839,630 Programmable Calculator Employing Algebraic Language

HP9830A: 4,012,725 Programmable Calculator

There are also german patents available from Deutsches Patent- und Markenamt (www.dpma.de):

HP9810A: 2264920, 2264923, 2264871

HP9820A: 2262725, 2264896, 2264897, 2264898

HP9830A: 2333908, 2365567, 2365568, 2365570

Further information about the history and technology of HP calculators can be found at



Most calculator and peripheral manuals are available for download from