Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
06470 DIP/Input Minor Always Jan 14, 2017, 08:11 Feb 21, 2017, 23:57
Tester ozfalcon View Status Public Platform SDLMAME
Assigned To Resolution Fixed OS Linux (32-bit)
Status [?] Resolved Driver qix.cpp
Version 0.181 Fixed in Version 0.183 Build Normal
Summary 06470: qix: Unable to map service buttons with ctrlr.cfg
Description Mame controller file fails to override default values for service buttons with Qix.

Default service buttons:
Test Next Line (F2)
Test Advance (F1)
Test Slew Down (F6)
Test Slew Up (F5)
Steps To Reproduce Assign custom controls via Mame CTRLR file.
Load ROM, Observe controls are not overridden.
Additional Information Use ctrlr.cfg to set service buttons to new assignments.

ctrlr.cfg
<?xml version="1.0"?>
<mameconfig version="10">
<system name="qix">
        <input>
            <port tag=":COIN" type="SERVICE" mask="1" defvalue="1">
                <newseq type="standard">
                    KEYCODE_9
                </newseq>
            </port>
            <port tag=":COIN" type="SERVICE" mask="2" defvalue="2">
                <newseq type="standard">
                    KEYCODE_0
                </newseq>
            </port>
            <port tag=":COIN" type="SERVICE" mask="4" defvalue="4">
                <newseq type="standard">
                    KEYCODE_EQUALS
                </newseq>
            </port>
            <port tag=":COIN" type="SERVICE" mask="8" defvalue="8">
                <newseq type="standard">
                    KEYCODE_MINUS
                </newseq>
            </port>
        </input>
</system>
</mameconfig>
Flags
Regression Version
Affected Sets / Systems qix
Attached Files
 
Relationships
There are no relationsihp linked to this issue.
Notes
5
User avatar
No.13539
Tafoid
Administrator
Jan 16, 2017, 10:19
I'm not certain that using ctrlr files in this nature is expected behavior.
to my knowledge, CTRLR files are specific mappings for "Input (general)" key bindings. Anything unique to a driver cannot be handled globally and therefore needs to stay in a .cfg file in the CFG folder.
User avatar
No.13541
ozfalcon
Tester
Jan 18, 2017, 00:33
edited on: Jan 21, 2017, 16:35
I understand what you are saying, What would be ideal is a game.CTRLR file loaded in a similar fashion to the .cfg file (ie. New feature).

Given that we don't have such a feature (yet), It would at least be useful to change the current assignments (which have conflict with some UI functions)
to the alternate service buttons 9, 0, minus, equals (which do not conflict with any other assignments).

A typical practical example of why assigning to the "Service#" buttons would be better is a Home Arcade cabinet "Operator Control Panel" used to adjust game configuration (without the need of a keyboard).

Extra Note:
Unfortunately using the CTRLR file is the only way I know of locking down changes to the default keycode assignments.
Keeping assignments in game.cfg leaves them vulnerable due to the read/write nature of game.cfg files.

User avatar
No.13547
B2K24
Moderator
Jan 22, 2017, 20:36
Requesting feedback on this one.
User avatar
No.13556
ozfalcon
Tester
Jan 24, 2017, 14:18
edited on: Jan 26, 2017, 21:32
It appears that each service switch is assigned to the IPT_SERVICE while then overriding with the port code.
Old Code:
/src/mame/drivers/qix.cpp
#define COIN_PORT \
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test Advance") PORT_CODE(KEYCODE_F1) \
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test Next line") PORT_CODE(KEYCODE_F2) \
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test Slew Up") PORT_CODE(KEYCODE_F5) \
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test Slew Down") PORT_CODE(KEYCODE_F6) \
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) \
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) \
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN3 ) \
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_TILT )

A better approach would be to assign each service switch to IPT_SERVICE1,2,3,4 and leave the keycodes to the current "General" assignment.
(Overrides will still function as normal in game.cfg & ctrlr.cfg files)
New Code:
/src/mame/drivers/qix.cpp
#define COIN_PORT \
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Test Advance") \
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Test Next line") \
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("Test Slew Up") \
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_SERVICE4 ) PORT_NAME("Test Slew Down") \
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) \
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) \
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN3 ) \
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_TILT )

User avatar
No.13575
ozfalcon
Tester
Jan 31, 2017, 11:27
edited on: Feb 1, 2017, 12:09
Pull request created
https://github.com/mamedev/mame/pull/2031

Related to 06489