/*---------------------------------------------------------------------------*
  Project:  NitroSDK - FS - libraries
  File:     rom.h

  Copyright 2003-2004 Nintendo.  All rights reserved.

  These coded instructions, statements, and computer programs contain
  proprietary information of Nintendo of America Inc. and/or Nintendo
  Company Ltd., and are protected by Federal copyright law.  They may
  not be disclosed to third parties or copied or duplicated in any form,
  in whole or in part, without the prior written consent of Nintendo.

  $Log: rom.h,v $
  Revision 1.4  2004/09/04 13:21:04  yosizaki
  add prototype of FSi_LoadOverlayInfoCore.

  Revision 1.3  2004/07/08 13:39:45  yosizaki
  extern rom archive.

  Revision 1.2  2004/05/11 04:27:57  yosizaki
  (none)

  Revision 1.1  2004/05/10 06:28:28  yosizaki
  (none)

  $NoKeywords: $
 *---------------------------------------------------------------------------*/


#if	!defined(NITRO_FS_ROM_H_)
#define NITRO_FS_ROM_H_

#include <nitro/misc.h>
#include <nitro/types.h>
#include <nitro/fs/file.h>
#include <nitro/fs/archive.h>


/* Card/Cartridge lock ID */
extern	u32	fsi_card_lock_id;

/* information of attached overlay */
extern	CARDRomRegion	fsi_ovt9;
extern	CARDRomRegion	fsi_ovt7;

#if	defined(FS_IMPLEMENT)
/* ROM Archive */
extern	FSArchive	fsi_arc_rom;
#endif	/* FS_IMPLEMENT */


#ifdef __cplusplus
extern "C" {
#endif



/*---------------------------------------------------------------------------*
  Name:         FSi_InitRom

  Description:  Initialize "rom" archive

  Arguments:    default_dma_no   default DMA channel for ROM
                                 if out of range(0-3),
                                 use CpuCopy instead of DMA.

  Returns:      None.
 *---------------------------------------------------------------------------*/
void	FSi_InitRom(u32 default_dma_no);


/*
 * Loads overlay information from specified rom-duplicated archive.
 * Unannounced release for convenience of IPL package.
 */
BOOL FSi_LoadOverlayInfoCore(
	FSOverlayInfo *p_ovi, MIProcessor target, FSOverlayID id,
	FSArchive *p_arc,
	u32 offset_arm9, u32 len_arm9,
	u32 offset_arm7, u32 len_arm7);



#ifdef __cplusplus
} /* extern "C" */
#endif


#endif	/* NITRO_FS_ROM_H_ */
