## Reset (NMI)

The following cautions should be observed when performing program reset. For additional information, please refer to Developer News 1.5: Reset Processing.

- 6-1 Determining Hot-start and Cold-start (Required)
- 6-2 Y Scale Reset (Required)
- 6-3 Suspension of Graphics and Audio Tasks (Required)

### 6-1 Determining Hot-start and Cold-start (Required)

Caution
To determine whether a hot-start or cold-start of the Control Deck has occurred, use the global variable, osResetType.

Discussion
A hot-start or cold-start cannot be reliably determined solely based upon the contents of memory. Using osResetType will prevent a game from locking up due to assumption of hot-start conditions.

### 6-2 Y Scale Reset (Required)

Caution
Ensure that a preemption by another thread, which changes the Y scale, has not occurred after resetting the Y scale to 1.0 in the PRENMI routine. Don't perform an operation that prevents vertical retrace.

Discussion
If the video mode registers have been altered in any non-standard way, these registers must also be set back to their original values in the PRENMI routine. Failure to reset these values may cause lockups on NMI.

### 6-3 Suspension of Graphics and Audio Tasks (Required)

Caution
When a PRENMI event occurs, graphic and audio tasks must be stopped before NMI occurs.

Discussion
When the reset button is pressed, a PRENMI signal is generated which should be processed by the game. This PRENMI signal is guaranteed to come at least 0.5 seconds before the NMI which resets the N64 hardware. In this 0.5 seconds, a number of operations must be performed in order to prepare the machine for the NMI. If these operations are not performed, the RSP may not function properly after system reset.

These operations are:

1. Stop graphics tasks.
2. Stop audio tasks.
3. Don't issue new PI DMA requests.
4. Return YScale to 1 and VI registers to original values.
5. Reset N64 Disk Drive.

Because at least 0.5 seconds will elapse between the PRENMI signal and NMI generation, the game has a small amount of time to reset gracefully. Examples of things which can be performed in this amount of time include ramping the audio down gradually and slowly dimming the screen to black.

© 1999 Nintendo of America Inc.
Release Date: March 1999