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: Progress with 2 guns in Sega Model 2 (kinda)  (Read 1435 times)

0 Members and 1 Guest are viewing this topic.

ShankyMcStabber

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 22
  • Last login:January 19, 2014, 02:48:24 pm
  • I want to build my own arcade controls!
Progress with 2 guns in Sega Model 2 (kinda)
« on: November 26, 2012, 03:24:33 pm »
While waiting for my AimTrak guns to arrive I read up on all the threads around the net about getting 2 guns to work in the Sega Model 2 emulator (with mixed success).

So obviously once I received the guns I started fooling around with the SM2 emulator and found out both guns DO work, just not as expected (correctly).

First off I set RawInput = 1.  Then I tested each DeviceID by going incrementally through the numbers and found the following mapping (for my setup):

0 = P1 Gun
1 = P2 Gun
2 = Spinner
3 = Trackball
4 = Mouse

I could easily set the DeviceID to 3 and 4 and get both players working in House of the Dead.  I could also set either player to 3/4 and the other to 0/1 and the Mouse/Trackball would work but the gun did not appear to be working.  If you set the ID to 0 and 1, it appears neither gun is working.

The catch is, the guns ARE working just not updating position correctly.  I found if you configure one or both guns with RawInput=1 and the correct ID it appears each cross hair is stuck in the top right corner, but when I watched closely I saw I could move the cursor from the screen corners by moving the gun to the extremes of the light bar sensor area.

So I opened up the HOTD service menu and watched the gun calibration tracking module and saw as either gun was moved the location values did change but they changed VERY VERY quickly instead of a more gradual location difference with the mouse.

So I next went to manually calibrate the gun values in the HOTD service menu and tweaked the Min/Max values enough that the crosshair was always contained on screen (for testing purposes).  With the cross hairs contained in that small space I could easily move either player to all 4 corners using the light gun.  The problem is, it doesn't transition at a slow pace and you literally go from the top right to the top left by moving the gun to the left (or to any other corner by pointing at that corner of the screen).  By moving VERY VERY slowly I could actually see the cross hairs transition across the screen as it moved from corner to corner.

This tells me that the game does see both guns independently of each other and they are both working, but they are not giving the correct updated position.  It is almost as if the positional updates are being scaled to an insanely high level or are somehow being multiplied instead of going on a linear movement like the actual mouse.

I have seen issues like this before when a game was unable to handle the DPI or Polling Rate of the mouse being used for the game.  Does anyone know of a way to alter the DPI or Polling Rate of the AimTrak guns to see if the problem is related somehow?


TL;DR - SM 2 emulator does see both guns and receives updates from them but the positional data is either WAY off or interpreted as WAY off.



ShankyMcStabber

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 22
  • Last login:January 19, 2014, 02:48:24 pm
  • I want to build my own arcade controls!
Re: Progress with 2 guns in Sega Model 2 (kinda)
« Reply #1 on: November 26, 2012, 11:37:55 pm »
I ended up connecting my Razer Naga to my arcade and tested with the DPI between 500 and 5600 and the Polling Rate from 125hz to 1000hz but couldn't recreate the issue.

I also tested every combination of light gun + mouse/track ball/spinner and in each case I can get both players to function correctly EXCEPT the fact the light guns use very extreme movement rates.  I can still go SLOOOOOOOOOOOOOOW with my movements and move the cross hairs to the middle of the screen.

So it looks like the only thing stopping 2 player light guns in SM2 is how the positioning is being calculated via raw input.

I've seen where it is mentioned about the issue regarding Relative Mouse positioning and Absolute Mouse positioning, which makes sense.  Would it be possible to create a virtual device that handles conversion from absolute to relative positioning provided the gun is started at a known point?
« Last Edit: November 27, 2012, 12:11:09 am by ShankyMcStabber »