sgdk
mapper.h
Go to the documentation of this file.
00001 
00034 #ifndef _MAPPER_H_
00035 #define _MAPPER_H_
00036 
00037 
00038 #include "config.h"
00039 #include "types.h"
00040 
00041 
00042 #define MAPPER_BASE     0xA130F1
00043 
00044 #define BANK_SIZE       0x80000
00045 #define BANK_IN_MASK    (BANK_SIZE - 1)
00046 #define BANK_OUT_MASK   (0xFFFFFFFF ^ BANK_IN_MASK)
00047 
00056 #if (ENABLE_BANK_SWITCH != 0)
00057     #define FAR(data) SYS_getFarData((void*) (data))
00058     #define FAR_SAFE(data, size) SYS_getFarDataSafe((void*) (data), size)
00059 #else
00060     #define FAR(data) data
00061     #define FAR_SAFE(data, size) data
00062 #endif
00063 
00064 
00072 u16 SYS_getBank(u16 regionIndex);
00080 void SYS_setBank(u16 regionIndex, u16 bankIndex);
00081 
00096 void* SYS_getFarData(void* data);
00110 void* SYS_getFarDataEx(void* data, bool high);
00122 bool SYS_isCrossingBank(void* data, u32 size);
00140 void* SYS_getFarDataSafe(void* data, u32 size);
00156 void* SYS_getFarDataSafeEx(void* data, u32 size, bool high);
00157 
00158 
00159 #endif // _MAPPER_H_
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines