(Broken) IPL dumper

Release threads for homebrew & utilities only
Post Reply
novenary
Posts: 1755
Joined: Mon Dec 30, 2013 7:50 am

(Broken) IPL dumper

Post by novenary » Fri May 29, 2015 9:35 pm

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.
Attachments
ipldump.zip
(473.85 KiB) Downloaded 365 times
tueidj
Posts: 564
Joined: Fri May 03, 2013 6:57 am

Re: (Broken) IPL dumper

Post by tueidj » Fri May 29, 2015 11:25 pm

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.
novenary
Posts: 1755
Joined: Mon Dec 30, 2013 7:50 am

Re: (Broken) IPL dumper

Post by novenary » Sat May 30, 2015 3:13 am

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.
Last edited by novenary on Sat May 30, 2015 3:54 am, edited 1 time in total.
tueidj
Posts: 564
Joined: Fri May 03, 2013 6:57 am

Re: (Broken) IPL dumper

Post by tueidj » Sat May 30, 2015 3:48 am

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?
novenary
Posts: 1755
Joined: Mon Dec 30, 2013 7:50 am

Re: (Broken) IPL dumper

Post by novenary » Sat May 30, 2015 3:55 am

Oh, didn't see your post, see my edit above. Thanks for the help ! :)
novenary
Posts: 1755
Joined: Mon Dec 30, 2013 7:50 am

Re: (Broken) IPL dumper

Post by novenary » Sat May 30, 2015 4:19 pm

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.
Post Reply