Apple2 emulation using advmess3
-
<EDIT> This is a running account of setting up ADVMESS for Apple2. It reads chronologically.
I just reached a successful milestone/POC: I can get Apple2 emulation working in the latest AdvanceMAME/MESS (as of now, that's advmame3.4 and advancemess3.3 apparently). I know it is working because I am playing Karateka, but I had to select it from the file browser within the MESS GUI, so I have a bit of work ahead of me to slot this configuration into Emulation Station etc.
I find it interesting that the MESS version did not bump with advmame 3.4. Inside the menu, it says 3.3 which may be a little confusing, but I guess nothing changed in the last advMAME update. Anyway, I don't have all of the details worked out yet, as I need to correct some paths in the .rc file and such, but but I confirmed it works. Here are a few things I discovered so far:
- My apple BIOS files were too new, or incomplete. . . basically had to launch via command line to see what was missing. In the end, I used a rather old collection of BIOS files. The tricky one was getting a zip that included disk2_33. Turns out, I had it all along from an old build, but newer BIOS files I tried kept showing missing file errors at launch. Once I had the BIOS files worked out, it launched, but I faced the familiar MAME/MESS "TYPE OK to continue" message and my keyboard did nothing. I have a safe reboot button on my pi, so I used it.
- Edited the newly created advmess.rc file and enabled quiet mode to get rid of the "Type OK" dialog. Now it booted with the familiar BEEP and APPLE //e at the top, but no disk image loaded, even though specified in command. Also, I am still locked out of the system and the GUI. I suspect an issue with the full keyboard emulation (cannot use TAB, etc. until you can toggle to partial keyboard emulation with SCROLL_LOCK which wasn't working).
- set
device_keyboard raw
in the .rc file. That did the trick. - booted, was able to press ScrlLock and get access to TAB and the GUI menu! Navigated to FILES, opened karateka.dsk and issued a PR#6, and BOOM, I am playing Karateka using advMESS.
- applied the
device_mouse raw
to see if the emulation supports analog input for the apple joystick, and it does, but like the setup for trackballs/spinners in advmame I also added:
device_raw_mousedev[0] /dev/input/mouse0 device_raw_mousedev[1] /dev/input/mouse1 device_raw_mousedev[2] /dev/input/mouse2 device_raw_mousedev[3] /dev/input/mouse3 device_raw_mousetype[0] ps2 device_raw_mousetype[1] ps2 device_raw_mousetype[2] ps2 device_raw_mousetype[3] ps2
So, next on the agenda for me is getting my launch command working better so I can specify the disk image and it actually loads as expected. Then, transcribe what I learn into an emulators.cfg so I can start using it via the frontend.
There is also the issue for me, using an arcade control system, of mapping keys to my joysticks and pushbuttons. Since I am using an IPAC in keyboard mode, this is trivial for mapping (I can do it in the MAME GUI). However, the keys are mapped for "This System" and Karateka will have different keys than, say, Lunar Leaper. I know where this leads because I have been there before: I will need to setup prelaunch scripts to build/use .rc files per disk image. That is my endgame, since I only want to have a keyboard attached to configure, the first time, and let these run on arcade controls once I have my favorites working.
-
By the way, my current launch command is:
/opt/retropie/emulators/advmame/bin/advmess apple2ee -dev_floppydisk karateka.dskOf course, it does not open karateka directly like this yet. I probably need to path to the image.
-
Ok, next milestone reached. I decided to install linapple and let the script go ahead and configure the AppleII system in Emulation Station. I don't really intend to even use linapple for what I am trying to do but I figured it was faster. I know, I could have just copied the details from a base config file yadda yadda.
In any case, I have a place to put "roms" now for apple2. This is a misnomer, since I am not putting the roms in there at all but rather the disk images. You get the idea.
I also setup a config folder for advmess and pointed at this for ROMs in the advmess.rc file. This is where I put the actual ROMs which are the BIOS files Advmess needs in order to launch the Apple2 system.
Here is my updated emulators.cfg file in the config/apple2 folder:
linapple = "pushd /home/pi/RetroPie/roms/apple2; /opt/retropie/emulators/linapple/linapple -1 %ROM%; popd" advmess = "/opt/retropie/emulators/advmame/bin/advmess apple2ee -dev_floppydisk %ROM%" default = "advmess"
I dropped my karateka.dsk file into the apple2 roms folder. Relaunched ES and I can now launch Apple2 titles from ES using ADVMESS.
<EDIT> Here is my advmess.rc file.
Next on the list: Setup per-rom (actually, per disk image) .rc files so I can customize the system keyboard mapping per game.
-
This is interesting stuff. You say that you don't intend to use Linapple for what you're trying to do. What advantages does MESS have over Linapple and what exactly are you trying to do?
-
@mediamogul I am trying to make it easy to remap keys for games to my arcade controls. I never figured it out in linapple, but I have done it in mess for years. Then, at launch, I just need to use a per-image .rc file with the keys/controls mapped for that game. It might be easier than I thought, as mess supports
keyboard-to-analog joysticks which will make most of the games work easily.For example, I typically map my Player 1 START button to "J" or "K" as many games launch in demo mode and to start the game you press J or K to indicate whether in intend to play with a joystick or keyboard.
Think about games like The Bilestoad, and how you would map all of the keys to a joystick and 6 arcade buttons. You can do it, but you don't want that configuration to mess up other games, since the keys are saved PER SYSTEM.
Anyway, I am almost done. A base config and a simple copy command in the launch script should do it.
-
You're testing with a top notch game. 'Karateka' is a lot of fun and you can definitely see the first flickers of Mechner's 'Prince of Persia' coming to be also. It always reminds me of Stephen Spielberg's 'Duel' and the evolution that can be seen there between it and 'Jaws'.
-
@mediamogul Yeah, funny how quickly I remember how to play, just like I am back in the 80s again! This was a fun game to beat.
-
Well, BLOW ME DOWN!!! It looks like MESS is automatically appending the name of the rom (disk image) into the custom keymaps that you create. This is an unexpected pleasure!
That means I can edit inputs for a given title and it won't affect other images. This is new. So, no need specify custom .rc config files per rom (disk). I think this little adventure is done.
<EDIT> like this:
apple2ee[home_pi_retropie_roms_apple2_karateka]/input_map[p1_stick_up] keyboard[0,up]
The above input customization appears in the .rc file and contains both the SYSTEM and the path+image. Very cool!
-
@caver01 if you make a config in a game but you want it to be universal just remove the game name in the rc file. Ie:
coleco[bc quest]/......
You just change it to
coleco/.......
-
@edmaul69 yep. It works a lot like AdvMAME. However, I noticed analog settings like sensitivity don't get the image name embedded, so these are universal for the system.
-
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.