1-2 Boot


At the beginning of every N64 game application, the boot function specified by a programmer is activated. (For convenience, it is called the boot function, but strictly speaking, whatever is specified by the entry command in the spec file becomes the boot function.) This boot function is similar to the typical C program's main function in that it is the first function called in the program.


1-2-1 The Boot Function


The boot function initializes the operating system and passes control to the first thread to begin processing (thread A in the following illustration). Note that control migrates as threads pass control and end. When thread A finishes, it becomes the idle thread.


Figure 1-2-1 Boot flow


The registration of the thread that is actually operating can also be carried out by the initialization thread where the execution has been transferred from thread A. Also, you can end thread A and create a new idle thread. In either case, note that you always need the idle thread.