Today I bought a Sanwa joystick for playing in fightcade and when I installed it on my console, the up-left and right-bottom diagonal sides were not working.
How did I fix it?
Very simple. After troubleshooting, turns out I had the cables to the joystick crossed. Once I was able to match the correct colors it worked.
Connect the pins as follows
Hope this helps.