I noticed a small bug in the emulation (patches being overwritten), so here's a fix:
Find this:
memcpy (src + 0x400, src + ((data & 1) ? 0x800400 : 0x700400), 0xdfbff);
Replace it with this:
memcpy (src + 0x10000, src + ((data & 1) ? 0x810000 : 0x710000), 0xcffff);