|Re: HP-97 in Nonpareil (work in progress)|
Message #6 Posted by Eric Smith on 15 July 2008, 4:28 a.m.,
in response to message #1 by Eric Smith
I've got the HP-97 printer now almost completely working in Nonpareil. Currently I'm not simulating the timing of the printer, and as a result, things that should be on one printed line are split across two. For example, with 0.00 in X, hitting PRINT X should result in one line with "0.00 ***", but I'm getting the asterisks on one line and the number on the next.
The printer prints right to left, and my simuluation is finished printing the asterisks before the firmware is ready to print the number. In the real calculator, it prints part of the line, gets more stuff ready to shove into the print buffer, polls the chip until it says it has "seen the carriage return" (but not yet acted on it, then tells it to print more, which winds up on the same line. The process is described in the HP Journal article on the HP-91, but I had to figure out some of the details.
I can print program listings, which for the reason given above wind up with the keycodes on one line and the instruction on the next (in TRACE mode).
Running a program in TRACE mode doesn't work, as the X register gets corrupted. NORM and MAN modes are OK, including printing functions. It's possible that this corruption is related to the timing problem.
It's always fun to get another calculator model running in Nonpareil, but this one has been especially interesting since it involved reverse-engineering the behavior of the CRC and PICK chips. Jacques Laporte helped with the CRC.