Function
nuSiMgrInit
Syntax:
u8 nuSiMgrInit(void)
Arguments:
None
Return Value:
Bit pattern of Controller
Explanation:
Initializes and starts the SI Manager
Initializes and starts the SI Manager, which controls access to the SI. Initilization involves calling the osContInit function to initialize the N64OS SI. SI events are registered in the SI Manager.
The SI Manager can register numerous device managers that use SI events. The SI can be accessed only via device managers registered in the SI Manager. This provides exclusive control of the SI.
The nuSiCallBackAdd function is used to register device managers in the SI manager. The nuSiCallBackremove function is used to remove them. The actual form of a device manager is an array of function pointers to callback functions.
A unique major number is assigned to each device. When this number and the index of the function pointer array are sent to the SI manager as a message number, the SI manager calls the device manager's callback function which corresponds with the message.
The device managers which can be registered in the SI manager are the Controller manager, Controller Pak manager, Rumble Pak manager, EEPROM manager, GB Pak manager, and Voice Recognition manager.
* Controller Manager
Gets the status of buttons and keys on a standard Controller. Register with the nuContMgrInit function.
* Controller Pak Manager
Performs read/write and note manipulation for Controller Pak. Register with the nuContPakMgrInit function.
* Rumble Pak Manager
Controls Rumble Pak. Register with the nuContRmbMgrInit function.
* EEPROM Manager
Identifies the EEPROM type and performs read/write. Register with the nuEepromMgrInit function.
* GB Pak Manager
Performs read/write for GB Pak. Register with the nuContGBPakMgrInit function.
* Voice Recognition System
Controls the Voice Recognition System. Register with the nuVrsMgrInit function.
The return value is the bit pattern of the connected Controller
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | bit | |
Bit pattern | - | - | - | - | 4 | 3 | 2 | 1 |
If the Controller is connected, the bit is 1
Since this function is called by the nuContInit function, in most cases this function does not need to be called.
Reference: nuSiCallBackAdd, nuSiCallBackRemove, nuContInit
- Revision History
1999/2/1 Rewrote content with changes in SI manager internal processing. Added descriptions regarding GB Pak and Voice Recognition System.