MiSTer-devel / Arcade-MCR3_MiSTer

Arcade: Midway MCR3 based games
2 stars 7 forks source link

Discs of Tron support for GRS Push/Pull Spinner #13

Open thorr2 opened 2 years ago

thorr2 commented 2 years ago

Hello, could you please add support for the GRS (Glens Retro Show) Push/Pull Spinner? This spinner is not recognized at all by Tron or Discs of Tron, but it works as a mouse in other cores like ao486. The controls are as follows:

Press down on the spinner: Mouse Left Click Pull up on the spinner: Mouse Right Click It comes with two arcade buttons that act as Mouse Scroll Down and Mouse Scroll Up. These could be used for Player 1 and 2 buttons. The spinner acts as a Mouse X-axis

Thanks!

sorgelig commented 2 years ago

what is vid:pid of this spinner? I have GRS spinner which works as a spinner in MISTer

thorr2 commented 2 years ago

Hello, here is the vid:pid information from lsusb. Thanks!! Bus 001 Device 006: ID 32be:1422 Baolian industry Co., Ltd. BL button spinner Z # 1

sorgelig commented 2 years ago

My spinner is 3be:1420

add into INI file:

spinner_vid=0x32BE
spinner_pid=0x1422
spinner_axis=0

you can use also spinner_throttle option for slower/faster move.

thorr2 commented 2 years ago

Thank you. This got the spinner moving, but the up and down is throwing the disc. It is supposed to raise and lower the level/height where you throw the disc. This won't happen until a few levels into the game. The left mouse click needs to be mapped to moving the level down, and the right mouse click needs to be mapped to moving the level up. Also, the scroll Down and Scroll Up on the mouse are the function of the two arcade buttons that come with the spinner and could be mapped to player 1 and 2 since those are the two buttons on the arcade control panel. There is also a trigger joystick with an extra button on the back. See this video at about 4:52 to see the levels change for the up/down push/pull spinner: https://www.youtube.com/watch?v=9ZGW8QvysdU

Thanks again! Also, how do you define spinner_throttle? What are the values it can be equal to?

sorgelig commented 2 years ago

MiSTer supports only one button on paddle/spinner. Other buttons should be used on gamepad/keyboard. MiSTer also expects that spinner generating mouse events should generate left/right buttons events, not wheel up/down.

sorgelig commented 2 years ago

from MiSTer.ini:

; spinner_throttle with base value 100 gives one spinner step per one tick. Higher value makes spinner slower.
; Lower than 100 makes spinner faster. Negative value gives opposite direction.
thorr2 commented 2 years ago

Thank you. Discs of Tron has a unique spinner control for the arcade game on its arcade control panel that spins and moves up and down. There are only two people who make it. Groovygamegear and GRS. They both have built in USB outputs as far as I know. The GRS produces left and right mouse clicks for the spinner when you pull it up/push it down. Can't these be made to be remapped in Discs of Tron to the correct controls in the core for moving the player targeting up and down instead of throwing the disc? Other cores work with multiple mouse buttons such as ao486. It could be as simple as an option to enable GRS push/pull spinner mapping in the core menu. It would be a shame if this unique game can't be played properly when there is a perfect controller for it available.

Thanks again!

On Fri, Dec 3, 2021, 5:43 AM Alexey Melnikov @.***> wrote:

MiSTer supports only one button on paddle/spinner. Other buttons should be used on gamepad/keyboard. MiSTer also expects that spinner generating mouse events should generate left/right buttons events, not wheel up/down.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MiSTer-devel/Arcade-MCR3_MiSTer/issues/13#issuecomment-985531747, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMVRPLXBKVF5YGLO32GSV43UPDCRFANCNFSM5JGNVZQA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

sorgelig commented 2 years ago

MiSTer support 2 major classes of input devices: 1) directional control + many buttons + possible spinner/paddle - these devices have mapping dialog system wide and per core. 2) simple spinner/paddle with 1 button. These devices have no mapping and overlaid on class 1 device.

