The SPC-700 processor is a 16-bit processor. The SPC-700 does 8-bit arithmetic, does 16-bit arithmetic, has a 16-bit memory address space, has an 8-bit IO address space, and also features the SPC-700 timers. The SPC-700 came from Sony, so the initials SPC might mean Sony processor.
Sony possibly had other uses for the SPC-700, but ROM hackers know the SPC-700 for exactly one purpose: the SPC-700 is the audio coprocessor inside the SNES. (This was before the Sony Playstation, when the Nintendo SNES contained a Sony chip.) The SNES attaches the SPC-700 to a digital sequencer. A program uses the SPC-700 timers to set the tempo and the digital sequencer to make music from sound samples.
From 65816 to SPC-700 Edit
Assembly hackers tend to learn the 65816 (the central processor of the SNES) before they learn the SPC-700. The two processors share some ideas.
The 65816 belongs to the 65xx family. The SPC-700 is not a 65xx processor, but some of the concepts and instructions are similar, so the SPC-700 is like a "Kaizo" 65xx. Some of the SPC-700 instructions are exactly like 65816 instructions, except that the opcode is different and the assembly syntax fits a different pattern. For example,
- the SPC-700 mov A, $nn (opcode $e4) is like the 65816 sta $nn (opcode $85).
- the SPC-700 mov $nn, A (opcode $c4) is like the 65816 lda $nn (opcode $a5).
- the SPC-700 mov $nn, $nn (opcode $fa) is new.
Like the 65816, the SPC-700 has an accumulator A and two index registers X and Y. The SPC-700 has no 16-bit mode for these registers, so A and X and Y are always 8-bit. Instead, registers Y and A of the SPC-700 combine to form 16-bit register YA. The SPC-700 has separate 8-bit and 16-bit instructions.
Like the 65816, the SPC-700 has a direct page for 8-bit addresses. Unlike the 65816, the SPC-700 can use the direct page locations like 8-bit accumulators. So the SPC-700 provides both adc A, #$nn and adc $nn, #$nn. With two direct page addresses in registers X and Y, the SPC-700 provides adc (X),(Y). In SPC-700 assembly language, the round parentheses (...) use a direct page address, while the square brackets [...] use a 16-bit address. The SPC-700 never uses any 24-bit addresses.
Assemblers like wla-spc700 require every 16-bit operand to start with an exclamation point. This distinguishes adc A, $nn from adc, A, !$nnnn.
Wiki pages Edit
- spc700.rom, the SPC-700 boot ROM in the SNES