Page 1 of 1
(Broken) IPL dumper
Posted: Fri May 29, 2015 9:35 pm
by novenary
Been screwing around with this today, it's the first time I write code for the GC and I still can't figure out that one crashing bug. Lines 66 and 73 (the most important stuff even) trigger a DSI and I have absolutely no idea why they would. If someone could check it out for me real quick it would be nice. Oh, and yes I'm aware that I'm dumping it encrypted, that's exactly what I want to do.
Thanks in advance.
Re: (Broken) IPL dumper
Posted: Fri May 29, 2015 11:25 pm
by tueidj
Don't declare a 2MB buffer as a local variable, move the declaration outside of main() so it's global. It also must be aligned to a 32-byte boundary to be used with EXI_Dma() so put ATTRIBUTE_ALIGN(32) at the end of the declaration.
Re: (Broken) IPL dumper
Posted: Sat May 30, 2015 3:13 am
by novenary
Thanks, it doesn't crash anymore and actually writes something. Now to figure out why I'm getting io errors on the files when trying to read it.
Actually I'm getting an empty file, and the read seems to be a bit fast. Checking that out.
Edit : here we go, it works now. I ended up looking at how Swiss did it and found out libogc provides the pretty convenient __Sys_ReadROM.
Re: (Broken) IPL dumper
Posted: Sat May 30, 2015 3:48 am
by tueidj
2MB might be too large for one DMA transfer, I'm not sure offhand what the maximum size is. There's actually a function already in libogc called __SYS_ReadROM that will break the reading into chunks of 256 bytes max.
Are you sure you're not getting an empty file because you've still got fwrite commented out?
Re: (Broken) IPL dumper
Posted: Sat May 30, 2015 3:55 am
by novenary
Oh, didn't see your post, see my edit above. Thanks for the help !

Re: (Broken) IPL dumper
Posted: Sat May 30, 2015 4:19 pm
by novenary
Damn, that was awesome. I was able to decrypt the code thanks to Segher's code. I spent all day reversing the disassembly. I might publish some of this work later, for now I'm keeping it private because copyrights.