                         GO48 for the HP48

           This file is more or less a copy of the URL
          http://poseidon.ulb.ac.be/groupe/dh/trash.html
          The original page also contains screenshots of
                              GO48



	Intro

I wrote this program for go-players who have an HP48, the best calculator
on the planet. It is meant as a game-recorder/reviewer, and it will in
no way ever be able to play against you, that's beyond me and most probably
beyond the calc's power.

I wrote this program for go-players who have an HP48, the best calculator
on the planet. It is meant as a game-recorder/reviewer, and it will in no way
ever be able to play against you, that's beyond me and most probably
beyond the calc's power.

This is the second release of GO48. It is smaller than the first release,
faster and has many many more features. To give you an idea, it 
     - is written in 90 % Sys-RPL 10 % assembly (I am stealing that part of
       the code from other people, of course, hehe. I may speed a few
       things up later using more ML, but I just learned a bit of Sys-RPL, let
       me digest that first...) 
     - allows you to store your current session 
     - uses different board-sizes (13x13 and 19x19) 
     - uses different board and stone-styles 
     - keeps count of prisonners 
     - handles handicaps 
     - displays the current position in algebraic notation 
     - uses UFL Font 1 if the UFL Lib (1 or 3) is installed 
     - compresses game records (typically a hundred moves take about
       120 bytes) 
     - includes help about itself and about GO. The rules exposed
       are quite close to the chinese rules. I chose this ruleset
       as I believe it conserves the spirit of the game while it is
       simple and concise.
     - includes code to be spawned by game, problem and possibly
       teaching libraries (there is only one for the time being, but I am
       working on it...) 

I put GO48 in a library so you don't see a million variables when you use it,
and also so that you don't mess with routines that do not perform
argument-checks and thus likely crash your machine if used improperly.
Besides, executing a lib can be done from any port (at least for my libs...),
which means you don't necessarily have to burden system-memory. 

If there are features you would like to see included in the following versions,
contact me (David.Hanon@ulb.ac.be). 



	What it does now

The control keys are in the HELP menu, they are as natural as I could think
of, they allow you to move one step at a time or directly to the star-points or
to the borders, which is quite convenient for typing in. 

    -  "new record" allows you to enter a new game. When you exit, the
    -  game is on the stack in form of a compressed game-string. 
    -  old session loads the last session with all the settings it was left in,
    -  no matter what you have changed since. 
    -  replay a game will read a game from the stack in the same format
    -  than above. If you care to, you can try to guess the next move (just
    -  move the cursor), GO48 will count how many good guesses you
    -  made and report your score when asked to. 
    -  file conversions 
          -  You may convert a GO48 game-string to the smart go format,
             understood by most go reviewing programs. 
          -  You may also convert a smart go format game-string to the
             GO48 format, which is far more compact than sgf-records and
             saves on that precious memory. 
       However, do not expect game-trees to be converted correctly, only
       use linear game-files. Also note that it only translates the following
       tags: HA[ ], ;B[ ], ;W[ ], the others are simply ignored. There may be
       further support in the future if there is sufficient request from you, the
       users. I myself do not need this feature, but hey, if YOU do... 
     - "settings": The parameters you can set are quite self-explanatory,
       except may be for the two following options: 
           - The UFL (Universal Font Library) allows you to use nice fonts,
             which are not originally implemented in the HP48. If the UFL is
             not installed on your machine you will not be able to toggle this
             option ON, but GO48 is fully functional without it. It is only a
             matter of esthetics. The UFL can be found at
                       http://www.engr.uvic.ca/~aschoorl/ufl/
           - Reset GO48 will delete all hidden data it creates (in the hidden
             directory), i.e. your preferred settings (which are automatically
             saved) and your last saved session (if you have one). You
             should use this if for some incredible reason you wanted to
             uninstall GO48. 

This second release of GO48 does not change or use PICT in any way and
will thus not change its contents. 



	What it still does not (yet ?) do

without trying to be exhaustive: 

     - remove captured stones automatically. 
     - show full screen with grey-shades. 
     - let you enter coordinates a..t 1..19 (you must use the cursor). 
     - translate sgf-files with variations. 
     - count the points at the end of a game. 



	So you still want to try it out ? 

The present package contains 

    -  the GO48 library (Library number 1331, 8435 bytes, checksum =
       #7CE7h) 
    -  the Shusaku-Games library (Library number 1332, 22311.5 bytes,
       checksum = #6520h) 
    -  this file 

Transfer the lib(s) to your HP in binary mode and store it (them) in any port
after having checked that the checksums are correct - do NOT use the
libs otherwise. Switch the calc off and back on, voila ! You can now go into
the Library menu and you're ready to go. 

The Shusaku-Games Library contains the uncommented game-records of
the possibly greatest 19th century GO-player. The records contain no
variations whatsoever - GO48 can't handle them anyway. Of course this
library requires the GO48 library to be installed ! The games are also
available from Jan's Page : http://www.cwi.nl/~jansteen/. 

These games are commented in John Power's great book "Invincible - the
Games of Shusaku", published by Kiseido. I find it a real pleasure to read
the comments while replaying the games on the HP. Call me twisted. While
the HP's limited screen-size may be a small inconvenience for grabbing
the wholeboard situation's essence, the book's diagrams entirely make up
for this. 



	What do I want for it ?

This is mail/postcard/chocolateware. If you have comments and/or
questions, please do feel free to mail me or send a postcard (you'll find me
there: http://poseidon.ulb.ac.be/groupe/dh)

You may distribute this package provided you keep it whole and give proper
credit. Easy !



	Thanks

Mathieu Peyral coded the (de)compressing algorythm in assembly.
The readers of comp.sys.hp48 turned out to be of great help,
especially Joe K. Horn. Jim Donnelly's book is still a source of
marvelling.



	Disclaimer 

I have written and tested this library on my HP48sx (ROM D revision) and
my expanded HP48g (ROM R revision) and believe it is completely safe; it
works quite well, even if it has happened that the program leaves a few
undesired objects on the stack upon exit. For you Sys-RPL-programmers,
I believe that my nested POLs react a bit slowly when wild
key-combinations are performed. This is however not very big a problem; if
you can tell me more about it, please do so. 

I will gladly admit that my programing style is probably, err, quite
personnal :-) but I keep working on it.

I used the D2LIB Library to put this program into a library. The Sys-RPL
source was compiled with the Jazz 6.5 package. Distributing this software
does not engage my responsability in any way as to whatever can happen
to your memory, your machine or your mom's goldfish if anything goes
wrong. Check the checksum, back up your memory if you have doubts and
all should go well ! 

