
      Notes on understanding Sun Debugger Version 1.5.
      ------------------------------------------------


  (1) This code was originally written by Brad Myers who worked for Three
      Rivers out of Pittsburgh. It was written in Perq Pascal under the POS
      O/S on a Perq. It was rewritten by me in C on the Sun using SunWindows
      graphics.

  (2) My real time graphics design for this program is not initially apparent.
      When the program is loaded it is in MASTER mode, so main follows the
      "starttool" path. This routine opens up a socket, makes the graphics
      window and subwindows, monitors keyboard and mouse, installs the tool
      then forks a duplicate image of itself raising the "god" exception.

      This time through main, the program will be a SLAVE process, so will
      take a totally different path. In the meantime the MASTER has blocked
      on the tool_select call waiting for events to happen. The slave (using
      the "startup" procedure, will connect to the socket (for receiving),
      open the graphics subwindow and standard font and make a couple of
      cursors.

      There has got to be a better way of doing this, but I'm buggered if I
      can see it.

  (3) Events are handled as follows:

      When the program is in autoplay mode, you have to press DEL to begin.
      This causes an exception to be raised and a menu of buttons are
      displayed at the top of the screen. The cursor is turned on and the
      user selects what should be done by pucking with the mouse over the
      appropriate button.

      Should you start the game, the Sun (Perq?) screen is moved around
      using the four arrowed function keys. If you get a high score at
      a particular skill level, then you are asked to type in your name.

      If the window is closed to it iconic form or hidden behind another
      window then redisplayed this causes the window to be "remade".

      All of these actions generate an event which is handled by the 
      toolsw_selected handler.
       (a) If the window has been damaged in some way then a "\01" is sent
           down the socket.
       (b) If the action buttons are pucked (in the range 0-6) then a value
           2+button number is sent down the socket.
       (c) If an ASCII character is pressed that that could is sent down
           the socket.  This includes the four direction arrow function
           keys, because during initialization these are mapped to the
           letters "u","l","r","d".

  (4) All the Sun specific routines are in sid_sun.c. The program has been
      written to try and make the code as portable as possible. Hopefully
      just changing the routines in sid_sun.c should allow the program to
      be ported to any other 4.2BSD system and with just a little more
      effort ported to any other Unix system. For this reason quite a lot
      of the higher level graphics interfaces supplied by Sun (IE. control
      panels, have not been used).

  (5) It is recognized that this program runs very badly on a Sun 2 (and
      would need to be redesigned for a Sun 1). Also because I've been self
      taught some of the Sun graphics methods used are probably inefficient
      and need to be improved.

  (6) The following areas need to be tidied up:

        (a) The screens should really be icon edited to look like Sun screens.
        (b) Sometimes the arrowed function key presses seem to be missed.

  (7) Should you wish to contact me furthur, then I'm on:

      PHYSICAL ADDRESS: Rich Burridge,
                          Sun Computer Australia,
                            14 Queens Rd,
                              Melbourne,
                                Victoria 3004.
                                  Australia.
      TELEPHONE: +61 3 267 6222.
      E-MAIL:    seismo!munnari!yarra.OZ!richb
