The PC Engine CPU, also known as the HuC6280, is a 8-bit CPU that was used in the PC Engine console. It is based on the 65C02 CPU and has a clock speed of 1.79 MHz or 7.16 MHz. The CPU has 8-bit registers, an 8-bit ALU, and an 8-bit data bus.
Overview
The HuC6280 CPU is part of a custom-designed package that includes a PSG sound chip and a hardware timer. It has a simple MMU that expands the physical address space from 16-bit to 21-bit. The CPU can run at one of two clock speeds: low (~1.79 MHz) or high (~7.16 MHz).
What it does
The CPU has several new instructions, including block transfer instructions (TAI, TDD, TIA, TII, and TIN) that can copy large amounts of data into VRAM or working RAM. It also has a new instruction called SET (Set T) that sets the new T flag for the immediately following instruction. Other new instructions include ST0, ST1, and ST2, which write an immediate operand directly to one of the three VDC ports, and BSR (Branch to Subroutine), which works like JSR (Jump to Subroutine) except the operand is a PC-relative displacement instead of an absolute address.
The CPU has 22 unused opcodes that function as plain old NOPs. It also has a zero page and hardware stack located at $2000-$21FF, rather than $0000-$01FF as on 6502. The console's physical memory map is straightforward, with 8 KB of working RAM and memory-mapped I/O registers and ports.
Tradeoffs
The PC Engine CPU is fast for its time, but has limited instruction set capabilities compared to its immediate competition. It has a large number of mostly-general-purpose registers, but they are 8-bit, not 32-bit like the 68000 CPU. The CPU's MMU is simple, but effective, and the block transfer instructions are useful for copying large amounts of data.
In conclusion, the PC Engine CPU is an interesting piece of hardware that is worth studying. Its unique features, such as the block transfer instructions and the simple MMU, make it a valuable resource for developers and programmers. For more information, readers can refer to the HuC6280 CPU documentation and opcode matrix.