osEepromProbe osEepromProbe (function)

Requests the status of EEPROM, and returns 1 if EEPROM exists, 0 if it does not

Syntax

#include <ultra64.h>        /* os.h */
s32 osEepromProbe(OSMesgQueue *mq);

Description

osEepromProbe checks to see if EEPROM is correctly loaded in an N64 Game Pak. If EEPROM is correctly loaded, this function returns the type of EEPROM. The return values are:

0x00... no EEPROM is loaded
0x01 (EEPROM_TYPE_4K)... SIZE=4K bit (a 4K-EEPROM is present)
0x02 (EEPROM_TYPE_16K)... SIZE=16K bit (a 16K-EEPROM is present)

mq is the initialized message queue associated with OS_EVENT_SI events. For details, see the osSetEventMesgfunction in the N64 Online Function Reference Manual. Since mq is used inside the function to wait for messages, the application does not need to use mq to wait for an end-of-function message.

Note that you must always call osContInit to initialize low-level synchronization before you call osEepromProbe.

Whenever an application uses EEPROM, you must use this function (osEepromProbe) to ensure that EEPROM is correctly loaded.

If you find that EEPROM is not correctly loaded, Nintendo recommends that the game be terminated for security reasons.

See Also

osContInit, osEepromRead, osEepromWrite, osEepromLongRead, osEepromLongWrite, and osSetEventMesg

Revision History

1999/02/01 Revised entirely
1999/04/30 Changed format