CARDProbeEx

C Specification

#include <revolution/card.h>
typedef void (*CARDCallback)( s32 chan, s32 result );
s32 CARDProbeEx(s32 chan, s32* memSize, s32* sectorSize);

Arguments

chan Slot number (0: slot A, 1: slot B)
memSize Pointer to type s32 object for storing the Memory Card size in megabits. If unnecessary, specify NULL.
sectorSize Pointer to type s32 object for storing the Memory Card sector size in bytes. If unnecessary, specify NULL.

Return Values

One of the following codes:

CARD_RESULT_FATAL_ERROR
CARD_RESULT_NOCARD Nothing is inserted.
CARD_RESULT_BUSY Try again later.
CARD_RESULT_WRONGDEVICE Found a non-Memory Card device.
CARD_RESULT_READY Found a Memory Card.

Note: the CARDProbeEx function returns CARD_RESULT_BUSY while the operating system is probing the specified Memory Card Slot. CARD_RESULT_BUSY usually turns into another state after a few milliseconds. Note: the CARDProbe function returns FALSE if a Memory Card is not inserted or the operating system is not probing the specified slot [as of 08/13/2001].

Description

This function verifies if a Memory Card of any type is inserted in the specified slot. The Memory Card size returned will be 4, 8, 16, 32, 64, or 128 Mb. The sector size returned will be 8, 16, 32, 64, or 128 KB. A game program must support Memory Cards that have a sector size of 8 KB.

Note: Nintendo officially discourages the current development of game programs that support Memory Cards with sectors that are not 8 KB. A game program should call the CARDProbeEx or CARDGetSectorSize function to verify whether the Memory Card is an 8 KB sector Memory Card before proceeding [as of 5/30/2001].

See Also

Revision History

03/01/2006 Initial version.