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: Ultimarc U-Trak: MAME Sensitivity Confirmation  (Read 1697 times)

0 Members and 1 Guest are viewing this topic.

BlackGreen

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 15
  • Last login:June 16, 2015, 08:01:26 pm
Ultimarc U-Trak: MAME Sensitivity Confirmation
« on: January 31, 2014, 04:17:57 pm »
Greetings:

For those out there using the Ultimarc U-Trak, could you confirm some of your sensitivity settings on games that use the trackball / mouse?  Do you use any special settings other than "-mouse"?

I ask because I have my sensitivity cranked all the way to "255" on games such as Centipede for the movement to be acceptable.  In comparison, standard mouse movement works great with the default settings (30 or 50 sensitivity, can't remember).  I am running SDL MAME, but would still like info from Windows users to compare against.

SDL has a couple important environment vars but I have been unsuccessful in "offsetting" the U-Trak sensitivity due to their limiations:
SDL_MOUSE_RELATIVE: must be set to "1" for MAME or else movement will have an "invisible wall" effect
SDL_VIDEO_X11_MOUSEACCEL: with SDL_MOUSE_RELATIVE set to "1" (enabled), changing this has no effect.

Compared to a standard mouse, the U-Trak is a high-precision device, and pumps out way more event messages.  I will probably end up having to toy around with programmatically skipping event messages so that MAME and my front end can respond faster.

Any U-Trak users out there offer any sensitivity advice (windows or linux)?

Thanks.
« Last Edit: January 31, 2014, 04:21:49 pm by rytz »

telengard

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 784
  • Last login:July 23, 2025, 10:56:55 am
  • Yeah, it's a classic! 21+ on BYOAC and still goin
    • S T U R C A D E
Re: Ultimarc U-Trak: MAME Sensitivity Confirmation
« Reply #1 on: August 31, 2014, 12:57:18 pm »
I don't have a U-track, but a Happ trackball.  I am experiencing the "bounded box" you mention but haven't been able to test out sensitivity yet.  The SDL environment variables don't seem to make a difference either for some reason.
S T U R C A D E     M.A.M.E. Cabinet
http://www.briansturk.com/mame.html

BlackGreen

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 15
  • Last login:June 16, 2015, 08:01:26 pm
Re: Ultimarc U-Trak: MAME Sensitivity Confirmation
« Reply #2 on: August 31, 2014, 01:12:07 pm »
I don't have a U-track, but a Happ trackball.  I am experiencing the "bounded box" you mention but haven't been able to test out sensitivity yet.  The SDL environment variables don't seem to make a difference either for some reason.
I got around my trackball sensitivity issue by making some changes to the MAME source code for the input events.  I didn't end up needing any SDL environment flags.  If you need the code changes I made let me know and I'll paste them here.

telengard

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 784
  • Last login:July 23, 2025, 10:56:55 am
  • Yeah, it's a classic! 21+ on BYOAC and still goin
    • S T U R C A D E
Re: Ultimarc U-Trak: MAME Sensitivity Confirmation
« Reply #3 on: August 31, 2014, 02:06:16 pm »
I don't have a U-track, but a Happ trackball.  I am experiencing the "bounded box" you mention but haven't been able to test out sensitivity yet.  The SDL environment variables don't seem to make a difference either for some reason.
I got around my trackball sensitivity issue by making some changes to the MAME source code for the input events.  I didn't end up needing any SDL environment flags.  If you need the code changes I made let me know and I'll paste them here.

That would be tremendous, thanks.  Grabbed the src not too long ago for GroovyMame (which is what I run) and that would be helpful.
S T U R C A D E     M.A.M.E. Cabinet
http://www.briansturk.com/mame.html

BlackGreen

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 15
  • Last login:June 16, 2015, 08:01:26 pm
Re: Ultimarc U-Trak: MAME Sensitivity Confirmation
« Reply #4 on: April 15, 2015, 09:41:07 pm »
That would be tremendous, thanks.  Grabbed the src not too long ago for GroovyMame (which is what I run) and that would be helpful.

A bit late on my response but I wanted to post the code I use to get my sensitivity right for the U-Trak.  I wanted to update my MAME to the latest before forced SDL2, which is 0.155, so finally getting back to this.

MAME Version: MAME 0.155 x64
File: src/osd/sdl/input.c

Add these up top somewhere:
Code: [Select]
static int mouse_xrel_total = 0;
static int mouse_yrel_total = 0;
static const int MOUSE_REL_THRESHOLD = 3;

In function "sdlinput_poll" under "case SDL_MOUSEMOTION:"
Code: [Select]
// original code below...
//devinfo->mouse.lX = event.motion.xrel * INPUT_RELATIVE_PER_PIXEL;
//devinfo->mouse.lY = event.motion.yrel * INPUT_RELATIVE_PER_PIXEL;

// new code below...
mouse_xrel_total += event.motion.xrel;
mouse_yrel_total += event.motion.yrel;
if (mouse_xrel_total >= MOUSE_REL_THRESHOLD || mouse_xrel_total <= -MOUSE_REL_THRESHOLD){
mouse_xrel_total = 0;
devinfo->mouse.lX = event.motion.xrel * INPUT_RELATIVE_PER_PIXEL;
}
if (mouse_yrel_total >= MOUSE_REL_THRESHOLD || mouse_yrel_total <= -MOUSE_REL_THRESHOLD){
mouse_yrel_total = 0;
devinfo->mouse.lY = event.motion.yrel * INPUT_RELATIVE_PER_PIXEL;
}