Homebrew Nintendo DS ROM API

JackHack96

New Member
OP
Newbie
Joined
Jul 19, 2015
Messages
2
Trophies
0
Age
28
XP
125
Country
Italy
Hi :)
I'm developing a program for Pokémon ROMs, and after I wrote the API for reading the ROM, I have to deal with the reversed process, in other words I have to write the ROM.
I tried to write an API, but it generates corrupted files :(

Does anyone know some open-source programs that allow to write a ROM (apart from ndstool, which is difficult for a student like me :( )?
Or a program which has an API for writing a ROM?
 

CTurt

Well-Known Member
Member
Joined
May 3, 2015
Messages
73
Trophies
0
XP
317
Country
What is your ultimate goal? Because, programs such as dslazy already exist which can simplify the process of unpacking and repacking DS ROMs with ndstool. Unless you just want to do this for learning, I would recommend avoiding writing your own tool.

With that said, "corrupt" is a very broad term, anything could be wrong: CRCs, offsets, lengths, etc.

I suggest you try unpacking and repacking some simple homebrew games first, because many don't have a filesystem, and so will just contain the header and ARM 7 and ARM 9 binaries.

If your application doesn't work for simple homebrews, you should look at the difference between the files in a hex editor and see what changed during the process.

If you still need help, you should upload the source code of your generator, and explain more details about what exactly is corrupt with your new ROMs. If you're using C, I would be happy to take a look at your project.

Here are some resources that may help you:

http://libnds.devkitpro.org/structsNDSHeader.html
http://dsibrew.org/wiki/NDS_Format
http://imrannazar.com/The-Smallest-NDS-File

Regarding ndstool, it's pretty much the standard for doing this. If you don't understand the source code, you should ask what in particular you don't understand. Because alternatives are likely to be very similar anyway.
 
Last edited by CTurt,

JackHack96

New Member
OP
Newbie
Joined
Jul 19, 2015
Messages
2
Trophies
0
Age
28
XP
125
Country
Italy
Thanks a lot for replying :D
I'll try to explain me better. I'm developing an application which can edit pokémon games. As for reading the ROMs I have no problems (I can also decompress ARM9).
The application works like this:
  1. It loads the ROM and it stores it in the RAM as a tree of folders and files
  2. The user edits the ROM, and the various changes he makes are stored in the RAM
  3. The program should take the ROM which is stored in the RAM and write it in the hard disk, and here comes the problem
I have absolutely no problems to publish the source code, because I intend to make the program open-source. But it's not written in C, it's written in Java.
Here is the API that should take care of the ROM, take a look at NitroFS class (if you understand Java)
 

Attachments

  • nitro.zip
    14.5 KB · Views: 93

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: @K3Nv2 https://www.youtube.com/watch?v=9yWIobzBdKc