(09-12-2024 09:26 AM)dm319 Wrote: [ -> ]That's intriguing - dropping the emulation could have been a motivation here.
I'll try and explain this as simply as I can. It may be longish. Again I did this stuff, professionally, for decades.
As
Steve Simpkin stated the HP-12C Platinum/Prestige use the Sunplus SPLB20D2 (v1 firmware) or Generalplus GPLB31A (v2 firmware). Both SoC's use a 8-bit 6502 core CPU. Why? Inexpensive. That's why chip-makers frequently have 8-bit (e.g. 8051) cores in their products. Less silicon area means lower cost. Up the clock, add more ROM/RAM so you can write in 'C' (as inefficient as that can be) and your product can be reasonably fast. ARM-based SoC's (32-bit CPU's) are challenging that market in both cost and speed.
To my knowledge the HP-12C Platinum firmware was completely rewritten and is
not a NUT emulation like the HP-12C+ or DM12L. I think the code was mostly written in 'C' (likely with some assembler). Again a
complete rewrite that acts similarly to the HP-12C (but not identically).
I have read (and understood) the Generalplus GPLB31A datasheet. That device has 256KB of
masked-ROM and 3KB+ of RAM. My understanding is that the Sunplus chip is almost identical possibly because of company renaming (
Sunplus to
Generalplus), a take-over, or whatever. Both having masked-ROM have
fixed and unchangeable (by anyone) firmware. Who created it? HP? Some contractor? Who knows.
By contrast 2015+ HP-12'S use a Atmel ATSAM2LC2CA SoC (32-bit CPU) emulating the original HP-12C NUT firmware. The HP-15C CE does the same as does the HP-15C LE. SwissMicros calculators also use a ARM-based SoC. In their case NXP (formerly Philips) LP11xx Cortex M0 products. The Atmel part has a M4 Cortex core and is a little faster. The latest known HP-12C+ firmware for this part is CHE--d1d1h, 2015-01-30.
Notice that the ATSAM2LC2CA firmware checksum values are 16-bits long
but the two bytes are the same value (e.g. 0A 0A, D1 D1, etc). In addition I've looked at multiple firmware image files and the same (single byte) value is stored at the end of them. I did the exact same thing over decades of writing firmware (8-bit LRC, 8/16-bit addition, 16/32 bit CRC methods). Or the start depending on the CPU. I had PC programs that calculated the checksum and wrote it to the image I made. My firmware would calculate the checksum at reset and compare it to the stored value. The same and all is good.
My theory is that when displayed by ATSAM2LC2CA based calculators one byte is
calculated while the other is
read just as I used to do. In legitmate firmware the two should match.
By contrast the HP-12C Platinum/Prestige calculators appear to
calculate a 16 bit checksum. The two bytes do
not match With masked-ROM firmware the chances of error/alteration are very low so why bother checking? Maybe ROM is verified. Maybe not. Being slower the Platinum/Prestige can take a brief time to do this. Atmel ATSAM2LC2CA based hardware, being much faster, is almost instantaneous.
The unknown firmware in
dm319's HP-12C has a 16-bit checksum just like the Platinum/Prestige models. My theory is that although the hardware is ATSAM2LC2CA based (modified) GPLB31A code was recompiled to produce the firmware. Perhaps bugs were introduced by this process. By whom? I've no idea and we'll probably never know.
This is why I asked (and got no answer) if the HP-12C in question had any
hidden Platinum/Prestige functionality. If so that would tend the confirm my theory (left over and unremoved code--but no Platinum keyboard markings or LCD annunciators).
One easy test is 2, ENTER, g+X [x^2]. On a Platinum/Prestige you'd get 4 (2 squared). On a HP-12C nothing would happen (no g+X [x^2] function).
The point of all this is that one must be a detective and have some idea what to check for. Physical features (from photo's, inspection) can provide clues but won't tell you everything.
A1