perjantai 30. marraskuuta 2012

Amiga emulation with Amiga forever and WHDload

This I'll tell how I configured Amiga emulation on my HTPC. Now, Amiga games typically are on several disks, and even though MythGame supports those, it does not work very well with Amiga emulators, e-uae in my case. Mostly the problem is that one must change the disks and stuff like that, which is quite clumsy in my opinion. I know there is fs-uae which probably would work better in that aspect, but it was horribly slow on my setup.

Anyways, I bought Amiga Forever from Cloanto. For just a few dollars, I got all necessary Kickstart ROMs, bunch of games, and Workbench (the nice OS).

Amiga Forever has a very nice Windows interface with one click launching of games etc, but it does not work so well with Linux. So I downloaded WHDload, which is an Amiga program intended to allow hard disk installing of Amiga disk games.

So, to set up my emulation, I created two directories: ~/Amiga/HDWorkbench and ~/Amiga/HDGames. In e-uae config, I added those to my uae config, and installed Workbench on the HDWorkbench drive, following this nice guide. After that, I installed WHDload (copied it to the hard drive and installed using Workbench).
Now everything is ready for games. Just copy the WHD installs of them to HDGames dir and launch them from Workbench! But what about MythTV?

I created a small script to write a proper startup file for amiga, so that when it boots, it automatically launches the game. The script looks like this, I call it run-uae:

#!/bin/sh -e
# Script to automatically lauynch e-uae using WHD game selected
# Also changes qjoypad layout to UAE
#
# Works by creating a User-Startup file which launches the
# game when UAE boots, and then deletes it when done.
# Note that paths MUST be correct and UAE must boot to
# Workbench with the selected configuration.

if [ ! $# = 2 ] || [ "$1" = "-h" ]; then
  echo "Usage: run-uae <config> <game>"
  exit 1
fi


AMIGA_GAME_PATH="Games:"
AMIGA_STARTUP_FILE="~/Amiga/HDWorkbench/S/User-Startup"

CONFIG="$1"
AMIGA_SLAVE=$(basename "$2")
AMIGA_PATH=${AMIGA_SLAVE%.*}

echo "${CONFIG} ${AMIGA_SLAVE} ${AMIGA_PATH}"
echo ${AMIGA_STARTUP_FILE}

# Create user-startup
echo "cd \"${AMIGA_GAME_PATH}\"" > ${AMIGA_STARTUP_FILE}
echo "cd \"${AMIGA_PATH}\"" >> ${AMIGA_STARTUP_FILE}
echo "whdload ${AMIGA_SLAVE} Preload PAL" >> ${AMIGA_STARTUP_FILE}
echo "uae-configuration SPC_QUIT 1" >> ${AMIGA_STARTUP_FILE}

# Change qjoypad layout to UAE
qjoypad --update UAE

# Run e-uae
e-uae -f ${CONFIG} -G 1

# Reset qjoypad configuration
qjoypad --update "MythTV"

# Remove startup file for next clean boot
rm ${AMIGA_STARTUP_FILE}

You need to tune the parameters in the beginning, the game path to have the Amiga drive label, and the other is real path to the user-startup file. And you point to the .slave file of the game. I think it might be better to use the .info file, But I haven't had the time to do and test the change. This works for 99% of the games out of the box.

In Mythgame the setup is like this:
- Player name: Amiga
- Type: Amiga
- Command: run-uae ~/.e-uaerc %s
- ROM path: ~/Amiga/HDGames
- Working dir:
- File extensions: Slave, slave
- Uncheck the box for multiple disks

Ei kommentteja:

Lähetä kommentti