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.

Coding > Help wanted decoding the icon from a .NDS rom...

#147077 - azzaazza69 - Fri Dec 14, 2007 2:35 am

I am currently writing a (Windows) program to copy/extract NDS roms onto a MicroSD card and I want to process the .NDS file and extract both the title and the icon to 'pretty up' the interface a bit. I have no problem in getting the title but I am having problems converting the TileData into a Windows BMP/ICO ready to display. Does any one have some code I could crib from (Preferably Delphi but I can handle C or VB)?

Thanks,
Azza

#147115 - Kyoufu Kawa - Fri Dec 14, 2007 6:35 pm

The NDS game icons are in regular GBA 4-bits format. I have code to convert this to something Windows can use, but I'm not so proud of it.

#147119 - azzaazza69 - Fri Dec 14, 2007 7:16 pm

Best I've managed so far is something slightly resembling it (graphically) with no colours!

Can you post it here or do you want to mail it me?

#147120 - Kyoufu Kawa - Fri Dec 14, 2007 7:40 pm

I'd rather wait for the experts.

#147124 - qw3rky - Fri Dec 14, 2007 7:59 pm

What do you mean exactly by "copying/extracting" NDS roms? If you're talking about copying commercial roms, be warned that any talk of piracy is strictly not allowed in the forum.
_________________
I've coded about 17 different implementations of Pong. It's the game dev's "hello, world".
DualScheme - Scheme Interpreter for DS

#147130 - azzaazza69 - Fri Dec 14, 2007 8:37 pm

to "qw3rky":
Copying/extracting means "copying" a .nds file from a disc (CD/DVD/HDD/etc) to a MicroSD card and "extracting" means pulling the said .NDS file out of it's .zip/.rar/.7z compressed container. I never mentioned *ANYTHING* about commercial roms...Homebrew roms contain icons you know!

to "Kyoufu Kawa":
I've been looking for some code other the past week on the Internet and I don't know who these "experts" are but I'm not sure if anyone else is gonna post on this subject. Please don't raise my hopes - I'd rather just have some code (no matter how dirty/unkempt it is) to look at...

#147173 - azzaazza69 - Sat Dec 15, 2007 8:02 pm

Never mind - Someone sent me some 'C' code that I've converted...

#147195 - qw3rky - Sun Dec 16, 2007 3:23 am

Oh okay, I just wanted to make sure you weren't asking for any "inappropriate" information. Typically when someone talks about "roms" they imply commercial, pirated stuff. Which is not okay around here. I'm pretty sure that "binaries" or ".nds files" is the more common term on this forum.

Your menu idea sounds interesting and I wish you good luck with it. Though I think you should know that not too many people here use Delphi so you're kind of on your own with that one. C and C++ are the main languages used by far.
_________________
I've coded about 17 different implementations of Pong. It's the game dev's "hello, world".
DualScheme - Scheme Interpreter for DS