This is version 0.6.9 of UAE, the Un*x Amiga Emulator. #include Copyright 1995, 1996, 1997 Bernd Schmidt & contributors (see below). This program is free software. You may do whatever you want with it for personal use. Permission is granted to redistribute this program free of charge, provided it is distributed in the full archive with unmodified contents and no profit beyond the price of the media on which it is distributed is made. Exception to the last rule: It may be included on freeware/shareware collections on CD-ROM, as well as on magazine cover CD-ROMs. There are no warranties of any kind for this program. If you use this program, you do so at your own risk. The authors are not responsible for any damages that might result from using this program. "Amiga" is a registered trademark of Amiga International. Other trademarks mentioned in this document and in other files in the UAE distribution are property of their owners. Overview ======== An emulator is a program which enables you to run software for a machine which has non-native hardware and a non-native operating system, on your computer. UAE allows you to run most of the available Amiga software. It is a software emulation, meaning that no extra or special hardware is needed to do this. The hardware of an Amiga is emulated accurately, so that Amiga software is tricked into thinking it is running on the real thing, with your computer's display, keyboard, harddisk and mouse taking the parts of their emulated counterparts. UAE was developed for Unixoid systems. Meanwhile, it has been ported to the Mac, DOS, the BeBox, NextStep, the XFree86/OS2 environment and the Amigas (it can run itself by now). You should have received several other files along with this document with details on how to install and use the version for your operating system. This section is just what it says: an overview. Please read _all_ of this file, especially if you have problems. UAE has many, many features and equally many configuration options. If you don't know about them, it's likely that UAE doesn't work for you, or doesn't work as good as it could. Please read also the file "FAQ" which contains some Frequently Asked Questions (and even the answers!) System-specific documents like "README.UNIX" and "README.DOS" also exist, you should read the appropriate one, too. People have complained that the UAE documentation contains only "weird jargon". Sorry about this. Despite what MessySoft and Tomato tell you, computer programs aren't always easy to use. UAE does require some assistance from you, and therefore you should at least understand a bit about computers. After all, you are an Amiga fan, so you should know what a Workbench is, don't you think? Features ======== This version of UAE emulates: - An Amiga 500 Computer, with 68000 or 68020 CPU (68020 includes 68881 FPU) - OCS Graphics Chipset, plus big blits from the ECS Chipset - Up to 2MB Chip RAM - Up to 8MB Fast RAM - Up to 1MB Slow RAM, for extended compatability with problem software - 4 x 3.5" floppy disk drives (DF0:, DF1:, DF2: and DF3:) - Hard-disk emulation - Joystick support (with option of mapping joystick to numeric keypad) - Mouse support - Ability to run in various screen modes (for better display quality or better speed) - Full sound support, consisting of 4 x 8bit channels (mixed into one, so output is mono for now). - Beta parallel port support - some other things which don't work well enough to mention them here... Requirements (IMPORTANT! READ THIS!)/Limitations ================================================ Not emulated: - Sprite to playfield collisions (sprite to sprite collisions work) - An MMU (part of 68030/040 CPUs except those that Commodore used). This means you can't use virtual memory systems or real operating systems like Linux or BSD. - The AGA chipset (A4000/A1200). This chipset has enhanced capabilites for up to 256 colors in all resolutions. - Serial port emulation exists but doesn't work too well. Since the PC floppy controller can't read Amiga disks (yes, that's a fact), floppy access has to be emulated differently: Floppies are emulated by means of disk files that contain a raw image of the floppy disk you want to emulate. A disk file is an image of the raw data on an Amiga floppy disk, it contains 901120 bytes (880K), which is the standard capacity of an Amiga disk. To actually run the program, you'll need to install the ROM image from your Amiga. You can't run UAE if you don't have this image. It is not included because it is copyrighted software. Don't ask me to send you one. I won't. If you don't have an Amiga and still want to use UAE, you'll have to buy an Amiga or at least the system software (ROM + Workbench) first. The Kickstart image can have a size of either 256K or 512K. It must be named "kick.rom" by default. Read the section "tools" below for information how to create ROM images and disk files. If you don't have a Kickstart file, you may still be able to boot some games and demos. The emulator includes some primitive bootstrap code that will try to read and execute the bootblock of the diskfile you are using, and if that bootblock only uses the one or two Kickstart functions that are supported by the "replacement Kickstart", your program will boot. Don't expect too much, though. You'll also need some other software to run - why else would you want to emulate an Amiga? There are several ways to make the software accessible to UAE, either with disk image files or with a harddisk emulation.You should make an image of your Amiga's Workbench disk and install it as "df0.adf" (adf = Amiga Disk File) when you use UAE for the first time. More about how to create these files in the chapter "Transferring software" Invoking UAE ============ First, read the system-specific documents for information how to set up UAE. You should have an executable program called "uae". You can simply execute it, but you can also optionally give it one of the following parameters: General options: -h : Give help on the options. -A n : Set emulator accuracy to n. The default is n = 2, which means the emulator will try to be as accurate as possible. This no longer does much in this version, and I'll probably remove it. -f n : Sets the frame rate to 1/n. Only every nth screen will be drawn. -a : Add no expansion devices. This will disable fastmem and harddisk emulation, but some extremely badly-written games may need this. (Kickstart 1.2 apparently needs it, too) -l lang : Set the keyboard language. Currently, the following values can be used for lang: "us" for U.S. keyboard (default), "se" for swedish, "fr" for french, "it" for italian, "es" for spanish, or "de" for german keyboard. This setting only affects the X11 version. -0 file : Try to use file as diskfile for drive 0 instead of df0.adf. -1 file, -2 file and -3 also exist for the other drives. -r file : Use file instead of kick.rom as Kickstart image. -J xy : Specify how to emulate joystick port 0 (x) and 1 (y). Both x and y can be one of the following characters: 0 = joystick 0, 1 = joystick 1, M for mouse, and a, b or c stand for various keyboard replacements (a is the numeric pad with '0' as fire button, b the cursor keys with right control as fire button and c is T/F/H/B with Alt as fire button. The default is "-J M0" (mouse and joystick as usual) -o : Allow UAE to overwrite ~/.uaerc with the selected options. This is only used by the text-based user interface in the SVGAlib and DOS versions. -G : Disable the user interface (if present). -n specs: Set blitter emulation. "specs" is a string of characters. If it contains a "3", the blitter will use 32 bit operations where that seems profitable (note that this will cause bus errors on most RISC machines). If you specify "i", all blits will finish immediately, which can be nice for speed. To enable both options, say "-n 3i" Emulating external devices (harddisk, CD-ROM, printer, serial port): -M VOLUME:path -m VOLUME:path mount the unix file system at path as an Amiga filesystem with volume name "VOLUME:". For example, "-M sound:/usr/amiga/modules" If you use -M instead of -m, the volume will be read only. Use this for mounting CD-ROMs. See below. -p cmd : Enable printing. See below. -I dev : Use "dev" as serial device (e.g. /dev/ttyS1 on Linux). Doesn't really work yet, at least not for me. Sound options: -S n : If your version of UAE supports sound, set the sound support level with this option. n = 0: No proper sound emulation at all. May be incompatible (unlikely). This is the default. n = 1: Emulate the sound hardware, but don't output sound. May be needed for compatibility, but can be much slower n = 2: Emulate the sound hardware and output sound. Recommended. n = 3: Emulate the sound hardware _exactly_. I don't think you'll hear a difference. SIDmon modules will be emulated correctly, but painfully slow with this setting. Unfortunately, this may also be needed to get some programs to work (AIBB, for example). -b n : Use n bits for sound output (8 or 16) -R n : Use n Hz to output sound. Common values are 22050 Hz or 44100 Hz. -B n:m : Specify the sound buffer size. Use at least n bytes and no more than m bytes. On most machines the minimum value is in fact ignored. Use small values on fast machines. The default buffer size is 8192 bytes. The larger this is, the longer will sound output appear to be delayed, but the emulator will run faster if this is large. Memory options: -s n : Emulate n*256K slow memory at 0xC00000. Some demos/games need this. -F n : Emulate n megabytes of fast memory as an expansion board. -c n : Emulate n*512K chip memory. The default is 2MB chipram. Some very broken programs need "-c 1" to work properly. The largest legal value is "-c 16", which means 8MB chip memory. -4 : If the emulator is configured for 68020 emulation, this option enables a 32 bit address space. Note that this is incompatible with some Kickstarts. Debugging options (not interesting for most users): -D : Don't start the emulator at once, use the built-in debugger. -i : Print illegal memory accesses Display options: -H mode : Select a color mode to use. -O specs: Select a display mode, see below how the specs parameter is interpreted. Color modes: 0 (256 colors, default); 1 (32768 colors); 2 (65536 colors) 3 (256 colors, with dithering to improve color quality) 4 (16 colors, dithered); 5 (16 million colors) About the "-O" display specs. These consist of the width and height of the mode, plus optional modifiers. One valid option to pass to UAE would be "-O 640:300:" which means use a display 640 pixels wide and 300 pixels high, with no modifiers (nothing after the second ":"). You may specify the following modifiers: l: Tell UAE to omit drawing every second pixel horizontally (for "lores" modes). Example: "-O 320:200:l" x: Tell UAE to try to fit the image horizontally into the displayed window. For example, if you have a mode that is 640 pixels wide, and the displayed image is also 640 pixels wide, the picture may still be partially invisible because it is displayed too wide to the left or to the right. With the "x" modifier, UAE tries to prevent this. You can also specify a capital "X", in that case, UAE tries to be extremely clever when doing this. y: The same thing in green, for fitting the image vertically into the window. (Y also exists) d: Draw every line twice. This allows interlace mode to be emulated nicely, but of course you also need a display that is twice as high c: Correct the aspect. This will omit certain lines of the display to make it fit better into the screen. Whew. You'll probably have to experiment a little to get a feeling for it. To make things easier, here are mode specs that are equivalent to the old "-d" and "-C" options, which are obsolete now. -d 0: Lores, 320x200, X centered: "-O 320:200:lx" -d 1: Lores, 320x240, X centered: "-O 320:240:lx" -d 2: Lores, 320x400, X centered: "-O 320:400:lx" -d 3: Hires, 640x300, X centered: "-O 640:300:x" -d 4: 800x300, centering not needed: "-O 800:300:" -d 3 -C: "-O 640:600:xd" -d 4 -C: "-O 800:600:d" (This table is accurate for the X11 version of UAE 0.6.6 and below. Other versions, e.g. SVGAlib and DOS behave differently, which was one of the reasons to get rid of the old method of specifying display modes.) UAE may choose to ignore and/or refuse some combinations of these two parameters. Some of these modes may also fail to work on your system. You can also put these options into a configuration file in your home directory. Simply create ~/.uaerc and put some of these options in it. On non-Unix systems, the file is called uae.rc and should be located in the current directory. Choosing color and screen modes =============================== As described in the previous paragraph, UAE can run in many different resolutions and color modes. However, few of the color mode options are available if you use the X11 version of UAE, since the X server determines how many colors are available. If you are running a 256 color X server, you can use "-H3" to tell UAE to dither the colors for better results. You will have to experiment which mode gives the best results for you at a satisfying speed. Note that the dithering process consumes time, so even if 256 colors with dithering look better than 256 colors without, remember that UAE will be slower in that mode. The recommended resolution is 800x600. In the lower resolution modes, some overscan pictures the Amiga tries to display may not fit entirely on the screen, others may be off-center and some graphical effects may look weird. For best results, use 800x600 with at least 32768 colors. Harddisk emulation ================== Using diskfiles is awkward. There are two ways how you can use larger amounts of data with UAE. UAE can emulate more than one harddisk at one time, the volumes will be named UAE0:, UAE1:, etc. UAE will boot from UAE0: if no diskfile is found for floppy drive 0. a) Harddisk files (not recommended) You can create a (unformatted) harddisk file with dd if=/dev/zero of=hardfile bs=512 count=16384 That will create an 8MB file. Other sizes ought to work, too, as long as they are powers of two. The harddisk file is accessed by a resident ROM module that is built into the emulator, called "hardfile.device". If it is present, this is always the first harddisk device the emulator finds and will be named UAE0: If you are using Kickstart 1.3 or earlier, this can't currently be mounted at boot time, and therefore you can't boot from it either. You will have to boot either from a floppy disk image or from a filesystem (see below), and mount the hardfile.device later. To do this, add the following to "DEVS:mountlist": UAE0: Device = hardfile.device Unit = 0 Flags = 0 Surfaces = 1 BlocksPerTrack = 32 Reserved = 1 Interleave = 0 LowCyl = 0 ; HighCyl = 511 Buffers = 5 DosType = 0x444F5300 BufMemType = 1 # Then, type "mount UAE0:" (or put that command in your startup-sequence), and you should be able to access it. Don't forget to format it with the AmigaDOS format command: format drive uae0: name Mister_Willwink b) Accessing native filesystems from the emulator This has some major advantages: - It has no problems with Kickstart 1.3 - It is more convenient. - It is much faster. In fact, it can be dramatically faster even than a real Amiga when reading directories. If you specify the -M or -m command line arguments, you your native filesystem from the emulator. If you start UAE with uae -m sound:/usr/amiga/modules you can access all the files in /usr/amiga/modules by reading from the AmigaDOS volume "SOUND:". (DOS users: try "uae -m dh0:C:\" to mount your drive C:\ as DH0:) You can mount up to 20 devices by giving this option multiple times. You can also use this to mount Amiga CD-ROMs. Tools / Transferring files ========================== As you should know by now, you need to transfer files between your Amiga and the machine you run UAE on. There are several ways how to do this. - Using a null modem cable, and a terminal package running on each machine, you can transfer the file(s) via Zmodem upload/download. 68000 equipped Amigas can normally attain around 3000cps through the null modem cable, using the standard Commodore serial.device. However, by using the device replacement BaudBandit.device, anything up to 5500cps can be attained. BaudBandit can be obtained from Aminet. A second alternative is to use the BASIC program adfi.bas (included with UAE) to transfer a file from the Amiga to the PC via the null modem cable. - If you're using CrossDOS on your Amiga, you can compress the disk or kickstart image using LhA or similar PC compatible archiver and copy it to a 720KB floppy disk. You can now take the disk over to the PC, copy the compressed file to the UAE directory and uncompress it. If you don't have CrossDOS on the Amiga, there is a similar freeware tool called Msh, which can be found on Aminet or on Fish disk 382 or 327. In either case, you ought to read the documentation for the programs that you use for the transfer. These programs can't be explained here. In the "amiga" subdirectory you'll find two small Amiga programs that will help you to generate the necessary image files. These are called transrom and transdisk. Copy them to your Amiga and make them executable (by typing "protect transrom rwed" and "protect transdisk rwed" in the Amiga shell window). transrom will dump the contents of your Kickstart ROM, and transdisk will dump an image of a floppy in one of the drives. Both programs write to the standard output (read: the screen), so you'll want to redirect that. Do transrom >ram:kick.rom to create a file called "kick.rom" in the RAM disk, and transdisk >ram:df0.adf to create a file called "df0.adf" in the RAM disk. These files are pretty big, 262144 or 524288 bytes for the ROM image and 901120 bytes for a disk image. transdisk understands the following arguments: -d device unit: Use this device instead of DF0: -s n: Begin transfer at track n (default: 0) -e n: End transfer at track n (default: 79) -w file: don't read from the floppy, instead write the contents of "file" to the floppy -h: Treat the disk as high-density disk. HD images aren't supported by UAE yet, though. Note that the resulting file will be twice as big. So, to transfer the disk in drive DF1:, you'd give the command: transdisk >ram:df1.adf -d trackdisk 1 If you don't have much RAM and can't fit all of a disk image in the RAM disk, you can split up the transfer into multiple parts with the "-s" and "-e" parameters. To transfer the disk in four parts, you'd use the following commands: transdisk >ram:df0_1.adf -s 0 -e 19 transdisk >ram:df0_2.adf -s 20 -e 39 transdisk >ram:df0_3.adf -s 40 -e 59 transdisk >ram:df0_4.adf -s 60 -e 79 Of course, you should save each of the four files to another place before transferring the next one with transdisk to make space in your RAM disk. If you have all the files on your PC, you can do the following under Unix: cat df0_1.adf df0_2.adf df0_3.adf df0_4.adf >df0.adf or, under DOS: COPY /B df0_1.adf+df0_2.adf+df0_3.adf+df0_4.adf df0.adf I've been told there are the following tools for the Mac to join binaries: "ChunkJoiner 2.1.2" found under Info-Mac's directory or "JoinFiles 1.0.1" under Info-Mac's . The current transdisk can only read the standard AmigaDOS format. This means that most games that rely on some form of copy-protection cannot be transferred (more about disk formats in the file "FAQ") **************************************************************************** If you transfer commercial software, you must not distribute the resulting image files, since that would be a violation of copyright law. The Kickstart ROM has to be considered commercial software. You may only use the Kickstart from your own Amiga, and you may not distribute Kickstart ROM files. Please read the license that came with your software for details. **************************************************************************** Retrieving files from a disk image ================================== If you have a disk image file, and you want to retrieve the files from it, you can use the "readdisk" tool. It is automatically built by "make". If you have a disk image of a disk called "Workbench1.3D" as df0.adf, and you do readdisk df0.adf the whole directory structure of the disk image will be stored in a newly created subdirectory called "Workbench1.3D". You can optionally give a second parameter to specify a directory where to create the output other than the current directory. readdisk only understands about the OFS right now. FFS disks will cheerfully be regarded as being unreadable. Use the unixfs.device from within the emulator if you want to transfer files from FFS disks. The UAE_CONTROL program ======================= In the "amiga" subdirectory, you will find two programs, uae_control and uaectrl that provide the same functionality as the X11 GUI. uaectrl is shell-based and works with any Kickstart, while uae_control needs the gadtools.library and a recent version of reqtools.library, so it only works with Kick 2.0 and upwards. Copy these two programs to the directory that you use for harddisk emulation. They should be self-explanatory. Quick overview of the debugger commands ======================================= Some (window-system based) ports of UAE have a built-in debugger. You can press ^C at any time to enter this debugger. Each debugger command consists of a single letter and occasionally some parameters. g: Start execution at the current address. c: Dump state of the CIA and custom chips. r: Dump state of the CPU m
: Memory dump starting at
d
: Disassembly starting at
t: Step one instruction z: Step through one instruction - useful for JSR, DBRA etc. f
: Step forward until PC ==
q: Quit the emulator. You don't want to use this command. Sound ===== If your version of UAE supports sound, you can pass parameters like frequency or number of bits to use on the commandline; if you don't specify any, sane defaults will be used. If graphics output is enabled while sound is output, the emulator will be much too slow on most systems. The sound will not be continuous. Therefore, a hack to turn off screen updates is provided: Press ScrollLock to disable graphics, press it again to enable them. The quality of the emulation depends on the setting of the "-S" commandline option. With "-S 3", all of the sound hardware is emulated; and some programs (e.g. AIBB) won't run with other settings. "-S 2" should sound just as good as "-S 3" and will be much faster for some programs. "-S 1" tries to emulate most of the sound hardware, but doesn't actually output sound. "-S 0" completely turns off sound. Pointers ======== There are a few sites in the Internet that contain helpful information about UAE. The new "official" UAE page is located at http://www.schokola.de/~stepan/uae thanks to Stefan Reinauer who is now maintaining it. There, you will find links to other UAE pages. One which is especially useful is the "UAE Discussion Board" set up by Gustavo Goedert, the address is http://www.netrunner.com.br/dosuae/uaeboard/index.html Not quite as good as a newsgroup due to braindamaged reader software (Ratscope), but still a blessing. I post announcements of new versions of UAE to the newsgroup comp.emulators.misc. From time to time, I also upload new versions to the ftp server sunsite.unc.edu. You will find them either in pub/Linux/Incoming or in pub/Linux/system/Emulators. There are many sunsite mirrors throughout the world, you should be able to find one near you. Thanks & Acknowledgements ========================= Thanks to all who have written me so far with bugreports and success/failure reports when trying to run the emulator on various hardware with different Kickstart versions. A list of everyone who has contributed to the source code can be found in the CREDITS file (this was getting too big to keep it here). Special thanks to: - Jay Miner, Dale Luck, R.J. Mical and all the others who built the Amiga. - Felix Bardos, whose HRM I "borrowed". - Hetz Ben Hamo mailed Peter Kittel from Commodore asking for permission to give Kick 1.3 away. Unfortunately, the response was negative :-( - Bruno Coste, Ed Hanway, Alessandro Soldo and Marko Nippula provided documentation - Fabio Ciucci gets the "Best bug reports" award for his help with the blitter line emulation and other problem areas. - Michael C. Battilana of Cloanto Software, for being so kind to send me two CD-ROMs with lots of Amiga software. - Julian Eggebrecht of Factor 5, for providing several F5 games. Authors/Maintainers =================== My address is: crux@pool.informatik.rwth-aachen.de or, via snailmail Bernd Schmidt Schlossweiherstrasse 14 52072 Aachen Germany Email is more likely to be answered, and will definitely be answered much faster. Please avoid phonecalls if you can. I won't distribute software, neither PD or commercial. Don't send me floppy disks without at least asking first, you will not get them back. The following people have ported UAE to different platforms; you should direct system-specific questions to them: DOS port: Gustavo Goedert Available: http://www.netrunner.com.br/dosuae Sourecode: available on the above Web page, most of it included in the main source (with some delay) Mac port: Ernesto Corvi Available: info-mac ("every Mac user knows where that is"). A link to the archive containing both PPC and 68k binaries is on my Web page. (info-mac is mirrored by sunsite.informatik.rwth-aachen.de) Sourcecode: extra package available. Bits and pieces in the main source, but nothing you could get to compile. Badly out of date. BeBox port: Christian Bauer Available: The main UAE web page (use the Unix sources) Sourcecode: Included in the main source (this version won't compile) NextStep port: Ian Stephenson Available: The main UAE web page (use the Unix sources) Sourcecode: Included in the main source (this version won't compile) Amiga port: Originally: Olaf 'Olsen' Barthel Currently: Samuel Devulder Available: Not quite sure yet. Paul Liss' Web page has binaries. Sourcecode: Included in the main source. Should compile OK. XFree86/OS2 port: Krister Bergman Available: http://www.kuai.se/~bellman/html/xfreeapps.html Sourcecode: nothing special, apparently the Unix stuff compiles cleanly (?) Win32 port: Mathias Ortmann Available: http://www.informatik.tu-muenchen.de/~ortmann Sourcecode: we're working on it Acorn RISC PC port: Peter Teichmann Available: http://www.wh1.tu-dresden.de/~sol/acorn.shtml http://www.wh1.tu-dresden.de/~sol/acorne.shtml Sourcecode: Some of it is included in the main source, but since Acorn's OS apparently doesn't have decent file handling, you can't even use the same source layout. Also needs lots of additional files. Since I generally don't have the possibility to test or improve these ports, it is a good idea to contact their respective authors if you have questions. Before you email... =================== Before you contact me with a problem that you have, make sure you have read _all_ of the above. Please read also the file "FAQ", which contains a lot of helpful information, and the README file for your specific system. I can't answer _every_ question. If you have trouble understanding this README, either because you don't speak English very well or because you have no clue at all about computers, please try to find some friend of yours who does understand this file and who can translate/explain it for you. I simply can't explain (for example) how to use terminal programs or CrossDOS because I don't use either, and it would be much too time-consuming anyway. This file and the file FAQ contains about every piece of information I can give you. I try to help people who have questions, but sometimes it takes too much time. Please don't ask for Kickstart ROM files or other copyrighted software. Don't _send_ me stuff like this either. If you want to send me something else which is big (>= 50K), ask me before or put it somewhere in Webspace. If I get 3MB of screen shots or a core dump ("it doesn't work, it generates this file"), I'm very likely to get extremely angry, I might complain to your sysadmin, and you might lose your account. Think twice. Oh, and another thing: If I promise to do things (like implement new features), and forget about them, pester me. That happens occasionally, it's a known bug in my brain. I'll have it replaced.