So your option is either keep it as class 2 and have only basic support. Or you can make it as class 1. I don't know if this GRS spinner has separate hardware between USB board and mechanical parts of spinner and micro-switches. I believe this is a part of your cabinet where additionally you have directional control device and other buttons. So i suggest to remove all those USB boards and replace them by single Arduino Micro which will have all controls combined into a single input device, so you can map it flexibly for any core you want, including those additional switches up/down. Some examples of such controllers are here: https://github.com/MiSTer-devel/Retro-Controllers-USB-MiSTer

thorr2 commented 2 years ago

Thank you. This is very helpful and makes sense. I have also emailed GRS to see if maybe they can reprogram the spinner to send keyboard keys like u and d for the up/down. Would that work since I think the keyboard can work at the same time, or do all of the player 1 controls need to come from one device?

Is there any chance that in the future the MiSTer's input system can get reworked to support a Mame-like system where any device can be used for any purpose? It would be great if there was a list of all input controls for each core that you could define from any and all connected devices. For example if I have an Arcade cabinet with two joysticks on it that are independent devices, it would be nice to be able to bring up the SNES core, launch Super Smash TV, and use the left joystick for the movement, and the right (player 2) joystick for the SNES buttons for player 1. Then I could play it like Robotron with two joysticks. Alternatively, I could make the two joysticks be one device with a joystick and a hat, and allow it to be used for player 1 and player 2. I keep running into issues with the current system and would really appreciate a change that allows the additional flexibility of using any physically connected control for any control in the core. I believe in Mame you can have a master set of controls and then further change them in each game if you want and it doesn't care what you press on any device when defining a control. Hopefully that makes sense. Thank you for your consideration.

For now I will see if I hear back about updating the GRS to use keyboard keys and hopefully that would work, and if not, I can try taking it apart to see if I can get at the connectors and use an Arduino. Thanks again!

sorgelig commented 2 years ago

MiSTer already supports mame-like keyboard mimicking devices such as JPac/iPac/JammaSD. It supports control for 2 players.

thorr2 commented 2 years ago

Thanks! Looking at the IPAC-2, it seems to be extremely flexible and easily programmable. It has connections for a Trackball and a Spinner as well. It appears that the IPAC-2 support on the MiSTer uses the Mame default keyboard mapping so both player one and player two can work at the same time.

Please confirm if all of the following is correct if I connected an IPAC-2 via USB to a single arcade control panel:

Alternative to the IPAC-2, can I use an Arduino programmed with the same Mame keyboard keys for the joysticks so both players can work at the same time on one device by defining the Arduino's pid and vid to the jamma_pid and jamma_vid in the MiSTER.ini? Would this also allow other controls to work at the same time on the Arduino like a spinner (same question asked above in the third bullet point)?

Thanks again!

sorgelig commented 2 years ago

I don't have any of those mame controllers, so cannot answer precisely. But some users confirmed it works for 2 players. Spinners aren't supported on IPAC/JPAC/jammaSD. Better way is to use Arduino Micro which can be programmed as a MiSTer arcade control with spinner.

thorr2 commented 2 years ago

Thank you very much for your help. I have been doing some experimenting and it seems that I will be able to use an Arduino programmed with keyboard keys for two simultaneous players (only in arcade cores), and also have a spinner or trackball. This should work for most things except three and four-player games since any additional joysticks/gamepads plugged in would probably be first detected as player 1 and player 2 instead of player 3 and 4. For Discs of Tron, I have been in contact with GRS and they are thinking about a solution to somehow provide output pins for the up/down function of the DOT spinner that could be hooked up to an Arduino or IPAC in addition to the mouse clicks via USB. There are no pins inside the spinner to connect to. The GRS DOT spinner is entirely digitized using a 3-dimensional hall effect sensor.