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
  • K3Nv2 @ K3Nv2:
    They haslve dedicated on board chips that aren't tweaked like x64/x32 afaik
  • ColdBlitz @ ColdBlitz:
    but its a custom os for both of them
  • ColdBlitz @ ColdBlitz:
    designed for only specific hardware
  • ColdBlitz @ ColdBlitz:
    so you have to learn to emulate that specific hardware which isn't as easy as you'd think
  • K3Nv2 @ K3Nv2:
    It's a locked down Linux distro basically
  • Psionic Roshambo @ Psionic Roshambo:
    I think the only custom hardware is to do with the SSD and a security chip
  • Psionic Roshambo @ Psionic Roshambo:
    Probably combined in one chip
  • K3Nv2 @ K3Nv2:
    They place married security chips onto boards iirc
  • Psionic Roshambo @ Psionic Roshambo:
    Damn Frontier is offering 5Gbps now lol
  • K3Nv2 @ K3Nv2:
    I honestly can't recommend any of the big 3 this years I'd say buy a rog ally z1 if we're being honest
  • Psionic Roshambo @ Psionic Roshambo:
    Honestly after the PS3 and 360 I just went full PC
  • K3Nv2 @ K3Nv2:
    Every games basically cross platform they only have about 6 titles making it worth the $600 price tag
  • Psionic Roshambo @ Psionic Roshambo:
    Didn't see much need for a console, all the advantages have kind of disappeared
  • ColdBlitz @ ColdBlitz:
    the ps3 used to support installing linux because the cpu was so powerful
  • K3Nv2 @ K3Nv2:
    Then the games are $70 and they want to reboot and refresh the same game every year
  • K3Nv2 @ K3Nv2:
    The ps3 was always Linux they just found a way to make it open source
  • ColdBlitz @ ColdBlitz:
    I'm avoiding buying from the big 3 at all atm
  • Psionic Roshambo @ Psionic Roshambo:
    At one point PC game pads where poorly supported, loading a game had setup, it was complicated. Now it's almost as easy as a console.
  • ColdBlitz @ ColdBlitz:
    nintendo needs to up their game soon
  • K3Nv2 @ K3Nv2:
    Yeah even bt support for Xbox one controllers are just as easy as pairing
    +1
  • ColdBlitz @ ColdBlitz:
    considering the steamdeck can emulate the switch (yikes) theres almost 0 reason to buy the switch apart from playing online and using cartridges
  • K3Nv2 @ K3Nv2:
    Xinput and 360 dongles were a driver nightmare
  • K3Nv2 @ K3Nv2:
    I remember having to manually put in drivers and what not
  • Psionic Roshambo @ Psionic Roshambo:
    Yeah the 360 dongles sucked
  • Psionic Roshambo @ Psionic Roshambo:
    But the new Xbox pads? PIr it up and if a game supports it it just works
    Psionic Roshambo @ Psionic Roshambo: But the new Xbox pads? PIr it up and if a game supports it it just works