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 > Decrompress boot code in firmware

#106789 - Lick - Mon Oct 23, 2006 1:42 pm

I want to execute the boot code inside the firmware, but first I need to decompress (LZSS) it. Has anyone done this before?

NDSTech: document
GBATek: document

Thanks in advance,
- Lick
_________________
http://licklick.wordpress.com

#106832 - Lick - Mon Oct 23, 2006 9:16 pm

(recycled the topic for a different use)
_________________
http://licklick.wordpress.com

#106927 - Lick - Tue Oct 24, 2006 10:06 pm

Update: I can't believe I missed this part of GBATek. It contains correct (?) pseudo code to decrypt the firmware bootcode. Seems to be exactly what I was looking for.

I've started turning the pseudo code into C++ code: http://rafb.net/paste/results/phK5iA80.html

Despite it not being finished, can someone check whether I have 'translated' correctly?
Also, is it okay to use (RAM) 0x02060000 as 'arm7 to arm9' buffer?

- Lick
_________________
http://licklick.wordpress.com

#106991 - Lick - Wed Oct 25, 2006 3:27 pm

Can't believe all the true heroes of DSdev have really left the scene.

Anyone of them could have pointed me to this post by Loopy/olimar: http://forum.gbadev.org/viewtopic.php?p=42334#42334
_________________
http://licklick.wordpress.com

#106993 - Lick - Wed Oct 25, 2006 4:00 pm

Maybe I should try booting PictoChat first.
_________________
http://licklick.wordpress.com

#107106 - Lick - Thu Oct 26, 2006 5:40 pm

Update
Success! Thanks to Loopy, yes Loopy, I have now written a firmware + bootcode (both ARM9 and ARM7) dumper.
I used libfatdragon_blue as fatlib. So some people won't be able to dump, but it's still interesting to see what happens.

Attachment
http://lick.huuf.net/supersmall.rar
Source included, but it's messy.

What now
At my hardware, the backlight fades out and in (which is FlashMe's work). I will research a way to hopefully boot to Supercard. This might be the first step to a universal Return to Card method!

- Lick
_________________
http://licklick.wordpress.com

#107192 - HyperHacker - Fri Oct 27, 2006 3:35 pm

I'd really like to be able to add Boot Firmware, Boot Pictochat and Boot Download Play options to my boot menu app. Did you find anything that might help with that?
_________________
I'm a PSP hacker now, but I still <3 DS.

#107888 - Extreme Coder - Thu Nov 02, 2006 9:25 pm

Let me guess: you're trying to add PictoChat and Download Play to LoveLite? :)

#107891 - Lick - Thu Nov 02, 2006 9:59 pm

I actually froze this research.. kinda.. The first reason for this research was to find out a method to reset to the Supercard menu, and as you all know and should know by now is that I already found the real working method.

Probably will look into it in the future, but I also have a project to update (DSLiveWeather) and new projects planned (DSLiveHotspots, DSLiveMoney)..
It's too much actually. Especially with real life coming in (school and work).
UGhh.. X(~

- Lick
_________________
http://licklick.wordpress.com