4P joysticks "offset"; P1 switches read as P2, etc.

Installing ARpiCADE for the first time? Having issues? Check here first for solutions and tips on installing.

Moderator: dee2eR

Post Reply
shoe2010
Community Member
Community Member
Posts: 4
Joined: Thu Jan 12, 2023 3:29 pm

4P joysticks "offset"; P1 switches read as P2, etc.

Post by shoe2010 » Sun Jan 22, 2023 6:08 am

Hello. I've been slowly restoring an old 4P jamma cab for the past several years. I had it working great with an original Open Ice pcb, but the board finally gave up the ghost. I'm so excited that Arpicade + the 4P adapter can get me so close to the original feel of the arcade game. Thank you! I'm running into a weird problem, though:

Baseline info:
- Raspberry Pi 4B
- Arpicade 4.3.1
- 4P adapter
- Dip switches on main adapter: 1,2 on; 3,4 off
- Dip switches on 4p adapter: all off
- I have switched to 4P mode in the attract mode menu reachable via F4 (how can I verify this setting "stuck"?)
- Converted 4P Midway jamma cabinet with standard jamma harness and Midway kick harnesses (I assume, since they worked with a Midway board)
- Cab ran an original Open Ice pcb since the 90s with no issues that basic repair and maintenance couldn't resolve
- Wells Gardner K7000 CRT

Specific issue:
In all games (so far only played in mame 172), each joystick/button set reads as the joystick/button set to its right. That is, all player 1 stick and button presses are interpreted as P2 presses, P2 reads as P3, P4 reads as P5 (which doesn't exist on the jamma connector). For example, pressing Player 1 Start is interpreted by Arpicade/MAME as Joy 2 Button 7.

Odd, but the major problem is that nothing reads as P1, so I can't just remap everything in MAME.

Similarly, coin 1 reads as coin 2, and coin 2 reads as service. The player buttons within each set are also mixed up. Those easy remap or rewire fixes, but may be related to the joystick situation.

I thought the issue might be in MAME, but:
When I run jstest .../js0, P1 joystick/buttons do nothing (I can't read the results, but they don't change; see secondary issue). However, when I run jstest .../js1, P1 joystick/buttons update the results. So same deal as in mame games and mame menus.

Interestingly: Only P1 joystick and buttons function in the attract mode menus, which I assume is how it's supposed to be.

I'm a mechanical guy and get a little lost once in the realm of software+hardware. Please let me know if there's any further information I can provide. I'm happy to do further troubleshooting. I really appreciate your time.

Quick edit: I ran through as many forums topics as I could but didn't find any similar issues. If there's already a thread on a similar topic, I can close this one and go there.

Thank you,
Dante

Secondary issue: Attract mode and the command line look like raw HD video is being sent to the standard res monitor. AM is mostly readable, but the command line is impossible. I tried changing the timing in config.txt to the other resolution options, but those just gave me a black screen; Only 1920 timing works. I also get "HDMI out of range" when I use an external monitor instead of the CRT, so I'm flying blind in the terminal.

dee2eR
Inventor
Inventor
Posts: 1857
Joined: Tue Aug 22, 2017 2:07 pm

Re: 4P joysticks "offset"; P1 switches read as P2, etc.

Post by dee2eR » Tue Jan 24, 2023 3:13 am

The default setup for four players is (or at least should be) player order 3 1 2 4 so players 1 and 2 are in the center, this is because there are at least 10x the number of 2 player games compared to four player games. Not sure why you're not getting anything mapped to player 1 (/dev/input/js0), it's the first one assigned so shouldn't be possible to miss... "player 5" should just be part of the hotkeys system and nothing to worry about (on a two player setup it appears as player 3), in general you can just ignore "player 5".

Coin 2 being service may be my mistake setting up the emulator config(s), as service would also give a credit I could easily miss making that sort of error... not sure offhand though.

Is the P1 controls working in Attract-Mode (the game select menu) the same player 1 controls that are not working in MAME? if so it at least tells you the inputs are working and suggests the issues are MAME config related.

When you say it looks like raw HD video what exactly are we talking about? The default settings are 480i for menu and command line, if your monitor doesn't handle interlacing well it could look kinda bad but that's largely up to the monitor. The 240p setting from config.txt should look sharp but obviously won't have as many lines to draw on so some menu themes and the command line can be a bit compromised. If your picture is significantly better in a game (after the software has swapped to a progressive scan res to suit the game) you are probably best off running ARpiCADE in the '240p only mode' (actually uses all the non interlaced low resolutions).

For your external monitor (I assume a PC monitor or modern flatscreen TV?) try using the high res setting (480p) in config.txt, do not use the high res setting for your low res cab monitor though - if you need to swap between monitors remember to change the setting). In my experience many modern TVs can handle the default low res direct from the HDMI of the Pi as long as you are using an HDMI input on the screen (VGA or DVI won't handle the low res signal), but it varies from TV to TV. While it's a bit of a hassle to swap res before and after it should at least get you a usable terminal for trouble shooting if you cannot use it directly on your arcade cab.

shoe2010
Community Member
Community Member
Posts: 4
Joined: Thu Jan 12, 2023 3:29 pm

Re: 4P joysticks "offset"; P1 switches read as P2, etc.

Post by shoe2010 » Wed Jan 25, 2023 11:48 pm

Thank you for the reply. Please don't kill me, but I found the error, and believe it or not it was primarily me.

I borrowed an old TV w/ HDMI and set the res in config to 640x480. The TV accepted that res, and I could now read the results of jstest. Once I could do that, it became clear that my js# were offset due to the keyboard I was using being detected as js0. I had previously troubleshot with no keyboard attached, but I think in that case I was getting confused by the P1 and P2 being in the center. Between those two situations and not being able to read jstest results, I was lost.

I dug out an old keyboard that does not get recognized as j0, and two player games now work as expected. I'll try to find a few minutes to test out 4P games, but I'm pretty sure this was the issue.

Even though this was mostly my issue, your insight on P1 and P2 being shifted helped pinpoint what was going on. I appreciate your help.

Post Reply