Software Support > controls.dat
control.ini for consoles?
arzoo:
Here's a sample of the schema that LEDBlinky's Control Editor uses:
--- Code: --- <emulator emuname="MAME" emuDesc="">
<controlGroup groupName="teamqb" voice="John Elway's Team Quarterback" numPlayers="4" alternating="0">
<player number="0">
<control name="CONTROL_JOY8WAY" voice="8-way Joystick and Baseball Pitcher" color="" primaryControl="1"/>
</player>
<player number="1">
<control name="P1_BUTTON1" voice="Action" color=""/>
<control name="P1_JOYSTICK_UP" voice="Up" color=""/>
<control name="P1_JOYSTICK_DOWN" voice="Down" color=""/>
<control name="P1_JOYSTICK_LEFT" voice="Left" color=""/>
<control name="P1_JOYSTICK_RIGHT" voice="Right" color=""/>
<control name="P1_AD_STICK_X" voice="Aim Left" color=""/>
<control name="P1_AD_STICK_X_EXT" voice="Aim Right" color=""/>
<control name="P1_AD_STICK_Y" voice="Throw / Kick" color=""/>
<control name="P1_AD_STICK_Y_EXT" voice="Short / Long" color=""/>
</player>
<player number="2">
<control name="P2_BUTTON1" voice="Action" color=""/>
<control name="P2_JOYSTICK_UP" voice="Up" color=""/>
<control name="P2_JOYSTICK_DOWN" voice="Down" color=""/>
<control name="P2_JOYSTICK_LEFT" voice="Left" color=""/>
<control name="P2_JOYSTICK_RIGHT" voice="Right" color=""/>
</player>
<player number="3">
<control name="P3_BUTTON1" voice="Action" color=""/>
<control name="P3_JOYSTICK_UP" voice="Up" color=""/>
<control name="P3_JOYSTICK_DOWN" voice="Down" color=""/>
<control name="P3_JOYSTICK_LEFT" voice="Left" color=""/>
<control name="P3_JOYSTICK_RIGHT" voice="Right" color=""/>
<control name="P3_AD_STICK_X" voice="Aim Left" color=""/>
<control name="P3_AD_STICK_X_EXT" voice="Aim Right" color=""/>
<control name="P3_AD_STICK_Y" voice="Throw / Kick" color=""/>
<control name="P3_AD_STICK_Y_EXT" voice="Short / Long" color=""/>
</player>
<player number="4">
<control name="P4_BUTTON1" voice="Action" color=""/>
</player>
</controlGroup>
--- End code ---
tony.silveira:
yeah, i thought about leaving those lines out but figured i'd leaving them in, just in case one of you guys' apps needed those lines in there, even with no values. good to know i can just leave them out if not used.
as for button colors arzoo, i thought of that but it *may* be easier to do from ledblinky in your next rev.
we have a colors.ini for arcade because each arcade game/machine is unique. for consoles, the buttons are static and the colors are always the same.
would it be easy to add an option to add colors by platform, not rom, within blinky?
blinky would look at the console, light those specific colors that the user adds and then load the controls for the rom. my thinking is blinky would take user defined colors first, as in consoles, and if nothing is there, then it would parse a colors.ini, for mame.
at the end of the day, it's all about how easily you and kaze can incorporate other control files into your apps. the grunt work is what it is; grunt work. :)
arzoo:
Guess I never really thought about that - consoles don't have unique colors for each game. So yes, using the blinky controls editor you could add the input codes and colors for each emu to the default controls group. The rom specific control actions would load from your new emu_controls.ini (just like with mame) and you'd be good to go.
By the way, I shouldn't really speak for the other apps when it comes to what values are used. All I can say for sure is that blinky would not use tilt, cocktail, or usesService.
tony.silveira:
sweet! one of two devs signed up to some extent :)
kaze, any thoughts? i'm especially interested in your thoughts on my "cheat sheet" window idea for all the combos or maybe even showing a scan of the manual page. i really think that may be the easiest way to incorporate combos but it would mean more work for you and i don't want to assume that.
headkaze:
You certainly couldn't use a valid ini file format like the one you describe. You would have to have different section names instead. But there also has to be an ability to link controls to other controls (ie. For button combos). That is where ini files really fall down. I think most people would prefer to keep it as an xml file (Arzoo and myself designed a new LED animation format called .lwax for example and that was xml as opposed to the original .lwa ini format)
I actually like garwil's idea on having pages, but instead of calling them "pages", call them "ControlCategory" or something. I like Arzoo's type of format which is very similar to how I design my data files. In fact ControlsDat exports pretty much exactly like that but instead of "action" it has "value".
So I think we should go with an xml format (you can still type them out in a text editor) and have ControlCategory's. The first ControlCategory could always be called "Main" and have the standard controls for the game. The other ones can be viewed by pressing a button to rotate through them.
Eg.
--- Code: --- <ControlCategory Name="Menu Controls">
<Control Name="Control Pad Up or Down" Action="highlight menu item">P1_JOYSTICK_UP OR P1_JOYSTICK_DOWN</Control>
<Control Name="Control Pad Left or Right" Action="change highlighted item">P1_JOYSTICK_LEFT OR P1_JOYSTICK_RIGHT</Control>
<Control Name="A Button" Action="select/go to next screen">P1_BUTTON1</Control>
<Control Name="B Button" Action="cancel/return to previous screen">P1_BUTTON2</Control>
<Control Name="Control Pad (when arrows appear)" Action="scroll">P1_JOYSTICK_LEFT OR P1_JOYSTICK_RIGHT OR P1_JOYSTICK_UP OR P1_JOYSTICK_DOWN</Control>
<Control Name="C Left" Action="access help screen">P1_BUTTON3</Control>
</ControlCategory>
--- End code ---
Well not exactly like that as it does need some tweeking but it's just about there. And it's complex enough to describe button combos and uses a very similar style to MAME where you can say buttons are AND, OR, NOT. So to describe a button combo you can use.
--- Code: ---<Control Name="Z + A Button" Action="Backward Somersault">P1_BUTTON1 AND P1_BUTTON7</Control>
--- End code ---
Earlier in the file you can assign what buttons mean what
Eg
--- Code: ---P1_JOYSTICK_LEFT=Pad Left
P1_JOYSTICK_RIGHT=Pad Right
P1_JOYSTICK_UP=Pad Up
P1_JOYSTICK_DOWN=Pad Down
P1_BUTTON1=Button A
P1_BUTTON2=Button B
P1_BUTTON3=Button C Left
P1_BUTTON4=Button C Right
P1_BUTTON5=Button C Up
P1_BUTTON6=Button C Down
P1_BUTTON7=Button Z
P1_BUTTON8=Button L
P1_BUTTON9=Button R
--- End code ---
And so on...
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version