Kent Dickey
2020-08-28 17:41:46 UTC
I'd love it if there was some "Getting started with MAME on Mac OS X for Apple
II emulation" somewhere. I had to figure this out on my own.
I know user hostile software--I developed KEGS. But MAME appears to be
on another level, at least on the Mac. These steps are just for running
the pre-built binaries, I didn't try to compile it.
In short, you must download ROMs for Apple II computers for MAME--there is
no practical way to get them yourself, and what you need is so arcane that
you have to use pre-verified-for-MAME ROM files. It's also annoying that
MAME refers to disk images as ROM files as well. It makes searching for
the ROM images for an Apple II nearly impossible.
Download MAME from mamedev.org. Click on Mac Download icon, then select
a URL for "Apple Macintosh OS X Intel", I picked http://sdlmame.lngn.net
I then downloaded SDLMAME v0.223 64-bit (As of August 17, 2020) which is
the file mame0223-64bit.zip. There's another link on that page for
"SDL runtime library", click that which goes to
https://www.libsdl.org/download-2.0.php, and download under Mac OS X
SDL2-2.0.12.dmg.
You also need to go to https://archive.org/download/MAME221RomsOnlyMerged and
scroll down and download the apple2.zip, a2diskiing.zip, and d2fdc.zip files
to get the ROMs for an Apple //e. MAME is not a real Mac application, so you
can't just run it from the Finder and just click "Let me run this dangerous
App" like you can with other apps you download from the internet. Instead, it
can only be run from Terminal, and the Mac has marked it "quarantine" and we
first have to fix that.
I also don't want to enter my password on my Mac to install any binaries.
This is just my security rule. It's one thing to infect my computer as a
normal user, it's another to give it full access to my machine. The SDL wants
to install to /Library/Frameworks/, and I don't want to do that. You can copy
it to ~/Library/Frameworks/, but that's almost as insecure (since other apps
can find it there).
So, unpack mame (Do all this from a Terminal window):
cd ~/Downloads
unzip mame0223-64bit.zip
Will create a mame0223-64bit/ directory.
cd mame0223-64bit
We need to remove the "quarantine" tag. This is tricky, and it keeps
changing, so let's do it in a simple way that should always work. The
executable for MAME is called mame64, so here's how to fix it:
mv mame64 mame64.orig
cat mame64.orig > mame64 # This "copies" it, removes quarantine
chmod +x mame64 # Make it executable again
Let's deal with SDL next
open ~/Downloads/SDL2-2.01.dmg
Copy the "SDL2.framework" to your Desktop using the Finder.
Then, back in the Terminal window:
mkdir Frameworks
mv ~/Desktop/SDL2.framework Frameworks/
Now we need to make a short script to load this local library (you can paste
the following all at once from "cat.." to "EOF" into the Terminal window,
it will create the proper file).
cat << 'EOF' > macmame2
#!/bin/bash
dir=`dirname $0`
DYLD_FALLBACK_FRAMEWORK_PATH=${dir}/Frameworks ${dir}/mame64 "$@"
EOF
We're getting there. Now we need the roms.
mv ~/Downloads/apple2e.zip roms/
mv ~/Downloads/a2fdc.zip roms/
mv ~/Downloads/a2diskiing.zip roms/
Running mame:
./macmame apple2e -w -flop1 ~/a2/french_touch/PNO_v11.dsk
I got this disk image from:
http://fr3nch.t0uch.free.fr/PNO/PNO.html
To pause: Press delete to enable more keys (other people refer to "scroll
lock". That must be on Windows. On my keyboard, it's the "Delete" key that
works). Then F4 will show a palette and pause the emulation.
I've not figured out any other keys. I'm unable to do reset, although once
you've hit "delete", the Reset key seems to be F3--but it then stops the
emulator.
My current issues: I cannot get the IIgs MAME to work:
./macmame apple2e -w sl4 mockingboard -flop1 ~/a2/french_touch/PNO_v11.dsk
I cannot figure out what keys are the Open Apple/Closed Apple keys.
On my Mac, in System Preferences, I've swapped the Capslock and Ctrl keys.
In MAME, this means I have no control key. I've undone the swap, and
I get a control key back. But this is a pain.
Kent
II emulation" somewhere. I had to figure this out on my own.
I know user hostile software--I developed KEGS. But MAME appears to be
on another level, at least on the Mac. These steps are just for running
the pre-built binaries, I didn't try to compile it.
In short, you must download ROMs for Apple II computers for MAME--there is
no practical way to get them yourself, and what you need is so arcane that
you have to use pre-verified-for-MAME ROM files. It's also annoying that
MAME refers to disk images as ROM files as well. It makes searching for
the ROM images for an Apple II nearly impossible.
Download MAME from mamedev.org. Click on Mac Download icon, then select
a URL for "Apple Macintosh OS X Intel", I picked http://sdlmame.lngn.net
I then downloaded SDLMAME v0.223 64-bit (As of August 17, 2020) which is
the file mame0223-64bit.zip. There's another link on that page for
"SDL runtime library", click that which goes to
https://www.libsdl.org/download-2.0.php, and download under Mac OS X
SDL2-2.0.12.dmg.
You also need to go to https://archive.org/download/MAME221RomsOnlyMerged and
scroll down and download the apple2.zip, a2diskiing.zip, and d2fdc.zip files
to get the ROMs for an Apple //e. MAME is not a real Mac application, so you
can't just run it from the Finder and just click "Let me run this dangerous
App" like you can with other apps you download from the internet. Instead, it
can only be run from Terminal, and the Mac has marked it "quarantine" and we
first have to fix that.
I also don't want to enter my password on my Mac to install any binaries.
This is just my security rule. It's one thing to infect my computer as a
normal user, it's another to give it full access to my machine. The SDL wants
to install to /Library/Frameworks/, and I don't want to do that. You can copy
it to ~/Library/Frameworks/, but that's almost as insecure (since other apps
can find it there).
So, unpack mame (Do all this from a Terminal window):
cd ~/Downloads
unzip mame0223-64bit.zip
Will create a mame0223-64bit/ directory.
cd mame0223-64bit
We need to remove the "quarantine" tag. This is tricky, and it keeps
changing, so let's do it in a simple way that should always work. The
executable for MAME is called mame64, so here's how to fix it:
mv mame64 mame64.orig
cat mame64.orig > mame64 # This "copies" it, removes quarantine
chmod +x mame64 # Make it executable again
Let's deal with SDL next
open ~/Downloads/SDL2-2.01.dmg
Copy the "SDL2.framework" to your Desktop using the Finder.
Then, back in the Terminal window:
mkdir Frameworks
mv ~/Desktop/SDL2.framework Frameworks/
Now we need to make a short script to load this local library (you can paste
the following all at once from "cat.." to "EOF" into the Terminal window,
it will create the proper file).
cat << 'EOF' > macmame2
#!/bin/bash
dir=`dirname $0`
DYLD_FALLBACK_FRAMEWORK_PATH=${dir}/Frameworks ${dir}/mame64 "$@"
EOF
We're getting there. Now we need the roms.
mv ~/Downloads/apple2e.zip roms/
mv ~/Downloads/a2fdc.zip roms/
mv ~/Downloads/a2diskiing.zip roms/
Running mame:
./macmame apple2e -w -flop1 ~/a2/french_touch/PNO_v11.dsk
I got this disk image from:
http://fr3nch.t0uch.free.fr/PNO/PNO.html
To pause: Press delete to enable more keys (other people refer to "scroll
lock". That must be on Windows. On my keyboard, it's the "Delete" key that
works). Then F4 will show a palette and pause the emulation.
I've not figured out any other keys. I'm unable to do reset, although once
you've hit "delete", the Reset key seems to be F3--but it then stops the
emulator.
My current issues: I cannot get the IIgs MAME to work:
./macmame apple2e -w sl4 mockingboard -flop1 ~/a2/french_touch/PNO_v11.dsk
I cannot figure out what keys are the Open Apple/Closed Apple keys.
On my Mac, in System Preferences, I've swapped the Capslock and Ctrl keys.
In MAME, this means I have no control key. I've undone the swap, and
I get a control key back. But this is a pain.
Kent