Jump to content

Photo

Joystick direction gets stuck when fire is pressed


8 replies to this topic

#1 Jron OFFLINE  

Jron

    Combat Commando

  • 5 posts
  • Location:Syracuse, NY

Posted Thu Aug 23, 2018 5:35 AM

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.

 

Attached Files



#2 ZackAttack OFFLINE  

ZackAttack

    Dragonstomper

  • 731 posts
  • Location:Orlando, FL US

Posted Thu Aug 23, 2018 7:14 AM

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



#3 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 9,136 posts

Posted Thu Aug 23, 2018 7:18 AM

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.



#4 Jron OFFLINE  

Jron

    Combat Commando

  • Topic Starter
  • 5 posts
  • Location:Syracuse, NY

Posted Thu Aug 23, 2018 9:35 AM

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.



#5 stephena OFFLINE  

stephena

    River Patroller

  • 3,283 posts
  • Stella maintainer
  • Location:Newfoundland, Canada

Posted Thu Aug 23, 2018 9:38 AM

I cannot duplicate this in either Linux or Windows.  Haven't tested in OSX, nor with any joysticks (keyboard only).



#6 SpiceWare ONLINE  

SpiceWare

    Draconian

  • 12,372 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Thu Aug 23, 2018 9:46 AM

Bluetooth keyboards are worse as with bad signals or low batteries they can repeat keystrokes.

 

 

 

I've had issues with MAME and bluetooth keyboards.   



#7 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • 28,738 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Thu Aug 23, 2018 10:58 AM

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



#8 Jron OFFLINE  

Jron

    Combat Commando

  • Topic Starter
  • 5 posts
  • Location:Syracuse, NY

Posted Thu Aug 23, 2018 4:49 PM

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, Thu Aug 23, 2018 5:09 PM.


#9 stephena OFFLINE  

stephena

    River Patroller

  • 3,283 posts
  • Stella maintainer
  • Location:Newfoundland, Canada

Posted Fri Aug 24, 2018 5:13 AM

Looks like our old friend is back: https://www.sjbaker....boards_Are_Evil






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users