home *** CD-ROM | disk | FTP | other *** search
/ RISCWORLD 5 / RISCWORLD_VOL5.iso / SOFTWARE / Issue6 / VICE / VICE.ZIP / doc / INSTALL < prev    next >
Encoding:
Text File  |  2004-01-18  |  17.0 KB  |  458 lines

  1. Installation notes for VICE
  2. ***************************
  3.  
  4.  
  5. This version of VICE can be compiled and installed under Unix/X-Window,
  6. MS-DOS, MS-Windows, OS2, and this file explains how this can be done.
  7. There is currently no documentation how to compile under RiscOS or BeOS.
  8.  
  9. 1. What you will need
  10. =====================
  11.  
  12.   1.1. Unix
  13.   ---------
  14.  
  15.     To compile VICE under Unix, you basically need a Unix machine
  16.     running the X-Window system version 11 R5 or better, with the
  17.     standard Xt and Xaw libraries.  R4 should work too, but hasn't
  18.     been tested lately.
  19.  
  20.     If you want to use joysticks under Linux, you must install the
  21.     proper joystick module (`joystick-0.8.0.tar.gz' or more recent),
  22.     which is available from `sunsite.unc.edu'.  You can also use a
  23.     customized `joystick-0.8.0.2.tar.gz' that has support for digital
  24.     joysticks connected to the parallel port.  This is available from
  25.     the VICE home page (see the `README' file).
  26.  
  27.     Unlike previous (pre-0.12) versions that only worked with 8-bit
  28.     displays, this release will work with all depths, though 8-bit is
  29.     still highly recommended for best performance.
  30.  
  31.     With version 0.16.0, VICE includes Dag Lem's reSID engine; to
  32.     compile it, you will need a C++ compiler.
  33.  
  34.     NLS (national language support) has been tested with Linux and
  35.     Solaris systems. The following environment variables have to be
  36.     set and exported before starting an emulator:
  37.  
  38.     - Linux: LANGUAGE=de        # de is currently the only available 
  39.                                 # translation
  40.                         
  41.     - Solaris: NLSPATH=${prefix}/lib/locale
  42.                LC_MESSAGES=de
  43.  
  44.     VICE has been compiled successfully on the following Unix systems
  45.     in the past:
  46.  
  47.       - Various i486/Pentium/Pentium Pro PCs running Linux 2.0.x and
  48.         XFree86 3.2/3.3, with both libc 5 and glibc 2;
  49.     Further support for October Gnome and newer Versions should work.
  50.  
  51.       - Some HP9000 (712, 715, 735, 800) machines running HP-UX 9.x
  52.         and 10.x;
  53.  
  54.       - SUN SPARC 5, 10 and Ultra running Solaris 2.3, 2.4, 2.5, 2.5.1
  55.         and 2.7.
  56.     Further support for October Gnome and newer Versions should
  57.         work. Gnome Libraries prior to October Gnome are known to be
  58.         broken with Vice.
  59.         (using gcc);
  60.  
  61.       - SUN SPARC 10 running SunOS 4.1 with both X11R4 and X11R5
  62.         (using gcc);
  63.  
  64.       - SUN SPARC 20 running Linux (2.0.30, RedHat 4.2);
  65.  
  66.       - SGI Indy R5000 and R4600 running Irix 5.3 and 6.2;
  67.  
  68.       - AlphaStation 500/533 with Digital Unix 3.2;
  69.  
  70.       - IBM RS6000 running AIX4.1 (using gcc or IBM C++ Set compiler);
  71.  
  72.       - MkLinux on Apple Macintosh, Kernel 2.0.33, X11R6.3 (no sound).
  73.  
  74.     Unluckily, not all of these systems have been tested with the
  75.     current release.  Success/failure reports are welcome at any time.
  76.     If you encounter any problems, you probably want to read the Hints
  77.     section below.
  78.  
  79.     If you are compiling on a Pentium machine, you might consider
  80.     using the Pentium-specific GCC compiler, which is available at
  81.     `http://www.goof.com/pcg'.  Each time we have tried it, and the
  82.     performance was always at least 20% better (even with just `-O2'
  83.     or `-O3').  However some versions of PGCC are known to produce
  84.     broken executables.  If you observe graphics errors try to compile
  85.     without optimizations.  If the graphics errors disappear, throw
  86.     away your compiler and install another one.
  87.  
  88.     Warning: you might need quite a lot of memory to compile VICE with
  89.     full optimizations on some platforms (in particular, this happens
  90.     with the Pentium-specific GCC).  Moreover, archaic versions of GCC
  91.     (e.g. 2.5.x and older) are known to cause trouble.  In that case,
  92.     it is a good idea to upgrade the compiler to a more recent
  93.     version.
  94.  
  95.   1.2. MS-DOS
  96.   -----------
  97.  
  98.     The MS-DOS port requires the Allegro library by Shawn Hargreaves
  99.     (`http://www.talula.demon.co.uk/allegro') to be compiled.
  100.  
  101.     You might apply this patch to `src/djgpp/timer.c' to achieve better
  102.     results on low end machines.
  103.  
  104.     --- old-timer.c Sat Jan  2 03:29:55 1999
  105.     +++ timer.c     Sat Jan  2 03:30:02 1999
  106.     @@ -197,8 +197,9 @@
  107.            new_delay = bios_counter;
  108.  
  109.         /* fudge factor to prevent interrupts coming too close to each other */
  110.     -   if (new_delay < 1024)
  111.     -      timer_delay = 1024;
  112.     +   /* FIXME: changed from 1024 to 0 (EP) */
  113.     +   if (new_delay < 0)
  114.     +      timer_delay = 0;
  115.         else
  116.            timer_delay = new_delay;
  117.  
  118.     Moreover, you also need DJGPP, the MS-DOS port of GCC
  119.     (`http://www.delorie.com').
  120.  
  121.     There is a separate file `MSDOS-Howto.txt' in the `doc' directory
  122.     describing what is required to compile VICE under MS-DOS.
  123.  
  124.   1.3.MS-Windows 
  125.   --------------
  126.  
  127.     There is a separate file `Win32-Howto.txt' in the `doc' directory
  128.     describing what is required to compile VICE under MS-Windows.
  129.  
  130.   1.4. OS/2
  131.   --------------
  132.  
  133.     After unzipping the archive and moving the folder 'Vice2' to
  134.     where-ever-you-want run 'install.cmd' to create the desktop-objects.
  135.  
  136.     Mention that 'install.cmd' does nothing else than creating desktop-
  137.     objects which could be easily removed.
  138.     
  139.  
  140. 2. Configuring and compiling
  141. ============================
  142.  
  143.   2.1. Compiling under Unix, for Unix or MS-DOS
  144.   ---------------------------------------------
  145.  
  146.     The release comes with an auto-configuring script created using
  147.     the GNU autoconf package; this script must be executed before
  148.     compiling VICE to detect the characteristics of your machine and
  149.     specify certain features you might want to enable or disable.
  150.  
  151.     To execute the configuration script, enter the `src' directory of
  152.     the distribution and type:
  153.  
  154.       ./configure <options>
  155.  
  156.     There are several options available, and some of them are not
  157.     necessary for the configuration. The important ones are:
  158.  
  159.       --prefix=PREFIX (default is `/usr/local/')
  160.       --bindir=DIR (default is `PREFIX/bin')
  161.       --mandir=DIR (default is `PREFIX/man')
  162.  
  163.         Specify the place where the VICE executable and support files
  164.         will be installed.
  165.  
  166.       --host=HOST
  167.  
  168.         Specify the host for which the executable will be produced.
  169.         If you want to compile for MS-DOS from a Unix machine using
  170.         GCC, use `--host=i386-go32-gnu'.  If not specified, the
  171.         configure script tries to guess it by itself, so you normally
  172.         don't need to use this option.
  173.  
  174.       --x-includes=DIR
  175.       --x-libraries=DIR
  176.  
  177.         Specify the paths for X11 include files and libraries.  The
  178.         configure script is usually smart enough to find them by
  179.         itself if the setup is not too odd; use these option if it is
  180.         not.
  181.  
  182.       --enable-autobpp
  183.       --enable-8bpp
  184.       --enable-16bpp
  185.       --enable-24bpp
  186.  
  187.         Specify the bit depth of your X11 display.  The default is
  188.         `autobpp', that enables support for all bit depths (the
  189.         emulator tries to find the ones your server supports by itself
  190.         at runtime).  If you think you are going to use only one type
  191.         of display, specifying this might give you (very) slightly
  192.         better performance.
  193.  
  194.       --disable-textfield
  195.  
  196.         Disable Robert W. McMullen's text widget; if you experience
  197.         problems with the text or file manager widgets, you can enable
  198.         the standard Athena one by using this option.  This can also
  199.         be useful if you are using a non-standard Athena-compatible
  200.         library that provides a better looking text widget; it that
  201.         case, using this option will give you that one (this is true
  202.         for neXtaw, for example).
  203.         Problems are known to occur on DEC Alpha systems running
  204.         Digital Unix.
  205.  
  206.       --with-xaw3d
  207.  
  208.         Use Xaw3d (instead of plain Xaw) if present.
  209.  
  210.       --without-resid
  211.       --with-resid=no
  212.  
  213.         Compile without the enhanced reSID engine.
  214.  
  215.       --with-resid=PATH
  216.  
  217.         Compile with a reSID engine located at `PATH'.  This is useful
  218.         in case you want to compile VICE with another version of the
  219.         reSID engine.
  220.  
  221.       --enable-gnomeui
  222.  
  223.         Compile Vice supporting the Gnome libraries. The location of
  224.         the Gnome/Gtk+ libraries are not detected automatically,
  225.         therefore `gnome-config' has to be found in the configuring
  226.         users path. Refer `to src/arch/unix/x11/gnome/TODO' for a list
  227.         of known problems/limitations.
  228.  
  229.      --disable-nls
  230.  
  231.         Force configure to ignore NLS support.
  232.  
  233.  
  234.     (to obtain a complete list of the available options with a
  235.     description, use `./configure --help')
  236.  
  237.     By default, VICE will be compiled by passing the following options
  238.     to the C compiler:
  239.  
  240.       `-g -Wall -O5 -fomit-frame-pointer -funroll-loops
  241.        -finline-functions -fno-strength-reduce'
  242.           on Intel-based x86 Unix systems that have gcc installed;
  243.  
  244.       `-g -Wall -O5 -finline-functions'
  245.           on other systems that have gcc installed;
  246.  
  247.       `-g'
  248.           on systems that do not have gcc installed.
  249.  
  250.     If these options do not fit your needs, you can specify what
  251.     options you want by simply passing them in the `CFLAGS' variable,
  252.     e.g. this is something you might want to do on HP-UX:
  253.  
  254.       CFLAGS="-Ae -g +O3" ./configure
  255.  
  256.     In the same way, you can force usage of a specific C compiler by
  257.     passing the `CC' variable, e.g.:
  258.  
  259.       CC="cc" CFLAGS="-Ae -g +O3" ./configure
  260.  
  261.     To specify a C++ compiler, use the `CXX' variable:
  262.  
  263.       CXX="g++" CFLAGS="-Wall -Wno-strict-prototypes" ./configure
  264.  
  265.     Important notice: if you use the Pentium-specific GCC, some
  266.     optimizations might have to be disabled.  The best way to make
  267.     sure everything works is
  268.  
  269.       CFLAGS="-mpentium -O5 -DNO_REGPARM" ./configure
  270.  
  271.     `-DNO_REGPARM' may also be needed with versions of GCC that have
  272.     buggy implementations of regparms.  Unluckily, we have no way of
  273.     finding about all of them, so you might have to play a bit.
  274.  
  275.     If you are running on a Linux system and the joystick module is
  276.     installed properly, the configure script will auto-detect it and
  277.     support for it will be enabled.  Otherwise, the joystick will be
  278.     only emulated with the numeric keypad.
  279.  
  280.     In case the `configure' script fails or complains about missing
  281.     libraries and you cannot explain this, please send the
  282.     `config.log' file to us together with a precise description of
  283.     your setup; otherwise, we cannot guess what is wrong with it.
  284.  
  285.     When the configure script has finished, the necessary Makefiles
  286.     will be produced and you can simply type
  287.  
  288.       make
  289.  
  290.     to build all the emulators and utilities (`x128', `x64', `xcbm2',
  291.     `xpet', `xplus4', `xvic', `c1541', `petcat') under the `src'
  292.     directory.  It is possible that `configure' is not able to find all
  293.     the needed libraries automatically (this is usually due to a weird
  294.     setup); if this happens, the script will report a warning message
  295.     but the `Makefile' will be produced anyway.  In this case, you can
  296.     try to re-run `configure' with different options or edit the
  297.     `Makefile's by hand to add the missing options.
  298.  
  299.     If you are cross-compiling for MS-DOS, check that all the DJGPP
  300.     libraries and include files, together with Allegro, are in the
  301.     right places.
  302.  
  303.     If you want to install the emulators and utilities, together with
  304.     the documentation and ROM files, just type
  305.  
  306.       make install
  307.  
  308.     The binaries and support files will all go under PREFIX/lib/vice.
  309.     You must of course have write permissions for the directories where
  310.     VICE is to be installed. Normally only the system administrator
  311.     has write access to /usr/local, the default PREFIX. Either ask
  312.     your system administrator to install VICE for you or use a PREFIX
  313.     in your home directory for example, where you do have write access.
  314.  
  315.     If you want to remove VICE from your system, you can use
  316.  
  317.       make uninstall
  318.  
  319.     If you want to re-compile with different options, you should do a
  320.  
  321.       make mrproper
  322.  
  323.     This will also remove the cache of the `configure' script,
  324.     assuring that all the tests are performed from scratch.
  325.  
  326.   2.2. Configuring for multiple architectures
  327.   -------------------------------------------
  328.  
  329.     As with most packages using GNU autoconf, you can compile VICE for
  330.     multiple architectures from the same source tree.
  331.  
  332.     To do so, simply create a build directory:
  333.  
  334.       mkdir {build-dir}
  335.  
  336.     Then run `configure' from the VICE source tree:
  337.  
  338.       {vice-source-path}/configure
  339.  
  340.     Of course, you can specify options, flags, etc. as explained on
  341.     par. 2.1.
  342.  
  343.     After you have configured VICE this way, you can simply compile
  344.     VICE as you would normally do, by typing `make'.
  345.  
  346.     For example, you might want to do something like this to produce
  347.     and MS-DOS executable of X64 (let's suppose a cross-compiling GCC
  348.     is installed as `gcc-dos' somewhere in your `$PATH'):
  349.  
  350.       cd sources/vice-0.14.2
  351.       mkdir i386-go32-msdos
  352.       cd i386-go32-msdos
  353.       CC="gcc-dos" CFLAGS="-O5" ../configure --host=i386-go32-msdos
  354.       make x64
  355.  
  356.  
  357. 3. Hints
  358. ========
  359.  
  360.   In this section we compiled some hints about problems we encountered
  361.   on different test machines and different setups. Any comments on or even 
  362.   solutions to these problems are welcome. 
  363.  
  364.   On Unix, if you are using alternative Xaw libraries (e.g. neXtaw,
  365.   Xaw95, Xaw3d) and you are having troubles with the GUI, try to use
  366.   the standard Xaw first.  There are some incompatibilities that can
  367.   cause them to crash or not to work properly.  Xaw3d should work, but
  368.   in any case please try to use the standard Xaw library before
  369.   reporting bugs.
  370.  
  371.   If you can, please use GCC (or EGCS) instead of the vendor's CC
  372.   supplied with your machine: it is usually less buggy and produces
  373.   better code.  On certain systems (most notably SunOS), configure
  374.   might completely refuse to use the standard CC.
  375.  
  376.   Some version of the HP-UX 10.x linker was also reported to fail
  377.   linking `x128'.  Unluckily, we believe it's a bug in the system and
  378.   we don't know a way to fix this problem (and we did not try very
  379.   hard, either).  If you know how, please let us know.
  380.  
  381.   Some versions of GCC seem to have troubles with `-funroll-loops' on
  382.   certain architectures; on an Alpha and a SPARC we have tried to
  383.   compile VICE on, the compiler died while trying to optimize the code
  384.   when this option was specified (GCC version 2.7.2).  If you
  385.   experience such a problem reconfigure by specifying the `CFLAGS' as
  386.   explained above, removing `-funroll-loops'.
  387.  
  388.   SunOS 4.1.x systems running X11R4 can cause a couple of troubles.
  389.   The first one is that `configure' might not find `-lXmu' and `-lXaw'
  390.   properly, because of some issues related to dynamic libraries.  This
  391.   would need some custom `configure' checks, which might be made
  392.   available in future versions.  For now, just edit `src/Makefile'
  393.   after it has been created by `configure' and add `-lXaw -lXmu' (in
  394.   this order) before `-lXt' on the `LIBS=...' line.  Moreover, you
  395.   might get undefined references to
  396.  
  397.     _get_wmShellWidgetClass
  398.     _get_applicationShellWidgetClass
  399.  
  400.   when linking `x64', `xvic' or `xpet'.  In that case you have to link
  401.   `-lXmu' statically (default is dynamically).  This can be done by
  402.   editing the `Makefile' by hand and replacing `-lXmu' with `-Bstatic
  403.   -lXmu -Bdynamic' in the `LIBS=...'  line.  A simplier way is to link
  404.   *everything* statically; this can be achieved by running `configure'
  405.   like this:
  406.  
  407.     LDFLAGS="-static" ./configure
  408.  
  409.   This will build much bigger executables, though.  We are sorry, but
  410.   that is not our fault.
  411.  
  412.   Some HP-UX (versions 9 and 10) need the "--without-readline" switch
  413.   because autoconf fails to detect that it needs "-lcurses"
  414.   (the configure test passes, but the compile is broken. Is this an
  415.   autoconf bug?). 
  416.  
  417.   One HP-UX 9 test machine failed to compile resid.cc, probably 
  418.   due to a broken gcc installation. In this case try to apply this 
  419.   patch:
  420. --------------------------
  421. --- vice-old/src/sid/resid.cc  Wed Mar 10 22:57:19 1999
  422. +++ vice-new/src/sid/resid.cc  Mon Apr 12 16:22:03 1999
  423. @@ -27,10 +27,11 @@
  424.  
  425.  #include "resid/sid.h"
  426.  
  427. -extern "C" {
  428.  
  429.  #include <stdio.h>
  430.  #include <math.h>
  431. +
  432. +extern "C" {
  433.  
  434.  #include "vice.h"
  435.  #include "sid.h"
  436. --------------------------
  437.   
  438.   When compiling on AIX in a directory different from where the source 
  439.   is and with the native C++ compiler "cc", then the C++ compiler mixes 
  440.   up the order in which include files are included. This makes the `resid'
  441.   package wrongly believe that `bool' is defined. You might use
  442.   `CXX="cc -qidirfirst"' instead. 
  443.   On the other hand using "cc" as C++ compiler resulted in a linkage 
  444.   error on our test machine. We thus recommend using the GCC C++ compiler 
  445.   or the configure switch `--without-resid'.
  446.   If you know how to fix this, any comments are welcome.
  447.  
  448.   On a DEC alpha-EV6 machine (64 bit, OSF1 operating system) when using
  449.   the DEC compiler, you might want to use `CC="cc -std1"' to enforce ANSI C
  450.   standard.
  451.  
  452.   To build a debug version of VICE, use `CFLAGS="-g -DNO_INLINE"'.
  453.   This disables inlining of functions in most of the places and does not
  454.   do any optimization. This way the debugger can produce a much better 
  455.   output. This also serves as a test whether the compiler optimization
  456.   breaks the code.
  457.  
  458.