NES Nights: The Origins of the Famicom CPU

Originally, Nintendo did not have any knowledge with the 6502. They actually wanted to use the Z80 as the main CPU for the Famicom. Ricoh was chosen as the main manufacturer for the Famicom CPUs for Nintendo. Nintendo had went with Ricoh because Ricoh was not operating at full capacity with production during that time. Also, Nintendo alluded to Ricoh that there would be many chips produced for the Famicom. Unfortunately, Ricoh did not have the license to manufacture Z80 CPUs.

Ricoh did however, have the license to create MOS 6502 CPUs. So Nintendo had to design the Famicom with the 6502 in mind. With this design choice brought a few pros and cons. The pros being that by going with the 6502, Nintendo could gain an industry advantage over competitors since at that time, the 6502 architecture was arcane to engineers in Japan. The Z80 was used much more in consumer electronics and computers.

Nintendo brought in Shuhei Kato to lead the effort in designing and developing tools that would create software for the 6502 architecture. Kato started out as the sole 6502 expert at Nintendo. Historically, Nintendo had put effort into obfuscating their technology as much as possible. This was no different with their own implementation of the 6502 CPU.

The CPU Nintendo had designed for the Famicom was dubbed the 2A03. This 2A03 was directly based off of the 6502 and could run 99% of the 6502 instruction. There were some minor glitches and some discrepancies in instructions taking a few more cycles to complete, but the chip was able to perform reliably. The biggest difference between the 2A03 and the vanilla 6502 was that the 2A03 had binary-coded decimal operations disabled. The BCD operations essentially split a byte into 4 bits to be interpreted as a base-10 decimal number for various math operations. 
For example, suppose the byte $56 was read. Splitting this byte into 4 bits, $5 and $6 would then in BCD, be interpreted as base-10 number 5 and base-10 number 6. In the typical 6502, this sort of arrangement in data could lead to faster arithmetic operations.

Why was the BCD logic disabled in the 2A03? Nintendo had disabled this to actually avoid any patent infringement. Since Ricoh was simply a manufacturer of the 6502, the true designs were licensed by MOS Technology. MOS had ties with Commodore and the BCD operations were actually patented. Nintendo had foresight to eventually bring the Famicom to the American market as the NES and thus did not want to go through legal troubles due to violating any patents. Nintendo had then disabled BCD operations by applying a mask that consisted of removing just 5 transistors in the chip. The circuitry within the 2A03 to perform BCD operations still physically existed on the CPU, but was just not accessible.

Source and Inspiration: I am Error. Nathan Altice.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.