If you have an owner's manual sometimes there is a card in the case with the radio code.
If that doesn't work then there is a thread on RennTech with instructions for accessing the serial number (without having to take the radio out) and you post it, and they give you a few codes to try. it worked for my neighbor that has a 996 Cab.
Lost Radio Code - post your request here - 986 Series (Boxster, Boxster S) - RennTech.org Community
Steve