I have bad news for you
bad: megadrive esd protection is inside the chipset, if its blown its game over.
maybe good: you said pins 4 and 5 are shorted one one of the ports, most likely you confused ports around and its the bad one shorted, if you are lucky short is in the connector
pad pins go to ferrite inductors for EMI filtering, and then straight to the chipset, there is no other place they could be shorted
you can desolder inductors to check where the short is (easier than big joypad connector)