text replacement (more clear this way)

This commit is contained in:
damdoum 2007-01-27 12:15:42 +00:00
parent 08900ee198
commit 64892e09b9
1 changed files with 83 additions and 154 deletions

View File

@ -46,172 +46,101 @@
char szRomPath[512]; char szRomPath[512];
char szRomBaseName[512]; char szRomBaseName[512];
#define DUP2(x) x, x
#define DUP4(x) x, x, x, x
#define DUP8(x) x, x, x, x, x, x, x, x
#define DUP16(x) x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x
MMU_struct MMU; MMU_struct MMU;
u8 * MMU_ARM9_MEM_MAP[256]={ u8 * MMU_ARM9_MEM_MAP[256]={
//0X /* 0X*/ DUP16(ARM9Mem.ARM9_ITCM),
ARM9Mem.ARM9_ITCM, ARM9Mem.ARM9_ITCM, ARM9Mem.ARM9_ITCM, ARM9Mem.ARM9_ITCM, ARM9Mem.ARM9_ITCM, ARM9Mem.ARM9_ITCM, ARM9Mem.ARM9_ITCM, ARM9Mem.ARM9_ITCM, ARM9Mem.ARM9_ITCM, ARM9Mem.ARM9_ITCM, ARM9Mem.ARM9_ITCM, ARM9Mem.ARM9_ITCM, ARM9Mem.ARM9_ITCM, ARM9Mem.ARM9_ITCM, ARM9Mem.ARM9_ITCM, ARM9Mem.ARM9_ITCM, /* 1X*/ //DUP16(ARM9Mem.ARM9_ITCM)
//1X /* 1X*/ DUP16(ARM9Mem.ARM9_WRAM),
//ARM9Mem.ARM9_ITCM, ARM9Mem.ARM9_ITCM, ARM9Mem.ARM9_ITCM, ARM9Mem.ARM9_ITCM, ARM9Mem.ARM9_ITCM, ARM9Mem.ARM9_ITCM, ARM9Mem.ARM9_ITCM, ARM9Mem.ARM9_ITCM, ARM9Mem.ARM9_ITCM, ARM9Mem.ARM9_ITCM, ARM9Mem.ARM9_ITCM, ARM9Mem.ARM9_ITCM, ARM9Mem.ARM9_ITCM, ARM9Mem.ARM9_ITCM, ARM9Mem.ARM9_ITCM, ARM9Mem.ARM9_ITCM, /* 2X*/ DUP16(ARM9Mem.MAIN_MEM),
AR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ARM9Mem.ARM9_OAM, ARM9Mem.ARM9_OAM, ARM9Mem.ARM9_OAM, ARM9Mem.ARM9_OAM, ARM9Mem.ARM9_OAM, ARM9Mem.ARM9_OAM, ARM9Mem.ARM9_OAM, ARM9Mem.ARM9_OAM, ARM9Mem.ARM9_OAM, ARM9Mem.ARM9_OAM, ARM9Mem.ARM9_OAM, ARM9Mem.ARM9_OAM, ARM9Mem.ARM9_OAM, ARM9Mem.ARM9_OAM, ARM9Mem.ARM9_OAM, ARM9Mem.ARM9_OAM,
//8X
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
//9X
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
//AX
MMU.CART_RAM, MMU.CART_RAM, MMU.CART_RAM, MMU.CART_RAM, MMU.CART_RAM, MMU.CART_RAM, MMU.CART_RAM, MMU.CART_RAM, MMU.CART_RAM, MMU.CART_RAM, MMU.CART_RAM, MMU.CART_RAM, MMU.CART_RAM, MMU.CART_RAM, MMU.CART_RAM, MMU.CART_RAM,
//BX
//CX
//DX
//EX
//FX
MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM,
MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM,
MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM,
MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM,
ARM9Mem.ARM9_BIOS, ARM9Mem.ARM9_BIOS, ARM9Mem.ARM9_BIOS, ARM9Mem.ARM9_BIOS, ARM9Mem.ARM9_BIOS, ARM9Mem.ARM9_BIOS, ARM9Mem.ARM9_BIOS, ARM9Mem.ARM9_BIOS, ARM9Mem.ARM9_BIOS, ARM9Mem.ARM9_BIOS, ARM9Mem.ARM9_BIOS, ARM9Mem.ARM9_BIOS, ARM9Mem.ARM9_BIOS, ARM9Mem.ARM9_BIOS, ARM9Mem.ARM9_BIOS, ARM9Mem.ARM9_BIOS,
}; };
u32 MMU_ARM9_MEM_MASK[256]={ u32 MMU_ARM9_MEM_MASK[256]={
//0X /* 0X*/ DUP16(0x00007FFF),
0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, /* 1X*/ //DUP16(0x00007FFF)
//1X /* 1X*/ DUP16(0x00FF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FF, 0x7FF, /* 7X*/ DUP16(0x000007FF),
//60 61 /* 8X*/ DUP16(ROM_MASK),
0x7FFFF, 0x7FFFF, /* 9X*/ DUP16(ROM_MASK),
//62 63 /* AX*/ DUP16(0x0000FFFF),
0x1FFFF, 0x1FFFF, /* BX*/ DUP16(0x00000003),
//64 65 /* CX*/ DUP16(0x00000003),
0x3FFFF, 0x3FFFF, /* DX*/ DUP16(0x00000003),
//66 67 /* EX*/ DUP16(0x00000003),
0x1FFFF, 0x1FFFF, /* FX*/ DUP16(0x00007FFF)
//68 69 ....
0xFFFFF, 0xFFFFF, 0xFFFFF, 0xFFFFF, 0xFFFFF, 0xFFFFF, 0xFFFFF, 0xFFFFF,
//7X
0x7FF, 0x7FF, 0x7FF, 0x7FF, 0x7FF, 0x7FF, 0x7FF, 0x7FF, 0x7FF, 0x7FF, 0x7FF, 0x7FF, 0x7FF, 0x7FF, 0x7FF, 0x7FF,
//8X
ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK,
//9x
ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK,
//AX
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF,
//BX
//CX
//DX
//EX
//FX
0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003,
0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003,
0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003,
0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003,
0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x0003, 0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF,
}; };
u8 * MMU_ARM7_MEM_MAP[256]={ u8 * MMU_ARM7_MEM_MAP[256]={
//0X /* 0X*/ DUP16(MMU.ARM7_BIOS),
MMU.ARM7_BIOS, MMU.ARM7_BIOS, MMU.ARM7_BIOS, MMU.ARM7_BIOS, MMU.ARM7_BIOS, MMU.ARM7_BIOS, MMU.ARM7_BIOS, MMU.ARM7_BIOS, MMU.ARM7_BIOS, MMU.ARM7_BIOS, MMU.ARM7_BIOS, MMU.ARM7_BIOS, MMU.ARM7_BIOS, MMU.ARM7_BIOS, MMU.ARM7_BIOS, MMU.ARM7_BIOS, /* 1X*/ DUP16(MMU.UNUSED_RAM),
//1X /* 2X*/ DUP16(ARM9Mem.MAIN_MEM),
MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, /* 3X*/ DUP8(MMU.SWIRAM),
//2X DUP8(MMU.ARM7_ERAM),
ARM9Mem.MAIN_MEM, ARM9Mem.MAIN_MEM, ARM9Mem.MAIN_MEM, ARM9Mem.MAIN_MEM, ARM9Mem.MAIN_MEM, ARM9Mem.MAIN_MEM, ARM9Mem.MAIN_MEM, ARM9Mem.MAIN_MEM, ARM9Mem.MAIN_MEM, ARM9Mem.MAIN_MEM, ARM9Mem.MAIN_MEM, ARM9Mem.MAIN_MEM, ARM9Mem.MAIN_MEM, ARM9Mem.MAIN_MEM, ARM9Mem.MAIN_MEM, ARM9Mem.MAIN_MEM, /* 4X*/ DUP8(MMU.ARM7_REG),
//30 - 37 DUP8(MMU.ARM7_WIRAM),
MMU.SWIRAM, MMU.SWIRAM, MMU.SWIRAM, MMU.SWIRAM, MMU.SWIRAM, MMU.SWIRAM, MMU.SWIRAM, MMU.SWIRAM, /* 5X*/ DUP16(MMU.UNUSED_RAM),
//38 - 3F /* 6X*/ DUP16(ARM9Mem.ARM9_ABG),
MMU.ARM7_ERAM, MMU.ARM7_ERAM, MMU.ARM7_ERAM, MMU.ARM7_ERAM, MMU.ARM7_ERAM, MMU.ARM7_ERAM, MMU.ARM7_ERAM, MMU.ARM7_ERAM, /* 7X*/ DUP16(MMU.UNUSED_RAM),
//40 - 47 /* 8X*/ DUP16(NULL),
MMU.ARM7_REG, MMU.ARM7_REG, MMU.ARM7_REG, MMU.ARM7_REG, MMU.ARM7_REG, MMU.ARM7_REG, MMU.ARM7_REG, MMU.ARM7_REG, /* 9X*/ DUP16(NULL),
//48 - 4F /* AX*/ DUP16(MMU.CART_RAM),
MMU.ARM7_WIRAM, MMU.ARM7_WIRAM, MMU.ARM7_WIRAM, MMU.ARM7_WIRAM, MMU.ARM7_WIRAM, MMU.ARM7_WIRAM, MMU.ARM7_WIRAM, MMU.ARM7_WIRAM, /* BX*/ DUP16(MMU.UNUSED_RAM),
//5X /* CX*/ DUP16(MMU.UNUSED_RAM),
MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, /* DX*/ DUP16(MMU.UNUSED_RAM),
//6X /* EX*/ DUP16(MMU.UNUSED_RAM),
ARM9Mem.ARM9_ABG, ARM9Mem.ARM9_ABG, ARM9Mem.ARM9_ABG, ARM9Mem.ARM9_ABG, ARM9Mem.ARM9_ABG, ARM9Mem.ARM9_ABG, ARM9Mem.ARM9_ABG, ARM9Mem.ARM9_ABG, ARM9Mem.ARM9_ABG, ARM9Mem.ARM9_ABG, ARM9Mem.ARM9_ABG, ARM9Mem.ARM9_ABG, ARM9Mem.ARM9_ABG, ARM9Mem.ARM9_ABG, ARM9Mem.ARM9_ABG, ARM9Mem.ARM9_ABG, /* FX*/ DUP16(MMU.UNUSED_RAM)
//7X
MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM,
//8X
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
//9X
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
//AX
MMU.CART_RAM, MMU.CART_RAM, MMU.CART_RAM, MMU.CART_RAM, MMU.CART_RAM, MMU.CART_RAM, MMU.CART_RAM, MMU.CART_RAM, MMU.CART_RAM, MMU.CART_RAM, MMU.CART_RAM, MMU.CART_RAM, MMU.CART_RAM, MMU.CART_RAM, MMU.CART_RAM, MMU.CART_RAM,
//BX
//CX
//DX
//EX
//FX
MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM,
MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM,
MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM,
MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM,
MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM, MMU.UNUSED_RAM,
}; };
u32 MMU_ARM7_MEM_MASK[256]={ u32 MMU_ARM7_MEM_MASK[256]={
//0X /* 0X*/ DUP16(0x00003FFF),
0x3FFF, 0x3FFF, 0x3FFF, 0x3FFF, 0x3FFF, 0x3FFF, 0x3FFF, 0x3FFF, 0x3FFF, 0x3FFF, 0x3FFF, 0x3FFF, 0x3FFF, 0x3FFF, 0x3FFF, 0x3FFF, /* 1X*/ DUP16(0x00000003),
//1X /* 2X*/ DUP16(0x003FFFFF),
0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, /* 3X*/ DUP8(0x00007FFF),
//2x DUP8(0x0000FFFF),
0x3FFFFF, 0x3FFFFF, 0x3FFFFF, 0x3FFFFF, 0x3FFFFF, 0x3FFFFF, 0x3FFFFF, 0x3FFFFF, 0x3FFFFF, 0x3FFFFF, 0x3FFFFF, 0x3FFFFF, 0x3FFFFF, 0x3FFFFF, 0x3FFFFF, 0x3FFFFF, /* 4X*/ DUP8(0x00FFFFFF),
//30 - 37 DUP8(0x0000FFFF),
0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, /* 5X*/ DUP16(0x00000003),
//38 - 3F /* 6X*/ DUP16(0x0003FFFF),
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, /* 7X*/ DUP16(0x00000003),
//40 - 47 /* 8X*/ DUP16(ROM_MASK),
0xFFFFFF, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF, /* 9X*/ DUP16(ROM_MASK),
//48 - 4F /* AX*/ DUP16(0x0000FFFF),
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, /* BX*/ DUP16(0x00000003),
//5X /* CX*/ DUP16(0x00000003),
0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, /* DX*/ DUP16(0x00000003),
//6X /* EX*/ DUP16(0x00000003),
0x3FFFF, 0x3FFFF, 0x3FFFF, 0x3FFFF, 0x3FFFF, 0x3FFFF, 0x3FFFF, 0x3FFFF, 0x3FFFF, 0x3FFFF, 0x3FFFF, 0x3FFFF, 0x3FFFF, 0x3FFFF, 0x3FFFF, 0x3FFFF, /* FX*/ DUP16(0x00000003)
//7X
0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003,
//8X
ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK,
//9x
ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK, ROM_MASK,
//AX
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF,
//BX
//CX
//DX
//EX
//FX
0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003,
0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003,
0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003,
0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003,
0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003,
}; };
u32 MMU_ARM9_WAIT16[16]={ u32 MMU_ARM9_WAIT16[16]={