Nintendo does not use PIN codes to unlock or access Pokémon Diamond (or any DS game) on its website. Game saves reside on the cartridge. To play:
If the cartridge fails, clean contacts with isopropyl alcohol. No online code system exists for legacy DS titles.