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 > Use NDS format !!

#41357 - darkfader - Wed Apr 27, 2005 9:56 pm

Don't just put up a PassMe version of your stuff!
NDS (aka SRL) should be the standard. Just prepend an NDS loader if you want to run it on PassMe.


Last edited by darkfader on Wed Apr 27, 2005 10:32 pm; edited 1 time in total

#41364 - Kyoufu Kawa - Wed Apr 27, 2005 10:31 pm

And how does "losing your source code" fit into this?

#41365 - smealum - Wed Apr 27, 2005 10:32 pm

Must be a subliminal message or something.... ;p

No, really, i don't understand, please explain yourself darkfader

#41367 - darkfader - Wed Apr 27, 2005 10:33 pm

ok, edited the subject :)
that applies to current demo's and stuff. they should be saved into NDS format.
Oh yeah. grab latest ndstool. It fixes some header information.

#41368 - Proteanruler - Wed Apr 27, 2005 10:36 pm

Darkfader can you explain more about what you are talking about?? .NDS does not load on passme! Nor does .SRL.... so how are we supposed to do this?? Passme looks for .ds.gba - I am very confused... please help :)... how do you "prepend a nds loader?!!" - thanks mate :)

ps out of nowhere you pop out with this - can u explain it for spastics like me? I can flash my firmware and undo it no probs - but this - I am at a loss.... ddduuuuuurrrrr ;)

#41370 - darkfader - Wed Apr 27, 2005 10:43 pm

You just got to prepend an NDS loader to the file and it will become a PassMe version.
For example, get http://darkfader.net/ds/files/ndsmall.bin
(note, this one doesn't provide a callback for filesystem calls yet. working on that)
Then you can do:
cat ndsmall.bin mydemo.nds > mydemo.ds.gba
or
copy /b ndsmall.bin + mydemo.nds mydemo.ds.gba

This way, the end-user can use the latest loader version and have support for other media like CompactFlash etc.

#41372 - Proteanruler - Wed Apr 27, 2005 10:49 pm

Thanks man - still not sure I 100% understand but will give it a go - I understand 60% :)

#41373 - dagamer34 - Wed Apr 27, 2005 10:55 pm

It's because there are at least 3-4 file extensions running around and few people know what they really do. Here's what I know.

