libretro / virtualjaguar-libretro

Hard fork of Virtual Jaguar (abandoned project) to Libretro
31 stars 34 forks source link

[bug] Numpad 7, 8, 9, *, # are unmappable onto the joypads. #39

Closed Testsr closed 2 years ago

Testsr commented 5 years ago

Self expantory

fragmental commented 5 years ago

@Testsr Why did you change it from "unmappable" to "unmappable onto the joypads"? Is there a way to map them to the keyboard?

These are critical controls for Alien Versus Predator Numpad 7 is Strafe Left Numpad 8 is Toggle Map Numpad 9 is Strafe Right Numpad * + # is Reset Game

Alien Versus Predator is almost unbeatable without the automap, but I don't know if it even works with the Alien Versus Predator core. It doesn't work with the windows build of version 2.1.2 or a build from 2016 06 03, and a build of a fork I found from 10 days ago, which are the newest builds I could find.

Testsr commented 5 years ago

OKay.

yukichigai commented 4 years ago

Confirming this behavior in my own tests. I haven't yet confirmed if there's a way to get around this through manual editing, but I am not holding out much hope.

The Virtual Jaguar Docs page should be updated to note this explicitly, and games with bindings assigned to Numpad 7+ should be added to the Compatibility list.

yukichigai commented 4 years ago

Digging into this more. The issue appears to be on the libretro side rather than Virtual Jaguar itself. VJ includes definitions and keybind support for the full numpad, including * and #, and corresponding variables. However, libretro.c stops at numpad 6 when it comes to keybind logic. Funnily enough, due to the way VJ orders the buttons this leaves gaps in the joystick button array as defined in joystick.h (and used in joystick.c); the last button in the array is Pause, which can be assigned, so this isn't an issue of a truncated array or something.

For now, there may be a way to force the assignment through manual editing of the configuration. I'll poke at this more.

yukichigai commented 4 years ago

I'm going to guess the bindings stopped at Numpad 6 due to Retroarch having no way to specify "dummy" bindings: if there's not a default assignment for the action then it doesn't get included in the list of available bindings. There's a feature request in to address this here.

There are enough inputs to bind all of the number pad entries if both analog sticks are used, but that would lead to a very awkward default binding. Less than ideal.

Testsr commented 4 years ago

The default mapping for Jaguar pro controler could be the Sega Saturn Mapping, with XYZ mapping to 987 and L,R maping to 4,6. https://atariage.com/forums/topic/24855-list-of-pro-controller-games/?do=findComment&comment=4136603 https://docs.libretro.com/library/beetle_saturn/

yukichigai commented 4 years ago

The only downside to that would be for games that need combination input, like Aliens vs. Predator. If the two (or more) keys that need to be pressed simultaneously were mapped to the same analog stick then it would be effectively impossible to do. At least you could rebind the inputs though. It would be a massive improvement over what we have right now.

It's times like these I wish we could have independent keyboard mapping for specific things. USB numpads are a thing, and being able to just straight up bind the numpad buttons to a literal numpad would make sense.

Testsr commented 4 years ago

If you want that approach,look no more further than the Blue MSX Core. The Coleco 9 and 0 are mapped to the 9 and 0 buttons on the keyboard. https://docs.libretro.com/library/bluemsx/#controller-tables

Testsr commented 4 years ago

Add keyboard support for 0-9 and * # #43

fragmental commented 4 years ago

Though having some buttons mapped to keyboard is better than not having those buttons at all, some of the controls would be essentially useless if they're not on the controller. As I mentioned in my first post, in Alien vs predator: Numpad 7 is Strafe Left Numpad 8 is Toggle Map Numpad 9 is Strafe Right

When I play this game in Phoenix Emu (which is the only emulator I'm aware of that displays the map properly), I map numpad 7 to the left shoulder button, numpad 9 to the right shoulder button and Numpad 8 to the y button (assuming an xbox controller-like configuration). In Phoenix emu, remapping controls is kind of a pain so I mapped the rest of the numpad buttons randomly to the analog sticks, which worked fine for aliens, which have the least controls, but is a bit awkward with predator and marine.

So I created a spreadsheet of what I think are sensible controls for all three classes.

https://docs.google.com/spreadsheets/d/1csk5KkRVj1HS7p4Q09Bjc1rYYXK-4aOLiOpzuGPeS58/edit?usp=sharing

The problem I'm running into is that, as @yukichigai mentioned, there is some combined inputs. There's only two combined inputs. One is C+direction for strafing, which hasn't given me any problems, and the other is numpad * and numpad # for resetting the game. In my controls I mapped C to X and B to A so that I can easily press A to fire while holding X to strafe. But I never use that because I use the shoulder buttons for strafing. I see that retroarch maps C to Y and B to B, I assume that is also so you can easily press B to fire while holding Y to strafe.

However, I don't know where to put Num and Num# to reset the game. The mostly logical place to put Num 1-4, is on the left or right analog stick, because they switch through 4 different weapons for marine and predator. But that only leaves the two analog stick buttons for Num and Num #, since you can't assign them to a single analog stick or you couldn't press them at the same time. However, pressing the two analog stick buttons at the same time is used, by some people(myself included), to reach retroarch UI, so that could be a potential conflict.

For AVP, having Num * and Num # on the keyboard would be fine, really, since you don't want to press them unless you really need to. There's probably some sort of meta-game in AVP where resetting the game is useful, but I don't know the game well enough to know about that. Also, I haven't even thought to use them, because I don't know what I mapped them too. haha.

This only applies to AVP. I don't know anything about the controls of other games.

Testsr commented 4 years ago

That is a good point @fragmental. However, the keyboard is really meant for backup control scheme. The controls should realy be mapped on to the joystick. @twinaphex, could you please take a look at the pull requests for the virtualjaguar Core?

fragmental commented 4 years ago

I just realized there is also a Numpad 0 button. That button wasn't on my spreadsheet, because Alien vs predator doesn't use it, and it isn't one of the buttons Retroarch is missing.

yukichigai commented 4 years ago

Just doing a quick glance through manuals on Atari Age, * + # is listed in most game manuals as a way of resetting the game. I think it may be a BIOS-level function or similar.

Many games seem to have functions mapped to the missing buttons, though of varying importance. Of the first four manuals I looked at, two had mappings for 7, 8, and 9. Both were non-trivial, though not exactly gamebreaking (camera/view controls).

fragmental commented 4 years ago

Somewhat related, I noticed there is a jaguar pro controller that has 3 more buttons and two shoulder buttons. Those buttons are mapped to the numpad. I believe x,y,z is mapped to 7,8,9 and Left shoulder is mapped to 4 and right shoulder is mapped to 6, but I haven't been able to confirm that. I've also seen reports that x,y,z mapped to 1,2,3. Since few controllers have 6 face buttons, this information might not be particularly useful, but I thought it was interesting. Here's a forum thread about games that benefit from the pro controller.

Testsr commented 4 years ago

XYZ maps to 987 not 789.

VideogameScrapbook commented 2 years ago

I'd also like to add that even though those keys for player 1 are available in RetroArch with the keyboard number keys, player 2+ keys are impossible to use at this time. Maybe the title needs to be updated to reflect that too or should a new issue be opened?

JoeMatt commented 2 years ago

63 is a WIP for this.

Testers welcome. It's super easy to build this core, just run make and copy from that branch.