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

   

nuScCreateScheduler

Format
void nuScCreateScheduler(u8 videoMode, u8 nnumFields)
Arguments
  • videoMode is the video mode setting (OS_VI_NTSC_LAN1 class)
  • numFields is the retrace notice cycle (1=60Hz, 2=30Hz)
Returned Value
none

What This Function Does
It initializes and activates the Scheduler, sets the video Interface (VI), and activates the VI Manager. It also creates and activates the reality co-processor (RCP) task management thread. This function is called when NuSystem is initialized at startup, so it is not necessary to call it from your application.

When a retrace interrupt or PRE-NMI interrupt occurs in the N64 operating system, the relevant message is sent to the message queue, but because only one message queue can be registered, it is not possible for more than one thread to receive the message. NuSystem works around this by using the Scheduler to send messages to several threads. The Scheduler receives retrace and PRE-NMI events from the N64 hardware and sends event messages to all the registered clients. To register clients, use the nuScAddClient function.)

Initialization of the Scheduler activates the VI Manager, sets the video mode in videoMode, and sets the retrace notice cycle in numFields. After that the ocViBlack function blacks out the screen. Initialization also leads to the creation and activation of the system event handler thread for the VI (V-Sync) and the serial processor (SP) and display processor (DP) event handlers. RCP task management uses the graphics task thread and the audio task thread.
  • The system event handler thread receives VI and PRE-NMI events from the N64 OS and sends messages to the registered clients.
  • The graphics task thread handles graphics task messages and executes graphics tasks. Usually these messages are created and sent by the nuGfxTaskStart function.
  • The audio task thread handles audio task messages and executes audio tasks. Usually these messages are created and sent by the Audio Manager. When an audio task is executed by the RSP, any graphics task is discontinued and the audio task is given priority. Once the audio task is completed, the graphics task starts up again.



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 January 1998