#define NAND_PAGE_SIZE (has_colors?0x800:0x200) #define NAND_SIZE ((has_colors?128:32)*1024*1024) #define MODEL_OFFSET 0x804 #define LOCAL_OFFSET 0x808 #define LOCAL_SIZE 8 #define PART_TABLE_OFFSET 0x818 #define PART_TABLE_ID "\x91\x5F\x9E\x4C" #define PART_TABLE_SIZE 4 #define CR4_OFFSET 0x81D #define DIAGS_OFFSET_OFFSET 0x82c #define BOOT2_OFFSET_OFFSET 0x830 #define BOOTD_OFFSET_OFFSET 0x834 #define FILES_OFFSET_OFFSET 0x838 #define SDRAM_OFFSET 0x840 #define SPIC_OFFSET 0x844 #define SPID_OFFSET 0x848 #define SPID_SIZE 0x40 #define BOOTG_SIZE_OFFSET 0x924 #define MANUF_PAGE_OFFSET 0x000 #define BOOT2_PAGE_OFFSET 0x020 #define BOOTD_PAGE_OFFSET 0xA80 #define DIAGS_PAGE_OFFSET 0xB00 #define FILES_PAGE_OFFSET 0x1000 #define NDEND_PAGE_OFFSET 0x10000 #define CX2_MANUF_PAGE_OFFSET 0x00000 #define CX2_BOOTL_PAGE_OFFSET 0x00040 #define CX2_PTTDT_PAGE_OFFSET 0x00140 #define CX2_UNKN1_PAGE_OFFSET 0x00180 #define CX2_DEVCR_PAGE_OFFSET 0x001C0 #define CX2_OSLDR_PAGE_OFFSET 0x00200 #define CX2_INSTL_PAGE_OFFSET 0x002C0 #define CX2_OINST_PAGE_OFFSET 0x004C0 #define CX2_OSDAT_PAGE_OFFSET 0x006C0 #define CX2_DIAGS_PAGE_OFFSET 0x00740 #define CX2_UNKN2_PAGE_OFFSET 0x00880 #define CX2_LOGIN_PAGE_OFFSET 0x01C80 #define CX2_FILES_PAGE_OFFSET 0x03240 #define CX2_NDEND_PAGE_OFFSET 0x10000 static const unsigned read_nand_31_addrs[] = { 0x10071F5C, 0x10071EC4, 0x10071658, 0X100715E8, 0x1006E0AC, 0x1006E03C}; static const unsigned write_nand_31_addrs[] = { 0x10072298, 0x10072200, 0x10071994, 0x10071924, 0x1006E3E8, 0x1006E378}; static const unsigned nand_erase_range_31_addrs[] = { 0x100724FC, 0x10072464, 0x10071BF8, 0x10071B88, 0x1006E64C, 0x1006E5DC}; #define read_nand_31 SYSCALL_CUSTOM(read_nand_31_addrs ,void, void* dest, int size, int offset, int, int percent_max, void *progress_cb ) #define write_nand_31 SYSCALL_CUSTOM(write_nand_31_addrs,int, void *source,int size, unsigned int endoffset) #define nand_erase_range_31 SYSCALL_CUSTOM(nand_erase_range_31_addrs,int, int offset,int end) #define NLANG 16 #define LANG_NONE 0 #define LANG_ZHCN 1 #define LANG_AR 2 #define LANG_FR 3 #define LANG_DA 4 #define LANG_DE 5 #define LANG_EN 6 #define LANG_ENGB 7 #define LANG_ES 8 #define LANG_FI 9 #define LANG_IT 10 #define LANG_NL 11 #define LANG_NLBE 12 #define LANG_NO 13 #define LANG_PT 14 #define LANG_SV 15 #define LANG_ZHTW 16 #define LOCAL_CHINESE "zh_CN\x00\x00\x00" #define LOCAL_INTERNA "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF" int getLocale(char* buf);