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: What causes mouse/gun offset?  (Read 4901 times)

0 Members and 1 Guest are viewing this topic.

BobA

  • Trade Count: (+14)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5943
  • Last login:July 11, 2018, 09:52:14 pm
  • What Me Worry?
What causes mouse/gun offset?
« on: August 08, 2003, 11:31:57 pm »
I was working on my gun games using the mouse and I have a problem with all shots for the 1 player being offset by about an inch on the screen.   I am using the regular PS2 mouse driver in XP and I have no acceleration or other fancy settings on the mouse.  The shots register about 1 inch to the right of where my cursor crosshair is located.

Does anyone know what I should adjust to fix this?

Thanks
BobA

Spaced Invader

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 585
  • Last login:July 15, 2008, 07:27:49 am
  • Resistance is... probably a good idea.
Re:What causes mouse/gun offset?
« Reply #1 on: August 09, 2003, 07:33:12 am »
Can't you calibrate the gun?
All Your Base Are Belong To Us!

BobA

  • Trade Count: (+14)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5943
  • Last login:July 11, 2018, 09:52:14 pm
  • What Me Worry?
Re:What causes mouse/gun offset?
« Reply #2 on: August 09, 2003, 10:28:07 am »
I had thought of that but the game does not give any access to gun calibration.  I was trying Gunbullet and nothing seems to bring up a calibration routine that I could find.   By the way I am using a mouse not a gun.   I thought that the mouse was self calibrated to shoot where it shows its crosshair.

BobA

BobA

  • Trade Count: (+14)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5943
  • Last login:July 11, 2018, 09:52:14 pm
  • What Me Worry?
Re:What causes mouse/gun offset?
« Reply #3 on: August 09, 2003, 09:53:03 pm »
Update:

Tried area51 and it worked fine.   Are there different gun/mouse drivers in different games?

BobA

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re:What causes mouse/gun offset?
« Reply #4 on: August 10, 2003, 12:22:23 am »
Update:

Tried area51 and it worked fine.   Are there different gun/mouse drivers in different games?

BobA

Each gun game driver works some voodoo magic on the value mame passes as the mame gun input (range from -128 to 128) to (supposed to) a valid game value (different game to game).   So, I guess the answer is "sort of".

Let me check Gunbullet...
Robin
Knowledge is Power

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re:What causes mouse/gun offset?
« Reply #5 on: August 10, 2003, 12:51:26 am »
Okay I just tested GunBullet (gunbulet) in plain mame 0.72 and 0.71 without any offset problems.

Couple things you might want to try:

a) Delete the nvram and cfg files.  They might have been corrupted, or become out of date when you updated mame.

b) Since you're using a mouse, enable the mouse in mame, and disable the lightgun input in mame.  
The mouse input method mame uses is more accurate than the lightgun method, and the lightgun method is only needed if you have a physical lightgun.  If this fixes the problem, your windows mouse driver isn't totally compatable with the API mame uses for lightgun inputs.

c) You could try the opposite: disable mouse inputs and enable lightgun inputs.

d) Try point blank (ptblank).  This game uses the same game driver file as gun bullet.  Try other gun games.  List the games that work and those that don't so we can see if there is a pattern.
Robin
Knowledge is Power

BobA

  • Trade Count: (+14)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5943
  • Last login:July 11, 2018, 09:52:14 pm
  • What Me Worry?
Re:What causes mouse/gun offset?
« Reply #6 on: August 10, 2003, 01:10:50 am »
U_rebelsum

Thanks for the hints I will try the items listed and see what occurs.

BobA

BobA

  • Trade Count: (+14)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5943
  • Last login:July 11, 2018, 09:52:14 pm
  • What Me Worry?
Re:What causes mouse/gun offset?
« Reply #7 on: August 10, 2003, 10:46:19 am »
Thanks the first suggestion worked great.  I deleted the nvram and cfg files and the game (gun bullet)  shoots right on now.

BobA ;D


tangodownNZ

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 72
  • Last login:October 18, 2024, 04:31:06 am
  • I want to build my own arcade controls!
Re: What causes mouse/gun offset?
« Reply #8 on: July 03, 2023, 03:55:56 am »
Re nvram and config.
Where do we delete these files exactly. Why do we delete them, and will this cause any problems.

I’m have calibration issues with opwolf. But I am using a ghost squad arcade gun.

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9270
  • Last login:July 14, 2025, 01:30:54 pm
  • ...
Re: What causes mouse/gun offset?
« Reply #9 on: July 03, 2023, 11:39:26 am »
Re nvram and config.
Where do we delete these files exactly. Why do we delete them, and will this cause any problems.

I’m have calibration issues with opwolf. But I am using a ghost squad arcade gun.

There was no calibration on the original machine so there is none in MAME.  There are a few old games like this.  Most notably all the Exidy games.
I'm guessing on the original machine the position of the potentiometers in the gun could be adjusted.

nvram is in the nvram folder in your MAME folder.  Each game nvram exists for will have a folder with the same name as the rom.
nvram is the memory of the original game that stored stuff like high scores and settings.  If you delete it, it will just get recreated with the default values next time you launch the game.

Similarly,  config files are in the cfg folder.  They exist if you have changed the control mapping to something other than the global mappings.
Deleting it will just reset the control mappings.

The ini folder is also relevant.  It contains the same options that are in mame.ini and exists if you've changed options to be specific for that rom.

Not sure any of that helps, but that is how it works.
I haven't fired up operation wolf in a long time, but don't remember having issues with my old guns which showed up as mice.
I can see where a gun that shows up as a joystick (as my current ones do) would be an issue.
« Last Edit: July 03, 2023, 11:42:32 am by BadMouth »

tangodownNZ

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 72
  • Last login:October 18, 2024, 04:31:06 am
  • I want to build my own arcade controls!
Re: What causes mouse/gun offset?
« Reply #10 on: July 03, 2023, 09:15:19 pm »
Re nvram and config.
Where do we delete these files exactly. Why do we delete them, and will this cause any problems.

I’m have calibration issues with opwolf. But I am using a ghost squad arcade gun.

There was no calibration on the original machine so there is none in MAME.  There are a few old games like this.  Most notably all the Exidy games.
I'm guessing on the original machine the position of the potentiometers in the gun could be adjusted.

nvram is in the nvram folder in your MAME folder.  Each game nvram exists for will have a folder with the same name as the rom.
nvram is the memory of the original game that stored stuff like high scores and settings.  If you delete it, it will just get recreated with the default values next time you launch the game.

Similarly,  config files are in the cfg folder.  They exist if you have changed the control mapping to something other than the global mappings.
Deleting it will just reset the control mappings.

The ini folder is also relevant.  It contains the same options that are in mame.ini and exists if you've changed options to be specific for that rom.

Not sure any of that helps, but that is how it works.
I haven't fired up operation wolf in a long time, but don't remember having issues with my old guns which showed up as mice.
I can see where a gun that shows up as a joystick (as my current ones do) would be an issue.

Thank you for this badmouth,

It all works. But when I point the gun in the corners its off, not by much, but off. Its like its not calculating the angle of the gun.
Thats why I thought a middleware calibration software might help.

Maybe I will try changing settings to a mouse or joystick, instead of lightgun to see if better