User Tools

Site Tools


20b:software-demo_45

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

20b:software-demo_45 [2008/08/06 21:52]
newell created
20b:software-demo_45 [2008/08/12 21:24] (current)
newell Update: fixed license info, corrected clock rate
Line 1: Line 1:
 +{{:​20b:​demo_45.tgz|}}===== HP-45 simulator running on the HP-20B =====
 +
 +==== Description ====
 +
 +A flash resident program that will simulate an HP-45.
 +
 +==== Usage ====
 +
 +Use SAM-BA or any other comfortable flash programming tool to install the .bin file.  It's less than
 +18kB.  Of course, you will lose any existing firmware in your HP-20B, so be sure you backup the stock
 +HP firmware before erasing it.
 +
 +Expect RAM to be corrupted if you decide to reload the stock HP firmware.
 +
 +Install this firmware at your own risk.
 +
 +==== Download link ====
 +
 + ​{{20B:​demo_45.tgz}}
 +
 +==== Readme.txt ====
 +Simulating an HP-45 on the HP-20B.
 +
 +Keymap:
 +
 +   ​1/​x ​ ln   ​e^x ​ fix  X^2  ->P
 +   ​sin ​ cos  tan   ​% ​  ​sto ​ rcl
 +   ​enter ​    ​rdn ​ x-y  chs  eex
 +   ​off ​  ​7 ​   8    9    /
 +         ​4 ​   5    6    *
 +   ​gld ​  ​1 ​   2    3    -
 +   ​clx ​  ​0 ​   .    sg+  +
 +
 +The source is present. ​ It builds for me using the CodeSourcery gnu
 +tools under windows 2000.  It's a thin wrapper around Eric Smith'​s
 +casmsim. To reduce the ram footprint, casmsim was used to dump both the
 +opcode map and the microcode file from the HP-45 as C arrays.  ​
 +
 +The code has not been optimized. ​ The PIT has been configured to run 
 +at about 3.5kHz, so the microcode clock rate should be pretty close
 +to real time.  The display update stuff still isn't quite right.
 +For some reason, the HP45 appears to be toggling the display on and
 +off while at idle.
 +
 +There is no power management. ​ I measure about 2mA while running, and
 +very little (100nA?) while off.  The CPU runs at about 2MHz and does not
 +sleep or idle once the program starts, so you can attach a JTAG debugger
 +at any time.  There is no auto off, so it will chew down your coin cells
 +if you leave it on. (At constant 2mA drain, I'd guess it's good for
 +about 240 hours.) ​ Press the up-arrow key to power off the calculator.
 +
 +I've noticed that the blinking error display doesn'​t work either.
 +Not sure what I screwed up there.
 +
 +There are probably still some bugs in the keyscan and display handling
 +areas. ​ The stopwatch doesn'​t seem to work.  I've tweaked some of the
 +values in the csim code to make the display solid and the keys register
 +reasonably well.
 +
 +I'd love to hear your comments on this.  ​
 +
 +Scott Newell
 +newell@cei.net
  
20b/software-demo_45.txt · Last modified: 2008/08/12 21:24 by newell