Nintendo DS Programming

Feel like posting Off Topic? Do it here.

Moderator: MaxCoderz Staff

Post Reply
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Nintendo DS Programming

Post by tr1p1ea »

This thread is all about Nintendo DS related programming, demos, comments and such.

Anyways, tilemap demo with animated tiles, scrolling, move a sprite around and collisions:

Image
Yes i know the gfx are crappy, but its only a test :)

Source: http://igoto.co.uk/2e3

EDIT - Whats with these links? They just dont work for me. You're going to have to copy the text and paste it into a new window :S.
Last edited by tr1p1ea on Thu 07 Sep, 2006 4:47 pm, edited 1 time in total.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
User avatar
Jim e
Calc King
Posts: 2457
Joined: Sun 26 Dec, 2004 5:27 am
Location: SXIOPO = Infinite lives for both players
Contact:

Post by Jim e »

Image


yeah could you paste some code, I wanna see whats going on. Though I don't want you to thread jack.
Image
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

I think i will make another thread for DS coding, tomorrow though.

Code is in the zip file :).
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

My tilemapper was me doing the sprite routine in a for loop. There is almost no documentation on anything. I had no idea there was an easier way to do it.
Image
User avatar
anykey
Extreme Poster
Posts: 420
Joined: Mon 31 Jan, 2005 3:36 am
Location: In the matrix
Contact:

Post by anykey »

hmm
what exactly is DS homebrew written in?
this looks like something I might want to try...
I think, therefore iMac
Image
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

C.
Image
User avatar
thegamefreak0134
Extreme Poster
Posts: 455
Joined: Mon 23 Jan, 2006 10:09 pm
Location: In front of a Computer, coding
Contact:

Post by thegamefreak0134 »

That has got to be the shortest answer to a problem. Well, almost, if you would have left off the period.

I'm looking into homebrew for the DS. I don't like this idea lf flashing the DS though, I kinda like the firmware and the pictochat and stuff. If you flash it, can you still use it to play real games, go to download play, and other goodies like that?

I hear tell that with newer firmware the GBAMP doesn't work, because the PassMe2 doesn't work if the GBA cart doesn't have any SRAM, and the GBAMP doesn't have any SRAM, so...

I personally will shell out the cash for a cart, I just need to go off and figure out which one.

-gamefreak

PS: Good job on the demos. Are the registers set up fairly the same? Like, is switching over pretty easy?
I'm not mad, just a little crazy.

DarkNova - a little side project I run.
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

I tried to answer just "C", but it wouldn't let me. The M3 CF emulates SRAM correctly and I did not need to use flashme or lose any of the default things. I actually still play games the normal way. For the most part. Supposedly most of the registers are exactly the same. Every guide I was referred to (with the exception of one) was written for the GBA.
Image
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

Im pretty sure you will be able to get away with not flashing your DS. I have a SuperCard Lite and a MK4-Key which work nicely.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
DarkAuron
Maxcoderz Staff
Posts: 1349
Joined: Sat 18 Dec, 2004 6:53 pm

Post by DarkAuron »

thegamefreak: Nothing is lost except the warning/health screen that pops up when you boot into DS mode, and even then theres a version of flashme that doesn't remove that. All flashme does is allows a GBA flashcart to boot into NDS mode, and add firmware protection in case you somehow brick the DS. That's all flashme really does. Pictochat, download play, and any actual commercial cart you put into the DS all still work like they always would.

Also if you're not sure which device to get, I suggest M3 or Supercard for universal purposes. GBAMP has too many limits.
[Gridwars Score] - E: 1860037 M: 716641 H: 261194
CompWiz
Calc King
Posts: 1950
Joined: Thu 13 Oct, 2005 1:54 pm
Location: UB

Post by CompWiz »

Really? normal ordinary C? I've done a fair amount of c programming. Oh well, I've really got too many other things going on to fit DS programming in to my life.

hmm, it seems a mod didn't like my previous post. Anyway, I posted just the letter C without a period or anything, just to show that it could be done. I'll do it again if you want proof, TFG. You just have to know what you're doing. :mrgreen:
Last edited by CompWiz on Thu 07 Sep, 2006 11:46 pm, edited 2 times in total.
In Memory of the Maxcoderz Trophy Image
User avatar
anykey
Extreme Poster
Posts: 420
Joined: Mon 31 Jan, 2005 3:36 am
Location: In the matrix
Contact:

Post by anykey »

too bad...I don't know C, and I've got too much going on right now to learn a new language.
I think, therefore iMac
Image
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

CompWiz wrote:hmm, it seems a mod didn't like my previous post. Anyway, I posted just the letter C without a period or anything, just to show that it could be done. I'll do it again if you want proof, TFG. You just have to know what you're doing. :mrgreen:
I did, too. It was also deleted.
Image
User avatar
thegamefreak0134
Extreme Poster
Posts: 455
Joined: Mon 23 Jan, 2006 10:09 pm
Location: In front of a Computer, coding
Contact:

Post by thegamefreak0134 »

Really? normal ordinary C? I've done a fair amount of c programming. Oh well, I've really got too many other things going on to fit DS programming in to my life.
Sort of, on the just C thing. The language and al is the same, but to do anything with the hardware you focus more on writing to specific registers. You have to download (or create) a library of pointers to these registers, which are just memory locations, and then write to them a specific way to get the hardware to know what to draw. Although the language is C, the actual methods of coding vary greatly from your everyday computer porgramming.
I'm not mad, just a little crazy.

DarkNova - a little side project I run.
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

Most of the stuff that's unfamilar is just writing to lists. They are memory mapped, so it's pretty easy to do them. All of the program flow and data manipulation stuff is just like C.
Image
Post Reply