Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
05479 Interface Minor Always Mar 18, 2014, 10:46 Apr 7, 2014, 21:48
Tester ozfalcon View Status Public Platform SDLMAME
Assigned To hap Resolution Fixed OS Linux
Status [?] Resolved Driver xybots.cpp
Version 0.152 Fixed in Version 0.153 Build Normal
Fixed in Git Commit Github Pull Request #
Summary 05479: xybots: Unable to map twist left / twist right controls
Description The Twist Left/Right for both players appear to be hard coded and Mame CTRLR file fails to override hard coded defaults.

Bugs similar include:
"05414"
Steps To Reproduce Assign custom controls via Mame CTRLR file.
Play game, Controls are not overridden.
Additional Information Mame CTRLR file extract:

<?xml version="1.0"?>
<mameconfig version="10">
<system name="xybots">
        <input>
            <port tag=":FFE100" type="P2_BUTTON3" mask="4" defvalue="4">
                <newseq type="standard">
                    KEYCODE_Q OR JOYCODE_2_BUTTON7
                </newseq>
            </port>
            <port tag=":FFE100" type="P2_BUTTON2" mask="8" defvalue="8">
                <newseq type="standard">
                    KEYCODE_S OR JOYCODE_2_BUTTON6
                </newseq>
            </port>
            <port tag=":FFE100" type="P1_BUTTON3" mask="1024" defvalue="1024">
                <newseq type="standard">
                    KEYCODE_SPACE OR JOYCODE_1_BUTTON7
                </newseq>
            </port>
            <port tag=":FFE100" type="P1_BUTTON2" mask="2048" defvalue="2048">
                <newseq type="standard">
                    KEYCODE_LALT OR JOYCODE_1_BUTTON6
                </newseq>
            </port>
            <port tag=":JSAI" type="COIN2" mask="1" defvalue="0">
                <newseq type="standard">
                    KEYCODE_5 OR KEYCODE_6 OR JOYCODE_1_BUTTON10 OR JOYCODE_2_BUTTON10
                </newseq>
            </port>
            <port tag=":JSAI" type="COIN1" mask="2" defvalue="0">
                <newseq type="standard">
                    KEYCODE_5 OR KEYCODE_6 OR JOYCODE_1_BUTTON10 OR JOYCODE_2_BUTTON10
                </newseq>
            </port>
        </input>
</system>
</mameconfig>
Github Commit
Flags
Regression Version
Affected Sets / Systems xybots
Attached Files
 
Relationships
related to 05414ResolvedOsso  dotron: Unable to map dial increment/decrement controls 
Notes
9
User avatar
No.10525
ozfalcon
Tester
Apr 4, 2014, 10:22
Extra Input:
Both player buttons #2 and #3 can not be overridden by the Mame CTRLR file.

The Mame controller file included in the Additional information shows Xybots player 1 twist left/right being assigned to Left-Alt and Space.
While player 2 twist left/right being assigned to Q and S.

However when you run Xybots, The twist left/right are the original defaults of Z,X for player 1 and Q,W for player 2
Mame fails to use the custom controller assignments.
User avatar
No.10526
Haze
Senior Tester
Apr 4, 2014, 10:54
I believe when a key is specifically named in the input structures then the CTRLR overrides don't change that.

keys are often named in the input structures to make operation with a keyboard easier (avoid keys clashing, or provide more sensible mappings than you'd get otherwise)

unfortunately some drivers have been 'fixed' by removing these mapping but that makes using them for regular users more difficult.

either it's "not a bug" but as designed (even if you don't like the behaviour) or the CTRLR overrides should override keys anyway in these situations, which of these it is I'm not sure.
User avatar
No.10532
ozfalcon
Tester
Apr 5, 2014, 22:06
I believe when a key is specifically named in the input structures then the CTRLR overrides don't change that.
Oversight in implementation (Key named input) that causes failure of operations (The CTRLR file) is still a bug.

