Main > Software Forum

New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)

<< < (20/47) > >>

nick3092:
Thanks for looking into it.  I did just discover another nuance with keypads too.  So, normally each control has a unique "type" identifier for each player.  Like P1_BUTTON1 and P2_BUTTON1.  But for both player 1 and 2, the keypad is always just KEYPAD.  There is a "tag" though, that indicates if it's player 1's keypad or player 2, in addition to the previously mentioned "mask" that tells MESS what key it is.

So from my actual coleco.cfg file, you can see the tag ":SAC_KEYPAD1" differentiates it from "SAC_KEYPAD2"

--- Code: ---            <port tag=":SAC_KEYPAD1" type="KEYPAD" mask="2" defvalue="2">
                <newseq type="standard">
                    JOYCODE_1_BUTTON9
                </newseq>
            </port>

            <port tag=":SAC_KEYPAD2" type="KEYPAD" mask="1" defvalue="1">
                <newseq type="standard">
                    JOYCODE_2_BUTTON19
                </newseq>
            </port>

--- End code ---

But ControllerRemap is also ignoring this "tag" and also lumping all of player 1 and player 2 under the same "keypad" with tag of :SAC_KEYPAD1":

--- Code: ---      <port type="KEYPAD" tag=":SAC_KEYPAD1" mask="1" defvalue="1">
        <newseq type="standard">
                    JOYCODE_1_BUTTON19
                 OR
...
                 OR
                    JOYCODE_1_BUTTON20
                 OR
                    JOYCODE_1_BUTTON18
                 OR
                    JOYCODE_2_BUTTON19
                 OR
                    JOYCODE_2_BUTTON9
                 OR
...

--- End code ---

So it looks like for "keypad" type entries, you have to group by both the "tag" and "mask" values.  Sorry I didn't see that yesterday.  I was just testing with one joystick yesterday, and today was adding the player 2 controls.

Edit: To confirm, I have only confirmed this on Coleco and Intv.  The only other console off the top of my head that used a keypad was Jaguar.

drventure:
So, just to clarify, you have a config file that might have a number of entries like this

 <port tag=":SAC_KEYPAD1" type="KEYPAD" mask="2" defvalue="2">

differing by the TAG (the number at the end) and the MASK (just the value)

Within each, you might have any number of actual NEWSEQ entries that define the buttons themselves.

Is that about right?

nick3092:
I have only seen 1 NEWSEQ per PORT.   But yes, the tag seems to indicate which keypad it belongs to, (player 1 or 2).  Along with the description of said pad.  Iin the case of coleco, Super Action Pad (:SAC_KEYPAD1), or Regular Pad (:STD_KEYPAD2) - even though they are functionally the same.  Intv just calls them :KEYPAD1 and :KEYPAD2.

And the Mask must identify which key on the keypad.  I don't see how else MESS is tracking say, '1' on the coleco keypad, vs. '#' when everything is just lumped under a type of KEYPAD.  I did notice non-keypad controls also have a mask as well.

Looking at the MESS source, it appears the "tag" matches the port name in the MESS source.

ie. PORT_START("SAC_KEYPAD1")

And the mask number matches the PORT_BIT.  Mask "8" in my cfg maps to the button I assigned to '3' on the coleco key pad.  Looking at the source you see:

PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("3 (SAC pad 1)")

And PORT_NAME is what you see in the OSD when manually mapping controls.  Probably not that useful to know in this case, but at least we know where those values come from.

drventure:
Could you post the CFG file in it's entirety.

Having a hard time understanding exactly how those parts fit together...

nick3092:
Sure.  Here you go.  This is a full mapping for 2 coleco super action joysticks, each with a keypad.  For reference, here is how the physical joystick buttons are mapped to the Coleco keypad:

Joystick - Coleco keypad

9 = 1
10 = 2
11 = 3
12 = 4
...
16 = 8
17 = 9
18 = *
19 = 0
20 = #

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version