Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Converting Joystick to Mouse Input  (Read 1703 times)

0 Members and 1 Guest are viewing this topic.

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9270
  • Last login:July 14, 2025, 01:30:54 pm
  • ...
Converting Joystick to Mouse Input
« on: October 08, 2010, 01:34:04 pm »
I have a big "positional/joystick" type arcade gun that I've been tinkering with on and off.  
It is wired to a gameport and plugged into a USB gameport adapter.
The computer sees it as a joystick and I can calibrate it under game controllers.

It works fine in MAME, but I'd like to get it working with M2 emulator.  (I want gunblade ny)
M2 emulator uses mouse input.  I used Joy2key to convert the joystick movements to mouse movements.
It works ok with a gamepad, but when you are behind the gun, looking through the sights, it's pretty much useless.
It goes up when you move the gun up, down when you move the gun down(slowly), etc, but it isn't really tracking where the gun is pointed.
Joy2Key is telling it what direction to move and how fast, but that's not really locking joystick position to mouse position.
I tried changing the speed, etc. in joy2key.  It made it different, but not any better.

Is there anyway to get more accurate tracking?

I know an aim-track would work, but I doubt it would work as close to the screen as I would want this gun mounted.

M2 emulator has a raw input option, but I don't know if it works with devices besides the mouse.

I was thinking there is probably a way for autohotkey to get the joystick state and move mouse position based on that, but it would have to be some type of formula and be updating constantly.
« Last Edit: October 08, 2010, 01:38:32 pm by BadMouth »