Hi! Sarah here, adding a note in July 2023. You probably don't want to use HP45TERM. It works perfectly well — and is your only option if you're using a Z80-MBC2 — but HP1973 includes more calculators, provides much more information about them, and uses internal code which more closely duplicates the hardware implementation of the original calculators. Why not try that, instead?
Quick download link: HP45TERM
I love the HP-45 calculator. It's beautiful on the outside, but I wanted to show people that it's beautiful on the inside, too. So, as a coding and retrocomputing challenge I wrote a simulator.
The simulator was designed for the Z80-MBC2, a computer with a Z80 processor running CP/M. (If you like retrocomputing, do try it.) But, after some tedious wrangling, I was able to write code which also compiled for Windows, Linux, MacOS and Raspberry Pi OS (32 bit).
I like the sense of retro-tech and (unfulfilled) futures which the terminal application provides: it's a hauntological calculator. It's also flexible: you can change what's shown on the display and, for slower machines (say, an 8MHz Z80), you can run in minimal mode, for speed.
Because I want hp45term to explain the genius of the HP-45's ROM code, I've kept my code as simple and clear as I could, & made sure that it includes copious & detailed comments throughout, explaining how the calculator processes the 2048 bytes of its ROM.
And because the HP-45's ROM is so beautifully crafted, I've also included a new version of the disassembled ROM, to show what it's doing in each byte. HP45TERM itself includes a "heat map" to show how each key press is processed throughout the bytes of ROM.
Download it here. The zip file includes documentation, source code and compiled versions for all the platforms. I hope you enjoy it. There are help screens in the program, but if you're new to the HP-45 (or RPN) then start here. Oh, and yes, it does implement the secret timer function.