I helped with defeating the CPS-2 encryption scheme.<p>It all comes down to the function code pins on the CPU, which change depending on what kind of data you are fetching (regular data or program instructions) and whether you're in supervisor or user mode.<p>FC1, FC0: 01 = data, 10 = program
FC2: 0 = user, 1 = system<p>The encryption enable line is tied to FC2 and FC1, so it's only active when fetching program instructions in user mode. The reason for this is that the reset vector, which is accessed as supervisor program data, cannot be encrypted, otherwise the initial program counter and stack pointer would be wrong.<p>So, you could take over the interrupt table and run instructions in an ISR, but you still had a problem. If you tried to do MOVE (a0), d0 for example, it would try to read (a0) with the DATA function code, which would not activate decryption.<p>BUT...<p>The m68k manual states: Data items in the instruction stream can be accessed with the program counter relative addressing modes; these accesses classify as program references.<p>So, all you needed to do is use PC-relative addressing within an ISR, which can access the entire memory space if you program it right, and then just stream the whole program ROM out, decrypted, via whatever means you wanted.<p>This worked, but for some reason, the encryption chip would mysteriously shut down after a very short while.<p>This final puzzle piece could have remained a mystery forever, if Capcom hadn't inadvertently spilled the beans.<p>In a bid to enter the high end home market, Capcom released a "home" version of their CPS-1 system, along with very slightly modified versions of all their classic CPS-1 games. Their mistake came when they decided to port some CPS-2 games to CPS-1 (the systems were close enough to do it without too much difficulty). If you look at the program code in the CPS-2 converted titles, you'll notice a weird MOVE instruction that is sprinkled throughout the code, yet doesn't seem to do anything useful.<p>This is the final piece of the puzzle. That specific move instruction is read by the encryption chip, and used as a "keep alive". If enough time passes without that pattern being on the data bus, the encryption chip shuts down permanently, until you turn off power.<p>So all you needed to do is inject that MOVE instruction while you were reading out the program ROM using PC-relative MOVEs from your custom exception routine.