I have an og Genesis / Mega Drive controller, but some of the buttons aren't working. I took a look at the PCB and my guess would be that it's either oxidisation or corrosion on the contacts, but I don't know where to go from here.

I tried cleaning it with a toothbrush and isopropyl alcohol, and when that didn't work I tried wd-40 contact cleaner. Neither seemed to have any effect on the brown bits.

Does anyone have any advice?

@scutterman It might also be the membranes (buttons), or the connection to the chip/port. Sega gamepads use a single wire per button, but those wires are multiplexed, so each wire returns a different button state when one of the wires is high/low. A pinout should tell you which buttons are on the same output wire.

@scutterman if you can confirm that the not-working buttons all go over the same wire, that tells you something is happening at the chip. It doesn't mean the chip is faulty, but it's possible something is jammed-in or broken at the connector. If you have a multimeter, putting it on buzzer mode (continuity), you should be able to probe the pins on the connector, and the output pins on the multiplexer chip.

My assumption is that this is where the problem lies, somewhere between these two points. If that's the case, you can chop off the connector and replace it with a brand new DB-9 connector. These should be quite cheap to buy from China (AliExpress), as long as you don't mind buying a pack of 5.

@pawv When I was testing it out, the only button I couldn't get to work at all was the B button - though I'm not sure if Aladdin uses that button or not.

The other buttons were anywhere between "mostly reliable" to "sometimes worked"

@scutterman curious. If you want on more things to try, try cleaning the contacts (pins) of the connector with a toothbrush and some isopropyl alcohol. Stab it with the brush, trying to loosen any buildup, just to rule out the connector.
@pawv I cleaned the connector and the port on the console a couple of nights ago. That's when I opened it up and saw the metal pads on the PCB were not looking right.