home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 1999 September / pcp155a.iso / linux / developer / xcopilot / README < prev    next >
Encoding:
Text File  |  1998-08-12  |  18.3 KB  |  497 lines

  1.         This is release v0.6.5 of XCopilot (12-Aug-98)
  2.         
  3. This release was done by Gene McCulley <mcculley@cuspy.com>.  The last
  4. "official" release from Ivan Curtis was v0.2. Release v0.3b was an
  5. interim release by Jeff Dionne.  A lot of stuff was added in the
  6. v0.4-iang series by Ian Goldberg <iang@cs.berkeley.edu>.
  7.  
  8. Please note that this is still very ALPHA software, so expect
  9. problems. Please send me any bug reports (or better yet, fixes) you
  10. discover.
  11.  
  12. Thanks to Kresten Krab Thorup <krab@daimi.aau.dk> for the endian patches
  13. Thanks to Andrew Pfiffer <andyp@co.intel.com> for 16bpp and keyboard patches
  14.  
  15. Building
  16. ========
  17.  
  18. Building should be straightforward. You will need the Xpm and Xext
  19. libraries
  20.  
  21. In the xcopilot-vxx directory, do
  22.  
  23. ./configure
  24. make
  25.  
  26. this will make the libmc68k.a library in the mc68k directory, libmx in
  27. the mx directory, and leave the executable xcopilot in the current
  28. directory.
  29.  
  30. Running
  31. =======
  32.  
  33. You will need a Pilot rom image file installed in ~/.xcopilot as
  34. "pilot.rom". Please see the original copilot documentation for details
  35. on how to get this file.
  36.  
  37. do
  38.  
  39. xcopilot -u 
  40.  
  41. for a brief command line synopsis.
  42.  
  43. The emulated serial port can be hooked to any device.  eg. if your
  44. modem is on /dev/cua1, then do
  45.  
  46. xcopilot -serial /dev/cua1
  47.  
  48. Debugging
  49. =========
  50.  
  51. To enable debug mode, run with the command switch -debug.  This will
  52. start the debugger listening to socket port number 2000. To connect to
  53. the debugger, use telnet e.g.
  54.  
  55. telnet localhost 2000
  56.  
  57. The debugger starts with the cpu stopped. You must explicitly start
  58. the cpu for anything to happen (use the "start" command).
  59.  
  60. You should not issue the "load" command until after the welcome screen
  61. has gone away.
  62.  
  63. Since the ram state is saved from run to run, once an app is loaded it
  64. persists until deleted, or the pilot.ram file is removed.
  65.  
  66. In this version, the -debug flag is deprecated.  You should really be
  67. using the -gdebug flag, described below.
  68.  
  69. Potential problems
  70. ==================
  71.  
  72.   * The default ram size is 1MB.  This can be changed by using the
  73.     -ramsize option, but be careful as you don't want to use a RAM
  74.     file for the wrong size.
  75.  
  76.   * Some systems don't have the ftruncate function. There is a crude
  77.     ftruncate function in memory.c, but I think it clobbers the file
  78.     as well as truncating it. You might want to find a better ftruncate
  79.    (or get a libc with more functionality)
  80.  
  81.   * The debugger uses port 2000 by default. If this port is not good for you,
  82.     the port number can be changed by changing the symbol DEBUG_PORTNUM
  83.     in main.c
  84.  
  85.   * Applications larger than 64k will not load.  If you want to
  86.     install larger databases or apps, hotsync them over.  Use:
  87.  
  88.       xcopilot -serial /dev/ptyqe
  89.  
  90.     and in another window:
  91.  
  92.       pilot-xfer /dev/ttyqe -i hugefile.pdb
  93.  
  94.   * X shm should be auto-detected.  People have had problems with the
  95.     X shared memory extensions. If you have problems running from a
  96.     remote CPU, try using the -noxshm to option.
  97.  
  98.   * People have had problems with the pixmap code. This could be
  99.     because I am using an older version of Xpm than most people. If
  100.     you have problems, check the code in display.c and the docs for
  101.     your version of xpm.
  102.  
  103. Shortcomings
  104. ============
  105.  
  106. Debugging, breakpointing, tracing support is still very rudimentary.
  107. Expect more in the next release.
  108.  
  109. I have developed this under i386-linux and SunOS 4.1.1, so there may
  110. be some portability problems, which I will rely on others to point
  111. out.
  112.  
  113. I would like to coordinate further efforts on this port (certainly I
  114. will be continuing work on it), so if anyone else out there would like
  115. to help out, please contact me.
  116.  
  117. Anyone interested in modifying this code will benefit from studying
  118. Greg Hewgill's copilot sources, which will need to be obtained
  119. separately.
  120.  
  121. Ivan Curtis
  122. icurtis@radlogic.com.au
  123.  
  124. Loading Databases and Programs, and Quitting xcopilot
  125. =====================================================
  126.  
  127. Holding down the right mouse button while pointing to the xcopilot window
  128. will bring up a little menu.  Drag the pointer to the item of choice and
  129. release the button to select it.  Here are the options in the menu:
  130.  
  131. Load database...
  132.  
  133.    This will bring up a menu of the .prc (resource databases or programs),
  134.    .pdb (regular databases), and directories in your current directory
  135.    (as well as ..).  Choosing a directory will bring up a similar menu
  136.    for that directory, etc.  Choosing a .pdb or .prc file will cause
  137.    that database or program to be installed.  You can click on the title
  138.    bar of the menu ("Select File") to cancel the operation.  Note that
  139.    if you are installing a program, an older version of that same
  140.    program should not be running at the time (nor should the
  141.    "Applications" screen).  Also, the xcopilot should not be "off", and it
  142.    should not be still displaying its title screen.  Databases and
  143.    programs that can be installed via this menu are limited in size to
  144.    just under 64K.  If you need to install a larger database, use
  145.    pilot-xfer to install it, as outlined in a previous section.
  146.    If you are using a Palm III ROM, make sure to set the memversion to "2",
  147.    either using the "-memversion 2" option, or by setting the
  148.    XCOPILOTMEMVERSION environment variable to "2".  If you do not do this,
  149.    the Load database... command will not work at all.  If you do this,
  150.    however, it should be able to load databases larger than 64K.
  151.  
  152. Load file...
  153.  
  154.    This is just like the previous menu option, but it lists all files, not
  155.    just .prc and .pdb files.  This is useful in case you named your database
  156.    or program with an odd name.
  157.  
  158. About...
  159.  
  160.    This just shows some version and credit information.
  161.  
  162. Quit
  163.  
  164.    Choosing this option is the recommended way to quit xcopilot.
  165.  
  166.  
  167. Debugging with gdb
  168. ==================
  169.  
  170. If you compile a program with gcc, and link it with the -g flag, then you
  171. can debug the program on xcopilot in the same way as on the real Pilot,
  172. but with the added advantage that the debugger doesn't take up the serial
  173. port (so you can debug serial and TCP/IP apps!).
  174.  
  175. Start xcopilot with the -serial and -gdebug options:
  176.  
  177.   xcopilot -serial [/dev/ptyqe] -gdebug [/dev/ptyqf]
  178.  
  179. The arguments to these options are the ptys to which to attach; the defaults
  180. are shown above.  Make sure you have the "gdb panel" app installed on the
  181. xcopilot; it comes with prctools,and you can install it, as with any app
  182. smaller than 64K, with the menu on the right mouse button.  Install your
  183. program as well.
  184.  
  185. In another window, run:
  186.  
  187.   m68k-palmos-coff-gdb progname
  188.  
  189. Note that you don't enter the .prc suffix here.  You will be given a gdb
  190. prompt, where you enter:
  191.  
  192.   target pilot /dev/ttyqf
  193.  
  194. Note that you use "ttyqf" here, whereas you used "ptyqf" in the xcopilot
  195. command line.  Of course, if you used something else there, make the
  196. appropriate change here.
  197.  
  198. On xcopilot, run the "gdb panel" app and turn on gdb debugging.  Then run
  199. your app.  gdb will stop your program at its beginning.  You can then set
  200. other breakpoints, and continue.
  201.  
  202.  
  203. Release Notes
  204. =============
  205.  
  206. Version 0.4 changes:
  207.  
  208.   * support for BIG endian machines
  209.  
  210.   * support for 16bpp displays (only on little endian machines, although it
  211.     will be easy for someone with a big endian 16bpp machine to add that).
  212.  
  213.   * menu user interface allows loading of .prc files without the debugger
  214.  
  215.   * keyboard input
  216.  
  217.   * working serial port
  218.  
  219.   * debug via a socket
  220.  
  221. Version v0.4-iang changes:
  222.  
  223. o Support for Palm Pilot Pro added
  224.    To use it, set the environment variable XCOPILOTROM to point to your
  225.    (1MB) Palm Pilot ROM (not included).  Alternately, if you never want
  226.    to simulate an old Pilot, just name the new ROM "pilot.rom".
  227. o Logging of flow traces
  228.    From the debug prompt ("xcopilot -debug"), "log on" and "log off" will
  229.    toggle logging of major changes in the PC (program counter).  This will
  230.    catch function calls, traps, and returns, but not conditional branches.
  231. o Improved sound support
  232.    Instead of just beeping, the correct frequency/duration/amplitude is used.
  233. o Parameter changes
  234.    The default RAM size is now 1024K, the scratch space is 64K, and
  235.    the time between screen updates is 1/20 second.
  236.  
  237. Version 0.4-iang2 changes:
  238.  
  239. o Support for debugging programs with gdb
  240.    To use it, run
  241.  
  242.    xcopilot -gdebug /dev/ptyqf
  243.  
  244.    You can, of course, choose a different pty.  You can also just say
  245.  
  246.    xcopilot -gdebug
  247.  
  248.    to default to ptyqf.  Then, from gdb, do
  249.  
  250.    (gdb) target remote /dev/ttyqf
  251.  
  252.    Note that here you use ttyqf, not ptyqf.  This support should not interfere
  253.    with the virtual serial port, so you can debug programs that use the
  254.    serial port by invoking xcopilot with
  255.  
  256.    xcopilot -gdebug <> /dev/cua0
  257.  
  258.    for example.  Try _that_ with a real Pilot!
  259.  
  260.    NOTE: in order to get the above to work, I needed to know where the debugger
  261.    lived in ROM.  I figured it out for the old Pilot and the Palm Pilot Pro,
  262.    but I don't have access to a Palm Pilot Personal ROM image, so you won't
  263.    be able to use this feature with that ROM (yet).
  264. o Support for multiple RAM files
  265.    Set the environment variable XCOPILOTRAM to the name of your RAM image.
  266.    If it contains a "%d", it will be substituted with the size of the RAM
  267.    (currently 1024).
  268. o Added SO_REUSEADDR to the old (TCP-based) debugging interface.
  269.  
  270. Version 0.4-iang3 changes:
  271.  
  272. o Support for greyscale and hardware panning
  273.    Apps that use the 2-bit mode should now work.  I've tested it using my
  274.    "mapview" greyscale and panning demo.
  275.  
  276. Version 0.4-iang4 changes:
  277.  
  278. o Support for pixel doubling (from Brian Grossman <brian@SoftHome.net>)
  279.    Use the -double option for a big xcopilot.
  280. o Solaris/AIX portability in libmx (from Brandon Long <blong@uiuc.edu>)
  281. o Backlight emulation (from Kenneth Albanowski <kjahds@kjahds.com>)
  282. o "Load app.." renamed to "Load file.."
  283. o New menu option "Load database.." which is the same as "Load file.."
  284.    except that it only shows .prc, .pdb, and directory files in the list
  285. o Support for sending serial I/O to a pty (-serial option)
  286.    Now, in one window, you can do
  287.  
  288.    xcopilot -gdebug -serial
  289.  
  290.    Note that -gdebug defaults to /dev/ptyqf, and -serial defaults
  291.    to /dev/ptyqe.  In a second window, do
  292.  
  293.    /usr/sbin/pppd /dev/ttyqe 38400 crtscts -detach local passive \
  294.       10.0.0.1:10.0.0.2
  295.  
  296.    You can use other local:remote IP address pairs if you want.  In fact,
  297.    if your kernel does automatic packet forwarding and you're on a broadcast
  298.    subnet (like most ethernets), make the first address your machine's real
  299.    IP address, and make the second an unused address on its subnet.  Then
  300.    your simulated Pilot will be able to speak TCP/IP to the real world.
  301.    Don't forget to set the phone number to dial to "00" on the simulator,
  302.    and make sure to give it a valid DNS address.  It is rumored that
  303.    the -serial option gives error messages on Solaris (ioctl() returns ENOTTY).
  304.  
  305.    If you like, in a third window, run m68k-palmos-coff-gdb and attach
  306.    to /dev/ttyqf.  In this way, you can debug TCP/IP apps.
  307.  
  308. Version 0.4-iang5 changes:
  309.  
  310. o Added shaped screen and a more realistic background colur (from Chris Bare)
  311. o Automatic determination of whether to use X shared mem (from Chris Bare)
  312. o The display should now look correct on big-endian machines
  313.    (from Brandon Long)
  314. o New options: -bg color (background color), -bbg color (backlight color)
  315. o Added support for gdb debugging via TCP (from Jeff Dionne)
  316.    To use this, pick a port number (say 5432).  Invoke xcopilot as
  317.    (note the colon):
  318.  
  319.    xcopilot -gdebug :5432
  320.  
  321.    From m68k-palmos-coff-gdb, do "target pilot hostname:5432", where hostname
  322.    is the name of the machine on which xcopilot is running (usually
  323.    "localhost", but it could be something else).
  324.  
  325. Version 0.4-iang6 changes:
  326.  
  327. o XCOPILOTRAM variable is a filename instead of a toggle (from Brian Grossman)
  328. o fixed pixeldoubling colors (from Brian Grossman)
  329. o Smarter screen updates (from Christopher Chan-Nui)
  330. o Added support for gdb debugging for a Palm Pilot Personal ROM
  331. o Trap window closes from the window manager, and shut down cleanly
  332.    (from Eric Howe)
  333. o Alternate icon: icon2.xpm (from Eric Howe)
  334. o File/path environment variable changes (based on a patch from Eric Howe):
  335.    
  336.    File           Default name       Env. var. to override
  337.    -------------------------------------------------------
  338.    ROM file       pilot.rom          XCOPILOTROM
  339.    RAM file       pilot.ram          XCOPILOTRAM
  340.    scratch file   pilot.scratch      XCOPILOTSCRATCH
  341.    log file       xcopilot.log       XCOPILOTLOG
  342.  
  343.    In addition, if the variable XCOPILOTDIR is set, and any of the above
  344.    variables are _relative_ paths (not starting with '/'), they are taken
  345.    relative to the $XCOPILOTDIR directory.  Note especially that there is
  346.    no longer a number in the RAM file name.
  347.  
  348. Version 0.4-iang6a changes:
  349.  
  350. o Bug fixes: power off/on now redisplays properly, menus go away when they're
  351.    supposed to, window manager "Delete Window" should now work
  352.  
  353. Version 0.4-iang7 changes:
  354.  
  355. o xcopilot now (finally) supports bus errors: writes to database memory or ROM,
  356.    or misaligned memory accesses will report a bus error (just like the real
  357.    Pilot would); this should be the last major difference in behaviour between 
  358.    xcopilot and the real hardware.  These changes were merged in from the
  359.    sources to the original Copilot.
  360.  
  361. Version 0.4-iang8 changes:
  362.  
  363. o The serial port and gdb interfaces have been totally rewritten, so as to be
  364.   _much_ faster.  It is now possible to use pilot-xfer to talk to xcopilot
  365.   over the virtual serial port.  This means you can upload large (>64K)
  366.   programs or databases to xcopilot at speeds higher than 10 characters/sec.
  367.   Running PPP programs on xcopilot is no longer painfully slow.
  368. o Changing the serial port's baud rate now actually works, for most baud rates,
  369.   as do settings for 7/8 bit chars, 1/2 stop bits, E/N/O parity.
  370. o Files ending in .PRC and .PDB (in caps) are now also displayed in the
  371.   "Load Database..." menu.
  372. o Loading files with spaces in their names now works (bug pointed out by
  373.   Diego Zamboni <zamboni@cs.purdue.edu>).
  374.  
  375. Version 0.5 changes:
  376.  
  377. * Now defaults to reading and writing files in ~/.xcopilot.  Can still
  378.   be forced to use other directories and filenames with the
  379.   environment variables.
  380.  
  381. Version 0.5.1 changes:
  382.  
  383. * ramsize can be set on the command line.
  384.  
  385. Version 0.5.2 changes:
  386.  
  387. * Makefile is more clear about where icons go.
  388.  
  389. Version 0.6 changes:
  390.  
  391. * XCopilot now uses Autoconf for trouble free portability to many
  392. Unixoid systems.
  393.  
  394. * Now gets explicitly sized types so that it can work on 64-bit
  395. platforms.  Go Alpha!
  396.  
  397. * Replaced the strsep function with the one from glibc as the old one
  398. had a small bug with regard to the beginning of the string being a
  399. delimiter.
  400.  
  401. * Fixed a few small bugs that prevented compilation with the native
  402. compiler under Digital Unix, Irix, and Solaris.
  403.  
  404. Version 0.6.1 changes:
  405.  
  406. * Fixed a bug in 2-bit mode while running with pixel doubling on a 16-bit X
  407.   display.
  408.  
  409. * Goodbye pixel doubling.  Hello arbitrary pixel magnification.
  410.  
  411. * Added simple dirty rectangle optimization to LCD udpate code.  This
  412.   makes the update a little smoother when using XShm and a lot
  413.   smoother otherwise.
  414.  
  415. * Fix Makefiles to use ranlib again.  This was accidentally knocked out
  416.   during the autoconfiscation.  Thanks to Dave Glowacki <dglo@SSEC.WISC.EDU>
  417.   for reporting this.
  418.  
  419. * Autoconf now picks the install program to use.  Thanks to Dave Glowacki for
  420.   pointing this one out too.
  421.  
  422. * Now minimally requests and handles Expose events.
  423.  
  424. * Doesn't give an error message when user specifies -noxshm.
  425.  
  426. * Fixes small signed char bug on AIX 4.1.  Thanks to Peter Trommler
  427.   <trp@zurich.ibm.com> for pointing this out.
  428.  
  429. * --prefix now works with configure.  Dave Glowacki pointed this one out.
  430.  
  431. * On HP-UX, it appears that the attached shared memory segments are inherited
  432.   over fork.  This caused errors for the children who were trying to
  433.   attach to the segment that was already attached.  Now we drop the
  434.   segment before forking off the children and reattach it afterward.
  435.   Dave Glowacki provided clues here.
  436.  
  437. * Now checks for sys/select.h.  Thanks to Peter Trommler for pointing this
  438.   out.
  439.  
  440. Version 0.6.2 changes:
  441.  
  442. * Merged Ian Goldberg's patches for Palm III ROM compatibility.
  443.  
  444. * Can now use a private colormap.
  445.  
  446. Version 0.6.3 changes (from Ian Goldberg <iang@cs.berkeley.edu>):
  447.  
  448. * Various fixes for Palm III ROM:
  449.   o gdb debugging
  450.   o Load database...
  451.   o -ramsize 2048 works
  452.  
  453. * New command-line option: "-memversion vers".  vers should be 1 if you
  454.   are using a ROM <= version 2.x, and it should be 2 for version 3.x.
  455.   The default value is 1, unless overridden by the new XCOPILOTMEMVERSION
  456.   environment variable.
  457.  
  458. Version 0.6.4 changes:
  459.  
  460. * Fancy new case supplied by Jon Abbott <muaddib@magicnet.net>.
  461.  
  462. * Fix for "About" popup race condition on SunOS from Bill Janssen
  463.   <janssen@parc.xerox.com>.
  464.  
  465. * Lots of good stuff from Brandon Long <blong@fiction.net>:
  466.  
  467.   * A manpage derived from newly created SGML documentation.
  468.  
  469.   * A distclean target in the Makefiles.
  470.  
  471.   * A configure flag to disable XShm completely.
  472.  
  473.   * A command-line flag to reset the .ram file.
  474.  
  475. * Fix for case where power was switched off before Quit button hit from Felix
  476.   Croes <felix@simplex.nl>.  In this case, all processes except the CPU
  477.   process would exit.
  478.  
  479. * Fix for Sparc GUI slowness from Brandon Long <blong@fiction.net>.
  480.  
  481. Version 0.6.5 changes:
  482.  
  483. * First steps toward reunification with UAE core and using threads from Max
  484.   Okumoto <okumoto@ucsd.edu>.
  485.  
  486. * Bail out and give an error diagnostic if we have too low a version of Xpm.
  487.  
  488. * Fixes so that we may load debug ROMS from Anders Hammarquist
  489.   <iko@iko.pp.se>.  A new option, '-nocheck' exists to inhibit the entrypoint
  490.   checking so that other types of ROMs may be used (e.g. Linux!).
  491.  
  492. * We now do all option parsing using Xt.  This is the first step in the
  493.   process of doing more stuff in Xt.  We no longer have the XCOPILOT*
  494.   environment variables.  We have only XCOPILOTARGS, which contains a string
  495.   of command line options.  This will unfortunately cause people pain on
  496.   upgrade, but makes it easier to add options in the future.
  497.