I bought the JLF 10 years ago and it came with a wire harness that works, but the encoder came with its own harness:

I tried it both ways, and I think the ground is the pin on the very right.
The only thing that remotely functioned was Up on my PS3 and then I couldn't get it to work again later. Mame doesn't recognize it (but the PC recognizes the encoder).
Tried it with buttons now too, no response.
Also there is a red light on under something that says D2.