Moderators: Mug UK, Zorro 2, Greenious, spiny, Sorgelig, Moderator Team
Sorgelig wrote:Mouse generates only amount of movement (EV_REL event).
Sorgelig wrote:Dolphinbar from the name looks like Wiimote's optical tracking adaptation for general use?
Locutus73 wrote:Sorgelig wrote:Mouse generates only amount of movement (EV_REL event).
Nope, there are some rare pointing-devices/mice, like touchscreens (which are emulated by a Dolphinbar and modern PC lightguns) which exposes themselves as HID mice (see Dolphinbar lsusb attributes here viewtopic.php?f=117&t=32736&p=368102#p368102 to confirm it’s a composite device with a HID mouse descriptor, so bInterfaceClass=3 and bInterfaceProtocol=2), but they send the absolute position (EV_ABS) events (again see the same post). They are rare, but they exist ad they are seen by operating systems as a mouse with no special driver. Think about it, how could a touchscreen be a mouse and send you the precise position of a single tap on the screen?
P.S.: Dolphinbar has several operational modes and in one it acts as a K+M combo, while in another it acts as a mouse+joypad combo, no driver needed. Obviously in both modes, as soon as you move it, MiSTer gets confused by its EV_ABS events and fires its joypad wizard, but with Rysha/Kitrinx latest implementations it shouldn’t matter since the EV_ABS events are translated into absolute screen positions for lightguns games on NES catching two birds with a stone: supporting both joypads and lightgun. The hard part is passing the joypad wizard pointing the screen with a lightgun and doing precise movements. I’ll report back as soon as I have some time.
Regards.
Locutus73
Locutus73 wrote: MiSTer gets confused by its EV_ABS events and fires its joypad wizard
Sorgelig wrote:You are not correct about mice device. /dev/input/mice is common for all devices pretending to be a mouse..
[...]
P.S.: My previous post was only about mouse(trackball).
Sorgelig wrote:Most likely nothing needs to be changed in core.
Sorgelig wrote:Probably some changes in MiSTer binary required for easier setup. Probably some hardcoded VID/PID will be enough. I think there is no other way to distinguish Dolphinbar (or some Lightguns) from generic gamepad.
Sorgelig wrote:Locutus73 wrote: MiSTer gets confused by its EV_ABS events and fires its joypad wizard
it's not true already several releases of MiSTer.
Sorgelig wrote:Your logic of detecting lightguns by EV_ABS is absolutely wrong. EV_ABS is the main event for analog joystick and analog sticks of gamepads.
And of course all input devices (including gamepads and joysticks) are HID devices. Many devices also advertise mouse protocol as they may be a complex multifunctional devices. Nothing from mentioned is identified lightguns as exact lightguns. They are bare pointing devices like touchscreen or touchpad. And if call more generic - they are bare analog sticks
Sorgelig wrote:So, currently i see the only way is to detect them by VID/PID and do a hardcoded setting to pass their X/Y as an analog joystick.
So, i need VID/PID of such devices and Axes numbers used for X and Y. Current implementation scales any range of analog sticks to -127..+127 range. This will be more than enough for lightguns. So change here is not required.
Sorgelig wrote:Most likely lightguns are the same class as touchscreens (note: not touchpads - they are EV_REL).
Sorgelig wrote:The only thing from my point of view can identify them are axes numbers. I remember DS4 generates axes 8/9 (IIRC) for its touchpad which acts as touchscreen as well.
So if lightguns generate the same axes and these axes are different from 0-5 then it can be used as identification.
As usual all input events can be seen in USB console while running Menu core.
Code: Select all
Input event: type=EV_ABS, Axis=0, Offset:=485, jnum=2, ID:0079:1802. ABS_INFO: min = 0 max = 512
Input event: type=EV_ABS, Axis=1, Offset:=400, jnum=2, ID:0079:1802. ABS_INFO: min = 0 max = 400
Input event: type=EV_ABS, Axis=0, Offset:=484, jnum=2, ID:0079:1802. ABS_INFO: min = 0 max = 512
Input event: type=EV_ABS, Axis=0, Offset:=483, jnum=2, ID:0079:1802. ABS_INFO: min = 0 max = 512
Sorgelig wrote:While i don't have light gun, i have DualShock4 whose touchpad acts as touchscreen.
So, i'm implementing light gun through on it.
And it works well (after some using it some time).
Sorgelig wrote:While i don't have light gun, i have DualShock4 whose touchpad acts as touchscreen.
So, i'm implementing light gun through on it.
And it works well (after some using it some time).
Code: Select all
Input event: type=EV_ABS, Axis=1, Offset=262, jnum=1, ID:0079:1802. ABS_INFO: min = 0 max = 400
PS2 MOUSE: 28 32 229
Input event: type=EV_ABS, Axis=0, Offset=214, jnum=1, ID:0079:1802. ABS_INFO: min = 0 max = 512
Combined mouse event: btn=0x28, dx=14, dy=-9, scroll=0
Input event: type=EV_ABS, Axis=1, Offset=267, jnum=1, ID:0079:1802. ABS_INFO: min = 0 max = 400
Input event: type=EV_ABS, Axis=1, Offset=273, jnum=1, ID:0079:1802. ABS_INFO: min = 0 max = 400
Combined mouse event: btn=0x28, dx=0, dy=-12, scroll=0
PS2 MOUSE: 28 14 235
Input event: type=EV_ABS, Axis=1, Offset=285, jnum=1, ID:0079:1802. ABS_INFO: min = 0 max = 400
Combined mouse event: btn=0x28, dx=0, dy=-23, scroll=0
Input event: type=EV_ABS, Axis=0, Offset=211, jnum=1, ID:0079:1802. ABS_INFO: min = 0 max = 512
Combined mouse event: btn=0x38, dx=-6, dy=-21, scroll=0
Input event: type=EV_ABS, Axis=1, Offset=296, jnum=1, ID:0079:1802. ABS_INFO: min = 0 max = 400
PS2 MOUSE: 38 250 212
Input event: type=EV_ABS, Axis=1, Offset=309, jnum=1, ID:0079:1802. ABS_INFO: min = 0 max = 400
Combined mouse event: btn=0x28, dx=0, dy=-25, scroll=0
Combined mouse event: btn=0x38, dx=-6, dy=-21, scroll=0
Input event: type=EV_ABS, Axis=0, Offset=208, jnum=1, ID:0079:1802. ABS_INFO: min = 0 max = 512
Input event: type=EV_ABS, Axis=1, Offset=320, jnum=1, ID:0079:1802. ABS_INFO: min = 0 max = 400
PS2 MOUSE: 38 250 210
Input event: type=EV_ABS, Axis=0, Offset=206, jnum=1, ID:0079:1802. ABS_INFO: min = 0 max = 512
Combined mouse event: btn=0x38, dx=-4, dy=-15, scroll=0
Input event: type=EV_ABS, Axis=1, Offset=328, jnum=1, ID:0079:1802. ABS_INFO: min = 0 max = 400
Input event: type=EV_ABS, Axis=0, Offset=212, jnum=1, ID:0079:1802. ABS_INFO: min = 0 max = 512
Combined mouse event: btn=0x28, dx=12, dy=-12, scroll=0
Input event: type=EV_ABS, Axis=1, Offset=334, jnum=1, ID:0079:1802. ABS_INFO: min = 0 max = 400
PS2 MOUSE: 28 8 229
Input event: type=EV_ABS, Axis=0, Offset=221, jnum=1, ID:0079:1802. ABS_INFO: min = 0 max = 512
Combined mouse event: btn=0x28, dx=18, dy=-13, scroll=0
Input event: type=EV_ABS, Axis=1, Offset=341, jnum=1, ID:0079:1802. ABS_INFO: min = 0 max = 400
Input event: type=EV_ABS, Axis=0, Offset=227, jnum=1, ID:0079:1802. ABS_INFO: min = 0 max = 512
Combined mouse event: btn=0x28, dx=12, dy=-12, scroll=0
Input event: type=EV_ABS, Axis=1, Offset=347, jnum=1, ID:0079:1802. ABS_INFO: min = 0 max = 400
PS2 MOUSE: 28 30 231
Input event: type=EV_ABS, Axis=0, Offset=398, jnum=1, ID:0079:1802. ABS_INFO: min = 0 max = 512
Combined mouse event: btn=0x28, dx=127, dy=-102, scroll=0
Input event: type=EV_ABS, Axis=1, Offset=400, jnum=1, ID:0079:1802. ABS_INFO: min = 0 max = 400
Combined mouse event: btn=0x08, dx=127, dy=0, scroll=0
Combined mouse event: btn=0x08, dx=88, dy=0, scroll=0
Input event: type=EV_ABS, Axis=0, Offset=387, jnum=1, ID:0079:1802. ABS_INFO: min = 0 max = 512
Combined mouse event: btn=0x18, dx=-22, dy=0, scroll=0
PS2 MOUSE: 68 255 154
Input event: type=EV_ABS, Axis=0, Offset=233, jnum=1, ID:0079:1802. ABS_INFO: min = 0 max = 512
Combined mouse event: btn=0x18, dx=-127, dy=0, scroll=0
Combined mouse event: btn=0x18, dx=-127, dy=0, scroll=0
Combined mouse event: btn=0x18, dx=-54, dy=0, scroll=0
PS2 MOUSE: 58 1 0
Input event: type=EV_ABS, Axis=0, Offset=274, jnum=1, ID:0079:1802. ABS_INFO: min = 0 max = 512
Combined mouse event: btn=0x08, dx=82, dy=0, scroll=0
Input event: type=EV_ABS, Axis=0, Offset=147, jnum=1, ID:0079:1802. ABS_INFO: min = 0 max = 512
Combined mouse event: btn=0x18, dx=-127, dy=0, scroll=0
Combined mouse event: btn=0x18, dx=-127, dy=0, scroll=0
PS2 MOUSE: 18 84 0
Combined mouse event: btn=0x08, dx=2, dy=0, scroll=0
Input event: type=EV_ABS, Axis=0, Offset=148, jnum=1, ID:0079:1802. ABS_INFO: min = 0 max = 512
PS2 MOUSE: 8 2 0
But now the problem: while the Wiimote aiming to the screen is seen as a Joypad analog stick, A and B button are seen as mouse buttons and other buttons are seen as keystroke. When Zapper(Joy1) is selected as Peripheral, the core expects a button mapped as Fire from the same joypad for triggering the virtual lightgun fire button, but when I click the trigger on the Wiimote MiSTer gets a mouse click. If I select Zapper(Mouse) I can successfully fire clicking the wiimote trigger, but I can’t aim.
A (simple? I don’t know) solution would be triggering virtual lightgun fire on left mouse click even when Zapper(Joy1) is selected. In this mode both Joy1 Fire button and mouse left click should trigger the virtual lightgun fire. This way we could successfully use the Dolphinbar/Wiimote combo.
Another marginal feature I’d like to get is using Wiimote buttons for navigating MiSTer menus. I partially achieved this, since the d-pad is mapped as arrow keyboard keys, + as RETURN and – as ESC. Problem is that home button is mapped as Windows key and I didn’t manage to map it for firing the MiSTer menu. I tried the joypad wizard, but it’s impossible to reach the menu definition. I tried to remap the keyboard, but again, I didn’t manage to get a result.
Thank you in advance.
Regards.
Locutus73
Regards.
Locutus73
Sorgelig wrote:So, Dolphinbar has BT receiver for wiimote?
Sorgelig wrote:While i don't have light gun, i have DualShock4 whose touchpad acts as touchscreen.
So, i'm implementing light gun through on it.
And it works well (after some using it some time).
onaryc29 wrote:have someone try to use a wiimote with just a bluetooth dongle and a sensor bar which is powered by battery? It should work?
Users browsing this forum: No registered users and 4 guests