I worked for IBM years ago. I remember signing their IP contract on the day I started work, while my manager explained to me "it doesn't matter if you're vacationing on the moon -- if you invent something while there, it's ours".
Not true in California -- they can only assert copyright claims on anything you build using company-owned property. So, if you did it your own time, on your own hardware, you can actually fight back against this.
Such was also true in the 1980s (I was advised- never tested it in court). Whether a signed agreement was enforceable was pretty much a state issue, but it was generally thought that they were hard to enforce (like non-compete agreements).