MOS Technology 8502


The MOS Technology 8502 was an 8-bit microprocessor designed by MOS Technology and used in the Commodore 128. Based on the MOS 6510 that was used in the Commodore 64, the 8502 allowed the C128 to run at double clock rate of the C64 with some limitations.
Common random access memory of the Commodore C64-era allowed accesses at 2 MHz. If the CPU and display chip both shared the same memory to communicate, which was the common solution in the era when RAM was expensive, then one would normally have to have the CPU and display chip chips mediate access to the bus so that only one of them used it at a time, generally by having one pause the other. Assuming the two chips require roughly equal access, that means the chips are paused half of the time, effectively running at 1 MHz.
The 6502-family had one design feature that eased the design of such systems. The 6502 used a two-phase clock to drive its internal circuity, but only accessed memory during one of the two phases. That meant the display chip could use memory during alternating clock phases without interfering with the CPU. The major advantage of this style of access is that the two chips do not have to communicate to pause each other, they simply watch the already-existing clock signal present on the 6502's pins. In the original C64, this timing trick was used to allow the VIC-II to interleave its access to main memory with that of the 6510.
The 8502 was able to run at 2 MHz and easily switch between that and the 6510's 1 MHz. When the 8502 runs at double-speed, it faces the problem that there is not enough time for the VIC to access memory during the free half-cycles. For this reason, the 8502 could only run at double-speed full-time when being used with the 80-column VDC in the C128, which had separate memory for the display that was not being directly accessed by the CPU.
When running a VIC display mode, the two chips began to share access as was the case in the C64, and this meant the CPU had to return to its normal ~1 MHz speed. Programs could disable the screen during CPU-intensive calculations to allow the CPU to run at its faster speed. A smaller speed gain, about 35%, was also possible while keeping the VIC display active by switching the CPU to 2 MHz only while the VIC is drawing the empty border along the top and bottom of the screen, since the VIC performs no RAM access during that time.
The pinout is slightly different than the 6510. The 8502 has an extra I/O-pin and lacks the ϕ2-pin that the 6510 had. The 8502 family also includes the MOS 7501, 8500 and 8501.
In 2007, HP released the HP 35s, a calculator that uses the Sunplus Technology / Generalplus SPLB31A/GPLB31A, an embedded chip integrating an 8502 microprocessor core alongside LC display and I/O controllers. The HP 17bII+, the HP 12c Prestige, as well as a revised version of the HP 12c Platinum and the HP 12c Platinum 25th Anniversary Edition, all manufactured by Kinpo Electronics, are also based on this chip.