MiSTer-devel / Linux-Kernel_MiSTer

Other
13 stars 19 forks source link

Request: Mouse Wheel as Spinner for 2 mouse objects #22

Closed birdybro closed 1 year ago

birdybro commented 2 years ago

Moved here from this request https://github.com/MiSTer-devel/NeoGeo_MiSTer/issues/161

https://www.amazon.co.jp/dp/B096FL5VXC/ - This is seen as a mouse device apparently, the trackball is the x and y for the mouse and the spinner is mouse wheel. vid:pid is 0ae4:0701 according to the user. Tested in the input core. Clockwise turn = increase mwhl number, counter-clockwise turn = decrease mwhl number.

https://www.amazon.com/gp/product/B002OOWB3O/ - This is a popular option for trackball users, seen as a mouse, trackball is x and y for the mouse, and the dial around the trackball is a mouse wheel. vid:pid is 047d:2048. When tested in the input core there is the same result as the first one, cw turn = increase and ccw turn = decrease. Below is the debug console output from this one:

clockwise

047d:2048:00 P0 Input event: type=EV_REL, Axis=8, Offset=-1
/dev/input/mouse0: dx=0, dy=0, scroll=1
PS2 MOUSE: 8 0 0 1

counter-clockwise

047d:2048:00 P0 Input event: type=EV_REL, Axis=8, Offset=1
/dev/input/mouse0: dx=0, dy=0, scroll=-1
PS2 MOUSE: 8 0 0 -1
flynnsbit commented 2 years ago

Verified, buttons map fine, the trackball is left/right on the mouse (already works in Arkanoid), spinner is the mouse scroll wheel and cannot be mapped or detected.

super-triangle commented 2 years ago

+1 to this request. I also have the Egret II spinner and I’d love to use it and the buttons on the device in MiSTer cores.

CraftyDlx commented 2 years ago

+1 also from me!

wolfsoftgmbh commented 2 years ago

+1 for me too. Its such a nice controller, hope somebody can do the driver part

sorgelig commented 2 years ago

too bad it doesn't include any dpad or joystick, so it cannot be used as standalone controller.

birdybro commented 2 years ago

That's true! One day someone will make the ultimate trackball+spinner arcade pad :P

sorgelig commented 2 years ago

while spinner is a good addition to controller, trackball/mouse is kind of redundant.. Another problem with this controller is inability to buy it.. If i would get this controller, then i would try to add reliable support for it.

CraftyDlx commented 2 years ago

Another problem with this controller is inability to buy it.. If i would get this controller, then i would try to add reliable support for it.

It's not an issue at all to get it. This controller will shortly be available for the western market, see for instance https://gamesrocket.com/eu/EGRET-mini-Paddle-and-Trackball-Game-Expansion-Set-Preorder/P27413-04 https://www.nin-nin-game.com/en/retro-games/49982-egret-2-mini-paddle-trackball-pack-taito-.html

Until then, it can be ordered as an import, e.g. from https://www.amazon.co.jp/gp/product/B096FL5VXC/ (where I got mine) https://www.japanzon.com/fr/taito-egret-ii-mini/17490-taito-egret-ii-mini-paddle-trackball-games-expansion-set--4988611221921.html https://www.play-asia.com/paddle-trackball-games-expansion-set/13/70ema9

birdybro commented 2 years ago

This Arcade1Up Atari Couchcade might end up using it too, but this is more of an all-in-one system with games in it, so no word yet on if it can be used as a controller.

image

A bit funky looking, but Arcade1Up sometimes makes good stuff. Just adding here for reference as later on it might be relevant and don't want to forget about it. Waiting on reviews to come out.

CraftyDlx commented 2 years ago

Arcade1Up Atari Couchcade

Really? Looks awesome but the fact that's it's an all-in-one system and therefore the price of ~200$ will break it's neck. It contains only 10 dusty and rusty games you can play on MiSTer or any other emulator anyways and where is the SD-card slot for 200$? I might be a success as a plain stick but like that, no way.

sorgelig commented 2 years ago

Arcade1Up Atari Couchcade

Really? Looks awesome but the fact that's it's an all-in-one system and therefore the price of ~200$ will break it's neck. It contains only 10 dusty and rusty games you can play on MiSTer or any other emulator anyways and where is the SD-card slot for 200$? I might be a success as a plain stick but like that, no way.

lol.. looking at price of Egret 2 $263 the one above is a bargain 🤣 Nope, guys... I don't play such games...

CraftyDlx commented 2 years ago

looking at price of Egret 2 $263 the one above is a bargain

I think you misunderstood. This is not about the "Egret II Mini all in one system". This is about the "EGRET Ⅱ mini Paddle and Trackball Controller" which is separately available for about $95. There is no need to buy the "Egret II mini" for about $200 (see e.g. japanzon.com) if you only want the paddle controller.

Besides, comparing the "Egret II mini" with the "Arcade1Up Atari Couchcade" is to compare apples with oranges. The "Egret II mini" has an integrated, rotateable screen, 40 build-in games and a SD-card slot. But thats offtopic.

@birdybro You might like this: https://ultimatemister.com/product/ultimate-spinner-pro/

birdybro commented 2 years ago

I am aware of Ricardo's nice spinner. That spinner doesn't use a mouse wheel as the spinner though.

MukiEX commented 2 years ago

If anyone is looking for the input data on the Egret II Mini Trackball (Model No: TAS-P-001)

(all this via an ubuntu box; there's no evtest in MiSTer afaik)

From lsusb:

0ae4:0701 Taito Corp.

From evtest:

Left 30mm button (EV_KEY (value 0 off, value 1 on)):

(EV_MSC), code 4 (MSC_SCAN), value 9001d
(EV_KEY), code 300 (?), value 0

Right 30mm button:

(EV_MSC), code 4 (MSC_SCAN), value 9001e
(EV_KEY), code 301 (?), value 0

Upper-Left 15mm button (purple):

(EV_MSC), code 4 (MSC_SCAN), value 90017
(EV_KEY), code 294 (BTN_BASE), value 0

Upper-Right 15mm button (blue):

(EV_MSC), code 4 (MSC_SCAN), value 90018
(EV_KEY), code 295 (BTN_BASE2), value 0

Center-Bottom 15mm button (white):

(EV_MSC), code 4 (MSC_SCAN), value 9001a
(EV_KEY), code 297 (BTN_BASE4), value 0

Turning the wheel (Positive values going clockwise, Negative values going counter clockwise, lowest/highest values I saw were 50/-71, though I'd imagine I didn't spin it as fast in one direction, they both probably top off equally):

(EV_REL), code 8 (REL_WHEEL), value -1

Trackball (tops out at less than -19/19 in any direction being spun FAST.):

Up is negative REL_Y, Down is positive REL_Y Left is negative REL_X, Right is positive REL_X

(EV_REL), code 0 (REL_X), value -1
(EV_REL), code 1 (REL_Y), value 1

In Windows the trackball moves relatively slowly and the spinner/scroll wheel moves pretty quickly. I have to "swipe" the rolling ball a good ten times to get from one end of the screen to the other (no acceleration curve detected in Windows). But the scroll wheel can get to the top or bottom of this Github page with a few mm of travel. Not sure if this is at all helpful; if need be I'll be happy to record more data.

gus0650 commented 2 years ago

+1 from me

poopybunghole commented 2 years ago

Might even be fun just to play these games with a mouse scroll wheel even if you don't have a spinner. As it is currently an unused input method. Also a potential cheap method of DIY spinners. Worth adding the functionality I think.

theypsilon commented 2 years ago

I managed to make it work, I'll try to prepare a PR when I have time

super-triangle commented 2 years ago

@theypsilon That's awesome to hear! Looking forward to playing Arkanoid with it. :D

flottenheimer commented 2 years ago

+1 What is the status on this? I just received my Taito egret II Mini Spinner/Trackball-controller last week and would loooove for it to work with Arkanoid and Breakout on the amazing MiSTer. Not at least for when Revenge of DOH is ready. 🔥

denisbr commented 2 years ago

I managed to make it work, I'll try to prepare a PR when I have time

How is it going with the PR?

gingerbeardman commented 1 year ago

Following.

denisbr commented 1 year ago

https://github.com/MiSTer-devel/Main_MiSTer/compare/master...theypsilon:Main_MiSTer:test-unstable-taito-spinner-firmware#diff-15bfc15588deaba1e467e30182d44d269884d911e5d684edacab95d8cffe7ba0

This is the relevant diff. @theypsilon, can I ask whether this is a working solution or if it would require a lot more work to be production ready?

retrob0t commented 1 year ago

Mouse wheel as spinner has been implemented in MiSTer main, and is working correctly for the Egret II mini spinner/trackball controller.

This issue can be closed.