Thanks to everyone for their work on the emulators. I have been building on that this weekend (so that I can get a full speed/full sound version of Star Wars up and running - I tried a couple of the existing solutions but all seemed a bit choppy).
A natural place to look for increased performance would be the earlier versions of AdvMAME. I am pleased to report success in building and running versions from 0.72 to 0.102. The earlier versions needed more patches than the later ones AND the versions before 0.94 exhibited some audio 'squealing' that I was not able to track down before settling down for Top Gear.
Anyway... here is a little script that takes a fresh install of the latest Wheezy, does some updates, downloads AdvMAME 0.94, patches the source (and the Makefile), compiles it and updates advmame.rc.
All you should need to do is:
(a) dump the Wheezy image onto an SD card;
(b) put the below script into the FAT partition of the card (where config.txt is) - call it mamebox.sh
(c) boot the Pi, do the first run for raspi-config so that the root filing system is expanded, your Pi is overclocked as you wish and that the memory split is set to 16 meg. You could also change overscan settings or whatever you want.
(d) Reboot and log into your Pi (by ssh or whatever)
(e) /boot/mamebox.sh
(f) wait about 5 hours.
The script sets up a samba share into the .advance folder so you can upload your roms from your PC/laptop after the script has finished.
The script has not been properly checked (I added a few bits to make it a bit more user friendly without running it) but seemed to patch the files that needed to be patched and run make OK. Works on a 512 meg Pi and seems to be working ok on a 256 meg Pi.
Star Wars runs 100% - Woo Hoo! Some more complex games are on the cusp of being 100% to the extent that chopping a few unimportant background processes, some configuration options or a serious overclock could get them going. I'll leave that for others to work on.
Let me know if anyone needs the patches I applied to the versions earlier than 0.94 to make them build. Please don't nag me about my script writing skills - I have Star Wars so I don't care!
Code: Select all
#! /bin/bash
cd ~
wget http://downloads.sourceforge.net/project/advancemame/advancemame/0.94.0/advancemame-0.94.0.tar.gz
if [ ! -f ~/advancemame-0.94.tar.gz ]
then
echo "Failed to download file. Are we online? If we are, please try the script again."
exit 1
fi
tar xzvf advancemame-0.94.0.tar.gz
sudo apt-get -y purge pulseaudio
sudo apt-get -y autoremove
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y install samba samba-common-bin libsdl1.2-dev gcc-4.7
cd advancemame-0.94.0
sed 's/MAP_SHARED | MAP_FIXED,/MAP_SHARED,/' <advance/linux/vfb.c >advance/linux/temp.c
mv advance/linux/temp.c advance/linux/vfb.c
sed 's/misc_quiet\", 0/misc_quiet\", 1/' <advance/osd/global.c >advance/osd/temp.c
mv advance/osd/temp.c advance/osd/global.c
sed '
/#include <string>/ i\
#include <stdlib.h>
' <advance/d2/d2.cc >advance/d2/temp.cc
mv advance/d2/temp.cc advance/d2/temp.cc
export CC=gcc-4.7
export GCC=g++-4.7
./configure
sed 's/LDFLAGS=-s/LDFLAGS=-s -lm -Wl,--no-as-needed/' <Makefile >Makefile.temp
mv Makefile.temp Makefile
echo 'NOW HAVE A CUP OF TEA, THIS WILL TAKE SOME HOURS!!!'
make
sudo make install
cd ~
advmame
echo 'device_video_clock 5 - 50 / 15.62 / 50 ; 5 - 50 / 15.73 / 60' >> .advance/advmame.rc
chmod -R a+rwX .advance/
comp=`cat /etc/samba/smb.conf | grep '\[M\.A\.M\.E\]'`
if [ "$comp" == '[M.A.M.E]' ]; then
echo 'Not updating smb.conf. Finished'
exit 0
fi
sudo chmod 666 /etc/samba/smb.conf
tee -a /etc/samba/smb.conf <<HDHD
[M.A.M.E]
comment = M.A.M.E
path = /home/pi/.advance
writeable = yes
guest ok = yes
create mask = 0777
directory mask = 0777
read only = no
browseable = yes
force user = pi
public = yes
HDHD
sudo chmod 644 /etc/samba/smb.conf
sudo /etc/init.d/samba restart
echo 'Now finished...'
Have fun.