Nintendo sued them for bypassing their protection. Often people caved; Nintendo/Sega controlled how many games a developer could get published; the genre etc. Codemasters was like "yeah, right" and reversed engineered it, and got sued. Apparently they thought they were going to lose and agreed with Codemasters to call off the lawsuit as long as Codemasters maintained publicly that they had done a deal with Nintendo to end the case.
Source: common knowledge in the small West England game dev community.
Nintendo also sued Galoob over the Game Genie, which Galoob had licensed (purchased?) from Codemasters. Nintendo lost, and then they lost again on appeal. The issue was whether the Game Genie created derivative works.
I read Console Wars and it was a really insightful look into how Nintendo and Sega came to be and how they operated if you are interested in this sort of thing.
Source: common knowledge in the small West England game dev community.