Build Your Own Arcade Controls Forum
Main => Software Forum => Topic started by: Indyplumber on July 12, 2011, 02:43:46 pm
-
Being happy to have CP Wizard figured out and working great I decided to setup custom configs for my Mame games.
I was using Romlister to create list of different control configs then using cfg magician to create them.
I noticed that asteroids did not appear in my list of button only games. Weird?
I checked Controls.xml to find that asteroids was listed as a Joy2way game. This isn't correct and it messed up my CP Wizard display.
I configured Asteroids and Asteroids Deluxe to use a 5 button setup per my control panel.
This works fine but the way that Controls.xml is setup, CP Wizard displays my controls incorrectly.
I edited Controls.xml with the following for those two games and it seemed to fix it with one exception. CPWiz shows the correct controls, but duplicates them with various buttons on the 2 player side of my CP.
I changed the Numplayers to 1 in Controls xml and that cleaned it up, but it causes CPWiz to blank out P2 Coin and P2 Start. ???
<game romname="asteroid" gamename="Asteroids (rev 4)" numPlayers="1" alternating="1" mirrored="1" usesService="0" tilt="1" cocktail="0">
<miscDetails>
</miscDetails>
<player number="1" numButtons="5">
<controls>
<control name="Just Buttons">
<constant name="button"/>
</control>
</controls>
<labels>
<label name="P1_BUTTON3" value="FIRE"/>
<label name="P1_BUTTON4" value="THRUST"/>
<label name="P1_BUTTON5" value="HYPER SPACE"/>
<label name="P1_BUTTON1" value="Rotate Left"/>
<label name="P1_BUTTON2" value="Rotate Right"/>
</labels>
</player>
</game>
<game romname="astdelux" gamename="Asteroids Deluxe (rev 3)" numPlayers="1" alternating="1" mirrored="1" usesService="0" tilt="1" cocktail="0">
<miscDetails>
</miscDetails>
<player number="1" numButtons="5">
<controls>
<control name="Just Buttons">
<constant name="button"/>
</control>
</controls>
<labels>
<label name="P1_BUTTON3" value="FIRE"/>
<label name="P1_BUTTON4" value="THRUST"/>
<label name="P1_BUTTON5" value="HYPER SPACE"/>
<label name="P1_BUTTON1" value="Rotate Left"/>
<label name="P1_BUTTON2" value="Rotate Right"/>
</labels>
</player>
</game>
-
Update:
I found a work around for this.
Step #1 is the changing of the Controls.xml stated above.
Step #2 is to make you asteroids and asteroids deluxe cfg files similar to this:
<?xml version="1.0"?>
<!-- This file is autogenerated; comments and unknown tags will be stripped -->
<mameconfig version="10">
<system name="asteroid">
<input>
<port tag="IN0" type="P1_BUTTON5" mask="8" defvalue="0">
<newseq type="standard">
KEYCODE_C
</newseq>
</port>
<port tag="IN0" type="P1_BUTTON3" mask="16" defvalue="0">
<newseq type="standard">
MOUSECODE_1_BUTTON2
</newseq>
</port>
<port tag="IN1" type="P1_BUTTON4" mask="32" defvalue="0">
<newseq type="standard">
KEYCODE_N
</newseq>
</port>
<port tag="IN1" type="P1_BUTTON2" mask="64" defvalue="0">
<newseq type="standard">
MOUSECODE_1_BUTTON1
</newseq>
</port>
<port tag="IN1" type="P1_BUTTON1" mask="128" defvalue="0">
<newseq type="standard">
KEYCODE_O
</newseq>
</port>
<port tag="IN0" type="P2_BUTTON5" mask="8" defvalue="0">
<newseq type="standard">
KEYCODE_C
</newseq>
</port>
<port tag="IN0" type="P2_BUTTON3" mask="16" defvalue="0">
<newseq type="standard">
MOUSECODE_1_BUTTON2
</newseq>
</port>
<port tag="IN1" type="P2_BUTTON4" mask="32" defvalue="0">
<newseq type="standard">
KEYCODE_N
</newseq>
</port>
<port tag="IN1" type="P2_BUTTON2" mask="64" defvalue="0">
<newseq type="standard">
MOUSECODE_1_BUTTON1
</newseq>
</port>
<port tag="IN1" type="P2_BUTTON1" mask="128" defvalue="0">
<newseq type="standard">
KEYCODE_O
</newseq>
</port>
</input>
</system>
</mameconfig>
Mame will create them when you put your custom controls in, however they will only show P1_BUTTON1, ETC. You need to duplicate them and then change the second set of P1_BUTTON1 TO P2_BUTTON1 ETC.
You will then save the cfg files and then change them to read only status. Otherwise Mame will change them back. Now CP Wizard correctly shows a 5 button layout for Asteroids and labeled correctly.
-
[rant]
UGH!!!!
I don't mean to get angry, but this is exactly why, controls.dat never gets updated. You don't make your own personal tweak, you submit the changes!!!
Step #1. Go to controls.arcadecontrols.com (http://controls.arcadecontrols.com)
Step #2. If you don't have a login, make one.
Step #3. Click on Contribute, then Update a Game.
Step #4, Modify the existing submission and submit it.
Step #5, The next time the dat is updated the new entry will be there!
[/rant]
Ok griping aside.....
The asteroids entry was one of the very first we ever did. Back in the day mame had it hacked to use a 2-way joystick. Now it doesn't. So no it isn't incorrect, it's just incorrect NOW. ;)
I will fix this one myself later, but for future reference controls.dat is a user dependant project. The reason it hasn't had any significant updates in ages is because nobody's bothered to do any user-submissons.
Also your gripes regarding cp wizard are a bug and you need to let HK know about it. Notice the "alternating=1" flag in game section of the entry? That is there to tell viewers that although it's a two player game, there is only one set of controls. Headkaze artifically injects start and coin info (the dat doesn't bother with those buttons) so the correct amount of them showing has to do with something on his end as well. It should be easily fixed.
-
Also your gripes regarding cp wizard are a bug and you need to let HK know about it. Notice the "alternating=1" flag in game section of the entry? That is there to tell viewers that although it's a two player game, there is only one set of controls. Headkaze artifically injects start and coin info (the dat doesn't bother with those buttons) so the correct amount of them showing has to do with something on his end as well. It should be easily fixed.
Not a bug actually, this was by design. Originally I was taking alternating into account but someone told me that even when the game is alternating you can use the second joystick, so I left them hilighted. Is this incorrect? If so it's only one line of code to change it back.
The start and coin info is artificially added, as you say, and is based on Numplayers. If it is 1 it will only highlight the start and coin buttons for player 1, if it is 2 it will highlight them for player 1 and 2, and so on.
-
I don't mean to get angry, but this is exactly why, controls.dat never gets updated. You don't make your own personal tweak, you submit the changes!!!
Sorry to get you in a wad. I'm still learning this stuff! And I'm not saying it's a bug with CPWizard. It clearly isn't. It is misinformation in the Control.xml file.
Just supply me the link like you did and tell me that's the route to go. :) But take a chill pill dude. We all had to learn how to do this sometime. :cheers:
-
Not a bug actually, this was by design. Originally I was taking alternating into account but someone told me that even when the game is alternating you can use the second joystick, so I left them hilighted. Is this incorrect? If so it's only one line of code to change it back.
Well this is right AND wrong. Some games allow that, but they aren't supposed to. ;) It's that way because of the cocktail option in mame. Even though player 2's inputs are usually shared, even on a real cocktail, mame adds a second joystick. Sometimes due to bugs you can use the second joystick, but you aren't supposed to be able to unless the cocktail dipswitch is turned on. It only happens on games with a real cocktail dipswitch and like I said, it's not supposed to happen then unless the dip is set. ;)
I think this was changed because of the ability to "fake" cocktail mode on any game now, but I'm not sure.
**UPDATE** I just confirmed that this is still not the case, even in the latest version of mame. Alternating play turns off player 2's controls unless the cocktail dip is on.
Anyway, because we want to show only the minimum required controls, I read the alternating flag and disable second player's labels accordingly. I think j5 has a cocktail option that ignores the flag, which makes the most sense because either you are going to have a cocktail cabinet or not and how you want things displayed is going to depend on that.
Regardless, I don't know all of cpwizard's functions, but I doubt you are able to rotate the text on only half of the layout so a cocktail mode isn't going to be particularly useful anyway.