OK, I do have legal training (University of Arizona 1999), and lets look at some precedents: (I should state that I am not a lawyer, as I have never taken the Bar exam because I decided on another career path.)
I should have clarified my statement about MAME - it DOES contain proprietary code, but not proprietary code relevant to the ROM sets, only proprietary and owned by MAMEDev.
Sony Computer Entertainment, Inc Vs Connectix Coporation - The courts ruled that as long as a BIOS encryption was reverse-engineered and not simply copied and stolen, it was legal. This should cover your assertions about the legality of the CPS2 encryption, and more importantly, it was upheld on appeal AFTER the DMCA went into effect. (And is therefore a different situation than Sega vs Accolade.) From the ruling:
"Some works are closer to the core of intended copyright protection than others. Sony's BIOS lay at a distance from the core because it contains unprotected aspects that cannot be examined without copying. The court of appeal therefore accorded it a lower degree of protection than more traditional literary works."
http://web.archive.org/web/20070228070634/http://www.ca9.uscourts.gov/ca9/newopinions.nsf/0/66b3a352ea33712988256952007578c2?OpenDocumentSega vs Accolade - Accolade lost this case, but the court upheld that disassembly of code is permitted under the fair use rule if the primary reason is to get to the parts of the code that are not copyrighted. Again, this goes to your assertion about the CPS2 code. In addition, this goes to why MAME can't be used for commercial purposes and why that is written into the license. (Accolade lost the case because their primary reason for doing so was to circumvent the copy protection for profit. This is also how MAME can be work as a non-profit entity, and why you can't sell it.)
http://digital-law-online.info/cases/24PQ2D1561.htmHere's another nice article (from the U of Iowa law journal) which explains things a bit further:
http://www.uiowa.edu/~cyberlaw/cls01/yi3.htmlThey accepted Connectix's defense, which entailed the following use of the Fair Use doctrine:
Notwithstanding the provisions of sections 106 and 106A, the fair use of a copyrighted work, including such use by reproduction in copies or phonorecords or by any other means specified by that section, for purposes such as criticism, comment, news reporting, teaching (including multiple copies for classroom use), scholarship, or research, is not an infringement of copyright. In determining whether the use made of a work in any particular case is a fair use the factors to be considered shall include--
(1) the purpose and character of the use, including whether such use is of a commercial nature or is for nonprofit educational purposes;
(2) the nature of the copyrighted work;
(3) the amount and substantiality of the portion used in relation to the copyrighted work as a whole; and
(4) the effect of the use upon the potential market for or value of the copyrighted work.
You can find the references at the article's site.
All of this boils down to: emulators are legal because they are protected by reverse engineering laws and laws governing the use of commercial copyrights. That's also the reason why they put "non-commercial" use clauses in the license, because "for profit" opens them up to a HUGE amount of civil lawsuits.