Requests the status of EEPROM, and returns 1 if EEPROM exists, 0 if it does not
#include <ultra64.h> /* os.h */
s32 osEepromProbe(OSMesgQueue *mq);
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 |
0x02 (EEPROM_TYPE_16K) | ... SIZE=16K bit |
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.
osContInit, osEepromRead, osEepromWrite, osEepromLongRead, osEepromLongWrite, and osSetEventMesg
1999/02/01 Revised entirely
1999/04/30 Changed format