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 > how to access the ds cart from a flashcart? plus make probs

#128912 - s0l1dsnak3123 - Wed May 16, 2007 6:43 pm

ok here goes... I'm trying to make an app that dumps the files from the ds cart. The reason I want to do this is because I want to see how my max media launcher works. first of all I can't seem to find any tutorials on this, second of all, I'm new to C++ as well as nds programming so I don't know where to look either (tried google, didn't come up with any results).

-----------------------------------------------------------------------------------------

secondly, I'm having problems compiling files. I press winkey and R to get the run dialog, then type CMD and press enter type in cd (and then the directory), and type in make. I get the following error:

Quote:
make[1]: Entering directory `/c/devkitPro/examples/nds/filesystem/embedded_gbfs'

main.c
arm-eabi-gcc -MMD -MP -MF /c/devkitPro/examples/nds/filesystem/embedded_gbfs/bui
ld/main.d -g -Wall -O2 -mcpu=arm9tdmi -mtune=arm9tdmi -fomit-frame-pointer -ffas
t-math -mthumb -mthumb-interwork -I/c/devkitPro/examples/nds/filesystem/embedded
_gbfs/include -I/c/devkitpro/libnds/include -I/c/devkitpro/libnds/include -I/c/d
evkitPro/examples/nds/filesystem/embedded_gbfs/build -DARM9 -c /c/devkitPro/exam
ples/nds/filesystem/embedded_gbfs/source/main.c -o main.o
arm-eabi-gcc.exe: CreateProcess: No such file or directory
make[2]: *** [main.o] Error 1
make[1]: *** [build] Error 2
make[1]: Leaving directory `/c/devkitPro/examples/nds/filesystem/embedded_gbfs'
make: *** [all] Error 2


I end up with no .nds file. What shouold I do? I'm running windblows vi$ta (crap edition) - i'm guessing that's the reason? Any help for any of these matters would be greatly appreciated.

s0l1dsnak3123

#128916 - Lynx - Wed May 16, 2007 7:11 pm

Umm.. I could be way out of line.. but I don't think a cart dumper is exactly the project for a new coder.. You might want to start with something a little easier. Like the examples that come with DevkitPro.
_________________
NDS Homebrew Roms & Reviews

#128929 - s0l1dsnak3123 - Wed May 16, 2007 7:52 pm

Lynx wrote:
Umm.. I could be way out of line.. but I don't think a cart dumper is exactly the project for a new coder.. You might want to start with something a little easier. Like the examples that come with DevkitPro.


you could be correct, but never-the-less, I do believe that It would be *quite* simple in theory... just open ds cart, copy contents to sram, save sram to file. This would be in a raw format of course, but then I could probably learn how to turn it into a .nds file or something (ds lazy, perhaps?)

I am quite experienced in vb.NET (2005), so I understand arrays, strings, stuff like that, and im up to page 82 on practical C++ programming by o'reilly, so I do understand at worst the basics. (and I can allways look stuff up that I don't understand).

#128930 - tepples - Wed May 16, 2007 8:04 pm

There are known incompatibilities between MinGW (the compiler used to produce devkitARM binaries for Windows) and Windows Vista OS.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#128934 - s0l1dsnak3123 - Wed May 16, 2007 8:34 pm

lol another reason to get rid of it :)

I am going to reinstall XP, whilst I'm doing that, does anybody know how I can connect with slot-1?

#128966 - Cydrak - Thu May 17, 2007 4:35 am

Given the scarcity of homebrew that actually does this... I think GBATek is going to be your best answer you'll get. Check under "DS Cards, Encryption, Firmware", it's all mapped out.

Simple... right? Now if you actually understood all of that, you can consider NOT running away, very very quickly. :)

Seriously though... it's not a straightforward interface, and "memcpy()" isn't going to help you. You have to send the card 8-byte command packets, frob some kinda-sorta-documented hardware, then set up DMA to get the reply. There is encryption and obfuscation required to access the card, so if you get just one little thing wrong, all you get is garbage in return. The keys are locked in the ARM7's BIOS, so you need a way to dump that.

