Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

ControlBlock Joystick configuration


  • Global Moderator

    Glad to hear!



  • I wondered why did you exchanged the axes configuration?
    Before the changes - all directions were matching the description on the ControlBlock board and the atari800 emulator was working fine.
    Now I updated the ControlBlock software and the axes are swapped and atari800 does not work anymore.



  • I have just checked that atari800 uses (in a correct way) the SDL library to get joystick position.
    I also assume that SDL has a correct implementation (proven in many project):
    https://www.libsdl.org/release/SDL-1.2.15/docs/html/sdljoystickgetaxis.html
    https://www.libsdl.org/release/SDL-1.2.15/docs/html/guideinput.html
    This means that your change was breaking compatibility not only with atari800 but with all games using the SDL library!
    Sorry guys, but a proper place to fix your problem was your buggy Daphne emulator...


  • Global Moderator

    Thanks for pointing to the SDL reference documentation. I was not aware of that and I agree that SDL compatibility is more important. Daphne should fix this in the emulator. I have just merged your pull request.



  • @montezuma nps. I will keep my fork with the changes :D Just pointing out that the "issue" was not only on Daphne (I remember also scummvm, some ports having exaclty the same issue) so not sure now where exactly is the problem....



  • @darkav
    Sure you can keep the "Daphne" specific fork of the ControlBlock driver. This is the advantage of open source software and github.
    But again - the driver is a wrong place to make an emulator specific fix!

    If you don't believe the SDL documentation, you can just run a test, which I run 5 minutes ago:

    1. Quit the emulation station (F4)
    2. List input devices (ls /dev/input) - you should see js0 and js1 (Controlblock joysticks)
    3. Connect any USB gamepad to the Raspberry Pi (fox example USB versions of the NES/SNES gamepads)
    4. List input devices again (ls /dev/input) - this time you will see a new device: js2
    5. run jstest to see how the original Linux driver works:
      jstest /dev/input/js2
    6. You will see the following:
      LEFT - AXIS 0: -32767
      RIGHT - AXIS 0: 32767
      UP - AXIS 1: -32767
      DOWN - AXIS 1: -32767
      This is exaclty the same that the ControlBlock driver does now and should do!

    I hope this finally convinced everybody.



  • @darkav
    When I look at your first post again, I think you wiring may be wrong...



  • I looked at Daphne source code. It uses SDL correctly.
    input.cpp
    void process_joystick_motion(SDL_Event *event)

    Now it is obvious for me that darkav issues are related to his setup (most probably wrong wiring). It is a pity that instead of double checking the hardware, he spoiled the driver, causing problems for all other users...



  • @montezuma said in ControlBlock Joystick configuration:

    I looked at Daphne source code. It uses SDL correctly.
    input.cpp
    void process_joystick_motion(SDL_Event *event)

    Now it is obvious for me that darkav issues are related to his setup (most probably wrong wiring). It is a pity that instead of double checking the hardware, he spoiled the driver, causing problems for all other users...

    Wiring is correct. It's a pity you assumed I didn't double check the hardware.
    Next step (even if unlikely the problem is on it) is to check the board.

    Also, I did a PR which has been reviewed and merged by the author of the driver ...it's very unpolite to say that "I spoiled the driver".


  • Global Moderator

    Thanks to all for providing more insights into this issue. I hope that we have a better understanding of it now and can use the driver as it is now :-)


Log in to reply
 

Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.