ASCII by Jason Scott

Jason Scott's Weblog

Gamepads! —

A week into the explosion of the Internet Arcade, with what has now been millions of visitors to the Archive as a result, and we’re getting pretty far down the “what still confounds people” realm. As someone who worked in tech support as his first “real” job at Psygnosis, (shout out to Chris Caprio and Jim Drewry for the hire), I know both the frustration of not having things work right when you expect them to, and the propensity on the technical support side to go ‘oh come on, why don’t you have this already”, like the mass of humans out there is just one person calling you back over and over.

In the last week, the JSMESS team made the software load in Internet Explorer and Safari, fixed aspect ratios on full-screening of the video, made keys work in fullscreen mode on all browsers, and shored up a bunch of little details not worth going into here.

This leaves the #1 thing we’re still getting mail about: Gamepads.

SO YOU HOOKED UP YOUR GAMEPAD AND IT WAS A LITTLE WONKY OR DOESN’T WORK RIGHT

  • Please bear in mind that JSMESS has basically nothing to do with Gamepad Support. We used Emscripten to compile it in. Whatever Emscripten does and whatever the generic Gamepad API loader does, we do – we do no development on it. So, first….
  • In all circumstances, definitely visit the Gamepad API Tester. This is a nice little page that will show what the current version of the Gamepad API thinks your controller is. If you can’t see it, or it acts weird, it’s the API.
  • Some gamepads actually press keys instead of doing “gamepad signals”. For example, we used the X-Gaming Tankstick during testing and it worked out of the box, since it’s basically another USB keyboard, and it was mapped to MAME controls. (Disclaimer – after X-Gaming found out I was using their stick at the Archive/Arcade, they sent a couple more a day or two ago.
  • There are software packages out there for various platforms that will convert joypad/gamepad movements to keyboards. For example, there’s Glovepie (Windows), Xpadder (Windows), Joystickmapper (OSX), and many, many more. This is a known thing of interest and people have made a lot of programs that do the same thing.

Ultimately, the message that we have at the bottom that says you should hook up your gamepad and then will go “Gamepad detected, you may need to refresh…” – well, this is because the way the API works, it’s not exactly guaranteed the signals from the gamepad will “Catch”. I tried to put in a message to go “keep messing with it if you don’t get it”.

Some people also got confused that this meant you could ONLY play these games with a gamepad. That’s not true – it’s just better in a lot of cases, once you have it working. The keyboard controls of MAME were always a weird compromise, and you can really feel it with some of the classics.

Remember, there’s a TAB command in all JSMAME emulations, letting you see the key mappings, and testing them with your joypad. It’s not perfect, but it at least informs.

The Joypad API specification is very new. It was barely up and running when we got it going in September of 2013. A year later, it’s there, and it works, except when it really doesn’t. That’s the nature of all of this – cobbled together pretty-good things presenting you a programming miracle. Like the fullscreen and the browser compatibility, I expect it to get incrementally, notably better.

Good luck.


Categorised as: computer history | Internet Archive

Comments are disabled on this post


One Comment

  1. >Some gamepads actually press keys instead of doing “gamepad signals”.
    It’s worth noting that this is exceptionally rare. The only case I can think of aside from X-Arcade would be building something custom around an I-Pac or other keyboard encoder. It’s generally a safe bet that a gamepad will report itself as such.

    >The keyboard controls of MAME were always a weird compromise, and you can really feel it with some of the classics.
    As someone that uses “all three” input methods extensively, I have mixed feelings on that point.

    Although anything multiplayer is going to be an unavoidable kludge, I don’t see a reason that most any single player game can’t be played masterfully on a keyboard. The default MAME mappings do start to get weird for anything with more than two buttons, but this is remedied by a slight remapping in the Tab menu (i.e., ZXC Space, ASD ZXC, etc.). In these cases, I feel a keyboard is a better approximation of the arcade controls, whereas on a gamepad the thumbs tend to get overloaded.

    That said, some keyboards don’t handle multiple key presses very well at all (although, then we’re talking about compromises made by the keyboard manufacturer more so than those of the MAME devs). A gamepad is better as a surefire “off-the-shelf” solution than trying to hunt down a cheap keyboard that behaves reasonably or delving into “gaming keyboard” territory. (I’m not sure about anything current, but, as far as cheap keyboards for games go, I still really like the old Apple iMac “Pro USB Keyboard” — three arrows + ZXC registers with no problem.)

    Now, where both solutions are out of luck would be games with analog controls… Sometimes a mouse or gamepad’s analog stick matches the original feel of the game fine, other times it’s an exercise in frustration trying (and failing) to configure and calibrate everything correctly.