home *** CD-ROM | disk | FTP | other *** search
/ Network PC / Network PC.iso / installations / amiga emulator / _setup.1 / README.AMIGA < prev    next >
Encoding:
Text File  |  1997-06-01  |  18.0 KB  |  426 lines

  1.                               UAE-0.6.8
  2.                             AMIGA version
  3.                                    
  4.                           by Samuel Devulder
  5.                        devulder@info.unicaen.fr
  6.  
  7.                               May 1997
  8.                                    
  9.  
  10. INTRODUCTION
  11. ============
  12.  
  13. This the Amiga port of UAE v0.6.8. UAE is the Un*x Amiga Emulator
  14. written by Bernd Schmidt. 
  15.  
  16. You should read the README file before this one to know more about uae.
  17. (how to use it, command-line options, what is emulated, and so on...).
  18.  
  19. This port features many things. It is build with the help of ADE
  20. (Amiga Development Enviroment): GCC, ixemul, ... Thus allowing an easy
  21. port of the original unix version to the Amiga without a lot of
  22. modifications. 
  23.  
  24.  
  25. REQUIREMENTS
  26. ============
  27.  
  28. This version will work on any Amiga running at least AmigaOS v2.04 and
  29. is programmed to use AmigaOS v3.0 facilities when available. UAE needs
  30. roughly 10Mb of free ram to run on the Amiga. A fast processor is also
  31. strongly recommended. 
  32.  
  33. Note that you can use UAE under VMM and that uae can run under UAE !
  34.  
  35.  
  36. FEATURES
  37. ========
  38.  
  39. The joystick can be used within the emulation, allowing you to play
  40. games without destroying your numeric keypad with the '-J' option :-). 
  41.  
  42. The sound can be emulated in this version. But Amigas are too slow for
  43. it to be really usefull. On my amiga, UAE produces one second of sound
  44. every twenty seconds in Sanity's Interference demo. Thus, An amiga which
  45. is around 20 times faster as an A4000 would be nice. PowerPC Amiga will
  46. probably achieve this one day.
  47.  
  48. The CPU emulation is speed up by using ASM code to compute flags
  49. directly from the 680x0 SR/CCR register.
  50.  
  51. It supports all Amiga natives mode as well as cybergraphics mode
  52. (rewritten in that version, so expects bugs in it; I'm waiting your
  53. bug-reports and improvements :-). It can run on a automatically
  54. selected custom screen, or on a user-selected screen, or on the
  55. default public screen. It will dither the output when not enough
  56. colors are available (unless you disable dithering), and eventually
  57. use a grayscale palette if less that 8 colors are available. This will
  58. give you the best graphic output according to your configuration. (use
  59. "uae -h" to know how to selected the rendering style).
  60.  
  61. You can mount Amiga partitions using the -m option. Be sure to use unix 
  62. convention when giving a path to UAE. For exemple do not do 
  63.  
  64.         CLI> uae -m boot:dh0:path -0 /disks/df0.adf 
  65.  
  66. but rather
  67.  
  68.         CLI> uae -m boot:/dh0/path -0 ../disks/df0.adf
  69.  
  70. This is not a bug, but an ixemul.library feature. You can access amiga
  71. disks by specifying /dev/<device-name>[.device]/unit or /dev/df<num>
  72. after -0. For example you can do "uae -0 /dev/df0" or "uae -0 
  73. /dev/trackdisk.device/0". Under the file requester, select the DEV: 
  74. assign to access amiga disk-devices.
  75.  
  76. You can reset the emulator by pressing CTRL-ALT-DEL in UAE's window. I
  77. guess it reminds you about something :^) You can enter debug mode by
  78. pressing ^C or ^D in the cli/shell window or by pressing the close-gadget
  79. of UAE's window when used on a public screen.
  80.  
  81. The F12 key of the X11 version of uae is simulated by pressing
  82. CTRL-SHIFT-ALT-F10 simultanemously. This toggles the mouse emulation
  83. mode and is needed for some games or demos when you find that the
  84. mouse does not work well under UAE (flickering mouse pointer).
  85.  
  86. You can toggle on/off the screen rendering to speed up the sound
  87. processing by pressing CTRL-SHIFT-ALT-F9.
  88.  
  89. You can insert disks by pressing CTRL-LALT-F1, CTRL-LALT-F2,
  90. CTRL-LALT-F3, or CTRL-LALT-F4. F1 corresponds to drive DF0, F2 to DF1,
  91. and so on. Alternatively you can simply eject a disk by pressing
  92. LSHIFT in addition of the above keys.
  93.  
  94. If UAE does not find a rom-file, it'll use the ROM located at address
  95. $F80000 - $FFFFFF. Thus, you need not grab it and that will spare you
  96. some disk space. You can disable this feature by creating the
  97. environment variable "USE_UAE_ERSATZ", in which case UAE will try to
  98. emulate rom calls using a built'in pseudo kickstart.
  99.  
  100. In this release, UAE should supports Graffiti screens (uae -H3), but
  101. I am not able to test it by myself as I don't have that board. Please
  102. send me some feedback about it.
  103.  
  104. This release also features an AREXX port to control UAE from an
  105. external gui (see section below). That port is used by the ARexx
  106. script "UAEGUI.rexx". That script uses MUIREXX to provide a nice MUI
  107. interface for UAE.
  108.  
  109. *NEW*: If you define ENV:UAEIFF to a proper filename, UAE will save
  110. an IFF file at every frame. For example if you:
  111.         setenv UAEIFF t:uae.%04d
  112. UAE will create t:uae.0000, t:uae.0001, t:uae.0002, ...
  113. If you forget the %d format specifier, uae will add ".%05d" to the
  114. filename as a format. Using that feature, you can build IFF anims
  115. to play demos on the workbench at full speed (I do it quite often :-).
  116.  
  117. *NEW*: If you setenv AUDIONAME <filename>, then uae will put the
  118. sound-samples into <filename>. Using that you can grab soundtracks
  119. very easily :-). Notice that <filename> can have two "%d". The first
  120. one will be replaced by the frequency (see the -R flag for UAE)
  121. and the second one will be replaced by the buffer size (-B option
  122. for uae). In addition, if ENV:AUDIONAME is not set and if you have
  123. the AUDIO: or AUD: handler mounted on your system, then UAE will
  124. use that handler instead of audio.device to play his samples.
  125. On one side, the AUD: device driver is done by Martin Brenner and
  126. can be found on Aminet. On the other side, AUDIO: is the AHI dos-driver
  127. and is supposed to be a bit better than AUD: (especially if you have
  128. a DRACO) because it can work with more soundcards than the simple
  129. paula-chipset. All those DOS drivers give the advantage to simplify
  130. the audio programming quite a lot on the amiga (to play one sample,
  131. one just have to send the data to it.. It can't be easier). I
  132. encourage everyone to use any of those handlers (thanks Paul for
  133. pointing those drivers to me :-).
  134.  
  135.  
  136. INCLUDED EXECUTABLE SETTINGS
  137. ============================
  138.  
  139. The included executable is compiled for MC68030. It has the following
  140. settings in ./config.h:
  141.  
  142.         #define USE_POINTER
  143.         #define CPU_LEVEL 3
  144.         #undef  DONT_WANT_SOUND
  145.  
  146. Note: code compiled for MC68030 runs better on 68060 that if compiled
  147. for MC68040.
  148.  
  149. AREXX PORT
  150. ==========
  151.  
  152. UAE provides an AREXX port through which you can set or retrieve
  153. internal parameters or variables such as the state of the joystick
  154. emulation or the framerate and so on. Is also implements a "feedback"
  155. mecanism so that a GUI piloting UAE through the AREXX port can hear
  156. about dynamical modification of UAE variables such as led states and
  157. the like. The port name is "UAE". If that port already exists, UAE
  158. will disable it's AREXX feature (that is to say if you have 2 copies
  159. of UAE running on your system, only one will have an AREXX port. I
  160. doubt anyone will try to run 2 UAE in the same time :-).
  161.  
  162. The commands that need a string argument accepts quoted strings. If
  163. the string is not quoted then it is the following word that will be
  164. used. The quotes can be single (') or double ("). They must match (eg.
  165. if you begin with ('),then you must end your string with (') too).
  166. Within a string, you can use a backslash (\) to express escape
  167. sequences. For example, "This 'is' a \"string\"." represents the
  168. string (This 'is' a "string"). I hope you get it :-)
  169.  
  170. Here is a list of the available commands:
  171.  
  172.         * BYE
  173.         * QUIT
  174.                 This make the emulator exit.
  175.  
  176.         * RESET
  177.                 This makes a hard-reset of the emulator.
  178.  
  179.         * DEBUG
  180.                 This forces the emulator to enter in debugging mode.
  181.  
  182.         * EJECT <num>
  183.                 This will eject the disk in drive <num> (from 0 to 3).
  184.  
  185.         * INSERT <num> <filename>
  186.                 This will insert the filedisk <filename> in drive unit
  187.                 <num>. 
  188.  
  189.         * FRAMERATE <num>
  190.                 This sets the framerate to <num> (1 <= <num> <= 20).
  191.                 It is a way to overwrite the -f flag of UAE.
  192.  
  193.         * VERSION <arg>         (<arg> = NUM | AUTHOR | PORT | STRING)
  194.                 This places in the AREXX 'RESULT' variable some
  195.                 information about UAE's version. 
  196.  
  197.                 NUM returns a numerical value that is to be interpreted
  198.                 as UAEMAJOR*100 + UAEMINOR*10 + UAEURSAMINOR (ie. uae
  199.                 v0.6.4 will return "64").
  200.  
  201.                 AUTHOR returns the original author of UAE (ie. Bernd
  202.                 Schmidt). 
  203.  
  204.                 PORT returns the name of the port author (that's me!:-)
  205.                 
  206.                 STRINGS returns a summary string made with the above
  207.                 strings. 
  208.  
  209.         * DISPLAY <arg>         (<arg> = ON | OFF | TOGGLE)
  210.                 This will enable or disable the display rendering.
  211.  
  212.         * FAKEJOYSTICK <arg>    (<arg> = ON | OFF | TOGGLE)
  213.                 This will enable or disable the joystick emulation. It
  214.                 is a way to overwrite the -J flag from the command
  215.                 line. 
  216.  
  217.         * SOUND <arg>           (<arg> = ON | OFF | BEST)
  218.                 This sets the state of the sound emulation (see option
  219.                 '-S' on the command line). BEST is the same as using
  220.                 the -S3 switch on the commandline.
  221.  
  222.         * QUERY <var>
  223.                 This asks UAE's for its internal variables. That
  224.                 state is written in the arexx 'RESULT' variable. So
  225.                 don't forget to put 'OPTIONS RESULTS' in your arexx
  226.                 scripts. 
  227.  
  228.                 <var> can be one of the following:
  229.  
  230.                 * FAKEJOYSTICK => returns "1" if the joystick
  231.                   emulation is ON and "0" if it is OFF.
  232.  
  233.                 * DISPLAY => returns "1" if the display is not
  234.                   inhibited and "0" otherwise.
  235.  
  236.                 * FRAMERATE => returns the current framerate (see
  237.                   option -f).
  238.  
  239.                 * SOUND => returns "0" if the sound is not emulated
  240.                   (ie. uae -S0 was used). "1" is returned when the
  241.                   sound is OFF (think about uae -S1). "2" means the
  242.                   sound emulation is ON and "3" means it is the best
  243.                   sound-emulation that is used (uae -S3).
  244.  
  245.                 * NAME_DF0
  246.                 * NAME_DF1
  247.                 * NAME_DF2
  248.                 * NAME_DF3 => returns the name of the diskfile used in
  249.                   the indicated unit.
  250.                   
  251.                 * LED_DF0
  252.                 * LED_DF1
  253.                 * LED_DF2
  254.                 * LED_DF3 => returns "1" if the drive led is hilighted
  255.                   and "0" if the led is OFF.
  256.  
  257.                 * LED_POW => returns "1" if the powerled is ON and "0"
  258.                   otherwise. 
  259.  
  260.         * FEEDBACK <eventname> PORT|ADDRESS <portname>
  261.                                CMD_ON|CMD|CMD_OFF <cmd> 
  262.                 That command needs a special explanation:
  263.  
  264.                 <eventname> is the name of an internal UAE event. It
  265.                 can be any of:
  266.                    ON_EXIT (UAE is about to quit),
  267.                    LED_POW (the power led has changed),
  268.                    LED_DF0 (led of drive DF0 has changed),
  269.                    LED_DF1 (the same, but for DF1),
  270.                    LED_DF2 (well...),
  271.                    LED_DF3 (guess!),
  272.                    NAME_DF0 (name of filedisk df0 has changed),
  273.                    NAME_DF1 (obvious),
  274.                    NAME_DF2 (ditto),
  275.                    NAME_DF3 (...).
  276.  
  277.                 <portname> is the name of an AREXX port. It can be
  278.                 "COMMAND" in which case <cmd> is interpreted as DOS
  279.                 command. 
  280.  
  281.                 <cmd> is a string containing a command that UAE will
  282.                 send to <portname> when the event matching <eventname>
  283.                 occur.  
  284.  
  285.                 Each event has 2 available <cmd>s. One is set by the
  286.                 CMD_ON keyword, the other by CMD_OFF. CMD_ON can be
  287.                 abreviated to CMD.
  288.  
  289.                 When the event is the name of a led (LED_POW, LED_DF0,
  290.                 ...), it is the <cmd> associated to CMD_ON that will be
  291.                 sent to <portname> if the led is hilighted. It is the
  292.                 <cmd> of the CMD_OFF argument that will be used if the
  293.                 led is dimmed. I think you need an example to make it
  294.                 clear (no pun intended :)
  295.  
  296.                 If you issue the command:
  297.  
  298.                         address UAE feedback LED_POW PORT COMMAND
  299.                         CMD_ON "list t:" CMD_OFF "list s:" 
  300.  
  301.                 Then UAE will issue "list t:" when the led is set to ON
  302.                 and "list s:" when it set to OFF. Note: this feature
  303.                 was not initially meant to transform UAE as a dir-like
  304.                 programm :-) A more serious example can be found in
  305.                 UAEGUI.rexx where you'll find something like:
  306.  
  307.                         address UAE feedback LED_DF0 PORT UAEGUI,
  308.                          CMD_ON  "switch ID DF0 ATTRS 0x8042654b 1",
  309.                          CMD_OFF "switch ID DF0 ATTRS 0x8042654b 0"
  310.  
  311.                 That makes the gui led follow any state changements.
  312.  
  313.                 If <eventname> is not a name of a led (ON_EXIT,
  314.                 NAME_DF0, ...) then UAE will only use the CMD_ON
  315.                 command. For events like NAME_DF0, <cmd> can bear a
  316.                 '%s'. It'll be replaced by the name of the
  317.                 correponding filedisk. For example, the following code:
  318.  
  319.                         address UAE feedback NAME_DF0 PORT UAEGUI,
  320.                          CMD "popasl ID NDF0 CONTENT %s"
  321.  
  322.                 Will change the content of the popasl gadged whose ID
  323.                 is NDF0 automatically when the drivename is modified.
  324.  
  325.                 The event ON_EXIT is used when uae is about to exit.
  326.                 You can use it to automatically close an external GUI
  327.                 when UAE ends:
  328.                 
  329.                         address UAE feedback ON_EXIT PORT UAEGUI,
  330.                          CMD "quit"
  331.                         /* sends "quit" to UAEGUI when UAE exits */
  332.  
  333. Note: I hope my explanation about the ARexx port is not too fuzzy.
  334. You can always have a look to UAEGUI.rexx to figure out how to use
  335. it. The script UAEGUI.rexx needs MUIRexx v2.2 by Russ Leighton
  336. <russ@sneezy.lancaster.ca.us>. MUIRexx can be found on Aminet and
  337. allows quick programming of GUIs with MUI and ARexx.
  338.  
  339.  
  340. HOW TO (RE-)BUILD UAE
  341. =====================
  342.  
  343. If you wish to (re-)build uae, you need to have ADE/gcc correctly
  344. installed (see ftp://ftp.ninemoons.com/pub/ade/). Not all part of ADE
  345. are needed, but be sure to have gcc2.7.2.1, binutils, autoconf, awk, ...
  346.  
  347. Note: This version uses an amiga specific feature of gcc found in Kamil
  348. Iskra's version (http://student.uci.agh.edu.pl/~iskra/ade.html). Look at
  349. __attribute__((regparm(4))) in configure.in. This allows gcc to
  350. use registered arguments passing. It is only available since gcc2.7.2.1.
  351. If it fails with the snapshot you have, then you should comment the
  352. definition of REGPARM in src/Makefile. Unfortunately that will make
  353. UAE run slower. (97/11/05: Now regparm is a feature that exists
  354. in recent ADE snapshots, so you won't need worry about it if you use
  355. a recent snapshot).
  356.  
  357. The default Makefile provided is for a MC68030 microprocessor. If you
  358. wish to have a Makefile tuned for your CPU (and fpu), just type "sh -c
  359. configure". Note that you should use sh from the pdksh distribution (in 
  360. ADE) if you want a correct "config.cache" file (other shells produces a
  361. buggy "config.cache" file).
  362.  
  363. If you have deleted the file "configure", you can rebuild it from
  364. "configure.in". To do this, just type autoconf in a shell. Note that 
  365. autoconf 2.10 is required.
  366.  
  367. Once your Makefile is generated (if needed), you can modify the file
  368. "config.h" to suit your needs. You can also modify "src/md-amiga/ami-win.c"
  369. to allow the support of cybergfx modes (you'll need to obtain
  370. CGraphX-DevKit.lha from Aminet then). I suggest you to define
  371. DONT_WANT_SOUND in "config.h". That will speed up the emulation (sound
  372. emulation slows down the speed by roughly 10%).
  373.  
  374. When you'll have configured uae correctly, type "make" in a shell. Then
  375. one hour and a half later you'll get the uae executable (it might be less
  376. if you have a *real fast* Amiga, but don't expect less that 15 minutes).
  377. I know it's slow, but Amigas are slow (even those with 68060 are not that
  378. fast, by today's standards ;-).  
  379.  
  380. To compile, 10Mb of free memory should be enough (I succeded with 4Mb, but
  381. virtual memory helps in that case). The resulting directory size is
  382. roughtly 5.7Mb on my harddrive. Be sure to have a stack of at least
  383. 300Kb when compiling UAE and at least 32kb when UAE is running.
  384.  
  385. NOTE: I had reports that gcc complains and fail to compile cpu_f?.s.
  386. This is caused by a problem with perl and src/md-amiga/cpuopti. I don't
  387. know where it comes from precisely as I never experienced that problem.
  388. Anyway, to avoid this, you should uncomment the lines in the beginning of
  389. src/md-amiga/cpuopti. Unfortunately, UAE will run slower as the asm files
  390. won't have an extra optimisation pass.
  391.  
  392.  
  393. REMARKS OR BUG-REPORTS
  394. ======================
  395.  
  396. You can send me your remarks and bug-report to:
  397.  
  398.                        devulder@info.unicaen.fr
  399.  
  400.  
  401. LAST NOTE
  402. =========
  403.  
  404. Why emulate an Amiga on an Amiga ? That can seem to be a foolish
  405. behaviour.. Actually it is not !
  406.  
  407. Many old games/demos refuse to work well if you are using a 68030+;
  408. even with degrader running. In that case, uae might be usefull.
  409.  
  410. UAE might also help graphic-board owners. With UAE, they can view all
  411. the demos with copper and blitter effects that fails to run on their
  412. graphics board. Or run programs like Deluxe-Paint or Brilliance that
  413. poke the hardware directly.
  414.  
  415. Using uae on a 68040+ Amiga will let you play games or demos on your
  416. workbench, in a perfect multitasking. And that is, believe me, quite
  417. amazing (even on my poor 68030 :-). Alternatively, UAE makes a 
  418. wonderfull screen-saver (a bit memory-hungry though).
  419.  
  420. The main advantage of uae, will be when PowerPC Amigas will come out.
  421. On these machines, I bet no old programs will run. Those machines will
  422. certainly include a 680x0 emulation powerfull enough to run DOS 
  423. programs, but certainly not sufficient to run old games. Thanks to UAE,
  424. backward compatibility will not be a problem anymore. UAE is definitely 
  425. a great program ! 
  426.