osInitialize osInitialize (function)

osInitialize

Performs hardware and software initialization procedures

Syntax

#include <ultra64.h>     /* ultra64.h */
void osInitialize(void);

Description

The osInitialize function initializes the internal NINTENDO64 hardware and the N64OS work area.

This routine performs the following processes:

  1. Sets the CPU's floating point control/status register. (Allows non-normalized values to be flushed to zero, and permits invalid operation exceptions to capture occurrences of Not-a-Numbers (NaNs))
  2. Disables watch exceptions.
  3. Sets exception vectors.
  4. Frees all TLBs. (Initializes TLB entry 31 for the SGI emulator board.)
  5. Sets variables related to the PI.
  6. References the value of osTvType and sets osViClock.
  7. Checks whether a PRENMI event has already occurred, and if so, halts processing.
  8. Permits AI-DMAs.

When the application is started up, this function must be called prior to any interrupt or exception process.

Revision history

1999/06/15 Completely rewritten.