Although NEC V20 is compatible with the Intel 8088, it features its own distinctive microcode characteristics. [GloriousCow] is attempting to decode the processor’s microcode ROM from its die image and create a usable ROM image in order to develop a cycle-accurate emulator. Since manually parsing the 29,928 bits in the image would take a long time, automation was used. [Travis Goodspeed]’s MaskRomTool could not reliably determine the bits because of the low contrast, but it identified their positions and generated 42×42-pixel PNG files for each bit. A convolutional neural network (CNN) was then trained on 1,000 manually classified images to distinguish between 0 and 1 bits. The few remaining uncertain bits were inspected visually. The resulting microcode is being matched to the V20’s internal architecture. The still-incomplete work is being published on GitHub. Microcode was at the center of processor compatibility lawsuits between NEC and Intel in the past.
Why it matters
This work shows that Intel 8088 compatibility may not be sufficient to explain all of the NEC V20’s behavior; revealing the processor’s distinctive microcode aims to accurately reflect not only the instruction set but also the operation of processing cycles in emulation. The use of image processing and CNNs offers a practical example of applying reverse-engineering methods by turning the examination of large amounts of data from low-contrast die images into a process no longer carried out manually. However, since the ROM has not yet been fully matched to the internal architecture, it is not yet clear to what extent the resulting data can be used in an emulator. The results may also contribute to understanding the historical technical and legal debates surrounding the V20’s Intel compatibility.