1.8

Bug information and programming guides for the N64 will be periodically released. All information that will become unnecessary with software (library, etc.) and hardware upgrades used in development will be noted together. Please utilize this information after confirming that the information concerns your specific upgrade.

Contents:

  1. Regarding NMI Reset
  2. Timing of the osAiSetFrequency() function


1. Regarding NMI Reset

A problem was found that caused the application to halt when the reset button is pressed when the n_audio micro code is used with MPAL. This occurs if the application is re-started without first initializing the RSP program counter (PC). To fix this problem, we have added the following function into this patch:

Function name
osAfterPreNMI
Initializes the -> RSP program counter(PC)

Syntax
#include <ultra64.h>
s32 osAfterPreNMI(void);

Description
When the application receives a pre-NMI event, halt all RSP tasks and then call this function.

If the function call is successful, 0 is returned. If the RSP is active, the call fails and -1 is returned. In this case, wait for the executing RSP task to end and then call the function again. When a pre-NMI event arrives, the application must halt GFX tasks and audio tasks. At the time that a pre-NMI event is received, confirm that the executing RSP task has ended and that no new RSP task has begun, and then call the osAfterPreNMI() function.

Please call the osAfterPreNMI() function whenever a pre-NMI event is received, even if you are using some mode other than MPAL (NTSC etc.).


2. Timing of the osAiSetFrequency() function

A bug was found that produces a funny noise after the power is turned on to N64 and before playback of sounds begins.

This is an N64 hardware problem. When more than around 0.5 second elapses between the time that the power is turned on to N64 and the time that the osAiSetFrequency() function is called, then this noise will be produced when the function is called.

To avoid this noise, please call osAiSetFrequency() right after startup. However, note that osAiSetFrequency() must not be called until after the osInitialize() function has been called. In general, osInitialize() is the first function called in an N64 application. Therefore, we strongly recommend that you call osAiSetFrequency() immediately after calling the osInitialize() function.

Even if you can not follow the above recommendation, please make sure to call the osAiSetFrequency() function within 0.5 second after calling osInitialize().