Or get two 9 pin connectors, one male and one female and wire them up 1:1 apart from pin 5 & 7 which you swap.
Amiga Format published that in the 90's with code for reading the extra buttons.
This is what I do, I also allways rewire the dpad up button to a unused button and put a switch so you can disable the dpads up button, this helps a lot because some games are just plain awkward to jump with dpad up easy to by misstake press up while going left/right one some gamepads.
Easy and works great.
A nice on off switch for the dpad up and button 2 is used as up (jump) instead, Master systems dpad needs this since it's a horrible dpad.

Some easy wireing. Cut traces and wire on


and another on/off switch fitting good.