keys are often named in the input structures to make operation with a keyboard easier
This is certainly not the case here for Xybots. I can't imagine a concurrent two play game of Xybots with player
one using "Z" & "X" while player two uses "Q" & "W" for the twist controls. Unless you like rubbing up your co-player.

unfortunately some drivers have been 'fixed' by removing these mapping but that makes using them for regular users more difficult.
It's a somewhat absurd notion that arcade games that used joysticks should take a back seat in preference to a ill thought out keyboard layout.
ie. Any other devices that provide a more realistic interface eg. I-Pac, Keywiz or an actual Joystick are not only not considered, But locked out
by this hard coded key assignment. Especially joysticks which are removed from individual game configs if they are not present.

the CTRLR overrides should override keys anyway in these situations
This is which it is.
User avatar
No.10533
ozfalcon
Tester
Apr 5, 2014, 23:54
edited on: Apr 6, 2014, 02:30
TH1
Why was this hard coded key mapping implemented?

The reason for this is due to Mames physical mapping of buttons 1,2,3 to the corresponding a,s,q keys.
Which leads to buttons 2 & 3 (s & q) not being next to each other for the twist left/right controls.

So generic assignments for button two & three have been hard coded to buttons three & four for Xybots.
This is a band aid fix of "Convenience" for the not so great layout of the keyboard assignments.

The ramifications of this approach mean that rather than fixing the ONE underlying problem, Multiple
games require this band aid fix of "Convenience" instead.

This may not be so bad initially, But what happens if some day the default keyboard layout IS changed?
Who is going to go through all the games and correct the hard coded assignments?
And just how many are there already? As far as I am aware - No one keeps a track of these.

I hope the people that advocate this approach are also willing to pour over every game to find these
unaccounted for hard coded key assignments in the event that default keyboard assignments change.
User avatar
No.10534
ozfalcon
Tester
Apr 5, 2014, 23:54
edited on: Apr 6, 2014, 05:02
TH2
What if this situation was reversed?
Lets say the keys for Xybots were not hard coded.

If I made the request to hard code the buttons to something else that is more convenient to me,
At the expense of breaking:
1.CTRLR file overrides.
2.I-Pac & KeyWiz standard key layouts (Which follow standard Mame key layouts).
3.Any USB or other type of plugin joysticks.

I would be told (And rightly so) that I should override the controls to my preference in the Game or CTRLR config files.
User avatar
No.10537
ozfalcon
Tester
Apr 6, 2014, 05:25
TH3
The fix is worse than the problem!

Given two scenarios, We can see the hard coding causes more problems than the alternate situation.

1) When the keys are standard defaults, If the user is unhappy about the assignments they can override at their will.
They can assign the keys to their liking and even permanently map joysticks to their control via the CTRLR file.

2) When the keys are hard coded, If the user is unhappy about the assignments - They are at a loss because
you can't override the assignments at all via the CTRLR file. This becomes a real problem when usb joysticks
are used. As the only way to make usb joysticks permanent is to include them in the CTRLR file.
User avatar
No.10542
NekoEd
Senior Tester
Apr 6, 2014, 20:07
Agreed. Nothing should be hardcoded in this manner for any reason. It's a hack, and we don't do hacks in MAME/MESS.
User avatar
No.10545
Haze
Senior Tester
Apr 7, 2014, 19:25
It's not 'hardcoded' because it can be changed from the menu, it's simply specifying a manual, sensible default. It is not a hack either. Our PRIMARY audience is devs testing with keyboards, so things that make that scenario easier are good.

It's been changed now anyway, but I strongly disagree with the change made.
User avatar
No.10546
hap
Developer
Apr 7, 2014, 21:48
edited on: Apr 7, 2014, 22:05
(don't overuse your catchphrase "I strongly disagree", it'll get weak:P)

Indeed it was not a hack, but in this case it was totally unnecessary. Besides, ALT and Space are as convenient as Z and X.

*edit* on the other hand, the dotron PORT_CODE on inc/dec was fine IMO. Right now, it overlaps with P1 left/right.
The CTRLR no-override problem is a core issue.