Hacking Some NDS ROM File Format Discoveries

Mewspaper

New Member
OP
Newbie
Joined
Dec 1, 2022
Messages
4
Trophies
0
Age
22
XP
73
Country
United States
Hello everyone, I've been working on a hobby project recently, and the first step is to extract as much data from an NDS ROM as possible. In pursuit of that goal I found some information that I couldn't seem to find elsewhere, and I want to share it with anyone interested.

In the GBATEK, part of the ROM header, 0x088, is marked as unknown. Well, here's an official diagram that makes the unknown known!

1673756638128.png

So it turns out 0x088 and 0x08C are the addresses of the ARM9 and ARM7 auto-load parameters respectively. I've got absolutely no idea what this means.

It also occurred to me that a piece of software called the "DS Master Rom Checker" from the SDK is capable of identifying the exact version of the Nitro SDK used to build the ROM, and identify third-party libraries. So I loaded the thing up in a debugger and determined that it searches for a string in the ARM9 binary, "[SDK+", I'd noticed this before but never put two and two together.

1673757624037.png

Turns out that it's as simple as parsing the data between "[SDK+" and "]". Split the string at the colon. The left side is the developer and the right side is the library. So it's fair to say that this ROM uses Actimagine's VX video codec somewhere. I have no clue why the Nintendo library is named "BACKUP" but I've seen this in every ROM I've checked so far.

As for determining the version of the Nitro SDK, it is two bytes preceding an array of bytes "21 06 C0 DE DE C0 06 21". The first is the minor version number, and the second is the major version number.

1673759182764.png

For example, this game was built with version 4.2 of the Nitro SDK. It goes deeper than this as well, you can extract the release type from the two bytes in the very front but I couldn't be bothered to figure out how this worked. What I find odd is that this byte array can be found multiple times throughout some ROMs. It makes me question if this signature was intentional, or if it's some build quirk that made its way into the ROM checker.

Either way this is great information because some versions of the Nitro SDK have been leaked, and it makes me wonder if using something like Ida's FLIRT or Ghidra's FunctionID would be feasible to recover some symbols.

Anyway I hope I've actually posted a new discovery here, and not some common knowledge... I am completely new to the ROM hacking scene.
 

Mewspaper

New Member
OP
Newbie
Joined
Dec 1, 2022
Messages
4
Trophies
0
Age
22
XP
73
Country
United States
Those have already been discovered some time ago, and the "21 06 C0 DE DE C0 06 21" check is actually how TWLMenu++ and nds-bootstrap detect the SDK version.
At the same time though, it's not common knowledge.

Ah well, that's a lot of time I could have better spent... would you happen to know what the auto-load parameters actually do?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Psionic Roshambo @ Psionic Roshambo:
    That Dell data breach is worse than people probably realize....
  • Psionic Roshambo @ Psionic Roshambo:
    When I worked for Dell we had access to data about military contracts and addresses for high ranking people.
  • Psionic Roshambo @ Psionic Roshambo:
    I personally handled a call from the second highest person at Raytheon. That call bothered me a lot... The guy was nice and smart what bothered me was the way management basically just blew him off instead of going the extra mile to help him.
  • Psionic Roshambo @ Psionic Roshambo:
    In the end that call ended up costing Dell millions in lost contracts with Raytheon, and really the issue could have been solved for like 450 bucks lol
  • NinStar @ NinStar:
    sometimes I wonder why anyone would ever buy mega man x legacy collection 2
  • NinStar @ NinStar:
    I always thought that capcom shuffled the games in these collection, but apparently they are all in chronological order, which makes legacy collection 2 worthless
  • BakerMan @ BakerMan:
    guys, i want to start singing pirate metal songs and sea shanties if i play sea of thieves
  • The Real Jdbye @ The Real Jdbye:
    find a pirate metal playlist
    +2
  • The Real Jdbye @ The Real Jdbye:
    and sing along
  • BakerMan @ BakerMan:
    nevermind i just learned swearing is against the rules in sea of thieves

    i was about to start singing the song i last put in "what song are you currently listening to" yesterday
  • BakerMan @ BakerMan:
    but yeah ig so
  • The Real Jdbye @ The Real Jdbye:
    swearing not allowed in a pirate game? what has the world come to
  • BakerMan @ BakerMan:
    (here's the song for context)
  • BigOnYa @ BigOnYa:
    Just add -izle to the end of every curse word, you will be fine.
    +2
  • The Real Jdbye @ The Real Jdbye:
    i like alestorm
    +1
  • The Real Jdbye @ The Real Jdbye:
    @BigOnYa too many syllables
    +1
  • BakerMan @ BakerMan:
    same lmao
  • BigOnYa @ BigOnYa:
    hi, welcome to the Temp!
    +1
  • BakerMan @ BakerMan:
    Welcome to the Underground!
    +1
  • BakerMan @ BakerMan:
    the booty boogie from (once again) the donkey kong country cartoon could also be a good song to sing while playing sea of thieves
  • BigOnYa @ BigOnYa:
    Please insert 25 cents for an additional 30 minutes of talk time.
    +1
    Psionic Roshambo @ Psionic Roshambo: https://www.youtube.com/watch?v=tG7fk_DUz5g +1