MiSTer-devel / PSX_MiSTer

PSX for MiSTer
GNU General Public License v2.0
206 stars 49 forks source link

Request: Use MiSTer's Paddle input as the Namco Volume controller (NeGcon) #222

Closed sonik-br closed 1 year ago

sonik-br commented 1 year ago

A few games uses the Namco Volume controller (SLPH-00015 / NPC-102) for input. It's a paddle using the NeGcon protocol.

MiSTer already have support for real paddle input. When using a paddle with mister, it does not output as joystick X axis, it get's maped as "paddle". So it's impossible to use a real paddle with the core.

Would be possible to have an "Paddle-NegCon" option just like the "Wheel-NegCon" option?

Comparing it's output to a NeGcon, it just use a single axis and two buttons:

NegCon Volume
Twist Paddle
Start A (main button)
A B (second button

Now stepping into uncharted waters for me... I don't know how much the framework works...

Might be possible to reuse the "Wheel-NegCon" mode? This joypad.WheelMap comes from mister's linux side? If so, a check here for also a Paddle would work?

https://github.com/MiSTer-devel/PSX_MiSTer/blob/ef16059177c922a23f5b8199d1c7a34838b2beb9/rtl/joypad_pad.vhd#L784

Something like:

if (wheel || paddle) { }
else { }
RobertPeip commented 1 year ago

What games use it so it can be tested?

birdybro commented 1 year ago

From this source --> https://shmups.system11.org/viewtopic.php?f=3&t=58034

And apparantly all negcon compatible games https://en.wikipedia.org/wiki/NeGcon

sonik-br commented 1 year ago

I've personally used it with Arkanoid R2000 and Prism Land (only the JAP version supports it)

There's also this list https://shmups.system11.org/viewtopic.php?f=3&t=58034

In practice it uses the same report as the negcon and any negcon compatible game should support it.

RobertPeip commented 1 year ago

Most negcon games wouldn't profit from it, as it doesn't have enough buttons then.

Overall i'm not sure emulated paddles is a good way. With different ranges and models, this seems like a zoo of things to maintain for very little win. The pure mapping of the port might work, but i don't think you would be happy with it.

Maybe it's rather a thing to keep for SNAC?

sonik-br commented 1 year ago

A "pure mapping" might be enough for some of the paddle adapters out there.

Sorg have a project to build a spinner/paddle. Very simple to do and to use, and it's tight integrated with the mister framework. With a simple rotary encoder, his device can output as a spinner and also as a paddle (with digital 0-255 range).

I've modified Sorgs code to output in a way that mister sees it as a wheel, and using the "Wheel-NegCon" on the core works wonderfully! Problem is that when the device outputs this way, it will be a wheel for mister, and not a paddle/spinner anymore, so it breaks compatibility with all other paddle games/cores.

I agree that if some or most paddles/adapters have different ranges, this will be a pain to maintain. But on the good side, at least in Arkanoid R2000 the game can calibrate the paddle range. Can't say about other games...

If you want to give it a try, I would be very happy to test it.

RobertPeip commented 1 year ago

The problem is that "support for some" means endless discussion and support and requests for the ones that don't work. We already see this with other edge case peripherals only 2-3 people use and can't get to run properly. It's not a good experience in the end.

Maybe there is way to enable it for those who really want to tinker around with their stuff, but not make it a standard option that people will try and not be happy with it....

In any case: i have no idea how spinners really work. I see the HPS code which delivers a signed 8 bit + update, but no buttons. I also have no spinner to test it. I could try to exchange a analog axis with the 8 bit signed value and you can test and see what it even does?

btw: i think you are also on discord? Maybe send me a private message there, so we have shorter ways to communicate.

sonik-br commented 1 year ago

I will send you a message on discord. Closing this one for now. And thanks for looking at it :)

tjanas commented 8 months ago

Would it be possible to re-open this issue and implement support for Namco Volume Controller at some point? With a USB spinner, I have found that it works great during gameplay with Arkanoid R 2000 (defined as a NeGcon in the core menu), but at the game title screen it does not work properly for scrolling up/down as I would expect it to if it was a real Namco Volume Controller on original hardware.

sonik-br commented 8 months ago

@tjanas the core already supports the Volume Controller. The device reports as a negcon with fewer buttons. Try to do small rotation movements on menus. See, the volume controller (and the negcon) have a limited range of rotation. A spinner can rotate freely. The software (game) expects a limited range also.

BTW even on original hardware, it's a pain to navigate the game's menu with the paddle.