Decoding the NEC V20 Microcode
summary
The author successfully extracted and decoded the microcode of the NEC V20 CPU to enable cycle-accurate emulation in the MartyPC emulator. This was achieved by using high-resolution die photography combined with a convolutional neural network (CNN) to identify ROM bits visually. By analyzing the extracted bits and collaborating with the vintage computing community, the author reconstructed the CPU's internal logic and instruction set implementation.
key points
- A convolutional neural network was trained on a small manually classified dataset to automate the extraction of nearly 30,000 bits from the CPU's microcode ROM images.
- The decoding process involved analyzing the activation PLA and the Group Decode ROM to understand how specific opcodes trigger corresponding microcode sequences.
- Analysis of the die photography revealed a physical metal-layer switch that allowed NEC to use the same microcode mask for both the V20 and V30 processors.
who should read it
Computer architects, emulator developers, and retro-computing enthusiasts interested in hardware reverse engineering and CPU internals.
discussion positive
consensus
Commenters generally admire the technical depth of the reverse engineering project and recall the V20 chip as a period-appropriate performance upgrade for 8088 systems. While some acknowledge the V20's unique 1980s instruction set extensions, others note that its speed gains were sometimes negligible in real-world applications or caused timing issues. The overall sentiment is one of nostalgic appreciation for the hardware's history and legal disputes.
top insight
The V20's microcode was a central point of legal conflict between Intel and NEC, with court documents revealing detailed comparisons of reset sequences and microcode formats. This adds a layer of historical and legal context to the technical reverse engineering effort. The distinction between NEC's unique mnemonics for standard registers and opcodes further complicates the analysis for those familiar with Intel's naming schemes.
Generated by an LLM from the article and thread. Check the sources before relying on it.