Nintendo's weird and wonderful CIC lockout chip

keeper7k

Human RetroDatabase
Joined
9 Ιαν 2006
Μηνύματα
2.599
Αντιδράσεις
22
The weird and wonderful CIC

I have been spending some time on reverse engineering the Nintendo CIC ROMs. The CIC is the “lockout” chip in NES/SNES/N64 cartridges, used to prevent people from copying games. It was manufactured by Sharp and is likely one of their old “one-chip microcomputers”, used in calculators and TV remotes and the like. I couldnʼt find a document describing the instruction set it uses (or its architecture!), so I made it all up (combining information from lots of sources: old datasheets, old patents, and the low-res die photographs).
The N64 chips are different, and I havenʼt seen a ROM dump of those yet, so all of the following is NES/SNES only.

There is one chip inside the console, and one in every cartridge; the code inside the chip decides what to do based on a pin strap (the console one will be the “lock”, and the cartridge one will be the “key”). The two chips run off the same clock, and they run the same code, so they run in lockstep (sometimes they execute different codepaths, but the code is careful to take the same number of cycles on both paths in these cases). The chips communicate over two wires, one from key to lock, one from lock to key. Both chips calculate what bits they will send, and what the other guy should send; if what they receive is not the same as what they should have received, they panic, and the lock chip resets the console.

Κώδικας:
              +------------------+
DATA_OUT <-- | 1 P0.0    +5V 16 |
 DATA_IN --> | 2 P0.1        15 |  ?
    SEED --> | 3 P0.2        14 |  ?
LOCK/-KEY --> | 4 P0.3        13 |  ?
             | 5 Xout   P1.3 12 | <-- RESET_SPEED_B
             | 6 Xin    P1.2 11 | <-- RESET_SPEED_A
             | 7 RESET  P1.1 10 | --> SLAVE_CIC_RESET
             | 8 GND    P1.0  9 | --> -HOST_RESET
             +------------------+
Το υπόλοιπο άρθρο βρίσκεται εδώ
 
Πίσω
Μπλουζα