FAQSGL programming related
BackForward
FAQ / SGL programming related

Slave CPU



I want to use a slave CPU.

Q)
I want to use a slave CPU, but I don't know how to specify it.

void slSlaveFunc (void (* func) (), void * par)

What does the above function void * par mean?
Also, is it necessary to turn on / off the slave SH2 before and after this function?
Also, please tell me how to notify the main that the slave processing is finished, and how to forcibly terminate the slave processing on the main side.

A)
It is not necessary because the slave CPU is turned ON / OFF in this function. Also, the argument par is a pointer to the argument list to the registered function.


I want to execute an SGL function on a slave.

Q)
I want the slave to take charge of the sound. Is there anything I should be aware of?

A)
SGL functions are not designed to operate on the slave side.

One of the causes is gbr. In the SGL system, gbr is set as the start address of the system variable area, and data is read and written from there using relative loading.
However, at present, nothing is set in gbr, so it will not work as it is.
Well, if you set gbr, it doesn't work. This is a problem that depends on the cache of each CPU. Data updated on the other CPU must be fetched using the cache-through address, but each SGL function is not designed to fetch that data at the cache-through address. As long as SGLs are running on each other's CPUs, the problem of system variable matching is considered to be very large, so we cannot guarantee that it will work properly.

For these reasons, avoid using SGL function groups on slaves. SGL Think of the basic slave position in the calculation (geometry engine).


BackForward
FAQSGL programming related
Copyright SEGA ENTERPRISES, LTD ,. 1997