On top of that, SRAM isn't big enough so you'd have to use a FAT device.

It's rrrreal fun to debug, trust me--I tried it, thinking I wanted an on-DS AC:WW editor, but sadly it's gonna have to wait. There's a reason no one wants to release dumping code...

#128991 - tepples - Thu May 17, 2007 12:07 pm

Cydrak wrote:
I tried it, thinking I wanted an on-DS AC:WW editor, but sadly it's gonna have to wait. There's a reason no one wants to release dumping code...

You don't need ROM dumping code to make a town editor. If AnimalMap for Windows manages to edit towns without having any access to the rom data...

What I really want is a SLOT-2 card that takes GameCube memory cards, so that I can make code that moves (eligible) items back and forth between your ACPG town and your ACWW town.

[This discussion was split to this topic. -- MOD]
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.


Last edited by tepples on Sun May 20, 2007 1:42 am; edited 1 time in total

#129003 - s0l1dsnak3123 - Thu May 17, 2007 1:47 pm

Cydrak wrote:
Given the scarcity of homebrew that actually does this... I think GBATek is going to be your best answer you'll get. Check under "DS Cards, Encryption, Firmware", it's all mapped out.

Simple... right? Now if you actually understood all of that, you can consider NOT running away, very very quickly. :)

Seriously though... it's not a straightforward interface, and "memcpy()" isn't going to help you. You have to send the card 8-byte command packets, frob some kinda-sorta-documented hardware, then set up DMA to get the reply. There is encryption and obfuscation required to access the card, so if you get just one little thing wrong, all you get is garbage in return. The keys are locked in the ARM7's BIOS, so you need a way to dump that.

On top of that, SRAM isn't big enough so you'd have to use a FAT device.

It's rrrreal fun to debug, trust me--I tried it, thinking I wanted an on-DS AC:WW editor, but sadly it's gonna have to wait. There's a reason no one wants to release dumping code...


oh... maybe i'll try something a little easier first :) (i think I underestimated how hard this was gonna be...

#129021 - Cydrak - Thu May 17, 2007 10:44 pm

Good luck... :) btw, I hope I didn't come off too abrasive, it's a lovely system to code for. It's just, the cards were specifically engineered to be difficult. If you still must try it, getting a feel for the -rest- of the hardware--and console coding in general--will help immensely.

Tepples, I know. AnimalMap works fine, but... I found it distinctly less than pleasurable to use. Hundreds of different items in the game, and they ALL show up as numbers or nondescript colors. Not even copy/paste/move, although of course that is fixable. :/

Which makes it a lot like the game, really: hover over the square, and if it wasn't what you want then rinse, repeat. If it was, cue mouse/joypad gymnastics. The thought of managing inventory with it scares me!

And as making graphics for all the items would be silly, it seemed easier to me, to just reuse the data from the game itself.

#129093 - s0l1dsnak3123 - Fri May 18, 2007 8:03 pm

Cydrak wrote:
Good luck... :) btw, I hope I didn't come off too abrasive, it's a lovely system to code for. It's just, the cards were specifically engineered to be difficult. If you still must try it, getting a feel for the -rest- of the hardware--and console coding in general--will help immensely.

Tepples, I know. AnimalMap works fine, but... I found it distinctly less than pleasurable to use. Hundreds of different items in the game, and they ALL show up as numbers or nondescript colors. Not even copy/paste/move, although of course that is fixable. :/

Which makes it a lot like the game, really: hover over the square, and if it wasn't what you want then rinse, repeat. If it was, cue mouse/joypad gymnastics. The thought of managing inventory with it scares me!

And as making graphics for all the items would be silly, it seemed easier to me, to just reuse the data from the game itself.


don't worry, I am not giving up dshomebrew that easily :) I have found pa_lib... I feel I have found a piece of me that I never knew I lost... ?_?'