Saving high scores on the XXX in 1 JAMMA boards
This is a two for the price of one post. This will go over adding an RW partition to the SD card and how to use it to store your highscore files.
Adding an RW partion
Prerequisites
- A computer running Linux
- SD card adapter
- An SD card with your arcade OS loaded on it(Use a backup copy for this!)
Steps
- Connect your SD card (Did I mention that you should use a backup yet?)
- Run
dmesg
to figure out what the device name of your sd card is - Create the partition
fdisk /dev/<sd card device>
n for add new partion
enter for the default starting cylinder
enter for the default ending cylinder (or specify a size if you don't want to fill up the rest of the sdcard with this partition) - Format the partition:
mkfs.ext2 /dev/<sd card device partition 4>
- Its helpful to have a mount point for each of the partitions on the card so its easy to move files around:
cd /mnt
mkdir one two three four - Mount the third partition of the sd card. This contains most of the base OS and startup scripts
mount /dev/<sd card device partition 3> /mnt/three
- Add a mount point directory for the new rw partion we made:
mkdir /mnt/three/sdcard-rw
- Now an edit to the startup script to mount the rw partition:
vim /mnt/three/etc/init.d/rcS (or whatever editor you like)
Add a line after the line that says “System Starting”:
mount /dev/mmcblk0p4 /sdcard-rw
- Save your edits
umount /mnt/three
Now when your board boots you’ll have a directory which is mounted read-write at /sdcard-rw. The next section will go over how to move the highscores over to there.
Saving highscores
This covers the general concept for the 412 in 1. This works for the games that run with xemu (which is xmame) and aemu which is another MAME variant with different build options.
Prerequisites
- A read-write partition setup as described above
- A copy of hiscore.dat from here. This is needed since its not included in the image.
- Unzip the archive and get the hiscore(pre_mame0133u1).dat file this gets used the rest is not.
Steps
- Mount the new rw partition:
mount /dev/<sd card partition 4> /mnt/four
- Mount the emulators partition:
mount /dev/<sd card partition 2> /mnt/two
- Mount the base OS partition
mount /dev/<sd card partition 3> /mnt/three
- Now make some directories to store the data for each emulator on the image:
mkdir /mnt/four/xmame
mkdir /mnt/four/aemu
- Make a directory for the hiscore.dat file (This directory is already setup in the xmame config)
mkdir -p /mnt/three/usr/local/share/xmame
- Move the hiscore(pre_mame0133u1).dat to the directory as hiscore.dat
mv hiscore(pre_mame0133u1).dat /mnt/three/usr/local/share/xmame/hiscore.dat
- Move the highscore directories to the rw partition:
mv /mnt/two/.xmame/hi /mnt/four/xmame
mv /mnt/two/aemu/hi /mnt/four/aemu - Create symlinks for those hiscore directories:
ln -s /sdcard-rw/xmame/hi /mnt/two/.xmame/hi
ln -s /sdcard-rw/aemu/hi /mnt/two/aemu/hi - Move the nvram directories:
mv /mnt/two/.xmame/nvram /mnt/four/xmame
mv /mnt/two/aemu/nvram /mnt/four/aemu - Create symlinks for the nvram directories:
ln -s /sdcard-rw/xmame/nvram /mnt/two/.xmame/nvram
ln -s /sdcard-rw/aemu/nvram /mnt/two/aemu/nvram - Add a symlink for the hiscore directory for aemu:
ln -s /usr/local/share/xmame/hiscore.dat /mnt/two/aemu/hiscore.dat
- Unmount all those partitions:
umount /mnt/two /mnt/three /mnt/four
That’s covers everything but 19XX which uses a different emulator which I haven’t gotten to figuring out yet.