• 0 Votes
    2 Posts
    533 Views
    J

    @jdoc I reached out to Xarcade, and this was their response:

    Hi John,

    Thank you for your interest in our Tankstick Max.

    To address the issue with the trackball/spinner for Raspberry Pi, we have two solutions:

    Custom Script: We have designed a custom script specifically for switching in the Raspberry Pi system. You can find the details here:
    I've attached the instructions for installing and using the spinner/trackball switching script on your RetroPie system. This document will guide you through setting up the script and provide details on how to utilize it effectively.

    Trackball/Spinner Mixing Adapter: We are releasing a trackball/spinner mixing adapter that combines both the spinner and trackball into a single device. This will resolve the issue for Raspberry Pi users. The adapter will be available at a low cost and ready for purchase in 1-2 months.

    I hope this helps!

    Best regards,

    Xgaming Support

    From the attached PDF:

    INSTALLATION INSTRUCTIONS

    AUTOMATIC INSTALLATION
    From terminal (press [F4] from EmulationStation to enter terminal) or, using SSH, enter the following
    commands EXACTLY as they appear:
    • cd
    • wget https://downloads.sourceforge.net/project/build-a-cade/xarcade.sh
    • chmod +x xarcade.sh
    • sudo ./xarcade.sh
    When the installation completes, you will be prompted to cleanup installation files (optional) and to
    reboot for changes to take effect.
    After the system is reloaded, load a game of your choice. Ensure the correct device (SPINNER or
    TRACKBALL) is active for the game. If not, press the RED BUTTON and then reload the game (exit with
    HOTKEY+START). After reloading, the correct device should be active. The current device remains active
    until the RED BUTTON is pressed, which switches input to the OTHER device. MANUAL INSTALLATION
    From terminal (press [F4] from EmulationStation to enter terminal) or, using SSH, enter the following
    commands EXACTLY as they appear:
    • cd
    • sudo apt update
    • sudo apt-get install python3-pip
    • sudo pip3 install evdev
    • wget https://downloads.sourceforge.net/project/build-a-cade/switchmouse.py
    • wget https://downloads.sourceforge.net/project/build-a-cade/red-button.sh
    • chmod +x red-button.sh
    • sed -i '1i sudo python3 /home/pi/switchmouse.py &' /opt/retropie/configs/all/autostart.sh
    • sudo reboot
    USAGE INSTRUCTIONS
    After installation and reboot, pressing the red button on the X-Arcade Tankstick MAX changes the
    input_player1_mouse_index in retroarch.cfg for the ARCADE system. Changes to the file are made
    instantly, but, if pressed while a game is running, the newly selected mouse won’t be active until the
    game is reloaded.
    To disable or reenable this feature, exit emulationstation by pressing [F4] on the keyboard, and enter the
    following command: sudo ./red-button.sh
    FILE DESCRIPTIONS
    xarcade.sh
    This Bash script automates the installation process for setting up X-Arcade switchmouse.py, a script used
    for changing the active mouse device in Retroarch between a Spinner and a Trackball using the RED
    button on the X-Arcade Tankstick MAX. Here's a breakdown of what the script does: Download Script: Downloads the switchmouse.py script and red-button.sh script from a
    specified URL. Update System Files: Updates the system's package lists to ensure it has the latest information
    about available packages. Install Dependencies: Installs necessary dependencies for running the switchmouse.py script,
    including python3-pip and evdev. Modify autostart.sh: Checks if the line sudo python3 /home/pi/switchmouse.py & is already
    present in the autostart.sh file. If not, it adds this line to the beginning of the file. Set File Ownership: Changes ownership of files to ensure they are owned by the user pi. Cleanup Installation Files: Offers the option to remove the installation files (xarcade.sh, which is
    the current script being executed) after installation. If the user chooses not to remove it, informs
    where the script is stored for manual deletion. Prompt for Reboot: Asks the user if they want to reboot the system to apply changes. If the user
    agrees, initiates a reboot; otherwise, informs the user that changes will take effect on the next
    reboot.
    Additionally, the script provides information on how to disable or enable the feature in the future by
    running sudo ./red-button.sh from the terminal.
    This script automates the setup process, making it easier for users to configure their systems for using X-
    Arcade switchmouse.py functionality.
    switchmouse.py Change Mouse Input for Retroarch: This script is designed to change the
    input_player1_mouse_index configuration in Retroarch between a Spinner and a Trackball using
    the RED button on the X-Arcade Tankstick MAX (middle mouse button). Create Configuration File: The script checks for the existence of the Retroarch configuration file
    (retroarch.cfg) in /opt/retropie/configs/arcade/. If the file doesn't exist, it creates it and sets
    the default value for input_player1_mouse_index. Find Next Mouse Device: It finds the next available Tankstick MAX mouse device in the system.
    This is done by looking for devices with the identifier "1241_1111" in the /dev/input/by-id/
    directory. Update Configuration File: The script updates the retroarch.cfg file with the index of the next
    mouse device found. It modifies the input_player1_mouse_index configuration line accordingly. Find Middle Mouse Button Event Device: It searches for the event device corresponding to the
    middle mouse button on the X-Arcade Tankstick MAX. This is done by scanning the /dev/input/
    directory for devices that support the middle mouse button event. Main Function: The main function of the script continuously monitors events from the middle
    mouse button device. When the middle mouse button is pressed, it triggers the process to
    switch to the next available mouse device and updates the Retroarch configuration file
    accordingly.
    Overall, this script automates the process of switching between Spinner and Trackball inputs in Retroarch
    using the middle mouse button on the X-Arcade Tankstick MAX, providing a convenient way for users to
    toggle between these input devices during gameplay.
    red-button.sh
    This Bash script automates the process of enabling or disabling mouse switching functionality using the
    red button the X-Arcade Tankstick MAX. Here's what the script accomplishes: Check Current Status: The script checks if the line sudo python3 /home/pi/switchmouse.py is
    present in the autostart.sh file located at /opt/retropie/configs/all/autostart.sh. This line
    initiates the functionality responsible for toggling between different mouse inputs. Toggle Functionality: If the line is found, indicating that mouse switching is currently enabled,
    the script prompts the user to confirm whether they want to disable it. Conversely, if the line is
    not found, indicating that mouse switching is disabled, it prompts the user to enable it. Update autostart.sh: Depending on the user's response, the script either removes or adds the
    line responsible for mouse switching to the autostart.sh file. This modification is performed
    using sed commands. Reboot Prompt: If any changes are made to the autostart.sh file, indicating a modification in
    mouse switching status, the script prompts the user to reboot the system for the changes to take
    effect. It ensures that the user's response is validated and provides appropriate feedback. Feedback: If no changes are made, the script informs the user that no modifications were
    performed.
    This script streamlines the process of managing mouse switching functionality, providing users with a
    convenient way to enable or disable this feature using the red button on their X-Arcade Tankstick MAX,
    with clear prompts and feedback throughout the process.
  • 0 Votes
    6 Posts
    1k Views
    J

    We have quite the setup guide here if anyone comes to this post looking: https://support.xgaming.com/solution/articles/5000554993-how-to-use-x-arcade-with-raspberry-pi

  • 0 Votes
    1 Posts
    369 Views
    No one has replied
  • 0 Votes
    44 Posts
    10k Views
    J

    @jono Thanks for reaching out. I've had some time in the last week or so to tinker with settings. I will definitely try what you've outlined and get back to this thread. BTW- I've read that the latest update to RetroPie breaks the tank stick config. Has anyone heard this as well?

  • 0 Votes
    2 Posts
    785 Views
    A

    10th time thru doing installs and fun to see the different results ,depends on what order you do stuff. thanks for the advice.