diff options
| author | TeamCemu <40145098+TeamCemu@users.noreply.github.com> | 2018-06-10 17:10:55 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-10 17:10:55 +0200 |
| commit | ad6636325e4eaae704231a90a8d1d53a946c19d1 (patch) | |
| tree | 64b11b7e4896c4f857076369cb69178226f08898 /src/wiiu/wiiu.cpp | |
| parent | 6380b272bd2b67862d855384d4478325c75444ae (diff) | |
updated for ida 7.0+
Diffstat (limited to 'src/wiiu/wiiu.cpp')
| -rw-r--r-- | src/wiiu/wiiu.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/wiiu/wiiu.cpp b/src/wiiu/wiiu.cpp index caafc7f..f470feb 100644 --- a/src/wiiu/wiiu.cpp +++ b/src/wiiu/wiiu.cpp @@ -4,40 +4,42 @@ #include <idaldr.h> static int idaapi - accept_file(linput_t *li, char fileformatname[MAX_FILE_FORMAT_NAME], int n) -{ - if ( n > 0 ) - return 0; - + //accept_file(linput_t *li, char fileformatname[MAX_FILE_FORMAT_NAME], int n) + accept_file(qstring *fileformatname, qstring *processor, linput_t *li, const char *filename) +{ elf_reader<elf32> elf(li); - if (elf.verifyHeader()) { if (elf.type() == ELF_FILETYPE_CAFE_RPL) { - set_processor_type("ppc", SETPROC_ALL); + + //set_processor_type("ppc", SETPROC_ALL); + //qsnprintf(fileformatname, MAX_FILE_FORMAT_NAME, "WII U RPX/RPL"); + + *processor = "ppc"; + *fileformatname = "WII U RPX/RPL"; - qsnprintf(fileformatname, MAX_FILE_FORMAT_NAME, "WII U RPX/RPL"); return ACCEPT_FIRST | 1; } } - + return 0; } static void idaapi load_file(linput_t *li, ushort neflags, const char *fileformatname) { + set_processor_type("ppc", SETPROC_LOADER); + elf_reader<elf32> elf(li); elf.read(); ea_t relocAddr = 0; if (neflags & NEF_MAN) { - askaddr(&relocAddr, "Please specify a relocation address base."); + ask_addr(&relocAddr, "Please specify a relocation address base."); } cafe_loader ldr(&elf); ldr.apply(); } #ifdef _WIN32 -__declspec(dllexport) #endif loader_t LDSC = { |
