Build Your Own Arcade Controls Forum
Main => Software Forum => Topic started by: jelwell on May 30, 2013, 12:49:35 pm
-
Anyone using JoyTray to automatically switch their joysticks into the right mode per game?
I just upgraded my arcade cabinet to Ultimarc's ServoStik. My current frontend is Mamewah. I run a batch file between mamewah and mame, I'm thinking of putting some smarts in the batch file to detect the game controller format and automatically switch between 4 and 8 way mode. Has anyone done something similar?
Or perhaps it's time for me to change frontends, are there frontends that support joytray automatically?
Thanks,
Joseph.
-
No idea bout joytray, but Mala supports switching via DaOldMan's plugin called joychoose.
I haven't used it yet, but if it's like his other plugins, it will spit out whatever command line you specify for either option.
I just tried to go to the website and it says bandwidth exceeded, so you might have to ask someone in the Mala subforum to upload it for you. :-\
-
I have mine set up to automatically switch upon game launch with mala. Joytray is needed to control servo board along with joychoose plugin set up in mala with the correct command line entry set up in the plugin. You will also need to have the "controls.dat" set up in mame so that the plugin knows what type of joy is needed. Qbert was the only issue since in the controls.dat it is identified as a 4 way joy stick. I edited the controls.dat so that it is identified as 8 way and set game specific controls in mame to only identify diagonals to have semi real qbert controls.
*if you need copies of latest mala and joychoose plugin I can help you with that.
good day.
-
LEDBlinky has that feature and it's what I use with HyperSpin and my ServoStiks. It looks like it works with Mala too but I personally haven't tried it.
Sent from my GT-N8013 using Tapatalk 2
-
Thanks for all the tips. I'd like to avoid changing frontends, but I will if I have to. It looks like I might be able to use LEDBlinky with Mamewah. I'll will try to set that up and report back.
Joseph.
-
Reporting back. LEDBlinky works great with Mamewah. Here's pointers on how to do it:
http://www.ledblinky.net/Support.htm#NoLEDs (http://www.ledblinky.net/Support.htm#NoLEDs)
http://www.ledblinky.net/Support.htm#MamewahConfig (http://www.ledblinky.net/Support.htm#MamewahConfig)
Looking forward to sending the devs some money. Makes my life a lot easier.
Joseph Elwell.
-
I guess you've sorted it, but you can use JoyTray with Mamewah. I've just got a ServoStik so have just set this up myself. You need something like this in your emulator.ini file:
pre_emulator_app_commandlines c:\joytray\joytray.exe -servo [input]
That's it!
-
pre_emulator_app_commandlines c:\joytray\joytray.exe -servo [input]
This seems like it would work to switch the joystick from 4 way to 8 way (or vice versa) per EMULATOR. LEDBlinky supports switching based on the controls.dat file per GAME. Or maybe I'm misunderstanding.
Joseph Elwell.
-
This seems like it would work to switch the joystick from 4 way to 8 way (or vice versa) per EMULATOR. LEDBlinky supports switching based on the controls.dat file per GAME. Or maybe I'm misunderstanding.
Joseph Elwell.
Nope, the '[input]' part is replaced with the input type from the mame -listxml output...ie joy4way, joy8way etc.
This commandline is run every time you launch your emulator, so you run Pacman it runs:
c:\joytray\joytray.exe -servo joy4way
(then Mame)...
Then you quit and run 1942 and it runs:
c:\joytray\joytray.exe -servo joy8way
(then Mame)...
etc...
You can also add multiple programs separated by ;'s to run prior to launching the emulator, eg:
pre_emulator_app_commandlines c:\joytray\joytray.exe -servo [input];c:\myprog\runme.exe
Hope that helps, I guess the naming vs meaning of the setting is not really clear.
-
I tried this:
pre_emulator_app_commandlines c:\joytray\joytray.exe -servo [input] {nowait}
The log shows that it ran:
c:\joytray\joytray.exe -servo joy {flags=178}
Note that it simply says joy and not joy4way nor joy8way.
I checked the output of my listxml, here's an example line:
<game name="puckman" sourcefile="pacman.c">
<description>Puck Man (Japan set 1)</description>
<year>1980</year>
<manufacturer>Namco</manufacturer>
<rom name="pm1_prg1.6e" size="2048" crc="f36e88ab" sha1="813cecf44bf5464b1aed64b36f5047e4c79ba176" region="maincpu" offset="0"/>
<rom name="pm1_prg2.6k" size="2048" crc="618bd9b3" sha1="b9ca52b63a49ddece768378d331deebbe34fe177" region="maincpu" offset="800"/>
<rom name="pm1_prg3.6f" size="2048" crc="7d177853" sha1="9b5ddaaa8b564654f97af193dbcc29f81f230a25" region="maincpu" offset="1000"/>
<rom name="pm1_prg4.6m" size="2048" crc="d3e8914c" sha1="c2f00e1773c6864435f29c8b7f44f2ef85d227d3" region="maincpu" offset="1800"/>
<rom name="pm1_prg5.6h" size="2048" crc="6bf4f625" sha1="afe72fdfec66c145b53ed865f98734686b26e921" region="maincpu" offset="2000"/>
<rom name="pm1_prg6.6n" size="2048" crc="a948ce83" sha1="08759833f7e0690b2ccae573c929e2a48e5bde7f" region="maincpu" offset="2800"/>
<rom name="pm1_prg7.6j" size="2048" crc="b6289b26" sha1="d249fa9cdde774d5fee7258147cd25fa3f4dc2b3" region="maincpu" offset="3000"/>
<rom name="pm1_prg8.6p" size="2048" crc="17a88c13" sha1="eb462de79f49b7aa8adb0cc6d31535b10550c0ce" region="maincpu" offset="3800"/>
<rom name="pm1_chg1.5e" size="2048" crc="2066a0b7" sha1="6d4ccc27d6be185589e08aa9f18702b679e49a4a" region="gfx1" offset="0"/>
<rom name="pm1_chg2.5h" size="2048" crc="3591b89d" sha1="79bb456be6c39c1ccd7d077fbe181523131fb300" region="gfx1" offset="800"/>
<rom name="pm1_chg3.5f" size="2048" crc="9e39323a" sha1="be933e691df4dbe7d12123913c3b7b7b585b7a35" region="gfx1" offset="1000"/>
<rom name="pm1_chg4.5j" size="2048" crc="1b1d9096" sha1="53771c573051db43e7185b1d188533056290a620" region="gfx1" offset="1800"/>
<rom name="pm1-1.7f" size="32" crc="2fc650bd" sha1="8d0268dee78e47c712202b0ec4f1f51109b1f2a5" region="proms" offset="0"/>
<rom name="pm1-4.4a" size="256" crc="3eb3a8e4" sha1="19097b5f60d1030f8b82d9f1d3a241f93e5c75d6" region="proms" offset="20"/>
<rom name="pm1-3.1m" size="256" crc="a9cc86bf" sha1="bbcec0570aeceb582ff8238a4bc8546a23430081" region="namco" offset="0"/>
<rom name="pm1-2.3m" size="256" crc="77245b66" sha1="0c4d0bee858b97632411c440bea6948a74759746" region="namco" offset="100"/>
<chip type="cpu" tag="maincpu" name="Z80" clock="3072000"/>
<chip type="audio" tag="mono" name="Speaker"/>
<chip type="audio" tag="namco" name="Namco" clock="96000"/>
<display tag="screen" type="raster" rotate="90" width="288" height="224" refresh="60.606061" pixclock="6144000" htotal="384" hbend="0" hbstart="288" vtotal="264" vbend="0" vbstart="224" />
<sound channels="1"/>
<input players="2" coins="2">
<control type="joy" ways="4"/>
</input>
<dipswitch name="Rack Test (Cheat)" tag="Rack Test (Cheat)" mask="16">
<dipvalue name="Off" value="16" default="yes"/>
<dipvalue name="On" value="0"/>
</dipswitch>
<dipswitch name="Service Mode" tag="Service Mode" mask="16">
<dipvalue name="Off" value="16" default="yes"/>
<dipvalue name="On" value="0"/>
</dipswitch>
<dipswitch name="Cabinet" tag="Cabinet" mask="128">
<dipvalue name="Upright" value="128" default="yes"/>
<dipvalue name="Cocktail" value="0"/>
</dipswitch>
<dipswitch name="Coinage" tag="Coinage" mask="3">
<dipvalue name="2 Coins/1 Credit" value="3"/>
<dipvalue name="1 Coin/1 Credit" value="1" default="yes"/>
<dipvalue name="1 Coin/2 Credits" value="2"/>
<dipvalue name="Free Play" value="0"/>
</dipswitch>
<dipswitch name="Lives" tag="Lives" mask="12">
<dipvalue name="1" value="0"/>
<dipvalue name="2" value="4"/>
<dipvalue name="3" value="8" default="yes"/>
<dipvalue name="5" value="12"/>
</dipswitch>
<dipswitch name="Bonus Life" tag="Bonus Life" mask="48">
<dipvalue name="10000" value="0" default="yes"/>
<dipvalue name="15000" value="16"/>
<dipvalue name="20000" value="32"/>
<dipvalue name="None" value="48"/>
</dipswitch>
<dipswitch name="Difficulty" tag="Difficulty" mask="64">
<dipvalue name="Normal" value="64" default="yes"/>
<dipvalue name="Hard" value="0"/>
</dipswitch>
<dipswitch name="Ghost Names" tag="Ghost Names" mask="128">
<dipvalue name="Normal" value="128" default="yes"/>
<dipvalue name="Alternate" value="0"/>
</dipswitch>
<driver status="good" emulation="good" color="good" sound="good" graphic="good" savestate="supported" palettesize="512"/>
</game>
Here's the input lines from a random Street Fighter game:
<input players="2" buttons="6" coins="2">
<control type="joy" ways="8"/>
</input>
Thanks,
Joseph Elwell.
-
The log shows that it ran:
c:\joytray\joytray.exe -servo joy {flags=178}
Note that it simply says joy and not joy4way nor joy8way.
Oh god...so they changed the format of the xml output again. Sorry, I am still using Mame v0.99...
Realistically I am not going to be able to do anything about that in Mamewah at the moment. I do have some other stuff I plan to do in the code as well, but probably over the winter.
Probably the easiest thing to do would be to use LED Blinky if that worked...I didn't realise it could do joystick mapping etc but I am a bit out of touch!
-
The log shows that it ran:
c:\joytray\joytray.exe -servo joy {flags=178}
Note that it simply says joy and not joy4way nor joy8way.
Oh god...so they changed the format of the xml output again. Sorry, I am still using Mame v0.99...
Not a problem! Thanks for all your work Minwah. If I get the time I'll look at your source and fix it myself, but that doesn't seem likely anytime soon.
Joseph Elwell.