Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,488,681
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 04-26-24 05:29 PM
Guest: Register | Login

0 users currently in ROM Hacking Related Releases | 1 guest

Main - ROM Hacking Related Releases - Nitro Explorer: universal NDS ROM file extracter/inserter New thread | New reply


Treeki
Posted on 09-22-07 11:21 AM (rev. 3 of 10-07-07 05:36 PM) Link | Quote | ID: 66008


Red Cheep-cheep
Level: 34

Posts: 105/209
EXP: 236619
Next: 17032

Since: 07-12-07
From: Rogueport

Last post: 3928 days
Last view: 3629 days
There are very few tools for modifying DS ROMs. There's NDSTool, which breaks NSMB due to how it works. NDSTS, which doesn't allow you to insert files of a different size.
And I needed a framework I could base NSMB Editor 3's modifying around. So I decided to develop my own, and Nitro Explorer is the result!

1.2 is here, with a better UI and bugfixes!

It may be buggy still. I haven't had a chance to test it too much.
So make regular backups of your hack.
If you encounter problems with corrupted files, try reopening the ROM again after each file insertion.
In any case, report any bugs here! If you do report bugs, I can't stress this enough: provide a detailed description of what you've been doing in NE that could have caused this!

Now, finally, to the download:
Download Nitro Explorer 1.2

Old versions:
NE1.1 NE1.0

____________________
I'll put something here later.

blackhole89
Posted on 09-22-07 03:30 PM Link | Quote | ID: 66013


The Guardian
Moloch whose eyes are a thousand blind windows!
Level: 124

Posts: 588/4196
EXP: 21533412
Next: 303189

Since: 02-19-07
From: Ithaca, NY, US

Last post: 471 days
Last view: 84 days



Eheh, I see the filenames indeed appear to be something that might come quite in handy in hacking, at least in NSMB... what filesystem do the ROMs use internally anyway, is it something "known" (like FAT12/16) or a proprietary one?

Also, I think it might make sense if you added icons to be prefixed to files based on their extension; that would help readability (and eyecandy, not to neglect) of the lists by a lot.

____________________



Treeki
Posted on 09-22-07 03:57 PM Link | Quote | ID: 66016


Red Cheep-cheep
Level: 34

Posts: 106/209
EXP: 236619
Next: 17032

Since: 07-12-07
From: Rogueport

Last post: 3928 days
Last view: 3629 days
Posted by Comic Book Guy
Eheh, I see the filenames indeed appear to be something that might come quite in handy in hacking, at least in NSMB... what filesystem do the ROMs use internally anyway, is it something "known" (like FAT12/16) or a proprietary one?

Also, I think it might make sense if you added icons to be prefixed to files based on their extension; that would help readability (and eyecandy, not to neglect) of the lists by a lot.

Proprietary. It's quite hard to find documentation on it.
I gave up on my own implementation of the file system, and so the file loading code is based off NDSTool. [However, it was rewritten, has various additions and much of the code is mine.]

I'll look into adding icons.. although it might get hard due to use of extensions.
NSMB uses many .bin files, all of different types, for example.

____________________
I'll put something here later.

MathOnNapkins
Posted on 09-24-07 02:54 PM (rev. 2 of 09-24-07 02:59 PM) Link | Quote | ID: 66255


Super Koopa
Level: 62

Posts: 243/842
EXP: 1935551
Next: 49135

Since: 02-19-07
From: durff

