matt-kempster / m2c

A MIPS and PowerPC decompiler.
GNU General Public License v3.0
386 stars 46 forks source link

mips eabi64 support #270

Open ethteck opened 3 months ago

ethteck commented 3 months ago

Very much a WIP, but this PR brings us from

void func_001099D8(void) {
    sceGsSetDefLoadImage(&D_002B8700, 0xE00, 8, 1);
    FlushCache(0);
    sceGsSyncPath(0, 0);
    sceGsExecLoadImage(&D_002B8700, &func_F20000);
    sceGsSetDefLoadImage(&D_002B8760, 0x1400, 8, 1);
    FlushCache(0);
    sceGsSyncPath(0, 0);
    sceGsExecLoadImage(&D_002B8760, &func_F20000 + 0x48000);
}

to the more accurate

void func_001099D8(s64 arg0, s64 arg2, s64 arg4) {
    sceGsSetDefLoadImage(&D_002B8700, 0xE00, 8, 1, 0, 0, 0x200, 0xC0);
    FlushCache(0);
    sceGsSyncPath(0, 0);
    sceGsExecLoadImage(&D_002B8700, &func_F20000);
    sceGsSetDefLoadImage(&D_002B8760, 0x1400, 8, 1, 0, 0, 0x200, 0xC0);
    FlushCache(0);
    sceGsSyncPath(0, 0);
    sceGsExecLoadImage(&D_002B8760, &func_F20000 + 0x48000);
}

That being said, the signature of this function is broken now, and some actual code changes will probably be needed here