Decoding the NEC V20's Microcode with a CNN

Decoding the NEC V20 Microcode

Decoding the NEC V20's Microcode with a CNN

MartyPC's author wanted cycle-accurate emulation of the NEC V20 CPU, but without the microcode it was guesswork. So he commissioned die photography of the chip, extracted the 29,928-bit microcode ROM visually, and trained a convolutional neural network to classify the bits—a task that took just an afternoon with PyTorch. The result: a full microcode dump and a decoder PLA extraction, bringing the V20's inner workings to light.

The problem is quite literally "Hotdog or Not Hot Dog."

More from this day

2026-09-07