I'm messing around with control settings in Hatari (current version 2.4.1) on a WIn1064 system and found that Joystick/gamepad Button 2 is mapped to SPACE by default.
This is really great for some games. But on my system the SPACE commands that happen when I press Button 2 are behaving like on some kind of rapid autofire setting. It's about impossible to only use that button for pressing SPACE once. That makes it unusable for some programs that it would come in handy for, like Killdozers for instance. You can choose your weapon mode with SPACE, but it's too fast to control the choice.
I also found that you can change the Button2 - mapping to JoyUp in modern Jump'n'Run style in the configuration file by setting bEnableJumpOnFire2to true, which is also a great feature. When I do that, that "autofire" problem on that button is also gone, it works perfectly, contrary to the SPACE mapping.
Is there an easy workaround for this within Hatari? If i understood this correctly, for further Joypad-Buttons to Keyboard mappings I'll probably have to recompile Hatari or use an external program anyway.
Gamepad Button 2 mapped to SPACE too fast
Moderators: simonsunnyboy, npomarede, thothy, Moderator Team
- Eero Tamminen
- Fuji Shaped Bastard

- Posts: 3899
- Joined: Sun Jul 31, 2011 1:11 pm
Re: Gamepad Button 2 mapped to SPACE too fast
Jump feature will just map button 2 to joy up, and game will then interpret it however it handles joy up.
Whereas when it is mapped to space key press, Hatari indeed will constantly press and release it on successive IKBD interrupts, until joy button 2 is released.
I've sent patch proposal to hatari-devel, for changing it so that each button press would inject just single key press (unless kept down long enough for key repeat to start). Let's see if there's some good reason why it works as auto-fire...
Whereas when it is mapped to space key press, Hatari indeed will constantly press and release it on successive IKBD interrupts, until joy button 2 is released.
I've sent patch proposal to hatari-devel, for changing it so that each button press would inject just single key press (unless kept down long enough for key repeat to start). Let's see if there's some good reason why it works as auto-fire...
Re: Gamepad Button 2 mapped to SPACE too fast
Hi, thanks a lot for replying.
And of course thanks a lot for sending that proposal, too.
Then I guess I'll wait and see if they find time and energy to optimize this.
And of course thanks a lot for sending that proposal, too.
Then I guess I'll wait and see if they find time and energy to optimize this.
- Eero Tamminen
- Fuji Shaped Bastard

- Posts: 3899
- Joined: Sun Jul 31, 2011 1:11 pm
Re: Gamepad Button 2 mapped to SPACE too fast
Patch I sent should be fine, *assuming* that button 2 SPACE key auto-firing behavior was not intentional.
(You're first to complain about the auto-firing, more than decade after that undocumented feature was added, so it's possible there's some actual use for it...)
(You're first to complain about the auto-firing, more than decade after that undocumented feature was added, so it's possible there's some actual use for it...)
- Eero Tamminen
- Fuji Shaped Bastard

- Posts: 3899
- Joined: Sun Jul 31, 2011 1:11 pm
Re: Gamepad Button 2 mapped to SPACE too fast
I've pushed fix to this to Hatari master, and added that option also to SDL GUI.
It should be available in Hatari nightly builds for Windows soon: http://antarctica.no/~hatari/latest/windows/
Re: Gamepad Button 2 mapped to SPACE too fast
Fantastic!
And again, thanks a lot.
I'll check the nightlies over the next weeks.
I'm just using ST emulation for a handful of older games more intensely lately, and for that, more devloped emulator-internal gamepad mapping is the only thing that I missed a bit when using Hatari. It's in all regards a neat program.
And again, thanks a lot.
I'll check the nightlies over the next weeks.
I'm just using ST emulation for a handful of older games more intensely lately, and for that, more devloped emulator-internal gamepad mapping is the only thing that I missed a bit when using Hatari. It's in all regards a neat program.
