Calculator ROM-sucker

I caught a cold from my roommate. I don’t want to give it to coworkers, and I don’t really feel up to going out anyhow. I can’t really work from home at the moment, so when I wasn’t feeling quite so miserable I spent a few hours hacking on CASMSIM.

I cobbled together an interface to let me capture the calculator bus signals using an LTC1045 hex level translator chip and a DLP-USB245M parallel-to-USB converter module (based on the FTDI FT245BM chip).

The level translator will be necessary for the older calculators that use PMOS levels (-10 to +6V clock, ground to +6V data).

I’m using the USB chip for input only. It takes eight data bits and a strobe. I’ve wired the phase 2 clock to the strobe, and the SYNC and ISA signals to two of the data pins. I wired up the top three bits as “010″ so that the samples are printable characters for convenience. Then it should only take “cat </dev/ttyUSB0 >foo.log” to capture a trace.

I couldn’t get it to work until I ran it as root. Strange, because I’d actually set the permissions on /dev/ttyUSB0 to 666.

I hooked the hardware up to an HP-11C. That’s a fourth-generation calculator in the Voyager series, and uses the same “Nut” processor architecture as the HP-41C. (Early Voyagers used the same actual processor chip, a 1LF5, but newer ones have been cost reduced, so the one I’m experimenting with has a 1LM2.)

By putting the calculator into self-test mode, it checks its ROM and RAM. From the trace, I was able to extra the ROM contents, 6K words of 10 bits each.

With a little bit of hacking, it should be possible to get the 11C running in my old NSIM simulator. But rather than mess around with that, I’m going to try to add the Nut architecture to CASMSIM.

I took some photos of the ROM dumping apparatus.

Now that I know the hardware works, I’ll dump the rest of the Voyager series (10C, 12C, 15C, 16C), and move on to the third generation calculators (Spice series: 31E, 32E, 33E, 33C, 34C, 37E, 38E, 38C). These all have the self-test, so capturing the ROM image will be easy. The first and second generations do not have a self-test, so dumping those is much more difficult.

When I use this on 2nd and 3rd generation calculators, I’ll have to hook up a few more of the internal signals, because I’ll need detailed traces in order to reverse-engineer the processor architecture.

Dave Hicks of the Museum of HP Calculators has given me permission to use images from his site in the CASMSIM distribution, so they will probably be included in the next release.

This entry was posted in Calculators, Hardware, Nonpareil. Bookmark the permalink.

Leave a Reply