Jump to content

Joystick direction gets stuck when fire is pressed


Recommended Posts

Hello all!


I am checking to see if I'm doing something wrong in my code, or if I found a compiler or Stella bug.


I am having an issue with the joystick direction getting stuck frequently in Stella when the fire button is pressed. I have confirmed through the debug tools that the joystick direction switch is stuck on when this happens even though I am not holding down any cursor keys. The cursor keys on my computer are not having problems in any other software.


It can be duplicated by pressing a direction and tapping the fire key and releasing the direction key. I think the timing needs to be right, but it will do it eventually.


I am using DPC+


I've attached my debug basic code that is stripped of everything except for the movement, playfield collision, and animation code. I kept removing pieces of code hoping to find the culprit but no luck. The code that is left is based off from code I found in the "batari Basic Command Reference" which I modified to fit how I wanted the player to move on the screen.


I am running the latest Batari Basic dev software found here in the forums and my Stella version is 5.1.3


I do not have a Harmony cart to be able to test this on a real 2600 (but I am curious if it also happens on a console).


I appreciate everyone's time.




Link to comment
Share on other sites

I added that to try to fix the problem. I removed that and the next if statement and the problem still persists.


Isn't that exactly what your code is designed to do?

  ; Skip player movement if attacking (preserving player attacking animation)
  if joy0fire || _Bit0_P0_Attacking{0} then goto __Skip_Player_Movement



I was thinking about that on my way to work. Maybe windows or my keyboard driver is doing a "sticky key" type thing? I will try using a usb gamepad tonight and report back.

I always use a USB joystick when testing builds. The keyboard can cause problems. Bluetooth keyboards are worse as with bad signals or low batteries they can repeat keystrokes.

Link to comment
Share on other sites

The problem does not happen when using the ctrl key. Thanks for that tip!

Have you tried firing with the CTRL key instead of the space bar?


It also doesn't do it when using a usb game pad. it must be something specific to my notebook's keyboard. Thanks everyone!


Edit: I tested with my usb keyboard and could not duplicate it. I guess it must be a feature of Thinkpad keyboards.

Edited by Jron
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...