Short: MS DOS emulator Author: DosBox team Uploader: Mathias 'Corto' Parnaudeau Type: misc/emu Version: 0.73 Replaces: misc/emu/dosbox.lha Requires: OS4 update3 and above Architecture: ppc-amigaos >= 4.0.3 URL: http://www.dosbox.com * DosBox 0.73 I released an improved DosBox 0.72 few days after DosBox 0.73 was out. The standard version 0.73 is better than the previous one. I tried to apply some improvements but I had the surprise to see that one of them was done in version 0.73 (in "paging.h") ! By default, I configured 3000 cycles and frameskip equal to 1. Adjust these parameters depending on your needs. But with this configuration, I get a CPU usage between 40 and 45 % for games like Kyrandia, Cannon Fodder or Lost Vikings, ... Of course, feedback is welcome ! I am curious to see if performances are enhanced (and finally good) on Sam440 :) Unsupported features : - launch editor and launch captures (that require function execlp in newlib) - OpenGL - the new core prefetch * How to use DosBox The config file "dosbox.conf" is the place you will try some parameters to make it running well on your Amiga. If you want to avoid entering the mount command each time you run DosBox, just have a look at the last lines of the file "dosbox.conf" and add the commands you want to run at startup. I provided "dosbox.conf" but you can create the initial file typing the following command in the DosBox console : CONFIG -writeconf dosbox.conf See http://www.dosbox.com/wiki/Dosbox.conf for more information. And read the README file provided in the archive ! Useful help can be found on the official website at : http://www.dosbox.com/wiki/Main_Page For example, it points on a page that describes the special keys (CTRL + function key) at http://www.dosbox.com/wiki/Special_Keys Remember that if your mouse is crazy, set "autolock=true" in "dosbox.conf". * What I changed in the sources The core of the emulator is version hard to optimize and to read. It is very difficult to change some things in that part due to the mess of the x86 instruction set and some stange coding rules (C++ code that is not always object oriented, many macros and inline functions, ...). So I used the wonderful tool oprofile on my MacMini running YellowDog Linux to find the other parts that could be optimized. So the changes I applied are : - src/cpu/core_normal.cpp : Activated C_CORE_INLINE, what increases the required memory to compile, it only worked with 512 MB and the OS 4.1 paging system ! - include/mem.h : Used instructions to read half-words and words with reversed bytes (PPC rulez !). Also changed a structure reorganizing TLB fields in order to decrease the pressure on the cache. - include/paging.h (again !) : Tried to improve the memory access through TLB. The archive contains a diff compared to the original sources (thanks to svn). * How I compiled DosBox 0.73 Since the last release of the AmigaOS 4 SDK, newlib is used instead of clib2 by default. If you want to build yourself the original DosBox sources, just follow what I did and don't forget it requires 512 MB of memory : - in "src/cpu/cpu.cpp", replaced "#include "memory.h" by "#include "mem.h" - in "src/include/render.h", changed the scaler complexity setting the define RENDER_USE_ADVANCED_SCALERS to 1 instead of 3 - in "src/cpu/core_prefetch.cpp", commented includes of the huge instruction switch else it does not compile on my machine (DON'T USE THIS CORE !) - in "src/gui/sdlmain.cpp", commented the calls to execlp that is not provided by the newlib Then, under sh : CFLAGS="-O2" CXXFLAGS="-O2" ./configure --disable-dynamic-core --disable-opengl --disable-dynrec --disable-dependency-tracking - exit sh - Remove -use-dynld in "src/Makefile" - make - Run "src/dosbox" * Ideas for the future / to do - Improve access to the x86 registers - Activate OpenGL - Check CDROM access - Compare options -O2 and -O3 - Change the way x86 registers are accessed - Profile DosBox 0.73 on Linux PPC - Fix install of Win 3.1 - Fix color problems (x-ray, hugi) - Fix MIDI : does not work even setting it in dosbox.conf with a directory that contains instruments - Fix FullScreen that send a 59 Hz signal and some screens does not go below 60 - Check usage of gamepads