The HP-12c and platinum Kinpo story - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: General Forum (/forum-4.html) +--- Thread: The HP-12c and platinum Kinpo story (/thread-22795.html) |
The HP-12c and platinum Kinpo story - dm319 - 12-01-2024 08:57 PM I started writing out a longish reply to this thread and realised it was best put into another post. I know we've heard the story many times that the 12c platinum is a rewrite-from-scratch, and I've seem people advise caution about buying the 12c platinum for exams where the exact answer is important. However, my TVM testing found something different. This was original reply: (12-01-2024 01:50 PM)Steve Simpkin Wrote: Perhaps. According to Wikipedia, the HP-12C Platinum is a complete reimagination of the HP-12C that was manufactured by Kinpo Electronics for HP. Unlike the HP-12C which, (more or less) run the same 1981 firmware on a real or emulated HP "NUT" processor, the HP-12C Platinum has completely rewritten software running on a 6502 processor core., (Apologies to those who've heard me say this already) The forensic testing I did on TVM suggested to me that the software running on my 12c platinum did not come from a clean slate. Most of it is identical to Saturn-and-beyond era HP financial calculators, returning 12 digits, with presumably a 15 digit internal precision. I suspect it is running some of the same C code as those devices. However, there are two slight differences - one is that, unlike the Saturn TVM solvers, but like the 12c, it takes the ceiling of solve-for-N. Another difference is the solve-for-i behaves more like the regular 12c. The article above is interesting, and I wonder whether the first device had these bugs, but they got fixed maybe? My device doesn't behave like described. from the article Wrote:. For example, f CLEAR-FIN n=10 PV=100 PMT=-20, and This takes 2 seconds on my 12c platinum and returns 15.09841448 compared to 15.09841448 on my 12c emulator. While the platinum shows 10 digits, you can expose the 12 digit precision by subtracting what is visible, which shows that the actual result is 15.0984144771. Just for fun I tried this on the rogue 12c. It returned 15.09841448 also. Using subtraction we can find the full result which is 15.09841447711221. This isn't really a forensic test, because it should be a fairly easy solve-for-i, but none the less, the 12c platinum returns the same result to 10 digits as the 12c, but also returns another two digits. The rogue 12c returns an extra 6 digits over the 12c. More digits can be nice, but only if they are good quality ones. Which one is the most accurate? Calculating a reference value in R, I could generate these accuracy measurements: Code: |calculator | 1046_12cp| The 12c platinum scores nearly 2 points more than the 12c, which means it does make good use of those two extra digits, in fact those 2 extra digits are correct. The Rogue 12c is more accurate, though not 6 digits more accurate. And so the conclusion to this exercise is that the most accurate HP TVM solver for this question is, bizarrely, a device currently being pulled from the shelves, and the next most accurate is the 12c platinum, which is often derided for 'having different algorithms' to the regular 12c. This solve-for-i isn't really a forensic test, but those tests do place the 12c platinum as some kind of meld of saturn financials and the old 12c. The story of Kinpo completely reimplementing the 12c from scratch using a scanned user manual would fit more with the Rogue 12c IMO. If anyone would like more information on why I think the 12c platinum is mostly a Saturn-era financial calculator, I can try to demonstrate why I think that (I hearing screaming into the distance of 'no please, not that again!'). RE: The HP-12c and platinum Kinpo story - AnnoyedOne - Yesterday 12:58 PM There are at least two versions of firmware for the 12CP, v1 and v2. The initial (silver) ones had v1 in them. I don't know if v2 fixed any bugs. Both use the Generalplus (was Sunplus?) GPL31A SoC which is a masked-ROM part. The firmware is therefore not updateble. The rogue HP-12C likely uses the newer Generalplus GPL833F which is flashable but has no USB controller so it looks like it requires a custom programmer for firmware updates. https://www.hpmuseum.org/forum/thread-22313-post-192959.html#pid192959 Whether Kinpo designed the 12CP hardware and firmware I'm not sure. I've seen statements claiming that they did and others saying that it was HP. As for the "rogue" that is also unknown. We may never know for sure. Interestingly the GPL31A went end-of-life over a year ago so it is quite possible that the GPL833F is being used as a replacement. Both use a 6502 CPU core. The latter is 2x as fast though (if so programmed). All of this is in contrast to the current HP-12C. That uses a Atmel (now Microchip?) ATSAM4LC2CA SoC. It emulates the original (1981) HP-12C firmware and thus acts the same. The firmware is end-user updateble (via USB) just like the HP-15C CE (which uses the same hardware). None of this likely matters to most end-users (financial professionals mostly I'd guess) and both the 12C and 12CP have changed hardware and/or firmware over the years. It remains to be seen what the future is for both. A1 PS Will the current 12C+, "Gold", or whatever you want to call it ever get VoyagerSave functionality like the HP-15C CE? Maybe. Maybe not. HP-15C LE owners never got a final bug fix firmware release so the history isn't promising. RE: The HP-12c and platinum Kinpo story - dm319 - Yesterday 07:16 PM Thanks A1, great summary of the hardware! That ARM processor seems remarkably powerful. I wonder how much more powerful it is compared to by first desktop computer. 48Mhz vs 14Mhz for starters! RE: The HP-12c and platinum Kinpo story - AnnoyedOne - Yesterday 07:21 PM (Yesterday 07:16 PM)dm319 Wrote: I wonder how much more powerful it is compared to by first desktop computer... I think that the first IBM PC used a ("16-bit") Intel 8088 clocked at 4.77MHz. As slow as a wet week. https://en.wikipedia.org/wiki/History_of_personal_computers#The_IBM_PC FYI the 6502 is 8-bit and ARM's 32-bit. A1 RE: The HP-12c and platinum Kinpo story - dm319 - Yesterday 08:15 PM It seems strange to me that we're still making modern equipment that runs on such an old 8 bit design. My first desktop ran a 68020, which I think must be somewhere closer to the 6502 than the ARM. A lot of the TIs seemed to run on Z80, and their CAS ones ran on 68000. I like that they are still in use. RE: The HP-12c and platinum Kinpo story - Eric Rechlin - Yesterday 09:10 PM (12-01-2024 08:57 PM)dm319 Wrote: The forensic testing I did on TVM suggested to me that the software running on my 12c platinum did not come from a clean slate. Most of it is identical to Saturn-and-beyond era HP financial calculators, returning 12 digits, with presumably a 15 digit internal precision. I suspect it is running some of the same C code as those devices. The Saturn-based financial calculators (10B, 14B, 17B/17BII, 18C/19B/19BII) were not coded in C. They were written in a mix of Saturn assembly and RPL. I believe the post-Saturn HP ones (20b/30b and 10bII+) were indeed written in C (or C++, I'm not sure), however. For the non-HP ones (10BII/10bII, 12c Platinum/Prestige, 17bII+) the code was written outside HP so implementation details are anybody's guess. Yes, the 10BII and 10bII were different (but similar) calculators -- and totally different from the 10bII+. Perhaps some similarities between the 12c Platinum and the Saturn machines were more due to the greater number of internal digits compared to the 12C rather than shared code. RE: The HP-12c and platinum Kinpo story - dm319 - Yesterday 10:33 PM (Yesterday 09:10 PM)Eric Rechlin Wrote: The Saturn-based financial calculators (10B, 14B, 17B/17BII, 18C/19B/19BII) were not coded in C. They were written in a mix of Saturn assembly and RPL. Ah yes, good point, was thinking of a post which I probably can't lay my hand on now that the Saturn code was written in C for the later calculators, probably up to the Prime (for TVM at least). (Yesterday 09:10 PM)Eric Rechlin Wrote: Perhaps some similarities between the 12c Platinum and the Saturn machines were more due to the greater number of internal digits compared to the 12C rather than shared code. Maybe.. The HP-12c platinum is reported to have 15 digit internal precision and displays up to 12, which is quite a specific set up and suggests it uses the same underlying calculator platform as the Saturns. Could it use different algorithms? Maybe, but arguably odd to use the same code for the calculator platform but not use the TVM code. I'll have a dig around in my results and come back with my most convincing argument. Maybe after I've done that exercise I might have changed my mind...! RE: The HP-12c and platinum Kinpo story - Steve Simpkin - Yesterday 11:02 PM (Yesterday 10:33 PM)dm319 Wrote:(Yesterday 09:10 PM)Eric Rechlin Wrote: The Saturn-based financial calculators (10B, 14B, 17B/17BII, 18C/19B/19BII) were not coded in C. They were written in a mix of Saturn assembly and RPL. Yes, I recall Cyrille mentioning that they had re-implemented the Saturn math routines into a C library for the later calculators. Here are a couple of posts that mentions that in passing. https://www.hpmuseum.org/forum/thread-2583-post-22843.html#pid22843 https://www.hpmuseum.org/forum/thread-14061-post-124770.html#pid124770 Edit: Link to additional post added. RE: The HP-12c and platinum Kinpo story - AnnoyedOne - Today 01:28 PM (Yesterday 08:15 PM)dm319 Wrote: It seems strange to me that we're still making modern equipment that runs on such an old 8 bit design. I know I've said this before. Cost, cost, cost. Simpler 8-bit CPUs means less silicon means lower cost. That's why many put 8-bit 8051/6502 CPU's in "modern" SoCs. Increase the clock speed, up the memory, and "Bob's your aunty" Many Microchip PICs fall into the same category IMHO. By contrast ARMs are a 32-bit architecture. Some variants use the reduced-cost "THUMB" instruction set which is a 16/32-bit hybrid as I recall. FYI ARM (a UK company) sells CPU designs and not chips. Chip manufacturers purchase designs from ARM, put stuff around them, and sell those (SoC = System on Chip). So "ARM" is a CPU architecture not a specific chip. The 68020 is a true 32-bit CPU made by Motorola (now Freescale). Probably a bit slower than newer ARM based designs but comparable. The Zilog Z80 is a 8-bit CPU. A super Intel 8080 in effect. I'm not a fan but again it is cheap. I've written a lot of Z80 assembler and some PASCAL code (but not cross-compiled 'C'). The 68000 is 32-bit internally with a 16-bit data and 24-bit address bus. I've written assembler and 'C' code for a 68000 system (on a Motorola multi-user 68010 VMEbus based computer). Insofar as calculators go the end-user probably doesn't care much. Sure an ARM-based HP-12C+ is faster than a 6502-based HP-12C Platinum but who cares? Since you're often selling them in large quantities every penny saved counts. Ask any accountant (who, ironically, probably uses a 12C to count those "beans"). The general "rule" in engineering is that you can build something fast/cheap/good. Pick two A1 RE: The HP-12c and platinum Kinpo story - Commie - Today 03:47 PM Hi, Just had a quick wizz through the eZ80 data sheet, wow what a processor, the 8051/pics and avr are just toys compared to the eZ80, it supports 50 mips, 24 bit address space (16Mbytes) comes ready to use 64kbyte flash 8kbyte ram (model dependant), probably the most powerful 8-bit micro available right now and I much prefer Von Neumann architecture over Harvard. The eZ80 is currently powering the ti-84+ce calculator with about 150Kbytes of user ram. Never seen a compiler for it? perhaps Zilog offer one at great cost, obviously only large conglomerates can afford to use it, like TI. RE: The HP-12c and platinum Kinpo story - dm319 - Today 10:00 PM (Yesterday 09:10 PM)Eric Rechlin Wrote: Perhaps some similarities between the 12c Platinum and the Saturn machines were more due to the greater number of internal digits compared to the 12C rather than shared code. OK I said I would come back to this, and maybe after carefully looking through the results, my confidence might be slightly less, though I'm still suspicious (of the general hypothesis that 12c platinum and saturn+ machines share code). The Saturn+ machines (HP-10bII+, HP-17B, HP-17BII, HP17BII+ mk1 and mk2, HP-19BII, HP-27S, HP-20b, HP-30b, HP-50G, HP Prime) essentially return identical results and I feel confident saying they likely run the same software. Previously I had pointed out problem 4 as evidence for the HP-12cp and saturn+ similarities, but this was somewhat disproven by Albert, who pointed out that it was correct given the accuracy of representing the PMT (see this thread): Code: | calculator | 3 | 4 | But some potential 'forensic' markers could be problem 8: N = 32, PV = -999'999, PMT = 0, FV = 1e6, P/YR = 1, calculate i (end mode) My reference result is 3.125001611329216004244745444268174e-6 Code:
The saturn+ returned 3.125001e-6, and so did the platinum. On the other hand, so did the rogue 12c, and the Casio FC-100V and FC-200V. So, again not specific for the platinum and saturns, and also it is a solve-for-i, so doesn't fit with my theory. Puzzle 12 returns -1001.6 for the saturn+ and platinum, and none other of the calculators. However, -1001.6 is the correct answer if you calculate the interest rate as 0.80000000001, 12 decimal places. However, still interesting that it has returned this value to 5 digits, maybe? Code:
So in summary, I am less confident about my claim that the HP-12c platinum is running some of the TVM code seen in the Saturn+ calculators. There are some particular differences, especially in the solve-for-i algorithm, which is not the same as on the Saturns, which we knew about. Otherwise it is very similar, but Eric, you might well be right, that this could well be more a feature of the 15/12 digit accuracy. However, it's interesting that the HP-12c platinum _does_ have a 15/12 calculator platform, but agree I can't say I've convinced myself of TVM code sharing with the Saturns. On the otherhand, overall, there are lots of similarities, like the failure on puzzle 5 and 6, and the overall implementation is very good (the best HP TVM solver overall?), like the HP-12c. Curious! |