What's new

How does the CPU give coprocessor(s) instructions?

Toasty

Sony battery
Noobie question, and pretty self-explanatory from the name. Are there special instructions that the CPU executes that then get sent to the coprocessor? Does the CPU send a big chunck of code written for the coprocessor over all at once? (How does the CPU tell the coprocessor what to do?) I know when programming in x86 assembly, the FPU instructions are written just as though floating-point operations are part of all the other instructions and they mix pretty seemlessly. Is it similar for the coprocessors on the 64? Thanks!
 

WildNinji

New member
Toasty said:
Are there special instructions that the CPU executes that then get sent to the coprocessor? Does the CPU send a big chunck of code written for the coprocessor over all at once?
I suppose you are talking about N64 coprocessors.
N64 has two main processors: the CPU and the RCP. Sometime the RCP is misnomined coprocessor but instead is a real processor on it's own.

The main CPU has two coprocessors:
  • COP0 that handles system status
  • COP1 that is the FPU coprocessor

The RCP is split into RSP and RDP. RSP acts as the leader processor.
  • RSP's COP0 handles processors communication
  • RSP has no COP1 for FPU
  • RSP COP2 is the RDP

The CPU controls the RCP (start, stop, send tasks) via DMA (to transfer code to be executed) and the SP_STATUS memory mapped register (to start/stop it).
The RCP talks to the CPU via RCP's COP0 instructions.

Inside a single processor, the format of the opcode tells to the processor if it should execute the opcode itself or send it to one of its coprocessors.
Search around (dextrose.com) for anarko opcodes tables and r4300i manual by MIPS, they have all the info you need.
 
OP
Toasty

Toasty

Sony battery
WildNinji said:
I suppose you are talking about N64 coprocessors.
Yeah, sorry about the confusion - I originally posted this in general 64 emulation, but it's more of a programming question so it got moved.

Anyway thanks for the info. Anyone know of any good links that have some documentation/info on the RCP?
 

WildNinji

New member
Toasty said:
Anyone know of any good links that have some documentation/info on the RCP?
The RCP is scarcely documented by anarko's opcode list, some documents by bpoint and LaC's n64-hw doc. You can find all of them around the net.

Another big source of information are the RSP interpreter/compiler source by Zilmar (part of the Project64 emulator).

The best source would be the official n64 documentation from the devkit, n64.icequake.net had it, but NOA took it down :cry: Anyhow you can still find some headers around, they can help somehow.
 

Zuzma

New member
Webarchive has everything except the SN systems files.

Edit: Sorry about that link. I won't do it again. I keep forgetting how anal nintendo is about stuff like this and I wouldn't want to see emutalk go under for something stupid I did.
 
Last edited:

Trotterwatch

Active member
Yeah was checking this last night :/ You can get the Kantan manual pretty easily. The advanced one is harder to find though.
 
OP
Toasty

Toasty

Sony battery
Well thanks guys. That should give me something to ponder for a while anyway.:)
 

Top