New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Naomi) Controls investigation #115
Comments
Ok, i did a few interesting discoveries :
by
This is probably necessary to get working analogs, and perhaps fix other input issues
after |
AFAIK the following code is never called for P2 controls with those games : |
The 2nd player issue should be fixed with #121. I still need to implement analogs. |
Also, i'm 99% sure analogs go in there : |
@twinaphex This is just crazy how bad i'm with bitwise arythmetics and type conversion, tell me how i can convert a signed char ( -127 to 128) to an unsigned short (0 to 65536) properly, and analog controls will be fixed 5 minutes later. |
Would that work? -127 -> 0 and 128 -> 65280
|
@flyinghead i opened a PR, controls finaly working in monkey ball, feel free to rewrite the lines i mention in the PR properly (i did it "the way i understand"). |
@flyinghead Nope, that's one of the things i tried, it doesn't work properly (extreme left analog would move right). |
Then you could try:
converts: -128 to 65280, 0 to 32512 and 127 to 0 Or:
converts: -128 to 65535, 0 to 32767 and 127 to 255 |
@flyinghead |
It's all good then. |
For future reference about 4P mode : https://www.solvalou.com/arcade_naomicapcom.php Basically, the second Jamma I/O board will be useless for most (all ?) games, we need to emulate a Capcom Naomi I/O board for this, and AFAIK, there is no emulator who knows how to do that (didn't find anything in MAME). |
As mentioned in 55b25a4, naomi controls are only partially working.
I think i got the general idea of what is wrong.
This is how we handle naomi inputs in reicast :
https://github.com/libretro/reicast-emulator/blob/master/core/hw/maple/maple_devs.cpp#L1136-L1161
This is extremely similar to how mame is handling dreamcast controls :
https://github.com/mamedev/mame/blob/master/src/mame/drivers/dccons.cpp#L428-L459
But mame is actually handling naomi controls differently, see this :
https://github.com/mamedev/mame/blob/master/src/mame/drivers/naomi.cpp#L2038-L2064
My guess is that the naomi controls in reicast are based on how the dreamcast controls work, but we actually need to figure out how to port the lines from naomi.cpp in the link above to reicast.
The text was updated successfully, but these errors were encountered: