RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    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

    Lightgun/Pointer Configuration (AR1100 Touchscreen)

    Scheduled Pinned Locked Moved Help and Support
    lightgun
    1 Posts 1 Posters 887 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.
    • johne79J
      johne79
      last edited by johne79

      v4.1.8/RPI3/RetroPie on SD

      I'm trying to set up an AR1100 as a touchscreen on an Adafruit 5" HDMI Backpack as a simple pointer input on RetroArch for testing the lightgun in games.

      The idea is, if I can get something working like this, then later on I may use an Arduino or STM32 Nucleo to build a custom hardware device*.

      • (The STM32 Nucleo MCUs are a little dicey, I haven't found anything regarding HID setups for it yet, but it should be technically possible. I HAVE gotten USB Joysticks a while back to work though through an Arduino Uno R3 creating a custom HID report.)

      Here's the AR1100:
      https://cdn-learn.adafruit.com/downloads/pdf/adafruit-5-800x480-tft-hdmi-monitor-touchscreen-backpack.pdf)

      I want to use the touchscreen as a lightgun pointer in some console games (for now I'm testing with Missile Defense 3-D / Safari Hunt (Master System), The Adventures of Bayou Billy (NES), and Super Scope 6 (SNES)), so far I've had no luck though. On the SMS the button works but the cursor doesn't move, on the NES I get nothing at all with either core I use (fceumm or nestopia), I haven't tested with the SNES yet.

      This page doesn't seem to have any information on light guns:
      https://github.com/retropie/retropie-setup/wiki/RetroArch-Configuration

      But I did find this post about some setup IDs:
      https://retropie.org.uk/forum/topic/1748/controller-configuration-per-system-and-finding-device-index-number/7

      So I tried setting up a per ROM specific configuration on games above like so:
      input_libretro_device_p1 = 4
      (also _p1 = 6, _p2 = 4, and _p2 = 6)

      I didn't get any luck with it, same results as always. Seems like it should work based on this:
      https://github.com/libretro/RetroArch/blob/5624b3482e679178968c6e5f1dfb0e927b82c7b7/retroarch.cfg#L401&L424

      This little article here gave me a little more help on figuring out the HID Report of the Touch Screen:
      http://www.slashdev.ca/2010/05/08/get-usb-report-descriptor-with-linux/

      So once I got a HID usage report I could see the X and Y values are Data/Variable/Absolute, the device has a protocol of Mouse and a usage of Pointer. Does that sound right for a pointer, or is it running as a mouse device? (I don't know enough yet about HID Report Descriptors to know) If it's plugged in before my kb/mouse dongle, it'll run as /dev/input/mouse0 and I can run cat on it and test the device from console (although if anyone knows something better like jstest for mice that would be awesome). It also actually builds a /dev/input/js2 device as well and I can test it with jstest to ensure it's working at the linux level.

      (Also I should probably mention until today I've been using USB NES Gamepads so there was no "X" button to SELECT+X into a RetroArch menu, not sure if that means anything. I saw that in a doc somewhere, I just got a Logitech F310 today for some testing and haven't played with it yet.

      EDIT: Apparently it does affect whether I can get to the RetroArch menu in-game or not, but selecting MS Light Phaser on MasterSystem games for example basically does nothing.)

      What's next in trying to diagnose the issue?
      This touchpad IS a pointer device, physically speaking, but I'm not sure if udev, or RetroArch, or whatever's in the mix sees in that way. I don't know enough about all of these platforms yet to really diagnose the full spectrum of architecture that's been put in place. It would be great how to know how to diagnose all of that on the command-line side. I'm less than one week I think into using RetroPie I'm still figuring lots of things out.

      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.