Nintendo lost the Game Genie case because the Game Genie couldn't create derivative works, like Nintendo claimed. Looking more into it, it doesn't relate entirely to the matter at hand, but it goes to show the history of trouble Nintendo's had in the court in matters of unlicensed code.
The cases Nintendo wins are cases that there's real, tangible copyright infringement, at least in the US. The more notable things picked up here is actually NES emulators featuring several roms. The ones that pass have always been devices capable of running homebrew content, and subsequently have the ability of doing illegal things. Contrary to popular belief, I don't think there's really such a thing as a closed platform. There's been legal unlicensed games on Nintendo's platforms since the NES, and the only illegal ones were the ones that stole patent information or claimed to be licensed. Yes, it's closed in that there's typically been extensive efforts to lock-out non-licensed code, but it's never been illegal to run unlicensed code.
That doesn't mean piracy isn't illegal. I'd equate homebrew to bypassing security on many PC games. While it's often used for piracy, it can be used for other reasons, for instance, if you own more PCs than the game's security allows it to be installed on, or if you lose a validation key, security bypasses can be very useful. Personally, I'm surprised many types of PC security/copy-protections aren't illegal, since you're often not informed of the EULAs and such involved at the point you choose to purchase the game. I'm honestly surprised I haven't heard much about consumer's advocates getting involved in some of these things.
On that note, flimsy and unreliable security methods have kept me out of PC gaming. I struggle enough with StarCraft, and that's the only game I play. I can't stand the CD key id, just because I lose it all the time.