diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/filesystem.h | 2 | ||||
-rw-r--r-- | include/nitro/OS_system_shared.h | 34 | ||||
-rw-r--r-- | include/nitro/consts_shared.h | 26 | ||||
-rw-r--r-- | include/nitro/types.h | 57 | ||||
-rw-r--r-- | include/pokemon.h | 2 |
5 files changed, 120 insertions, 1 deletions
diff --git a/include/filesystem.h b/include/filesystem.h index 64335228..37f73bb0 100644 --- a/include/filesystem.h +++ b/include/filesystem.h @@ -1,6 +1,8 @@ #ifndef POKEDIAMOND_FILESYSTEM_H #define POKEDIAMOND_FILESYSTEM_H +#include "nitro/types.h" + typedef struct NARC { FSFile file; diff --git a/include/nitro/OS_system_shared.h b/include/nitro/OS_system_shared.h new file mode 100644 index 00000000..f36e7638 --- /dev/null +++ b/include/nitro/OS_system_shared.h @@ -0,0 +1,34 @@ +/* + * NOTE: + * This file is shared between ARM9 and ARM7 + * DO NOT PUT PROC SPECIFIC CODE IN HERE + * Thank You! + */ + +/* + * DO NOT INCLUDE THIS FILE DIRECTLY + * Include OS_system.h from the specific proc's lib + */ + +#ifndef POKEDIAMOND_OS_SYSTEM_SHARED_H +#define POKEDIAMOND_OS_SYSTEM_SHARED_H + +#include "nitro/consts_shared.h" + +typedef enum { + OS_PROCMODE_USER=16, + OS_PROCMODE_FIQ=17, + OS_PROCMODE_IRQ=18, + OS_PROCMODE_SVC=19, + OS_PROCMODE_ABORT=23, + OS_PROCMODE_UNDEF=27, + OS_PROCMODE_SYS=31 +} OSProcMode; + +typedef enum { + OS_INTRMODE_DISABLE_IRQ = HW_PSR_DISABLE_IRQ, + OS_INTRMODE_DISABLE_FIQ = HW_PSR_DISABLE_FIQ, + OS_INTRMODE_ENABLE = 0 +} OSIntrMode; + +#endif //POKEDIAMOND_OS_SYSTEM_SHARED_H diff --git a/include/nitro/consts_shared.h b/include/nitro/consts_shared.h new file mode 100644 index 00000000..e515831e --- /dev/null +++ b/include/nitro/consts_shared.h @@ -0,0 +1,26 @@ +/* + * NOTE: + * This file is shared between ARM9 and ARM7 + * DO NOT PUT PROC SPECIFIC CODE IN HERE + * Thank You! + */ + +/* + * DO NOT INCLUDE THIS FILE DIRECTLY + * Include consts.h from the specific proc's lib + */ + +#ifndef POKEDIAMOND_CONSTS_SHARED_H +#define POKEDIAMOND_CONSTS_SHARED_H + +#include "nitro/types.h" + +//Shared Consts + +#define HW_PSR_CPU_MODE_MASK 0x1f // CPU mode + +#define HW_PSR_DISABLE_FIQ 0x40 // Disable FIQ +#define HW_PSR_DISABLE_IRQ 0x80 // Disable IRQ +#define HW_PSR_DISABLE_IRQ_FIQ 0xc0 // Disable FIQ and IRQ + +#endif //POKEDIAMOND_CONSTS_SHARED_H diff --git a/include/nitro/types.h b/include/nitro/types.h new file mode 100644 index 00000000..190d9eae --- /dev/null +++ b/include/nitro/types.h @@ -0,0 +1,57 @@ +/* + * NOTE: + * This file is shared between ARM9 and ARM7 + * DO NOT PUT PROC SPECIFIC CODE IN HERE + * Thank You! + */ + +#ifndef POKEDIAMOND_TYPES_H +#define POKEDIAMOND_TYPES_H + +typedef unsigned char u8; +typedef unsigned short int u16; +typedef unsigned long u32; + +typedef signed char s8; +typedef signed short int s16; +typedef signed long s32; + +typedef unsigned long long int u64; +typedef signed long long int s64; + +typedef volatile u8 vu8; +typedef volatile u16 vu16; +typedef volatile u32 vu32; +typedef volatile u64 vu64; + +typedef volatile s8 vs8; +typedef volatile s16 vs16; +typedef volatile s32 vs32; +typedef volatile s64 vs64; + +typedef float f32; +typedef volatile f32 vf32; + +typedef u8 REGType8; +typedef u16 REGType16; +typedef u32 REGType32; +typedef u64 REGType64; + +typedef vu8 REGType8v; +typedef vu16 REGType16v; +typedef vu32 REGType32v; +typedef vu64 REGType64v; + +typedef int BOOL; +#define TRUE 1 +#define FALSE 0 + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else // __cplusplus +#define NULL ((void *)0) +#endif // __cplusplus +#endif + +#endif //POKEDIAMOND_TYPES_H diff --git a/include/pokemon.h b/include/pokemon.h index 494f29d8..a8584b27 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -1,7 +1,7 @@ #ifndef POKEDIAMOND_POKEMON_H #define POKEDIAMOND_POKEMON_H -#include "types.h" +#include "nitro/types.h" // Enums |