gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > DS Firmware Upacker

#116614 - chishm - Sat Jan 27, 2007 11:30 am

For reasons that are too long to bother explaining now, I decided to write a firmware unpacker. That was over a week and a half ago. I finally finished it. So other people don't have to go through the same trouble, get fwunpack.

What does it do?
It decrypts and decompresses all the binaries (parts 1-5 and FlashMe stubs) from a firmware dump.

What use is it?
To satisfy your curiousity.

Can I make my own firmware with this?
No, there is no repacker, but I suppose it isn't too hard to write one now. The worst bit would be writing the compressor for parts 3-5.

Thanks to:
Martin Korth for GBATek, where I got the decryption algorithms.
Pepsiman for his BIOS dumpers and firmware dumping in DSLinux.
Loopy for answering all my questions and pointing me in the write direction, and for HB Firmware where I got the (now unused) LZ77 recompression code.
Forgotten for the LZ77 decompression code taken from Visual Boy Advance.
_________________
http://chishm.drunkencoders.com
http://dldi.drunkencoders.com

#116617 - Lick - Sat Jan 27, 2007 12:22 pm

Quote:
in the write direction

Hehe. Nice work Chishm. Oh here was my rather sad attempt (yes, I'm ashamed).
_________________
http://licklick.wordpress.com

#116619 - chishm - Sat Jan 27, 2007 12:59 pm

Lick wrote:
Quote:
in the write direction

Hehe. Nice work Chishm. Oh here was my rather sad attempt (yes, I'm ashamed).

Heh, Freudian slip (although it's not about my mother). Your attempt isn't too bad, it took me a few days to even get the part 1&2 decryption working.
_________________
http://chishm.drunkencoders.com
http://dldi.drunkencoders.com

#116630 - Lynx - Sat Jan 27, 2007 4:51 pm

Wow.. good work.. Did you get that amazone wish list put together yet?
_________________
NDS Homebrew Roms & Reviews

#116874 - Juglak - Tue Jan 30, 2007 4:42 pm

I made something pretty similar to this... was a pain, but it works.

I've looked around for any existing code for compressing parts 3-5, but, couldnt find any.

Any luck on that front?

-J
_________________
My goodies: 1xDS Lite - Supercard Lite, DSi, Supercard DSONEi

#116931 - chishm - Wed Jan 31, 2007 3:33 am

Nah, no luck. The compression looks to be Huffman-encoded LZ77-compressed data, possibly similar to DEFLATE. Apart from that, I haven't looked into it too much (moved onto another project).
_________________
http://chishm.drunkencoders.com
http://dldi.drunkencoders.com