gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Question - Booting?

#167827 - Nitto - Mon Mar 30, 2009 7:28 am

Using devkitPro,C/C++ or ASM is there a way that I could boot an ROM or NDS if I could access it off a drive like an sd card (I mean programing wise)?

Thanks in Advance, Nitto

PostScript: This is my first post.
_________________
~Simplicity is what counts but so does design

#167828 - Dwedit - Mon Mar 30, 2009 7:46 am

You can always load files and jump to them, provided you follow the file format.

If you are intending to run commercial games, those requires lots of complicated hacking.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#167835 - Nitto - Mon Mar 30, 2009 4:03 pm

Dwedit wrote:
You can always load files and jump to them, provided you follow the file format.

If you are intending to run commercial games, those requires lots of complicated hacking.


Yea I was reading up bit and found that I get a return address and then jump to the others and then it comes back to the address I specified. I also noticed that getting all the files corrupts the stack.

So:
1. How would I go about with commercial roms? Should I check passme source?
2. How could I load all the files into an array without corrupting the stack, and to "Hack" for commercial roms were could I look?
_________________
~Simplicity is what counts but so does design

#167837 - zzo38computer - Mon Mar 30, 2009 5:21 pm

If you want to run from the DS card you can check the FWNITRO source-codes.
_________________
Important: Please send messages about FWNITRO to the public forum, not privately to me.

#167842 - Nitto - Mon Mar 30, 2009 11:42 pm

zzo38computer wrote:
If you want to run from the DS card you can check the FWNITRO source-codes.


Is there a way I could load it of an SD card? Ie: No flashing my firmware just using some code to boot of a chip?

And I am getting mix reviews here saying it flashes the firmware.
_________________
~Simplicity is what counts but so does design

#167843 - Nitto - Tue Mar 31, 2009 1:55 am

Could I read a file lets say:

Code:

char* readWholeFile(const char * filename)
{
   //Open file
   FILE* dl = NULL;
   dl = fopen(filename, "r");
   
   //Find file size
   fseek(dl , 0 , SEEK_END);
   int dlTotalBytes = ftell(dl);
   rewind(dl);

   //allocate memory to contain the whole file:
   char* fileBuffer = (char*)malloc(dlTotalBytes);     
   int result = fread(fileBuffer,1,dlTotalBytes,dl);

   //Something went wrong? Free the memory.
   if (result != dlTotalBytes)
   {
      free(fileBuffer);
      fileBuffer = NULL;
   }

   //Close and return
   fclose(dl);   
   return fileBuffer;
}


Thus reading it off the sd card, but My question is how could I link this to a custom built card based of pass-me? Ie: A chip, then sd input?
_________________
~Simplicity is what counts but so does design

#168066 - silent_code - Wed Apr 08, 2009 11:18 pm

Please read the forum rules, where you will see that talking about software piracy (running ROMs of commercial games) is a thing we don't do here.
Thanks.
_________________
July 5th 08: "Volumetric Shadow Demo" 1.6.0 (final) source released
June 5th 08: "Zombie NDS" WIP released!
It's all on my page, just click WWW below.

#168107 - Nitto - Fri Apr 10, 2009 8:33 am

silent_code wrote:
Please read the forum rules, where you will see that talking about software piracy (running ROMs of commercial games) is a thing we don't do here.
Thanks.


I am trying to boot home brew o.o - like Nitro
_________________
~Simplicity is what counts but so does design

#168108 - Mighty Max - Fri Apr 10, 2009 8:40 am

Nitto wrote:

I am trying to boot home brew o.o - like Nitro


Nitto wrote:

So:
1. How would I go about with commercial roms? Should I check passme source?

So that question is done?

For the other cases, there are some threads on that already. Do a search and be presented with several approaches.
_________________
GBAMP Multiboot

#168109 - Nitto - Fri Apr 10, 2009 8:44 am

Mighty Max wrote:
Nitto wrote:

I am trying to boot home brew o.o - like Nitro


Nitto wrote:

So:
1. How would I go about with commercial roms? Should I check passme source?

So that question is done?

For the other cases, there are some threads on that already. Do a search and be presented with several approaches.


I know I will have to load the file, so I wrote a simplistic approach to micro sd. I then will load this file, that will then load some other file (.nds) then load it into memory and execute.

And I stopped with commercial roms due to the fact that there will be protection.
_________________
~Simplicity is what counts but so does design

#168114 - spinal_cord - Fri Apr 10, 2009 12:55 pm

Chishm has made a homebrew loader, the source is here in the forum somewhere, maybe that can help you?

[edit] there is a version of his loader on his tunavids page[/edit]
_________________
I'm not a boring person, it's just that boring things keep happening to me.
Homepage

#168128 - Nitto - Fri Apr 10, 2009 5:35 pm

spinal_cord wrote:
Chishm has made a homebrew loader, the source is here in the forum somewhere, maybe that can help you?

[edit] there is a version of his loader on his tunavids page[/edit]


Well I had the loading done: http://forum.gbadev.org/viewtopic.php?p=168106#168106
_________________
~Simplicity is what counts but so does design