-
Notifications
You must be signed in to change notification settings - Fork 3
Analog controls #5
Comments
Agree on that. |
Right-o! I don't have a gun with analog inputs yet that I can use to test but I'm happy to implement this anyways. Just one question: How should the stick be recognized?
I know GUN4IR had the ability to use a Wii Nunchuk, but I'm not quite sure if they used analog outputs or just converted stick input to digital. The only reason I hadn't considered this earlier was not having a Top Shot myself, which I now realize only uses sticks for directional input. |
Thanks to take this improvement into account! Well, I don't only think in guns like the Top Shot Elite gun that has 2 analog sticks as-is, I was thinking in adding mini sticks for Arduino in any lightgun we can modding I think that could be useful to have the possibility to choice if the analog stick can work as analog or digital. But the digital input could be a good start When using a Nunchuk in GUN4IR the stick works as digital inputs |
Then I can absolutely match that behavior (digital), should be fairly simple. Should a stick be mapped/aliased to keyboard cursor keys, like the Guncon 2's d-pad? Or should it go to a gamepad-like output? I will probably proto a digital-only implementation before writing in analog output, but admittedly it's hard to think of gun games that need an analog stick specifically. The obvious example is TC4 retail's FPS mode, but a Guncon 3 isn't even able to be emulated yet in RPCS3. |
Hi SeongGino, You're right, maybe mapping the analog stick to a digital d-pad based on keyboard cursor is far enough... I only remember a few lightgun games that need a stick and I'm not pretty sure if any of them really uses an analog stick... Metal Gear Arcade, Banzai Scape 2, Epoch, the 2 Resident Evil Chronicles and Dead Space: Extraction on RPCS3, more on Dolphin and Teknoparrot emulators... But probably those games only use a digital implementation |
Top Shot is coming in soon, so I can start implementing this shortly. Since I've added gamepad output support (mainly to support PCSX2), the idea for now is to make any stick respond as either a d-pad, the keyboard arrow keys, or a second stick (currently, It's also safe to say we probably won't need the second stick either--as far as I can tell, RaspPi Pico doesn't even have a fourth analog pin, and I don't think any games outside of Cabela's titles even uses it? Either way, as the thread has shown thus far, the use of the stick is limited outside of navigation, so it's mostly semantics at this point :P |
The output of the joystick is simulated using the X/Y coordinates from the camera. |
That is indeed what we're doing; I'm just asking to clarify which stick should the camera simulate, and so I know which side to map a gun's available analog stick to. |
4fcf9d6 has added support for any analog stick to be mapped to the output'd left stick, with the right reserved for the camera when analog output mode is ticked. The pins should be set to read at 12-bit precision, but do advise if the sensitivity or the deadzone is too much or not enough (I still have yet to try with an analog stick myself). Though it seems like we're reaching the limits of what can be safely transmitted with this, as I had to move things around to ensure that camera performance wasn't impacted. For what it's worth, I ran into some strangeness in an early build that caused the board to stall, very much like #3, so please report back if there are any issues. |
I have a suggestion. Both the left joystick and the right joystick should be implemented. In pause mode, use a combination of keys to switch between the left joystick and the right joystick, as some games use the left joystick while others use the right joystick. |
Of course, I have a better suggestion. If it can be switched to the regular relative coordinate mouse mode, it would be unbeatable because there are still many light gun games that only support the regular mouse mode, like "Rambo: The Video Game". |
Hmmm, so different games use different sticks for aiming? That's really dumb--but noted. Will see about implementing soon. (since I forgot to write, just sending:
will do the job. No idea what an equivalent to this would be on Windows.) As for the mouse, we can only use absolute positioning, since we can only load one type of mouse at a time (and the way mice devices work, they are hard-coded to being either relative or abs at boot)--even then, relative positioning simply doesn't work when lightguns, and the nature of our tracking, are intrinsically based on absolute positioning. |
Added stick declaration in 676a69e so the camera & analog stick will swap places when declared. Still exclusively a serial command tho - send A reminder though, do advise if the physical gun's analog stick movement isn't quite accurate! It might need some tweaking still. |
How do I switch between joystick and light gun? I have a lot of things to do recently and haven't had time to review the code in detail. You should update the README file to inform everyone how to use the new code. |
Just to clarify, this issue is about adding a physical joystick to the board. The ability to output the camera as a stick was already implemented but not a part of this issue. I've already tested and that part works as expected. I'm still waiting for feedback on this issue so I can add it to the next release; and because of the scope of what's been added/changed, it will take a while for me to update documentation. |
Sorry,there seems to be a mistake in my description. What I actually meant to ask is how to switch functions between the light gun and the controller. I will find some time to test it out. It seems that there aren't many people who use MAMEHOOK for testing. |
Apologies for the confusion. It should be noted that it (analog output mode) isn't dependent on Mame Hook but I'm not sure how else Windows users can send one-off serial commands. Like I said earlier, it's relatively easy to do on Linux. Now that I think about it, I probably should remove the "experimental" label off the Mamehook flag in the sketch code... stability has been fine so long as the patched core is used (and the TinyUSB library is not installed in the IDE--I know, confusing). It'll matter less once binaries are being distributed. |
This comment was marked as off-topic.
This comment was marked as off-topic.
@cmjdbb None of this is related to the issue at hand for the record, so I have no idea what you're on about right now. Though I'll only comment on this:
So you're referring to this?
If you have any other issues that aren't related to the topic here, please make a separate thread for it to declutter this one. |
support for analog controls used in guns such as the top shot elite
The text was updated successfully, but these errors were encountered: