Loading DS rom resources[c++]
Introduction/What I'm using this thread for
Greetings all, I'm Scaryghoul and I'm trying to do something that I can't find a whole lot of information on. I'm overall unsure whether this belongs in Game Development or R&D but I feel as though this is the correct place to be. The way I justify it in my head is I'm doing my own R&D unrelated to a game yet, and it technically fits the three forum rules. I'll probably use this thread as a place to consolidate my findings/information if you guys don't mind.
What I'm trying to do
I'm trying to not exactly extract the resources but more so use load them into my own project(It will be open source, because I hate the level of closed source around here).
Ways not to help me - Apologies if this title comes off slightly snide.
Please don't refer me to closed source tools that will extract the resources because that's not what I'm looking to do exactly. Open sourced tools would still benefit me since I could peek at their code.
What I'm looking to do
The roms I want to work with: Pokemon HG or Pokemon BW
As for what I want to extract/load from them immediately:
Places I've already looked/researched
So far I've only read up on the DS Rom and GBA Rom specifications here(I can't post links so remove spaces, also I apologise for circumventing your forum rules.): ht tp: // nocash . emubase . de/ gbatek. htm
I'm not exactly looking to be spoon-fed but more so a community place to get feedback and to consolidate my information.
Fantastic, my post was finally approved. Well I started the project originally that morning of the post and spent a good day or so working on it. I would edit this into the original post and it will eventually be added when I merge all data into the original post to share. Although for now I'd like to get to 15 posts so I can start posting links xD Also remember, this is acting as my dev-log(Since most of you probably know the things I'm discovering already)
Anyways, as I said in the original post, I started by finding out how the information on the DS is stored and how the roms are laid out.
So I visited these two places - They have most of the same information, but one is formatted and sectioned, and one has everything in one big link.
htt p :/ / w w w. daftcode. n et/ gbatek/ds
h ttp : / / noca sh. emubase. de/ gbatek. htm
From these I gathered information the header of roms first(Hopefully the spoiler tags will keep the information contained)
From this we only really needed a few things but it allowed me to load the initial rom information and test what versions of roms we're loading. Not a WHOLE lot of this information is useful or relevant though since we're only aiming at a handful of roms. Anyways I got the initial rom information loaded and now my next goal was understanding the filesystem used.
To understand the filesystem I first set out to figure out what filesystem is actually used in the DS perhaps as a standard but I couldn't actually find one(Which was shocking since almost everyone refers to something called "the DS Filesystem"). In the specifications it says they use NitroROM File system so I started there.
Now my search from there lead me to an old project called PPRE(Project pokemon rom editor).
Their main website is here. h ttp : / / projectpokemon. or g/
I know this forum is familiar with this tool since I saw some threads during my search relating to this here. Anyways, they wanted to make a general purpose rom editor by modifying source code from "Nitro Explorer 2".
So I was interested in whether this project was open source so I immediately started searching around for some source code and found a post on their forums from a few years back linking to a public SVN, so their project was open source at one time. Alas the SVN link was a 404. So I went to IRC talked with some people in the PPRE irc channel and they said the project was abanonded a couple years ago.
So I looked for public forks and I found this gem
htt ps: / / github .co m /magical/ppre
This guy cloned PPRE back in 2010 and started cleaning up their code. It's not the most recent code but it will have to do because there is no more public SVN. I did a lot of code reading to get a general understanding but it's really difficult to follow the spaghetti code that PPRE is. Magical seemed to do a good job at cleaning up some of it, but a lot of it is just a giant mess. So right now I'm working on creating a general purpose rom library in c++ based off of some of the stuff in PPRE(Not going to directly port it because that'd get unnecessarily messy). Having a bit of trouble but hopefully it won't be terrible for too long.
Right now I'm working on creating a filesystem table class that can read the rom's file locations and everything so I can create a virtual filesystem within the library.
Also since I won't know if I'm reading the filetables correctly, I have to write a NARC class since it seems most of the files in pokemon roms are stored in NARC archives. Luckily that's something that is somewhat understandable from the ppre source. I'll upload the project when I get to at least reading NARC files appropriately.
You might want to look at "ndstool." If I remember correctly it is open-source, and it would do everything you would need, with a few modifications, of course.
|All times are GMT -8. The time now is 9:36 PM.|
© 2002 - 2015 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2015.