Build Your Own Arcade Controls Forum
Main => Main Forum => Topic started by: BlackGreen 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.
-
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 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.
-
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.
-
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:
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:"
// 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;
}