Mame keymap support (1 Viewer)

Keflon

Portal Member
April 30, 2004
8
0
Liverpool
Mame keymap support.

Hi everyone.
First off I hope this turns up in the right place (Support for MAME games), I'm kind of new to forums.

So, I'd like to know if I can configure the MP keymap to use the default MAME keys. This is because I have an arcade cabinet that maps joystick and buttons to keypresses in a Mame friendly way.

I've changed keymap.xml but there doesn't seem to be a way to make use of the SHIFT, CTRL or ALT keys in MP, which are three of the buttons used for player 1 by the cabinet. Entering scancodes for the keys doesn't work, nor does the keymap editor respond to these keys.

As an example, I would like to have MP use the left CTRL key for the 'select' action.

Thanks for reading!

Oh and while I'm here, respect to all involved in development. MP and the associated community is a thing of beauty. :)
 

waeberd

Portal Pro
August 16, 2004
314
1
Fribourg (CH)
Re: Mame keymap support.

Hi Keflon,

and thanks for the nice words!

Unfortunately, the "CTRL" key will not send a keystroke that is recognized in the keymap.xml, cause we're not using scancodes (as it seems).

For MAME, are you using a keyboard-simulating arcade-stick?
Or a DirectInput device?

Thanks,

Daniel
 

Keflon

Portal Member
April 30, 2004
8
0
Liverpool
Hi Daniel, thanks for the response.

For input I'm using a J-PAC. It connects to the JAMMA connector in my cabinet and translates joystick actions to keypresses, so it's a keyboard simulator as you suggested. See http://www.ultimarc.com/jpac.html if you're interested and unfamiliar with the device as it also has some useful VGA functionality.

I can reprogram the keymap on the device to suit MediaPortal and likewise modify the Mame keymap, but before I do can you tell me if there's any reason why this functionality cannot be integrated into MP? If it is practical then I might take a look at the code myself and implement this as long as it won't adversely affect current or future plans for MP keyboard operation. Mame support 'out of the box' would be a good goal.

Time permitting of course; as a programmer I don't have much spare time which is another reason I have great respect for you guys. :)

K.
 

waeberd

Portal Pro
August 16, 2004
314
1
Fribourg (CH)
Hi Keflon,

Your JAMMA-project sounds sweet, you definitely know what you're talking about! :)

mPod has done a great job and coded a first version of a mame-compatible keyboard-mapper. I will test/tweak that one tonight with my X-Arcade stick and let you know as soon as it's working! Looking good!

Regards,

Daniel
 

waeberd

Portal Pro
August 16, 2004
314
1
Fribourg (CH)
Hello Keflon,

ok, we have integrated a first version of the MAME-Mapper into MediaPortal. To use it, you'll need a current CVS Version of MediaPortal.

Some quick info of how to use it:

* Start Configuration
* Click "Plugin" in the treeview
* Enable the "MAME Devices" entry and quit the config with OK

This will activate the default mapping I've done for MAME (I was using the X-Arcade stick which may use a slightly different configuration).

To tweak the configuration, you can:

* enter SETUP of the plugin
=> This will display the mapping screen where you can assign different actions to the buttons.

One word of caution:
* The default MP-keymapper is still running as well in the background, which means that cursor-keystrokes etc are handled there. In case the keymapping gets in your way, you'll need to remove the unneccessary entries from your keymap.xml.

This is still work in progress, but you should be able to get a minimal MP control with the default settings.

Hope that runs for you, would be nice to hear from the results :)

Regards,

Daniel
 

Keflon

Portal Member
April 30, 2004
8
0
Liverpool
Hi Daniel.

I've downloaded the CVS version and I must say I'm impressed! I had in mind something very simple like "this key maps to this other key" before MP gets the keystroke, and mPod has clearly a bigger vision than I had!

I see what you mean about the default keymapper also running in the background, since with the default setup, pressing [player 1 button three] initiates a pause, then MP (presumably) picks up the same keystroke ('button three' on the cabinet maps to 'space' on the keyboard) and immediately unpauses. Have I understood this behaviour correctly?

To get around this obviously I can edit keymap.xml to work in harmony with the Mame-Mapper. In fact that is what I intend to do as soon as I can prise my girlfriend away from the cabinet!

Maybe it would be good if the plugin could register the keystroke, and then optionally have the keystroke removed from the keyboard buffer before MP gets it? In fact, maybe the plugin can do this already so I'll have a play around with it a bit more before I make too many assumptions. :)

So to summarise, I'm going to edit the MP keymap so that
1) There are no key collisions between MP and the plugin.
2) The player 2 buttons do something useful in MP. (Up, down, left and right map to r, f, d, g respectively and fire1, 2, 3 and 4 map to a, s, q, w respectively)

Is this the intended usage?

I'll keep you posted on my results. Thanks to you and to mPod for the great plugin!

Keflon.
 

mPod

Portal Pro
January 26, 2005
2,084
3
Berlin
Home Country
Germany Germany
Keflon said:
I see what you mean about the default keymapper also running in the background, since with the default setup, pressing [player 1 button three] initiates a pause, then MP (presumably) picks up the same keystroke ('button three' on the cabinet maps to 'space' on the keyboard) and immediately unpauses. Have I understood this behaviour correctly?
Yes, definately.

Keflon said:
Maybe it would be good if the plugin could register the keystroke, and then optionally have the keystroke removed from the keyboard buffer before MP gets it?
That's a part we're still working on. (It's not that piece of cake, as we cannot simply switch the old mapper off at this point, you (and what is more, every other user) wouldn't be able to navigate via simulated or real keystrokes any longer.)

Keflon said:
So to summarise, I'm going to edit the MP keymap so that
1) There are no key collisions between MP and the plugin.
2) The player 2 buttons do something useful in MP. (Up, down, left and right map to r, f, d, g respectively and fire1, 2, 3 and 4 map to a, s, q, w respectively)

Is this the intended usage?
For now it is, yes.

Keflon said:
I'll keep you posted on my results. Thanks to you and to mPod for the great plugin!
Well, thanks to you for your feedback! :wink:
 

Downzy

Portal Pro
January 5, 2005
55
0
Melbourne, Australia
Home Country
G'day,

Just wondering if there has been any work done on this feature since the last post (August 05). I'm in the process of setting MP up for a mame cabinet/jukebox/media player so I'll be making use of the mame devices plugin to control everything from the games controls.

Do I still need to make sure the the mame keys are not used in the MP key mapping?

Cheers,
Downzy
 

Users who are viewing this thread

Top Bottom