Log In  


There is a recent feature request on the arkos github asking if the joystick could control the mouse. I managed to make it work on my device, and thought others might want to use it too, so here is a tutorial. Only tested on rgb30 and this tutorial is for that handheld running arkos, altough most ARM chips should work. Other devices might have their events in a different location, you can run evtest from ssh to test it.

  1. ssh into the device using the info from here
  2. Get xboxdrv. You can either install the official files using

    sudo apt-get update
    sudo apt-get install xboxdrv

    Or get the package I compiled that fixes the bug where there is a 60-90 second delay. The .deb file is here you need to unpack it, move it to the sd card and install using:

    sudo dpkg -i xboxdrv_0.8.8-1_arm64.deb
  3. Create the file xboxdrv-mouse.ini using the command:

    sudo nano xboxdrv-mouse.ini
  4. Paste the following there. Note: the 4 and -4 are sensitivity, it felt good for me, but you can adjust, higher is faster. Also I mapped the shoulder buttons to the left and right mouse. Not sure how intuitive that is for everyone. I also didn't bother mapping things to the scroll wheel, it is not really used as far as I know.

    [xboxdrv]
    evdev=/dev/input/event3
    silent=true
    device-name="joystick-2-mouse"
    [evdev-absmap]
    ABS_RX=x2
    ABS_RY=y2
    [evdev-keymap]
    BTN_TL=lt
    BTN_TR=rt
    [ui-axismap]
    x2=REL_X:4
    y2=REL_Y:-4
    [ui-buttonmap]
    lt=BTN_LEFT
    rt=BTN_RIGHT
  5. Then save and exit (Ctrl+O, Enter, Ctrl+C)

  6. Create file /etc/systemd/system/xboxdrv-mouse.service using the command:
    sudo nano /etc/systemd/system/xboxdrv-mouse.service
  7. Paste the following there.

    [Unit]
    Description=xboxdrv mouse service
    After=systemd-udev-settle.service
    [Service]
    Type=simple
    User=root
    ExecStart=/usr/bin/xboxdrv --evdev-no-grab --config /home/ark/xboxdrv-mouse.ini
    Restart=always
    RestartSec=5
    [Install]
    WantedBy=multi-user.target
  8. Save and exit (Ctrl+O, Enter, Ctrl+C)
  9. Start the service
    sudo systemctl daemon-reload
    sudo systemctl enable xboxdrv-mouse.service
    sudo systemctl start xboxdrv-mouse.service
  10. Restart and enjoy!

Note: this always runs in the background. Essentially the right joystick and shoulder buttons are always connected to a virtual mouse. This doesn't really matter for pico8, as those inputs are ignored. I don't really play anything else, but it might be conflicting with other games.

3



[Please log in to post a comment]