N64® Functions Menu

al - Audio Library Functions
gDP - DP GBI Macros
gdSP - General GBI Macros
gSP - SP GBI Macros
gt - Turbo Microcode RDP
gu - Graphics Utilities
Math - Math Functions
nuSys - NuSystem
os - N64 Operating System
sp - Sprite Library Functions
uh - Host to Target IO
64DD - N64 Disk Drive

Nintendo® Confidential





osContSetCh

Syntax
#include <ultra64.h> /* os.h */
s32 osContSetCh(u8 ch);
s32 osContSetCh(u8 ch);

Explanation
The osContSetCh function specifies the number of devices for the functions to access when those functions access to multiple direct SI devises. Specifically, those functions are:

osContStartReadData()
osContGetReadData()
osContStartQuery()
osContGetQuery()
osPfsIsPlug().

By default, it is set for the system to read device data of the number specified in MAXCONTROLLERS

Direct SI devices that the sytem reads range from port 0 to port (ch-1). Note that it cannot be used to obtain the data only from the devices connected to Port 2 and Port 3 out of the number specified in MAXCONTROLLERS. It must start with the first port which is Port 0 in this case. Also ch cannot be greater than the nunber of MAXCONTROLLERS

By setting ch to a number smaller than MAXCONTROLLERS, you can save time in polling for Controller data. For instance, it can take as much as 2 milliseconds for the the osContStartReadData function to issue read command and receive a message for completed data reading and for the osContGetReadData fucntion to obtain data from Controller when ch is set to MAXCONTROLLERS. However, you can save around 0.3 milliseconeds for every MAXCONTROLLERS you reduce.

Notes
osContInit() must be called before the osContSetCh function is called. If the osContSetCh function is called before osContInit, the value specified for ch will be returned to "MAXCONTROLLERS"

See Also
osContInit
osContGetQuery
osContGetReadData
osContStartQuery
osContStartReadData
osPfsIsPlug



Nintendo® Confidential

Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.


Copyright © 1998
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last updated March 1998