Jump to content
(Public Beta) HyperSpin 2 is now available for everyone ×

Cocktail.py - batch modify game.cfg for mirrored 'cocktail' mode


Recommended Posts

Posted

I'm working on a cocktail cabinet right now and want to be able to play horizontal games split screen in mirrored 'cocktail' mode. Unfortunately in the MAME.ini there is no option I could find to set this to default and for 8000+ games (give or take) I wasn't about to manually go through each one. I compiled the MAME source to have this as an option but it would lead to problems with games that are vertical orientation. So rather than spend much time on writing a full blown app, I wrote a python script to take care of the monotanous task of manually doing it. Figured python would be the quickest way for me to knock this out but I may rewrite in C or something else later if I want to make it a full blown game config app.

The way it works is, it parses an xml file like MAME.xml or VerticalGames.xml or whatever you have, creates a 'cfg' directory with all the games cfg files from the list. Don's tools are great to make your own lists first too.

I'm using standard libs and it should run on any OS with Python 2.7.4. The later will work on Python 3.0 and up. Usage is:

~$ python cocktail.py -i <filename>

post-41864-14287059037_thumb.jpg

Not sure how many people will use this, but if you do, let me know. I'll probably do something a lot more customizable later.

Took my Raspberry Pi about ~45secs to process all 8500+ files. (just for benchmark testing.. not using a pi in my cabinet)

cocktail.py (Python 2.x)

cocktail_py3k.py (Python 3.x)

Posted

Thanks emb! But no, I'm not running a Raspberry Pi in the cocktail. I have that for another cabinet i plan to do afterwards. I just wanted to see if the script would run on the Pi.

The newer Pi with 512mb ram seems to handle street fighter 2 okay... but really only if you're running older MAME versions specifically AdvMAME. Older games, Pac Man/etc are great on it. The Pi will most likely go into a bar top or something else. It's my 3rd one now so I always find new uses for em.

snarfies: hope it saves you some time so you can spend it playing games instead :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...