RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    ControlBlock Joystick configuration

    Scheduled Pinned Locked Moved ControlBlock, PowerBlock & Co.
    control blockjoystick
    21 Posts 4 Posters 8.4k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      petrockblog Global Moderator
      last edited by

      Glad to hear!

      1 Reply Last reply Reply Quote 0
      • MontezumaM
        Montezuma
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • MontezumaM
          Montezuma
          last edited by

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

          D 1 Reply Last reply Reply Quote 0
          • P
            petrockblog Global Moderator
            last edited by

            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.

            1 Reply Last reply Reply Quote 1
            • D
              darkav @Montezuma
              last edited by darkav

              @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....

              MontezumaM 1 Reply Last reply Reply Quote 0
              • MontezumaM
                Montezuma
                last edited by

                @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.

                1 Reply Last reply Reply Quote 0
                • MontezumaM
                  Montezuma @darkav
                  last edited by

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

                  1 Reply Last reply Reply Quote 0
                  • MontezumaM
                    Montezuma
                    last edited by

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

                    D 1 Reply Last reply Reply Quote 0
                    • D
                      darkav @Montezuma
                      last edited by

                      @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".

                      1 Reply Last reply Reply Quote 0
                      • P
                        petrockblog Global Moderator
                        last edited by

                        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 :-)

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post

                        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.