.nds - binary that is meant for an emulator
.pme - binary meant for PassMe/WiFiMe
.ds.gba - binary meant for PassMe/WiFiMe. the .gba at the end exists because some flash programs won't see anything else
.bin - a great evil that should never be used. It could be any one of the 3 previously mentioned.
_________________
Little kids and Playstation 2's don't mix. :(

#41374 - Proteanruler - Wed Apr 27, 2005 11:08 pm

okay what about .srl ??? Darkfader said .NDS (aka SRL) ??? I also thought .bin was .nds therefore must be .srl??? God the filenames are confusing!!

#41383 - josath - Thu Apr 28, 2005 12:11 am

.SRL is what is output by a certain other development tool kit that shall remain nameless. I believe it should be exactly the same as an .NDS file.

#41384 - assassda - Thu Apr 28, 2005 12:14 am

josath wrote:
.SRL is what is output by a certain other development tool kit that shall remain nameless.

why not name it so people can use it? <_<

#41386 - tepples - Thu Apr 28, 2005 12:29 am

dagamer34 wrote:
.bin - a great evil that should never be used. It could be any one of the 3 previously mentioned.

Never? Not even when a Mega Drive emulator gets ported?

.bin - uninterleaved Sega Genesis ROMs. Given that PCE Advance runs on GBA, someone is likely to try port a Genesis emulator to the Nintendo DS.

.srl - Given the connotations of josath's language, I'm guessing that some Confidential(TM) tool uses this.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#41388 - PhoenixSoft - Thu Apr 28, 2005 12:41 am

assassda wrote:
josath wrote:
.SRL is what is output by a certain other development tool kit that shall remain nameless.

why not name it so people can use it? <_<


Could this anonymous devkit be the official CodeWarrior SDK?

#41390 - dagamer34 - Thu Apr 28, 2005 1:05 am

tepples wrote:
dagamer34 wrote:
.bin - a great evil that should never be used. It could be any one of the 3 previously mentioned.

Never? Not even when a Mega Drive emulator gets ported?

.bin - uninterleaved Sega Genesis ROMs. Given that PCE Advance runs on GBA, someone is likely to try port a Genesis emulator to the Nintendo DS.

.srl - Given the connotations of josath's language, I'm guessing that some Confidential(TM) tool uses this.


The problem is that .bin files are practically everywhere and don't have a strict definition in terms of what they are (inside the file itself). In one example, it could be a Genesis ROM and in another a file spitted out after compiling a homebrew demo. There are just better extensions out there.
_________________
Little kids and Playstation 2's don't mix. :(

#41407 - netdroid9 - Thu Apr 28, 2005 3:34 am

.bin - Binary.

Binary - Anything encoded in a binary format. Let's just leave it at that.

#41413 - darkfader - Thu Apr 28, 2005 4:18 am

Quote:
.pme - binary meant for PassMe/WiFiMe

heh.. I've never seen anyone use that yet :)

#41416 - dagamer34 - Thu Apr 28, 2005 4:33 am

darkfader wrote:
Quote:
.pme - binary meant for PassMe/WiFiMe

heh.. I've never seen anyone use that yet :)


iDeaS apparently accepts ROMs with a .pme extension.
_________________
Little kids and Playstation 2's don't mix. :(

#41437 - Proteanruler - Thu Apr 28, 2005 2:04 pm

Darkfader - I tried your nds stuff - successfully made a file with the bin added but it would not come up in my Powerwriter program as a DSbooter file therefore doesn't get recognised by passme. What am I doing wrong?

#41442 - Chetic - Thu Apr 28, 2005 4:59 pm

About time we got a nice standard rom format, eh? ;)
Wish it'd be a bit quicker making an .nds file into .ds.gba though..

Don't like how it takes so long to get a rom onto the cart already, especially since my EZFA has to be put into my GBA and then try 10 times or more to connect to my computer software.. anybody know why it's like that by the way?

#41465 - TheMikaus - Thu Apr 28, 2005 8:25 pm

I have sort of the same problem with my Xrom. Usually I just plug everything in and wait a while. But that might be cumbersome for dev.

#41534 - RiZeUp - Fri Apr 29, 2005 3:07 pm

I just recently received my PassMe and it works great. However my pong doesnt run on it. I wasn't too surprised at first so I quickly recoded it using the template. But it still doesnt boot on hardware.

Right now I use the arm9.bin to test it on an emulator as no other file seems to work.
And the ds.gba doesnt work on the passme. In fact. I've tried to compile a few projects and none of the ds.gba seemed to work on passmes. Am I skipping a step?

I use a Flash2Advance 256 with natrium's passme.
_________________
~RiZeUp

#41538 - Ethos - Fri Apr 29, 2005 3:13 pm

@RiZeUp: Your PassMe works great? Is it only your own demos that you cannot run, and the precompiled ones work?

#41539 - RiZeUp - Fri Apr 29, 2005 3:15 pm

yeah ive tried a few precompiled demos and they work great. For example the dspaint is pretty impressive.
_________________
~RiZeUp

#41541 - Lynx - Fri Apr 29, 2005 3:23 pm

Yup, I know what your talking about. We've had simular issues after upgrading ndslib. So, there is something wrong with your dev env. Your best bet is to rename your current directory structure (for backup purposes) and start from scratch.

Windows:
http://www.aaronrogers.com/nintendods/Day1/day1.php

Linux:
http://www.dspassme.com/programmers_guide/tutorial/

Fallow them step by step, don't rely on a .bat to do everything for you.

Then, using source provided from the site you fallowed your dev env setup from, compile their source and test it on hardware. If it works, then copy over your current main.cpp's and compile again. If it doesn't work then, you'll know it's your code. If it does work, then you should be all set.

#41551 - RiZeUp - Fri Apr 29, 2005 4:32 pm

I've already upgraded to nds dev env. Everything i compile just shows up as a white screen on my DS. Was there an issue recently with ndslib?

Thanks for the help and sorry for hijacking the thread. I just tought it might be related.
_________________
~RiZeUp

#41562 - dagamer34 - Fri Apr 29, 2005 6:28 pm

RiZeUp wrote:
I've already upgraded to nds dev env. Everything i compile just shows up as a white screen on my DS. Was there an issue recently with ndslib?

Thanks for the help and sorry for hijacking the thread. I just tought it might be related.


Are you compiling the template and it is giving you a white screen? Because that is all the template is supposed to do at the moment. Maybe we should change the color of the screen in the template to red or something so there isn't any confusion.
_________________
Little kids and Playstation 2's don't mix. :(

#41564 - tepples - Fri Apr 29, 2005 6:30 pm

Or at least put graphics for "Hello" at the top and "World" at the bottom. That would look more like the international sign for "your toolchain is properly set up".
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#41568 - RiZeUp - Fri Apr 29, 2005 6:44 pm

dagamer34 wrote:
RiZeUp wrote:
I've already upgraded to nds dev env. Everything i compile just shows up as a white screen on my DS. Was there an issue recently with ndslib?

Thanks for the help and sorry for hijacking the thread. I just tought it might be related.


Are you compiling the template and it is giving you a white screen? Because that is all the template is supposed to do at the moment. Maybe we should change the color of the screen in the template to red or something so there isn't any confusion.

No i'm compilling either my PongDS rom that I converted to work alot like the template. I've also tried to compile other demos such as birds and the minesweeper clone for example and I always get the white screen.
However, when I use the precompiled roms, everything works fine. So I know I'm doing something wrong.
_________________
~RiZeUp

#41578 - Lynx - Fri Apr 29, 2005 9:15 pm

Well, I guess there also is some confusion to the templates. Because the template that I use has colors on the screen that change when you move your styles around.

#41585 - bluescrn - Fri Apr 29, 2005 10:08 pm

RiZeUp wrote:

No i'm compilling either my PongDS rom that I converted to work alot like the template. I've also tried to compile other demos such as birds and the minesweeper clone for example and I always get the white screen.
However, when I use the precompiled roms, everything works fine. So I know I'm doing something wrong.


You're not alone... I'm having the same problem. the pre-build DSPaint runs fine (WifiMe and FlashMe), but nothing I've built will run on hardware - but does work on the emu.

I'm using the all-in-one dev env package, so I don't think I have the problematic version of ndslib?

Darkain said that the template doesn't work on hardware, doesn't set VRAM banks up correctly - and it doesn't work in in the latest Dualis (r8), which backs this up.

So I tried the Mines demo instead, which does work (sort of, doesn't render correctly, but displays some output) in Dualis, but that still white-screens on HW. Tried FlashMe and WifiMe.

When I build either project, I get at least one 'mv: missing file argument' error, but the files are built (and work in emulators). Is this normal?? The error appears just after the output 'make[1]: Entering directory '/c/ndsdev/projects/template/arm7'. I've not managed to track it down yet, I'm not great with makefiles. And I think I'm going to give up for the night....

#41586 - [FireFly] - Fri Apr 29, 2005 10:24 pm

The next version of my wireless multiboot app will support the .nds format. Please make sure to switch to this format now so that ppl who have an "rsa signature free" DS can enjoy your homebrew creations via multiboot.

#41590 - Lynx - Sat Apr 30, 2005 12:29 am

[quote="bluescrn"]
RiZeUp wrote:

Darkain said that the template doesn't work on hardware, doesn't set VRAM


When I build either project, I get at least one 'mv: missing file argument' error, but the files are built (and work in emulators). Is this normal?? The


Well, I'm not sure what template he's talking about, cause it worked fine for me on hardware.

As for the mv: command errors, they don't matter. It's a poor makefile, but works.

The reason your compilations work on emus and not on hardware is because emus (well, some do, some don't, etc) don't care if you have code missing, like if you forget to turn the display on, etc. They just display your game. Well, for some reason, the hardware (yes, I'm being sarcastic!) wants you to turn the screens on before display a background/sprite/etc. This is just an example, and I'm not talking about any perticular emu. I use Dualis, and it's getting better with every release!

Anyway, you need to figure out what is wrong with your dev env before wasting a lot of time writing a game that no one can play on hardware because your env is making bad builds. I have something like 15 versions of ndslib and since there isn't a real release, every time you do a CVS update, you have another version of ndslib. Well, incase the current version breaks my stuff, I keep the previous working version(s) before accepting the current version. So, untill there is an official release of ndslib, everyone out there coding is using a different version (whatever was current when they pulled it out of CVS), so it makes it hard to troubleshoot.

#41604 - arog - Sat Apr 30, 2005 6:20 am

If you're using NDS Dev Env (2.3.0), grab the latest ndslib updater. I think it'll fix the white screen problem.

If not, get the latest ndslib from CVS or DrunkenCoders.

- Aaron Rogers
http://www.aaronrogers.com/nintendods/

#41641 - maniacdevnull - Sat Apr 30, 2005 5:56 pm

So anyway, how do we make .nds files? My makefiles all make .ds.gba files, what do I need to do to make .nds files instead?

#41652 - josath - Sat Apr 30, 2005 9:19 pm

Code:
ndstool -c game.nds -7 arm7.bin -9 arm9.bin

#41659 - maniacdevnull - Sat Apr 30, 2005 9:42 pm

#41661 - [FireFly] - Sat Apr 30, 2005 9:59 pm

And if you use the ndstool -b parameter then the specified icon and game info shows up when multibooting the .nds on a modified ds (one that does not check the rsa signature).

Example:
Code:
ndstool.exe -c game.nds -b icon.bmp "line1;line2;line3"


Line 1 will be used as game name. Lines 2 & 3 will be used as game description.

#41770 - maniacdevnull - Sun May 01, 2005 8:25 pm

[FireFly] wrote:
And if you use the ndstool -b parameter then the specified icon and game info shows up when multibooting the .nds on a modified ds (one that does not check the rsa signature).

Example:
Code:
ndstool.exe -c game.nds -b icon.bmp "line1;line2;line3"


Line 1 will be used as game name. Lines 2 & 3 will be used as game description.


NDStool tells me my bmp is not valid. What are the specs for it? Mine is 32x32, 256 color, and I created it in mspaint.

#41773 - [FireFly] - Sun May 01, 2005 8:48 pm

maniacdevnull wrote:
NDStool tells me my bmp is not valid. What are the specs for it? Mine is 32x32, 256 color, and I created it in mspaint.

It's a bug in ndstool which will be resolved in the next version. You can work around this problem by hex-editing the .bmp and swap the first two bytes, so that the header reads "MB" and not "BM".

EDIT: The icon can only have 16 colors, so it's better to save in 16 color format. Also remember not to use the first color/entry in the palette because that one is reserved for transparancy.

#42705 - Pacifist - Sat May 14, 2005 3:25 am

I find nothing easy. it's my super power.

I found that I had to save my icon in 256 colours for ndstool to accept it. it would not accept 16 colour bitmaps.

But, as FireFly mentioned the icon can only have 16 colours when the DS reads it.

So in practice you have to save the picture in 256 colours so ndstool will accept it (as far as I can tell) but only use the first 16 colours or the DS won't display it properly.

Just a heads-up in-case anyone else is has similar troubles.

#42714 - The 9th Sage - Sat May 14, 2005 4:32 am

[FireFly] wrote:
And if you use the ndstool -b parameter then the specified icon and game info shows up when multibooting the .nds on a modified ds (one that does not check the rsa signature).

Example:
Code:
ndstool.exe -c game.nds -b icon.bmp "line1;line2;line3"


Line 1 will be used as game name. Lines 2 & 3 will be used as game description.


OH, that's how it's done...you have to use the -c paramter to use the -b one...that makes sense, I was having trouble with this because I assumed since the NDS was already created (except for the icon) it would just add the icon. Hah, boy do I feel stupid now. :) By the way, great work on the wireless stuff...I'm so loving that right now.
_________________
Now with 20% More Old Man from Zelda 1 than ever before!