Build Your Own Arcade Controls Forum

Main => Software Forum => Topic started by: screaming on July 06, 2004, 01:38:04 pm

Title: P1B1/P1B2 keycode remapping
Post by: screaming on July 06, 2004, 01:38:04 pm
Hey all,

  Has anyone out there with a 4 player control panel spent the time to figure out which keys P1B1 and P1B2 should be remapped to in order to avoid any Windows oddities with the Control or Alt key?  If so, what did you come up with?

-Steve
Title: Re:P1B1/P1B2 keycode remapping
Post by: ErikRuud on July 06, 2004, 02:07:13 pm
It really doesn't matter which keys you use, as long as you do not duplicate key mappings.

I am using V,C and X for Buttons 1,2 & 3.
Title: Re:P1B1/P1B2 keycode remapping
Post by: screaming on July 06, 2004, 03:35:55 pm
It really doesn't matter which keys you use, as long as you do not duplicate key mappings.

  I guess my confusion with this statement comes from after looking at this (http://www.ultimarc.com/ipac2.html) page about the IPAC/4 (which is what I have) key mappings.   P2B8 is mapped to 'L', but so is P3R!  I still haven't tested it, but wouldn't that mean if I pressed P2B8, it would cause the same effect as moving P3 joystick to the right?  Or since the IPAC/4 is really 2 IPAC/2's, does MAME treat the two modules on the IPAC/4 as two separate keyboards and know the difference?

  Anybody know?

-Steve



Title: Re:P1B1/P1B2 keycode remapping
Post by: Tiger-Heli on July 06, 2004, 04:58:45 pm
I guess my confusion with this statement comes from after looking at this (http://www.ultimarc.com/ipac2.html) page about the IPAC/4 (which is what I have) key mappings.   P2B8 is mapped to 'L', but so is P3R!  I still haven't tested it, but wouldn't that mean if I pressed P2B8, it would cause the same effect as moving P3 joystick to the right?
Yes it will . . .
Quote
Or since the IPAC/4 is really 2 IPAC/2's, does MAME treat the two modules on the IPAC/4 as two separate keyboards and know the difference?
No, MAME wouldn't know the difference even if you used two USB keyboards.

I thought you were concerned about issues with L-ctrl and L-alt, which I don't think cause problems with MAME.

NOTE: The conflict you mention would not affect gameplay, as there are no 3 or 4 player games with more than 4 butttons, so having buttons 5 thru 8 conflict is only a problem in that someone mashing those buttons could mess up player 3.
Title: Re:P1B1/P1B2 keycode remapping
Post by: ErikRuud on July 07, 2004, 08:55:06 am
l-control and l-alt do not cause problems with MAME.  They can cause other problems.

Not to long ago, I was playing Armored Warriors with my 11 year old adopted brother. All of a sudden the screen went black and came back upside down! I exited all the way to windows and it was upside down as well.

It turned out that my ATI video card driver has hot keys for scren rotation.  Ctl-Alt-R was defined as "Toggle 180".  In a default MAME stup this is P1b1, P1B2, P2UP.

I decided that it was easier to remap the keys in MAME so that the Shift, Ctl and Alt keys are not used, rather than trying find and disable all the hot key definitions that may exist on my MAME PC.

Title: Re:P1B1/P1B2 keycode remapping
Post by: screaming on July 07, 2004, 09:11:53 am
I thought you were concerned about issues with L-ctrl and L-alt

  I am.

which I don't think cause problems with MAME.

  They don't - They cause problems with Windows.

  I'll go ahead and remap them to 'O' and 'M' (default inputs P3B4 and P4B4 on the IPAC/4) since they're not used in any MAME games (right?).

-Steve

Title: Re:P1B1/P1B2 keycode remapping
Post by: Tiger-Heli on July 07, 2004, 09:15:56 am
 I'll go ahead and remap them to 'O' and 'M' (default inputs P3B4 and P4B4 on the IPAC/4) since they're not used in any MAME games (right?).
The Dungeons and Dragons series games are 4-player, 4-button.  Better to pick keys that are not used anywhere else on the I-PAC/4 -

Comma, period, quote, something like that.
Title: Re:P1B1/P1B2 keycode remapping
Post by: screaming on July 07, 2004, 11:42:54 am
 I'll go ahead and remap them to 'O' and 'M' (default inputs P3B4 and P4B4 on the IPAC/4) since they're not used in any MAME games (right?).
The Dungeons and Dragons series games are 4-player, 4-button.  Better to pick keys that are not used anywhere else on the I-PAC/4 -

Comma, period, quote, something like that.

  Good call. Thanks for the heads-up!

-Steve
Title: Re:P1B1/P1B2 keycode remapping
Post by: Howard_Casto on July 07, 2004, 03:07:44 pm
left ctrl won't bother anything, so leave it as-is

"v"  is a good key to replace alt with and afaik it doesn't interfere with other inputs.
Title: Re:P1B1/P1B2 keycode remapping
Post by: screaming on July 07, 2004, 03:15:45 pm
left ctrl won't bother anything, so leave it as-is

  Actually Control (P1B1)-Enter (P3B3) screwed me up a couple times when it caused MAME to go into "windowed mode".

"v"  is a good key to replace alt with and afaik it doesn't interfere with other inputs.

  FYI, V is already used twice in the IPAC/4: P1B8 (which I'm not using) and P4L.

  Thanks for the input guys..

-Steve
Title: Re:P1B1/P1B2 keycode remapping
Post by: Tiger-Heli on July 08, 2004, 07:04:49 am
left ctrl won't bother anything, so leave it as-is
Actually Control (P1B1)-Enter (P3B3) screwed me up a couple times when it caused MAME to go into "windowed mode".
After reading this thread, I got concerned about my own key assignments, and decided to test some things out.

First off - If you are using a modern MAME build (post- 0.62 or so), I am pretty sure the Windows Ctrl and Alt combinations are handled/disabled by the C:\mame\ctlr\windows.ini file that ships with MAME.  Not sure how they do it, but it seems to work, and I trust the MAME devs to know what they are doing.

The Window Mode glitch that Screaming mentioned is a potential problem, but the default is Alt-Enter.  I didn't see a ctrlr.ini file option for this, but it was easy enough to go into Tab-Inputs all games and set the last entry "Windowed Mode" or some such to None.  Easier than re-mapping all my MAME games to avoid Left Alt, although that would be pretty simple as well.

I use an ATI vid card, and in the driver, I found that I had not set a hotkey for screen rotation.

Most hot-keys should only work with the associated program active, but it's a valid point that you should disable them for drivers and programs that TSR (Terminate and Stay Resident) (the systray stuff).

In summary, I found no reason to stray from the defaults.
Title: Re:P1B1/P1B2 keycode remapping
Post by: ErikRuud on July 08, 2004, 09:20:57 am
I have seen a few others mention that they had HotKey problems as well.

I never set a hot key for the ATI stuff either.  It was set by default the last time Iupgraded the driver.  Most of the rotation hotkeys were set to "None", but for some reason "Toggle 180" was set.

I am running NoNameMAME 0.79 under Win2K Pro.

I will give regular MAME 0.84 a try and see what happens.
Title: Re:P1B1/P1B2 keycode remapping
Post by: SirPoonga on July 08, 2004, 11:05:34 am
Copy and paste this into a fresh browser.
My key config.
http://free.hostdepartment.com/S/SirPoonga/keys.htm
Title: Re:P1B1/P1B2 keycode remapping
Post by: screaming on July 13, 2004, 09:14:40 am
Copy and paste this into a fresh browser.
My key config.
http://free.hostdepartment.com/S/SirPoonga/keys.htm

  Thanks for the inspiration!  I saw this and figured I'd throw my configuration into a spreadsheet and see how it would help me.

  Once I was done, I was able to better see which keys were being used and what they were being used for.. I ended up remapping my buttons with the IPAC config utility like this:

P1_BUTTON1 KEYCODE_COMMA
P1_BUTTON2 KEYCODE_STOP (that's a period ".")

P3_BUTTON1 KEYCODE_QUOTE
P3_BUTTON5 KEYCODE_SLASH
P3_BUTTON6 KEYCODE_EQUALS

P4_BUTTON5 KEYCODE_OPENBRACE
P4_BUTTON6 KEYCODE_CLOSEBRACE

Thanks for all the info guys...

-Steve