|
-joystick_map issue
#312173 - 07/29/13 08:28 AM
|
|
|
I know -joystick_map works properly when using a USB joystick as I verified it with my USB XBOX controller. But does MAME recognize the joystick_map in the game's ini file if you're using keys and a keyboard controller?
I have created a keymap file for donkey kong where there are no dead zones and the perfect diagonals are sticky keys. But when I try to play donkey kong on my cabinet, the diagonals make Mario stop running.
For a test, I created a keymap to ONLY recognize/allow up and down and set that for galaga. When using my USB joystick, my ship doesn't move left or right - as expected. However, when I use the arrow keys on the keyboard, it moves just fine. This verifies that when using a keyboard/keyboard encoder that the keymap is ignored.
So I guess the question is, if you're using a keyboard is there any way to force it to recognize the joystic_map?
If it matters, I'm using .149u1 version of MAME.
-Mc
|
|
|
GatKong |
Tetris Mason
|
|
|
Reged: 04/20/07
|
Posts: 5908
|
Loc: Sector 9
|
|
Send PM
|
|
|
Re: -joystick_map issue/question
[Re: McHale]
#312177 - 07/29/13 03:58 PM
|
|
|
> I have created a keymap file for donkey kong where there are no dead zones and the > perfect diagonals are sticky keys. But when I try to play donkey kong on my cabinet, > the diagonals make Mario stop running.
This type question comes up regularly. DK was made for a 4-way joy. The game doesn't know what to do with diagonals as a result, so unpredictable things happen when you try.
Needs 4-way, simple as that.
|
|
|
|
Re: -joystick_map issue/question
[Re: GatKong]
#312178 - 07/29/13 04:18 PM
|
|
|
> > I have created a keymap file for donkey kong where there are no dead zones and the > > perfect diagonals are sticky keys. But when I try to play donkey kong on my > cabinet, > > the diagonals make Mario stop running. > > > This type question comes up regularly. DK was made for a 4-way joy. The game doesn't > know what to do with diagonals as a result, so unpredictable things happen when you > try. > > Needs 4-way, simple as that.
No, I understand that. The question is, why does MAME not recognize -joystick_map for keyboard controls?
If you have not used -joystick_map in your dkong.ini (or pacman) file, you need to check it out. It pretty much takes care of the 8 way/4 way issue if done correctly.
-Mc
|
|
|
R. Belmont |
Cuckoo for IGAvania
|
|
|
Reged: 09/21/03
|
Posts: 9716
|
Loc: ECV-197 The Orville
|
|
Send PM
|
|
|
Re: -joystick_map issue/question
[Re: McHale]
#312180 - 07/29/13 05:05 PM
|
|
|
> No, I understand that. The question is, why does MAME not recognize -joystick_map for > keyboard controls?
Because the problems it's intended to fix (primarily analog stick deadzones and 4-way vs 8-way) don't exist on keyboards. E.g. if you want to banish diagonals for 4-way games you can pick 4 keys far enough apart from each other that it's not a thing. It's called joystick_map for a good, descriptive reason
|
|
|
|
Re: -joystick_map issue/question
[Re: R. Belmont]
#312182 - 07/29/13 05:36 PM
|
|
|
> > No, I understand that. The question is, why does MAME not recognize -joystick_map > for > > keyboard controls? > > Because the problems it's intended to fix (primarily analog stick deadzones and 4-way > vs 8-way) don't exist on keyboards. E.g. if you want to banish diagonals for 4-way > games you can pick 4 keys far enough apart from each other that it's not a thing. > It's called joystick_map for a good, descriptive reason
But for the many of us that use keyboard encoders for our joysticks and buttons, it's a problem. My HAPP joysticks and buttons are mapped to keys. I'm betting the vast majority of MAME cabinets use keyboard encoders, thus suffer the same problem. And even if you're only using the arrow keys, it's still easy to hit two keys, especially in games like pacman where you are constantly turning 90 degrees.
Is there a way to force the joystick map to be used when using a keyboard? Because technically, the keyboard is emulating a joystick, thus the problem exists.
Tnx...
-Mc
|
|
|
|
Re: -joystick_map issue/question
[Re: McHale]
#312187 - 07/29/13 07:37 PM
|
|
|
|
|
Re: -joystick_map issue/question
[Re: grog]
#312189 - 07/29/13 07:59 PM
|
|
|
|
|
Re: -joystick_map issue/question
[Re: grog]
#312212 - 07/30/13 09:09 AM
|
|
|
> i havnt tried any of this stuff but maybe a program like key2joy might help (there is > also a program called joy2key) > > links: (in the first link maybe check out vjoy also...) > > http://forum.arcadecontrols.com/index.php?topic=60431.0 > > http://www.google.co.uk/search?q=joy2key
OK, spent some time with vjoy (which is a pretty decent program). While using vjoy, setting my mapped keys as a joystick, the joystick maps work. And when the joystick maps work, the 4 way/8 way issue is basically resolved. So, if we could get MAME to recognize the joystick map for keyboard control as well, far fewer people will have to worry about the 4 way issue on 8 way joysticks.
For anyone that would like to try it, here's the 4 way joystick map I'm using for games like Donkey Kong and Pac-Man:
joystick_map s8888888s.4s88888s6.44s888s66.444s8s666.444456666.444s2s666.44s222s66.4s22222s6.s2222222s.
One reason that solutions like vjoy aren't a great solution is it maps the keys to a joystick so while the driver is active, you can't use those keys. I haven't coded in C in a few years but I may try to find the code related to joystick_map and see what it would take to enable it for keyboard entry. The issue exists whether using keys or joystick as the issue is caused by hitting 2 directions at once, which is a frequent occurrence on games like Pac-Man and Donkey Kong, regardless of your method of movement.
-Mc
|
|
|