User Tools

Site Tools


hp vChess


This is an attempt to turn the hp20b into a chess machine!


The moves are entered as numbers, where A=1,B=2, … G=8. For example, the classic opening E2-E4 is coded as 5254.

The calculator will response by appending its reply. for example 4745 (D7-D5). Castle by entering the king move.

Just keep entering moves until one side wins!


  • here is the binary (so far).
  • I'll be releasing the source code, as soon as i figure out the idea buffer sizes.


  • This project is not, at all, finished!
  • The game supports promotions, but currently there is no way to enter them (using exponent maybe!). You will always get a queen by default.
  • Currently, there is no UI to play as black.
  • switching the calculator off ends the game.
  • The three move repetition rule is not supported.
  • you cannot change the level of play currently. This is supported internally, but for now i've set it to take a few seconds per move.
  • the top row isnt being used at all, this should be used to display “thinking..” and maybe the line being considered. also to prompt “check” and for win and lose.


  • unless your batteries are in top condition, the calculator can reset itself with a power failure.
  • you will notice the calculator reports on start up. if it says “Power Up”, it means it has started from a power dropout as indicated above, otherwise it should say “Normal W”ake.

Code Snippets

How to disable the watchdog

board_lowlevel.c, LowLevelInit

can only write to WDTC_WDMR once, comment out original code and set to disabled, like this:

    // clobber watchdog!!! i hate dogs anyway :-)
20b/hpvchess.txt · Last modified: 2010/04/12 15:03 by lemon