Note: This section is not a Unix tutorial. You need to know some basic Unix commands to compile and install xmame/xmess.
-fno-strict-aliasing
to fix it. gcc-2.95.1 does work with -fstrict-aliasing
, and gives a nice speed
increase.
xmame-0.34b1.1.tgz
to xmame-0.34b1.1.tar.gz
gzip -d xmame-0.34b1.1.tar.gz
tar xvf xmame-0.34b1.1.tar
xmame-0.34b1.1
is created. Change to it. This directory is
the top of the source tree.Makefile
and change the settings according to your system. The
default makefile.unix
is pre configured to run under X11/Linux. Be careful
editing this file.
make xlistdev; ./xlistdev
make
make install
"make"
and
"make install"
steps adding "TARGET=<target>"
to the make command for example:
make TARGET=mess make install
"make"
and
"make install"
steps adding "DISPLAY_METHOD=<method>"
to the make command
for example:
make DISPLAY_METHOD=svgalib make install
make TARGET=mess DISPLAY_METHOD=svgalib make install
/usr/games/xmame.x11 dkong
If all else fails, send email to the current maintainer of the xmame/xmess project. See Mail for contact information.
Linux i386 is the platform I (Hans) use, so xmame should compile without any hassles on Linux i386.
Some bugs have been found and worked around when using gcc27x, please use egcs if available. If more gcc bugs popup egcs will be made mandatory, but I hope that won't be nescesarry.
It has been reported that some SoundBlaster AWE32 cards do not correctly
manage get_freespace(). If so you'll get some audio_ioctl() calls failed messages
in console, and if everything goes right a message that xmame/xmess is falling
back to timer based audio. If this doesn't happen and sound isn't right try
forcing timer based audio by starting xmame/xmess with -timer
.
Sb64/128pci cards (ensoniq 137x based cards) also do not correctly manage
get_freespace(), unfortunatly this doesn't result in failed ioctl's instead
they just ignore the calls. Xmame tries to autodetect this and to fall back
to timer based audio. If this doesn't happen and sound isn't right try forcing
timer based audio by starting xmame/xmess with -timer
.
Also, I've tested sound using the PC-Speaker driver module. It works!!
But needs -timer
, again it should do this automagicly, but you know what todo
if it doesn't.
Distribution Specific Comments:
Linux powerpc should work from now on, here's an email from: Andreas Varga
sid@skater.htu.tuwien.ac.at
, the linux/powerpc maintainer describing the nescesarry steps:
Required changes to compile xmame 0.34b3.1 on Linux/PowerPC with SVGALIB
Makefile:
Required changes to compile xmame 0.34b3.1 on Linux/PowerPC with X11
Makefile:
Another thing... sound is not working, because sound drivers support is currently under development in Linux/PPC kernels...there is an old driver that is a hacked Soundblaster driver, and newer 2.1.1xx kernels have a sound drivers based on Amiga DMA sound drivers... Once this issues are settled there should be a full OSS-compatible driver... sound should work then...
I can't speak about Joystick support...
The original Linux/PPC target changes in the Makefile were done by me, but there are some other changes required to get it to compile... Starting from October I will have some more time to work on this, and I'll keep you updated...
Cheers, Andreas
Use the generic unix arch for those machines that have no sound support installed. ( xmame/xmess uses the dmedia package or the newer AL package on IRIX systems )
Silicon Graphics provides several native compilers. xmame/xmess has been compiled and tested with the normal cc. There were some problems with this when using -n32 for new style 32bit code. It does work when using -o32 for oldstyle 32 bit code. It should now also work with -n32 wich is much faster.
The use of DCC is not recommended (anymore) since it's a c++ compiler and thus won't even compile xmame/xmess out of the box due to uncasted malloc's. Changing all these malloc's would be crazy, esp since they are not only in the osd part, but also in the core which is not under our control. Besides that mame is normal c, so please compile it with a normal c compiler.
Some problems have been reported using GNU linker. It's recommended that you use native one.
Use the generic unix arch. In HP-UX gcc and gnu-make is MANDATORY.
Use the generic unix arch.
Notes received from Danny
dboxhoor@iso.vilspa.esa.es
VERY IMPORTANT!!!
The xmame/xmess CPU emulators access memory through pointers which are sometimes cast to illegal addresses - as far as the MIPS CPU is concerned. The Ultrix operating system is aware of that and fixes this "unaligned data access".
Depending on your system setup, lots of warnings are generated for certain games. Fortunately these messages can be disabled by executing the command "uac p 0" in the same shell where xmame/xmess will be running.
UPDATE: The new -DALIGN_INTS
switch in the makefile fixes these unaligned
accesses in the source which is probably a lot faster than hot fixing them
in the kernel segfault handler.
Use gnu make.
Compile with the `c89' compiler. Though `gcc' has no problems with compiling and optimizing xmame/xmess, the resulting `c89' executable is faster on an empty machine (read: xmame can use all cpu & memory without competing with other high priority processes), so you can set `frameskip' to 1.
When compiling with `c89 -O2' don't forget to also use `-Olimit 1000'. If 1000 is not enough, the compiler will tell you to increase it.
There are 2 relevant architecture options available in the makefile:
ARCH = generic : use this for old SunOs running on Sparcs, but a Sparc running Solaris will usually handle this option too. ARCH = solaris : this is the one you should use for Sparcs running Solaris.
Currently sound is not supported under sunos. The solaris arch does support audio.
If you are using Sun's OpenWindows implementation of X11, then make sure that the X11INC and X11LIB variables in the X11 Options section of the makefile are set properly. (There are already entries for the standard OpenWin directory there that you can uncomment).
Of course, if you are compiling for X11 then you need to set these variables properly, no matter what implementation of X11 you are using! :)
If you are using Sun's SunPro cc compiler, then the following optimisation flags have been reported to be good:
OPTFLAGS = -fast -xO4 -native
Finally, there has been a case of the xmame compilation processes breaking over the "ar" program. Most Solaris installations will include a set of utilities that conform to the XPG4 standard, usually in the "/usr/xpg4/bin" directory. The XPG4 version of "ar" should be avoided like the plague. Ensure that the "/usr/ccs/bin" appears in your path before the "/usr/xpg4/bin" directory and everything should go smoothly.
PLEASE NOTE : there is currently not much support for SunOS/Solaris. If you have any trouble, try to fix it yourself. If you succeed, send a message to the mailing list detailing what you did. If you don't succeed, send a message anyway and someone _may_ be able to help you. Either way, this is the only way that problems with xmame on SunOS/Solaris will get fixed.
You must use the OpenStep gnumake, not make. You must also use the NeXT/Apple cc rather than gcc. Also use only the optimisation options as recommended for OpenStep in the makefile, others will cause the resulting executable to crash. The OpenStep assembler on i386 architectures is incompatible with the mame assembler cpu cores and thus you must use the C versions (Use i386-noasm instead of i386 when compiling for i386).
The supplied complier is based on gcc 2.7.2.1 which will not compile src/profiler.c without crashing. To get around this you must turn off + optimisation when this crash occurs, re-make to compile this file only, then stop the make, re-enable optimisation and continue.
On an OpenStep keyboard the functions keys do not all operate as expected. Using the command key in conjuction with a number key generates the equivalent function key within xmame, with 0, - and = + representing F10, F11 and F12 resepectively. Also note that the ALT + keys cannot be mapped. As most games tend to use this as the default fire button it is exteremly useful to remap this globally the first time you run xmame.