Here's the pinout for the Space Harrier 50 pin connector.
|A8||Stick Up/Down||B8||Stick Left/Right|
|A14||Shot 3||B14||Shot 1|
|A17||Coin 2||B17||Coin 1|
|A19||Coin Counter*||B19||GND (test/service)|
|A21||GND (buttons)||B21||GND (PSU)|
|A22||B22||5V (Start Lamp)|
|A23||Start Lamp||B23||Coin Counter*|
|A24||Coin Counter 2||B24||+5V (PSU)|
|A25||Coin Counter 1||B25||+5V (PSU)|
So the inputs for Space Harrier are very straightforward, there are two axes for direction and three shot buttons, as well as the usual coin, start and test and service inputs. In testing I actually found that the "Shot 1" and "Shot 3" buttons are reversed, though it doesn't really matter.
I bought myself an old analogue PC joystick and set about rewiring it for both Space Harrier and Hang-On. In the case of Hang-On I still use my Out Run pedals for the accelerator and brake, so only the left/right axis of the joystick is needed.
Another decision I made was to not cut the 15-pin joystick connector off, and I also didn't want to connect directly to the Space Harrier board, so instead I soldered all of my connecting wires to another 15-pin connector for the joystick end and a big Molex plug at the other end.
The wiring inside a PC joystick is a little different to what the Sega games expect. Also, if you have an old joystick or buy one it may have extra electronics on the inside for autofire etc. It was easy to connect the fire buttons on the joystick though the axes were more complicated. Looking at the pinout above you can see that there's only one +5V line and one Ground line, so you'll need to connect each of them to both pots. The joystick I have works perfectly, with full range in each direction.
I didn't want to cut any wires I didn't need to on the harness, so I use the Service button on both games for credits. The start button is mapped to the fourth button on the joystick.