One cart protected itself with checksums, computed over time from interrupt code, that were the key to decrypt a piece of code that did the "am I running from RAM instead of ROM?" check. Took me two weeks to write (I had two weeks of hanging around waiting for play testing to finish).
The software pirate who lived in my apartment complex knew I worked at Atari, and we were chatting one day when I mentioned that I'd written that particular cartridge. He lit up. "Yeah, that was a hard one. Took us three days to crack."
Copy-protection can be useful, but it's definitely an asymmetric game.