Last post: 4488 days
Last view: 4011 days
It's not proprietary, it's FAT (which flavor, i'm not sure)

____________________
Zelda Hacking Forum
hobbies: delectatio morosa

Treeki
Posted on 09-24-07 03:11 PM Link | Quote | ID: 66256


Red Cheep-cheep
Level: 34

Posts: 109/209
EXP: 236619
Next: 17032

Since: 07-12-07
From: Rogueport

Last post: 3928 days
Last view: 3629 days
Posted by snikpaNnOhtaM
It's not proprietary, it's FAT (which flavor, i'm not sure)

I looked up some documentation on FAT32.. sneaky edit, clicked the quote button and it changed.
Looked up something on FAT16.. doesn't seem similar, either.

Either there's some other uncommon variant I haven't seen, or it IS proprietary.
The NitroROM file system is missing various things, after all, which seem to indicate it's not meant to be modified. No dates, no fragmentation support, etc.
These seem to show it's meant to be compiled once and then forgotten about.

____________________
I'll put something here later.

blackhole89
Posted on 09-24-07 03:32 PM Link | Quote | ID: 66257


The Guardian
Moloch whose eyes are a thousand blind windows!
Level: 124

Posts: 612/4196
EXP: 21533412
Next: 303189

Since: 02-19-07
From: Ithaca, NY, US

Last post: 471 days
Last view: 84 days



This might be of interest to you

____________________



Treeki
Posted on 09-24-07 05:19 PM Link | Quote | ID: 66258


Red Cheep-cheep
Level: 34

Posts: 110/209
EXP: 236619
Next: 17032

Since: 07-12-07
From: Rogueport

Last post: 3928 days
Last view: 3629 days
Posted by yuG kooB cimoC
This might be of interest to you

Not really.. it's a FAT library for DS (and GBA?) homebrew. I don't believe it works with the official NitroROM filesystem.

____________________
I'll put something here later.

blackhole89
Posted on 09-24-07 05:41 PM Link | Quote | ID: 66259


The Guardian
Moloch whose eyes are a thousand blind windows!
Level: 124

Posts: 613/4196
EXP: 21533412
Next: 303189

Since: 02-19-07
From: Ithaca, NY, US

Last post: 471 days
Last view: 84 days



Oh yeah, on second sight, you were actually right... I found this on the internetâ„¢:

NitroROM File System Specifications

Note that this document has been reworded in an attempt to circumvent possible
watermarking measures. No pertinent information has been lost.
Introduction

This document describes a simple file system which can be used to speed up
development time, and where the program and data files map into ROM. Application
developers need not concern themselves with the format of the file system; an API is
provided.

Details within this document may change before final release.
Data Format

A NitroROM file has the following constituents.
Header:
16KB of management stuff.
Startup static blocks:
Modules for the Main and Sub systems that are loaded and executed on startup.
File name table:
Array associating file names with numbers.
Overlay header:
Links for main and sub systems between file numbers and overlay IDs.
File allocation table:
Array of file numbers and ROM positions.
File Images:
Take a guess what these do.

For each block in the file, the developer can specify whether and to what granularity
the block should be aligned. If alignment is required, padding will be added.

The ROM header is fixed at the top of the NitroROM file; all other blocks are accessed
by direct or indirect pointers relative to the top of the header. Due to this, it is
possible for the other blocks to lie in any order in the file.
ROM Header Format

The following table shows the format of the ROM_Header structure.
Portion Offset (hex) Size Type Name Use
Reserved for system 000 8 bytes u8[] corp_id Should be "NINTENDO"
008 24 bytes u8[] reserved_A Unused, should be 0
Static module params 020 4 bytes void* main_rom_offset Offset of ARM9 startup code in ROM
024 4 bytes void* main_entry_address Entry address [unimplemented]
028 4 bytes void* main_ram_address ARM9 destination RAM address
02C 4 bytes u32 main_size Size to copy for ARM9 code
030 4 bytes void* sub_rom_offset Offset of ARM7 startup code in ROM
034 4 bytes void* sub_entry_address Entry address [unimplemented]
038 4 bytes void* sub_ram_address ARM7 destination RAM address
03C 4 bytes u32 sub_size Size to copy for ARM7 code
Nametable params 040 4 bytes ROM_FNTDir* fnt_offset Offset of name table in ROM
044 4 bytes u32 fnt_size Size of table
FAT params 048 4 bytes ROM_FAT* fat_offset Offset of allocation table
04C 4 bytes u32 fat_size Table size
Overlay header params 050 4 bytes ROM_OVT* main_ovt_offset ARM9 overlay offset in ROM
054 4 bytes u32 main_ovt_size Size of ARM9 overlay
058 4 bytes ROM_OVT* sub_ovt_offset ARM7 overlay offset
05C 4 bytes u32 sub_ovt_size Size of ARM7 overlay
Reserved 060 16 bytes u8[] reserved_B Should be 0
070 3984 bytes u8[] reserved_C Again with the 0's
100 12288 bytes u8[] reserved_D And again
Startup Module

This is a supplied binary, linked in with the application ELF. The binary is placed in
ROM without modification. The top ROM address for both processors must be aligned
at a 512 byte boundary.

File Name Table

This table associates file names with IDs. The table is built up from two sub-tables: a
table of directories, and a file table. Directories are distinguished from files by their
ID: a file can only have an ID in the range of 0x0000-0xEFFF, and a directory has an
ID of 0xF000-0xFFFF. Therefore, there can be a maximum of 61440 files and 4096
directories.
Directory sub-table

The size of the directory table implies the number of entries within it; the subscript of
a given entry corresponds to a directory ID of subscript+0xF000.

The following table specifies the format of the ROM_FNTDir structure.
Offset (hex) Size Type Name Use
000 4 bytes u32 entry_start Offset of the constituent file sub-table
004 2 bytes u16 entry_file_id ID of first file in the file sub-table
006 2 bytes u16 parent_id ID of parent directory

The directory with ID 0xF000 is the root directory. In this case, the parent_id field
holds the number of directories contained within the filesystem, since it has no
parent.
File sub-table

An entry in a file sub-table can be produced with either of two structures; one
describes a file entry, and one a directory reference. The developer must choose
which structure to use dependent on the circumstances.

The following table describes a ROM_FNTStrFile entry.
Offset (hex) Size Type Name Use
000 Bitfield: 1 bit u8 entry_type 0 for a file
000 Bitfield: 7 bits u8 entry_name_length Length of entry name
001 [length] bytes char[] entry_name File name (NOT zero terminated)

This table describes a ROM_FNTStrDir structure.
Offset (hex) Size Type Name Use
000 Bitfield: 1 bit u8 entry_type 1 for a dir
000 Bitfield: 7 bits u8 entry_name_length Length of entry name
001 [length] bytes char[] entry_name Dir name (NOT zero terminated)
[length]+1 1 byte u8 dir_id_L Directory sub-table ID, low byte
[length]+2 1 byte u8 dir_id_H Directory sub-table ID, high byte


Yeah, on second thought, this doesn't look like FAT at all, at most slightly inspired by it...

____________________



Treeki
Posted on 09-24-07 05:48 PM (rev. 2 of 09-24-07 11:24 PM) Link | Quote | ID: 66260


Red Cheep-cheep
Level: 34

Posts: 111/209
EXP: 236619
Next: 17032

Since: 07-12-07
From: Rogueport

Last post: 3928 days
Last view: 3629 days
Posted by yuG kooB cimoC
Oh yeah, on second sight, you were actually right... I found this on the internetâ„¢:

(huge doc. removed)

Yeah, on second thought, this doesn't look like FAT at all, at most slightly inspired by it...

That's the same one I used.
(Although, I tidied the tables up a little to look better so they're actually readable and the columns are where they should be.)

edit: 1.1 is out, now with LZSS/LZ77 support.

____________________
I'll put something here later.

Raccoon Sam
Posted on 09-29-07 12:19 PM Link | Quote | ID: 66656


Cobrat
Level: 56

Posts: 318/672
EXP: 1380056
Next: 18120

Since: 02-19-07
From: Hi

Last post: 3468 days
Last view: 2699 days
It's all good, it's all good.
Although the readme says it has support for "Limprel-Ziv" compression... It's "Lempel-Ziv".
But yeah, aside from a lil' typo, it's great..!

____________________


Treeki
Posted on 09-29-07 12:21 PM Link | Quote | ID: 66657


Red Cheep-cheep
Level: 34

Posts: 112/209
EXP: 236619
Next: 17032

Since: 07-12-07
From: Rogueport

Last post: 3928 days
Last view: 3629 days
Posted by Raccoon Sam
It's all good, it's all good.
Although the readme says it has support for "Limprel-Ziv" compression... It's "Lempel-Ziv".
But yeah, aside from a lil' typo, it's great..!

Oh? I'll fix it in 1.2.

Just thought I'd mention that LZ support is a little broken, hopefully it will be fixed in 1.2. Extraneous bytes are added, and recompression takes very long and appears to freeze up the program, so don't use it.

____________________
I'll put something here later.

Treeki
Posted on 10-07-07 05:37 PM Link | Quote | ID: 67254


Red Cheep-cheep
Level: 34

Posts: 119/209
EXP: 236619
Next: 17032

Since: 07-12-07
From: Rogueport

Last post: 3928 days
Last view: 3629 days
Nitro Explorer 1.2 has been released. Bugfixes, no more possible ROM corruption (haven't experienced it happening but it could happen in 1.1) and recompression has been removed due to bugs.
Get Nitro Explorer 1.2!

____________________
I'll put something here later.

Main - ROM Hacking Related Releases - Nitro Explorer: universal NDS ROM file extracter/inserter New thread | New reply

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.025 seconds. (335KB of memory used)
MySQL - queries: 77, rows: 99/100, time: 0.017 seconds.