FSOverlayID, FS_OVERLAY_ID, FS_EXTERN_OVERLAY

FS_LDTOVERLAY_ID, FS_EXTERN_LDTOVERLAY

Definition

#include <nitro/fs.h>

typedef u32 FSOverlayID;
#define  FS_EXTERN_OVERLAY(name)   extern u32 SDK_OVERLAY_ ## name ## _ID[1]
#define  FS_OVERLAY_ID(name)       ((u32)&(SDK_OVERLAY_ ## name ## _ID))
#define	FS_EXTERN_LTDOVERLAY(name)  extern u32 SDK_LTDOVERLAY_ ## name ## _ID[1]
#define	FS_LTDOVERLAY_ID(name)      ((u32)&(SDK_LTDOVERLAY_ ## name ## _ID))

Description

These macros define the module ID of the overlay that is specified by the FS_LoadOverlay and FS_UnloadOverlay functions. These are generated at link time by makerom, so they can be used at on the program side as shown below.

(1) Use an LSF file to specify an overlay.

Example:
Overlay overlay_1
{
After main
Object func_1.o
}


(2) Use the macros in a program to declare an overlay ID.


Example:
FS_EXTERN_OVERLAY(overlay_1);


(3) Specify an overlay ID in the FS_LoadOverlay function or the FS_UnloadOverlay function.


Example:
FS_LoadOverlay(MI_PROCESSOR_ARM9, FS_OVERLAY_ID(overlay_1));

or

FSOverlayID id = FS_OVERLAY_ID(overlay_1);
FS_LoadOverlay(MI_PROCESSOR_ARM9, id);



FS_EXTERN_LTDOVERLAY, FS_LTDOVERLAY_ID are used instead of FS_EXTERN_OVERLAY, FS_OVERLAY_ID when using overlays in the LTD region.

See Also

FSOverlayInfo
FS_LoadOverlayInfo
FS_LoadOverlay
FS_UnloadOverlay

Revision History

2009/11/11 Added descriptions of FS_EXTERN_LTDOVERLAY and FS_LTDOVERLAY_ID
2005/06/02 Changed & to &amp;
2004/11/02 Corrected the structure definition to match the header file.
2004/09/24 Revised links.
2004/04/08 Revised the description in line with changes to the FSOverlayID type.
2004/04/05 Initial version.


CONFIDENTIAL