I've been studying logic analyzer traces of the HP-97 bus. I was surprised to find that there are a lot more hitherto unknown instructions than I expected. From the HP Journal article on the 91 (or was it the 92?) I knew that there were about six instructions for the printer, and an unknown number for the keyboard and card reader, but thus far I haven't captured any traces involving printing.
The PIK chip controls both the printer and the keyboard (with buffer), so I expected that there would be at least one new keyboard-related instruction. I've been able to identify the instruction that tests whether there are any keycodes available in the buffer.
Reading a keycode out of the buffer doesn't use a new instruction; actually it can't, because it's not possible for chips external to the ACT processor to add new instructions that transfer data into ACT internal registers. So instead, it is mapped as RAM, to address 0xFF. (The actual RAM inside the combined RAM/ROM chips appears to be mapped from 0x00 through 0x3F.) I've determined a portion of the hardware keycode encoding information, but not yet all of it.
Thus far I've seen 13 "new" instructions, of which one is the keyboard status test.
Probably some of the extra instructions are asking the card reader whether a card has been inserted, and asking the printer whether it is in the home position. Maybe this will become more apparent when I capture traces with the printer or card reader in active use. I will need to refurbish the card readers in my 97 (and 67) before doing any reverse-engineering of that.
The ROM bank switching on the 97 does NOT appear to use the same instruction as used in the Spice models. I know there is some form of ROM bank switching going on, because the ACT can only address 4K of ROM, but the 97 has 6K, and some other ACT-based calculators including the 67 and 19C have 5K. I'm hoping that it uses essentially the same scheme they used in the later Spice series and merely a different opcode, but I don't yet have enough trace data to find it.
Right now I'm limited to capturing about six seconds of execution at a time.
I think it will take a long time to build up a full understanding of the HP-97, but once that is done I should be able to simulate all of the Topcat models as well as the HP-19C.