/*---------------------------------------------------------------------------*
  Project:  NitroSDK - FS - include
  File:     file.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: myrom.h,v $
  Revision 1.1  2004/07/09 00:59:51  yosizaki
  (none)

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


#if	!defined(NITRO_FS_DEMO_ARC_1_MYROM_H_)
#define NITRO_FS_DEMO_ARC_1_MYROM_H_

#include <nitro.h>
#include <nitro/fs.h>
#include <nitro/card.h>


#ifdef __cplusplus
extern "C" {
#endif


/* Duplicate ROM archive structure  */
typedef	struct	MyRomArchive
{
	/* Archive structure */
	FSArchive	arc[1];
	/* DMA channel to be used*/
	u32	default_dma_no;
	/* Card/cartridge lock ID */
	u32	card_lock_id;

} MyRomArchive;


/* Initialize duplicate ROM archive */
void	MyRom_Init(MyRomArchive *p_rom);

/* Specify DMA and register/load archive */
BOOL	MyRom_Create(
	MyRomArchive *p_rom,
	const char *name, int name_len,
	u32 base, const CARDRomRegion *fnt, const CARDRomRegion *fat);

/* Get current default DMA */
u32	MyRom_GetDefaultDMA(const MyRomArchive *p_rom);

/* Set default DMA */
u32	MyRom_SetDefaultDMA(MyRomArchive *p_rom, u32 dma_no);


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


#endif	/* NITRO_FS_FILE_H_ */
