From 5190527369bd879a7182eaa39171780b38313c15 Mon Sep 17 00:00:00 2001 From: Crementif <26669564+Crementif@users.noreply.github.com> Date: Wed, 20 May 2026 19:58:23 +0200 Subject: Update Wii U IDA loader to IDA 9.3 --- src/wiiu/wiiu.cpp | 41 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 23 deletions(-) (limited to 'src/wiiu/wiiu.cpp') diff --git a/src/wiiu/wiiu.cpp b/src/wiiu/wiiu.cpp index 2588145..41ac110 100644 --- a/src/wiiu/wiiu.cpp +++ b/src/wiiu/wiiu.cpp @@ -4,19 +4,16 @@ #include static int idaapi - //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) -{ +accept_file(qstring *fileformatname, qstring *processor, linput_t *li, const char * /*filename*/) +{ elf_reader elf(li); - if (elf.verifyHeader()) { - if (elf.type() == ELF_FILETYPE_CAFE_RPL) { - - //set_processor_type("ppc", SETPROC_ALL); - //qsnprintf(fileformatname, MAX_FILE_FORMAT_NAME, "WII U RPX/RPL"); - - *processor = "ppc"; + if (elf.verifyHeader()) + { + if (elf.type() == ELF_FILETYPE_CAFE_RPL) + { + *processor = "ppc"; *fileformatname = "WII U RPX/RPL"; - + return ACCEPT_FIRST | 1; } } @@ -25,28 +22,26 @@ static int idaapi } static void idaapi - load_file(linput_t *li, ushort neflags, const char *fileformatname) +load_file(linput_t *li, ushort /*neflags*/, const char * /*fileformatname*/) { set_processor_type("ppc", SETPROC_LOADER); - elf_reader elf(li); elf.read(); - - ea_t relocAddr = 0; - if (neflags & NEF_MAN) { - ask_addr(&relocAddr, "Please specify a relocation address base."); - } - + elf_reader elf(li); + elf.read(); + cafe_loader ldr(&elf); ldr.apply(); } +#ifdef _WIN32 +__declspec(dllexport) +#endif loader_t LDSC = { IDP_INTERFACE_VERSION, LDRF_REQ_PROC, accept_file, load_file, - NULL, - NULL, - NULL + nullptr, + nullptr, + nullptr }; - -- cgit v1.3.1