Closed Mygit520 closed 3 months ago
Windows and Linux don’t provide the same APIs to applications, so some behaviour will obviously be different.
MAME defaults to its RawInput mouse and lightgun providers on Windows. Which one reacts to a peripheral depends on whether it generates relative or absolute RawInput MOUSE_MOVE_RELATIVE
or MOUSE_MOVE_MOVE_ABSOULTE
. RawInput is a Windows-specific API.
As of version 0.266 MAME defaults to its SDL mouse and lightgun providers on Linux (the SDL lightgun provider was not implemented in version 0.265 and earlier). The SDL mouse provider responds to SDL mouse movement events; the SDL lightgun provider maps the pointer position within the window onto the lightgun axes. The SDL mouse and lightgun providers have similar behaviour to the Win32 mouse and lightgun providers on Windows.
You may get better results by upgrading to version 0.266 so you can use the SDL lightgun provider, or by using the X11 XInput lightgun provider described here: https://docs.mamedev.org/commandline/commandline-all.html#mame-commandline-lightgunprovider
Sorry, wrong link. Description of the X11 XInput lightgun provider is here: https://docs.mamedev.org/advanced/linux-lightguns.html
Note that none of the MAME developers have access to hardware for testing this, and the person who contributed it has not contributed to MAME or responded to communication since. We cannot provide additional support.
Windows and Linux don’t provide the same APIs to applications, so some behaviour will obviously be different.
MAME defaults to its RawInput mouse and lightgun providers on Windows. Which one reacts to a peripheral depends on whether it generates relative or absolute RawInput
MOUSE_MOVE_RELATIVE
orMOUSE_MOVE_MOVE_ABSOULTE
. RawInput is a Windows-specific API.As of version 0.266 MAME defaults to its SDL mouse and lightgun providers on Linux (the SDL lightgun provider was not implemented in version 0.265 and earlier). The SDL mouse provider responds to SDL mouse movement events; the SDL lightgun provider maps the pointer position within the window onto the lightgun axes. The SDL mouse and lightgun providers have similar behaviour to the Win32 mouse and lightgun providers on Windows.
You may get better results by upgrading to version 0.266 so you can use the SDL lightgun provider, or by using the X11 XInput lightgun provider described here: https://docs.mamedev.org/commandline/commandline-all.html#mame-commandline-lightgunprovider
I downloaded the source code of 0.266 and cross compiled it to run on the ARM64 architecture. I chose the SDL Lightgun device as you said, and the emulator recognized my absolute value mouse device. The buttons can be detected, but the movement of the X and Y axes is completely undetectable. I followed the website you provided and configured udev rules and Xorg inputs step by step according to the instructions above. However, this situation became even more suspious. When we enabled this configuration, our own keyboard and mouse (including absolute and relative value mice) became invalid.
MAME version
0.230, 0.265
System information
Windows: Windows 11, 64-bit, version 23H2, USA, x86-64, 16GB system RAM
Linux: Ubuntu 18.04.6 LTS (GNU/Linux 5.4.0-150-generic x86_64), 16 GB System RAM
INI configuration details
Emulated system/software
game: timecris I
Incorrect behaviour
Our mouse output absolute coordinate. It works exactly same as a normal mouse in Linux system desktop and Windows system desktop. We have same version of Mame in both Windows and Linux. the mouse work normally in Windows. However, the mouse's sensitivity is very unusual in Linux. The mouse was locked around the four corner of the screen and move suspious fast in both the game and mame interface. We have to modify the in-game sensitivity and set it to the minimum. Even though the sensitivity has been set to the minimum, it still not working well comparing to the behavior in Windows. The mouse need no configuration and work smoothly in Windows.
Expected behaviour
Our mouse works fine in Linux system desktop just like a normal mouse in Linux. We expect our mouse working normally in emulator interface and in Timecris game.
Steps to reproduce
we have a hid device that output absolute coordinate. The device works fine in Linux system desktop. However, in both Mame 0.230 and Mame 0.265 in Linux, the device was locked around the 4 corners of the screen. The movement of the device on the screen become suspious fast in both Mame interface or in Timecris game.
Additional details
No response