1 /*---------------------------------------------------------------------------*
2   Project:  TwlSDK - NA - include
3   File:     verdata.h
4 
5   Copyright 2007-2008 Nintendo.  All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain
8   proprietary information of Nintendo of America Inc. and/or Nintendo
9   Company Ltd., and are protected by Federal copyright law.  They may
10   not be disclosed to third parties or copied or duplicated in any form,
11   in whole or in part, without the prior written consent of Nintendo.
12 
13   $Date:: 2008-09-17#$
14   $Rev: 8556 $
15   $Author: okubata_ryoma $
16  *---------------------------------------------------------------------------*/
17 #ifndef TWL_NA_ARM9_VERDATA_H_
18 #define TWL_NA_ARM9_VERDATA_H_
19 
20 #include    <twl/misc.h>
21 #include    <twl/types.h>
22 #include    <nitro/os/common/emulator.h>
23 
24 #ifdef  __cplusplus
25 extern "C" {
26 #endif
27 
28 /*===========================================================================*/
29 
30 
31 #define NA_VERSION_DATA_WORK_SIZE (40*1024)
32 
33 
34 BOOL NAi_LoadVersionDataArchive(void* pWork, u32 workSize);
35 BOOL NAi_UnloadVersionDataArchive(void);
36 s32  NAi_DecodeVersionData(const void* src, u32 srcSize, void* dst, u32 dstSize);
37 
NA_LoadVersionDataArchive(void * pWork,u32 workSize)38 static inline BOOL NA_LoadVersionDataArchive(void* pWork, u32 workSize)
39     { return OS_IsRunOnTwl() ? NAi_LoadVersionDataArchive(pWork, workSize): FALSE; }
NA_UnloadVersionDataArchive(void)40 static inline BOOL NA_UnloadVersionDataArchive(void)
41     { return OS_IsRunOnTwl() ? NAi_UnloadVersionDataArchive(): FALSE; }
NA_DecodeVersionData(const void * src,u32 srcSize,void * dst,u32 dstSize)42 static inline s32  NA_DecodeVersionData(const void* src, u32 srcSize, void* dst, u32 dstSize)
43     { return OS_IsRunOnTwl() ? NAi_DecodeVersionData(src, srcSize, dst, dstSize): -4; }
44 
45 
46 /*===========================================================================*/
47 
48 #ifdef  __cplusplus
49 }          /* extern "C" */
50 #endif
51 
52 #endif /* TWL_NA_ARM9_VERDATA_H_ */
53 
54 /*---------------------------------------------------------------------------*
55   End of file
56  *---------------------------------------------------------------------------*/
57