17

The NES CPU was a copy of the 6502 with the BCD circuitry removed. As I understand it, this modification was motivated by a theory that BCD was the only part of the 6502 that was actually patented, so that by intellectual property law of the early 80s, it was technically legal to directly copy the rest of it.

Did they redo the layout to squeeze other parts of the CPU into the vacant space, to save overall area? Or did they, for development cost or schedule reasons, just leave it as it was, with gaps where the BCD circuitry had been?

(A similar example from the same era: HAM mode was nearly removed from the Amiga, but by the time the chip architect changed his mind about wanting it, the layout people told him it was too late to save area because there was not enough schedule time left to redo the layout. It turned out to be one of the machine's most iconic features.)

1
  • 5
    Far as I know it used the same layout as the 6502 and they just severed some of the control lines that would otherwise activate it.
    – Brian
    Commented Jun 18 at 10:03

2 Answers 2

25

TL;DR: No.

The NES CPU was a copy of the 6502

The 6502 section of the Ricoh RP2A03 is a very close (*1) copy as comparing the images show

Comparison RP2A03 and 6502. Composed from Wikipedia and Visual 6502 images. . Scaled for comparison, not area. Annotation mine.

(Images sourced from Wikipedia (RP2A03) and Visual 6502. Scaled for comparison, not area. Annotation mine.)

with the BCD circuitry removed.

More like disabled.

As I understand it, this modification was motivated by a theory that BCD was the only part of the 6502 that was actually patented, so that by intellectual property law of the early 80s,

Note just a theory, but the very reason.

it was technically legal to directly copy the rest of it.

It's even legal to copy everything, as long as it gets modified in a way making sure it's no working the patented way. In this case the circuitry is mostly still present, but modified to simply let the input value always pass unmodified.

Did they redo the layout

No, they just modified the decimal adjust circuit to always let the input value pass straight through.

to squeeze other parts of the CPU into the vacant space, to save overall area?

Nothing that would really make any sense for multiple reasons:

  • To start with, the adjuster is a very tiny piece of logic. Removing it wouldn't yield a noticeable area, as this nice annotation of the data path shows:

enter image description here

(Image taken from these incredible slides about Apple II Assembler Programming by Stephen Edwards)

  • It also shows it being squeezed right between ALU and A-register. Removing and sliding either side up, would be a major undertaking for next to no gain.
  • In addition the gained space would be in an area where there is already unused space on both sides.
  • Lastly, and maybe most importantly, by the time the RP2A03 was designed, the used process not only shrunk the CPU area in half (6 vs. 8 µm) but also allowed way bigger die sizes.

Or did they, for development cost or schedule reasons, just leave it as it was, with gaps where the BCD circuitry had been?

As visible, there is no gap. Investing any amount of time past disabling the adjuster would never have yielded any ROI. The fact that they only disabled the circuitry might be the most definitive trace about how little time was invested.


*1 - So close that even all unofficial opcodes work the same, so even the ROM is unchanged

3
  • 11
    Disabling BCD has another small advantage: no need for issuing a CLD in interrupt handlers. Commented Jun 18 at 15:58
  • "It's even legal to copy everything, as long as it gets modified in a way making sure it's no working the patented way" That only saves you from patent infringement. Still can violate other IP restrictions.
    – Ben Voigt
    Commented Jun 20 at 16:04
  • 1
    @BenVoigt Maybe - and today. All of that wasn't canon back then.
    – Raffzahn
    Commented Jun 20 at 17:32
9

AFAIK the circuitry was not removed, it was only "damaged" enough to stop working. So no area gains/etc., neither the layout was redone.

Well the part about layout might be not completely true since they'd added audio-"DMA" on the same crystal, but I guess that could be done without touching already existing layout.

1
  • 4
    It's possible that Nintendo might have been able to get by with a somewhat slower process since I think the critical paths with regard to cycle rate occurred while doing BCD math. A given 6502 which wasn't going to be used for BCD could probably run reliably at a faster rate than one which would be required to process BCD computations, but 1.79Mhz isn't really all that fast for a 6502 so I doubt there were any real timing constraints.
    – supercat
    Commented Jun 18 at 14:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .