Gamepad Button 2 mapped to SPACE too fast

A forum about the Hatari ST/STE/Falcon emulator - the current version is v2.5.0

Moderators: simonsunnyboy, npomarede, thothy, Moderator Team

Post Reply
blam666
Atarian
Atarian
Posts: 4
Joined: Wed Mar 01, 2023 6:33 pm

Gamepad Button 2 mapped to SPACE too fast

Post by blam666 »

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.
User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3899
Joined: Sun Jul 31, 2011 1:11 pm

Re: Gamepad Button 2 mapped to SPACE too fast

Post by Eero Tamminen »

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...
blam666
Atarian
Atarian
Posts: 4
Joined: Wed Mar 01, 2023 6:33 pm

Re: Gamepad Button 2 mapped to SPACE too fast

Post by blam666 »

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.
User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3899
Joined: Sun Jul 31, 2011 1:11 pm

Re: Gamepad Button 2 mapped to SPACE too fast

Post by Eero Tamminen »

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...)
User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3899
Joined: Sun Jul 31, 2011 1:11 pm

Re: Gamepad Button 2 mapped to SPACE too fast

Post by Eero Tamminen »

blam666 wrote: Mon Mar 06, 2023 8:51 pm And of course thanks a lot for sending that proposal, too.
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/
blam666
Atarian
Atarian
Posts: 4
Joined: Wed Mar 01, 2023 6:33 pm

Re: Gamepad Button 2 mapped to SPACE too fast

Post by blam666 »

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.
Post Reply

Return to “Hatari”