Japanese
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 void *par in the above function mean?
Also, is it necessary to turn slave SH2 ON/OFF before and after this function?
Also, please tell me how to notify the main that the slave's processing has finished, and how to issue a command on the main to forcibly terminate the slave's processing.

A)
The slave CPU is turned on and off within this function, so it is not necessary. Also, the argument par is a pointer to the argument list to the registration function.


I want to execute SGL functions on the slave.

Q)
I would like to have the slave side handle the sound, but is there anything I should be careful about?

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

One of the causes is gbr. In the SGL system, gbr is used as the start address of the system variable area, and data is read and written from there using relative loading.
However, currently nothing is set in gbr, so it will not work as is.
So, it doesn't mean that it will work if you set gbr. This is a problem that depends on each CPU's cache. Data updated on the other CPU must be retrieved using a cache-through address, but SGL functions are not designed to retrieve that data using a cache-through address. Since SGL is running on each other's CPUs, the problem of system variable consistency is considered to be very large, so we cannot guarantee that it will work properly.

For the above reasons, avoid using SGL functions in slaves. SGL Think of the basic slave position as being for calculation (geometry engine).


BackForward
FAQSGL programming related
Copyright SEGA ENTERPRISES, LTD. 1997