Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Programming Talk / Other - DS - How to get started with homebrew

Author
Message
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 25th Jun 2007 05:19
This is in answer a question by Oolite about how to get started with homebrew on the DS in this thread.

Oolite:
Quote: "Just out of curiosity Jess, how safe is it to install the new moddable flash software for the ds, i want to get into making some ds games but i'm unsure as to how safe it is and i don't want to screw up my ds."


If you're going to mod your DS's firmware, then make sure you get FlashMe v8 (there's two around, one of them is a dodgy copy that somehow made it out, so look for somewhere that lists both and go for the good one and instructions ).
If you get the 'stealth' version, it will remove that annoying Warning & Safety screen when you boot up the DS.

Jeku:
Quote: "I'll answer if you don't mind. You don't have to install any software on your DS for modding. I use something called M3 Simply which is a cart int he DS slot and a cart in the GBA slot, with which fits a nice Micro SD slot for all your homebrewing needs. The DS BIOS itself isn't touched.

Unless there's some specific reason you want to flash your DS?"


If you go for the method that Jeku posted, then what you're after is a PassMe device.
I avoided a PassMe device since I had a WiFiMe (tutorial) compatible WiFi card, which allowed me to flash my DS and from then on all I needed was my GBA Flash Cart. To do that, however, you have to have v3 firmware or earlier.

Whichever option you go for, you'll still need a storage device of some sort. This usually comes in the form of a GBA flash cart with an expandable memory slot (an SD (normal/mini/micro) or CF card).
The reason GBA flash carts are so popular over slot-1 devices (NDS flash cards) is two fold: First, when they were first in development, slot-1 cards stuck out and were too cumbersome to keep the DS portable, and 2: because your GBA flash cart will, surprise surprise, work in a GBA and play GBA homebrew

If you're going to purchase from anywhere, I 100% recommend Natrium42. He's quick, cheap, and has all the popular cards (and takes PayPal).

One of the things I personally like to do with my DS is use the NDS Motion Card which is a Slot-1 device. If I had a slot-1 homebrew kit, then I would have to boot the game, pop out the flash card, then insert the motion card. As well as this, it means I couldn't then read or write to my flash cart (saves, loading media, etc) since it wasn't inserted.
Having said this, there is a slot-2 motion card coming out, so there would be no need to pop out the homebrew card anymore.

The good thing about the M3 Simply device, is that it has the PassMe included within it, meaning you only have one peice of hardware.

Speaking of reading and writing to the flash cart, since the latest release of the dev kit (devkitARM & libnds), there is now support for a DLDI interface (allows a stub to be written for any flash hardware, then patched into a ROM to allow read/write access to the cart - It's how the Mp3 player does it). Most carts support DLDI, however, I would check over this list first, just to be 100%.

Now, to test your games before you pop 'em onto the hardware, you'll want an emulator:
NDS Emulator.com links to the more popular ones.
I have them all installed with Right-click context menu's so I can test it in all if one doesn't work.
The one I use the most (and seems the closest to the actual hardware) is no$gba (funnily enough, it's not even listed on ndsemulator.com ).

So... That should give you a good start to get underway with DS homebrew

Nintendo DS & Dominos :: DS Dominos
http://jt0.org
Oolite
19
Years of Service
User Offline
Joined: 28th Sep 2005
Location: Middle of the West
Posted: 25th Jun 2007 13:55
Wow, cheers mate, this saves me a hell of a lot of trouble researching stuff.
Quote: "
If you get the 'stealth' version, it will remove that annoying Warning & Safety screen when you boot up the DS."

Sweet, i really hate that thing, on both the wii and the ds.

Cheers Again mate


[Looking for work]
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 25th Jun 2007 18:25
No worries.
Don't forego the research entirely, there's still the issues of which Flash Cart, or slot-1 device to get (I have a SuperCard MiniSD), what particular needs you have for the hardware you get (does size matter? Do you need the internal 32MB of memory to allow GBA SRAM saving? Do you need extra internal RAM [the DS only has 3Mb of it]?)...

Unfortunatly, I made only half the right choice the first time round (got an EFAII which as the internal 32Mb of memory, an SRAM save area, and 128MB of space [big for the time, since none supported SD or CF cards]), but unfortunatly, DLDI isn't supported, the company doesn't update the firmware anymore, and it's quite annoying to have to unplug it, plug in a miniUSB cable, open up a special application to read and write to it, then unplug, push back into the DS, etc, etc...

Now, with my SuperCard, I simply pop out the miniSD card, plug it into my card reader which is permanently attatched to the computer, and read/write through windows like normal

Nintendo DS & Dominos :: DS Dominos
http://jt0.org
Darth Vader
20
Years of Service
User Offline
Joined: 10th May 2005
Location: Adelaide SA, I am the only DB user here!
Posted: 12th Jul 2007 06:38 Edited at: 12th Jul 2007 07:11
Wait a minute looking at it again, it does look quite expensive! All I want is to be able to run NDS and GBA Homebrew without having to flash my DS lite. I have my Pocket PC for music, videos and text reading. Any ideas?


Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 12th Jul 2007 15:48
r4DS USD$39 with an included MicroSD USB reader.
All you need is a MicroSD card which you can get for about USD$12.

Total: USD$51

That's much, MUCH less than I've spent on my DS homebrew endevours!
So far, it's cost me about AU$200

Nintendo DS & Dominos :: DS Dominos
http://jt0.org
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 12th Jul 2007 16:19 Edited at: 12th Jul 2007 16:28
I take that back, you said GBA homebrew too... You can only play that from slot-2 devices...

[EDIT]
So, you'll need a slot-2 device (SuperCard, etc) and a PassMe2 device.
It's definitely more expensive going for a slot-2 device since it's old hardware now and needs a PassMe device (unless you flash your firmware)

Nintendo DS & Dominos :: DS Dominos
http://jt0.org
Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 20th Jul 2007 09:31
This is cool--- but how do you trace something out to the debugger? Can't seem to find any way of doing that. Debugging in general seems to be impossible

Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 20th Jul 2007 13:10
If you mean the debugger in no$gba, you need to pay for it:
http://nocash.emubase.de/gba.htm#debug

I don't know how good the debugger is for the DS (since it's a GBA emulator made to work with DS roms) I don't actually know of anyone who uses the debugger.

I find it fairly easy to initialize standard console output via devkitpro's consoleInitDefault() function and just output when I need to.
However, it doesn't have any debugging features like variable watching, etc, so you may be better off purchasing the No$gba debugging version

Nintendo DS & Dominos :: DS Dominos
http://jt0.org
Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 20th Jul 2007 22:22
Well, all I need is to be able to trace output to the debugger.. with printf or something else. I usually put a simple printf statement at the beginning of the functions so I can trace the program flow.

Could you let me know how you do that consoleInitDefault()? I can try it out at home tonight.

Variable watching is important, but not necessary. Being able to trace text to a console is very important and essential for me

Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 21st Jul 2007 08:01 Edited at: 21st Jul 2007 08:04
First up, you have to choose one of the modes which has a text background available.

Mode's 0 through 3 with background 0 have this, so let's set that up (btw, I'm doing this on the sub screen):




Next, you need to assign some background memory to it:



To be honest, I believe that the text background only needs 16Kib instead of the 256 I've assigned there, so you can assign a different part of memory if you wish.


Then, we set up the palette that's outputting our text:




Now, tell the DS where the background should start getting its map data from to output by setting the MAP base (or it would be a BMP base if we were thinking in terms of bitmaps rather than tilemaps).
The macro BG_MAP_BASE does this for us.
In this case, we're going to set it to the last possible base, 31:



This just ensures that we clear the tile data so we don't overwrite it with map data (Try changing the base to as low as you can get it, remembering to change the associated number in consoleInitDefault()).


Finally, the actual function call which sets up the default text output:



Here, you can see that we are telling it that the map data (screen base block) starts at block 31, and that the tile data (char base block - the actual character images) starts at block 0.

After you have done this, all that's required is to output some simple text:




And, here's a slightly modified example taken from the nds-examples pack from devkitpro:


That does mean that you'll either have to shuffle any memory you're using for that background, but you still have quite a lot of memory and you can use other backgrounds for all your other output and what-not.

It takes a little mental work to get used to how the memory is layout out and how the macro's etc work, but I generally find that once I have the basics down, simply opening the video.h header file from libnds provides enough answers in the comments

Nintendo DS & Dominos :: DS Dominos
http://jt0.org
Darth Vader
20
Years of Service
User Offline
Joined: 10th May 2005
Location: Adelaide SA, I am the only DB user here!
Posted: 21st Jul 2007 09:20
Jess do you recommend the R4 or the M3? Cause I found this place that has the M3
http://www.ozmodchips.com/
So I might buy it from them. I decided to go with slot-1 since I can go for slot-2 with it as-well (I just need the passme for the GBA slot!). There is really no difference and I did a-lot of reading on the M3 Simply and it's sounds good.
What do you use and think?
Thanks!


Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 21st Jul 2007 10:19
Thanks for that info, Jess I was thinking more for having output to the debug console, not the DS screen itself--- know what I mean? For example if you are using Java, you can still output text to the command prompt window when you're running a Java GUI.

Not sure if you have used the Dualis emulator but there's debug output text as the game runs. You *should* be able to output text there. Even if I paid for the advanced No$ debugger, I still don't know the command to output text to the console.

I have always needed to have this capability during development, as I have some pretty crazy algorithms in my games (wordtrix as an example), and I have needed to output what my game is doing at every stop so I can read through the output and make sure everything is going proper.

And on a side-note, I much prefer using Palib as the syntax is much easier to grasp than your examples show

Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 21st Jul 2007 12:14
Oh, sorry for that confusion, Jeku!
I do know what you mean with dualis, but I have no idea how to output to it. Email the developer, I've gotten good responses from quite a few Emulator dever's when I emailed them with non-working code, etc.

I've never even looked at PAlib to be perfectly honest.
But now, it doesn't matter... I've got it all down and have a nice little library of code that I just include into my projects

Darth,
Quote: "I decided to go with slot-1 since I can go for slot-2 with it as-well"


I'm not sure what you mean, but you can't run GBA code from slot-1 devices.

I've heard good things about both the R4 and M3, but I have had complaints from a few users of M3 about my homebrew not working, and not a single one from R4 users. I don't know if that's just down to the number of people who have bought them, or because the R4 is better...

Personally, I use a SuperCard MiniSD which is a slot-2 device. It works quite well, and I haven't had any trouble with any homebrew apps yet.

Nintendo DS & Dominos :: DS Dominos
http://jt0.org
vibe runner
18
Years of Service
User Offline
Joined: 7th Aug 2006
Location: The Future
Posted: 22nd Jul 2007 17:42
I just got a Slot-1 SuperCard with a 2GB Kingston microSD.

It's cheap, easy to read/write to, does not stick out, and it works. Hurrah!
Darth Vader
20
Years of Service
User Offline
Joined: 10th May 2005
Location: Adelaide SA, I am the only DB user here!
Posted: 25th Jul 2007 06:09
Well I'm getting me M3 Simply tomorrow all I need to get now is 1 2GB MicroSD card and I'll be ready to go!

I'm hoping to replace my PDA with my DS using DSOrganise!


Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 25th Jul 2007 06:39
Nice to hear it

Let us know how you go with it all.

Nintendo DS & Dominos :: DS Dominos
http://jt0.org
Roxas
19
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 25th Jul 2007 09:22
Aww.. M3 and R4 are out of stock ;( Well.. I cant even yet order anything.. Because the site doesnt support click and buy i need my web bank account for sampo.. I should get it soon

And DS i will order soon (Last work week and i get its payday )

[center]
DarkBIBLE Wikipedia for TGC Users!
Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 25th Jul 2007 20:48
Quote: "I'm hoping to replace my PDA with my DS using DSOrganise!"


Anyone used this? I heard it's pretty good.

Thanks for the info, Jess--- I'm going to email the Dualis developer.

Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 26th Jul 2007 17:46 Edited at: 26th Jul 2007 17:48
I haven't used it, but I've only heard good things about it

[EDIT]
To be completely honest, the DeSuMe developer actually contacted me.
I mentioned in passing in a post on another forum that it didn't work in DeSuMe, and next thing I know, I've got an email from him asking me to send him some code that breaks the emulator so he could fix it.

Now, if that isn't supporting the indie scene, I don't know what is!

Nintendo DS & Dominos :: DS Dominos
http://jt0.org
Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 28th Jul 2007 14:16 Edited at: 28th Jul 2007 14:27
Yay I got a DS lite Onxy Black today I only got Pokemon Diamond at the moment. Was thinking of getting a homebrew for music, movies and maybe one day developing my own DS games.

Sorry if these questions have been answered but im very tired and can't be bothered reading it all... (I read at least half of all the posts though)

- What is everything needed to do to set up a homebrew for; Movies, Music and Developing DS games?

- How do you get the movies, music and games to play on the DS once the homebrew is set up?

- Is the DS homebrew legal?

Roxas
19
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 28th Jul 2007 17:57
1.
You need bootable card slot 1 or slot 2.
I suggest r4 or m3 (Gba roms doesnt work with these)

2.
Theres lot of free mp3 players what are 100% better than those what you need to pay. (Video players aswell). Developing ds games is free aswell (C++)

3.
Its legal for sure.
But put comerical roms on your flash cart at your own risk

[center]
DarkBIBLE Wikipedia for TGC Users!
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 28th Jul 2007 18:06
Homebrew is 100% legal.

Using your homebrew kit to play illegal roms, however, is not.

I believe both Moonshell, and DSOrganize allow playing of Movies.
I'm not 100%, but I would say that since DSLinux is a proper Linux port, it should support at least some media playing software.

As well as that, you can go for the specific hardware which supports it; the Max Media Launcher is the main one I've heard of.

As for Music, then this gbadev.org post explains it quite well (also some extra links in there).

You'll need a PassMe2 device since you have a DS with the new firmware, but if you use it to flash your DS, then you wont need it again.
Otherwise, you need to get a cart that has a NoPass included in it (M3 & R4DS are the same thing with a NoPass in it).

Nintendo DS & Dominos :: DS Dominos
http://jt0.org
Roxas
19
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 28th Jul 2007 19:26
I heard Max Media Launcher is epensive and crap.

[center]
DarkBIBLE Wikipedia for TGC Users!
Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 29th Jul 2007 06:18
So all I need is those cards for the DS then I just copy Music and Movies onto that? If so I will need an SD card reader for my PC

Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 29th Jul 2007 15:47
Kieran, pretty much, yeah.

The card will have software that can convert the video to the right format, but most will play standard mp3 for music.
SD Card readers are cheap as chips: ebay will give you one for less than a dollar

Roxas, I've never used it, so I can't say, but I have heard basically the same thing too

Nintendo DS & Dominos :: DS Dominos
http://jt0.org
Roxas
19
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 29th Jul 2007 16:49
Isnt there SD Card reader with m3 and r4?

Btw. I ordered Nintendo DS Yesterday It should come tomorrow Also i will order the m3 simply after i get my DS!

[center]
DarkBIBLE Wikipedia for TGC Users!
dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 30th Jul 2007 10:10 Edited at: 30th Jul 2007 10:20
Jess, didn't you say one time you got a free cart from some forum for posting your game for the DS? Or am I just imagining things?

Edit: Also, think you could post some links to how to program for the DS? That'd be great as well.
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 30th Jul 2007 12:55
Roxas, not sure, I've never looked into them.

Dabip, The idea was that you posted your game on the NeoFlash forum, and they would go through and see which ones looked like they could use a helping hand in some way, and offer them with free NeoFlash carts. Unfortunatly, for whatever reason, they just stopped doing it, so I never got one
Oh well

For how to program, look in the following gbadev.org forum post:
NDS Tutorials and Misc. Dev Links

Nintendo DS & Dominos :: DS Dominos
http://jt0.org
Roxas
19
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 31st Jul 2007 17:28
Ok i got M3 DS Simply today And it HAS card reader So i was right.. Unfortunally DS Hasnt came yet (And i ordered it before m3 lol).. Anyways Im waiting my DS

[center]
DarkBIBLE Wikipedia for TGC Users!
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 1st Aug 2007 14:50
Haha, that's funny

Nintendo DS & Dominos :: DS Dominos
http://jt0.org
Darth Vader
20
Years of Service
User Offline
Joined: 10th May 2005
Location: Adelaide SA, I am the only DB user here!
Posted: 3rd Aug 2007 09:37
Quote: "I suggest r4 or m3 (Gba roms doesnt work with these)"

Not quite true. The M3 Simply can act as a Passme device for slot-2 (GBA) expansion. Of course you do need the extra equipment!

Quote: "Anyone used this? I heard it's pretty good."

Yes I'm using it and it's dang good! I haven't tried out the browser yet but it works like a charm for all my PIM uses in-fact I'm selling my PDA as I don't have anymore uses for it!

There was one problem which I've sort of fixed and that was, with a PDA you turn it on and BAM all your schedules and To-Dos are there, were-as with DSOrganise you have to wait for it to load the DS then the ROM! All in all I found it quite long and tedious! So then I thought of a great way to counter it, I changed the name of the DSOrganise name to that of the Moonshell one so when I click on the multimedia button in the menu it takes me straight to DSOrganise! I still have to wait but not as long!

DSOrgainse can't play movies BTW. Also does anyone know a good movie converter? BatchDPG gave me terrible quality!


Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 3rd Aug 2007 10:45
Darth, of course they can, but by that stage, you've spent an extra $50 on hardware that you could have saved and just flashed your DS and bought a slot-2 device (like I did).

It sounds like I should get me a copy of DSOrganize... I might start using it like a PDA

Nintendo DS & Dominos :: DS Dominos
http://jt0.org
jaden decar
18
Years of Service
User Offline
Joined: 26th Jan 2007
Location:
Posted: 4th Aug 2007 04:29 Edited at: 4th Aug 2007 04:32
Hey Jess, i'm having troubles with sprites using ndslib as my command library. Basically, it turns the image into 6x6 pieces and scatters them around the general area I positioned it. Here's an example:

Image Before:


Image in-game:


Anyways, here's my code, based on the manual by PataterSoft:

Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 4th Aug 2007 07:28
Are you using ndslib, or libnds? There's a difference
libnds is the one that comes with devkitpro now.

The only thing that I can think is doing that, is that these two lines are messing it up:


Are you certain that you have saved the image out as a 256bit palleted image?

What happens if you put in some dummy data?
Such as:

(I haven't tested that, so I don't know if it actually compiles or not )

Nintendo DS & Dominos :: DS Dominos
http://jt0.org
jaden decar
18
Years of Service
User Offline
Joined: 26th Jan 2007
Location:
Posted: 4th Aug 2007 19:44
Ok, i am using libnds(snice I use devkitpro). Anyways, your code wouldn't compile, and my image was only 16-bit. Also, I converted it to 256-bit and it looks like this now:

Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 5th Aug 2007 09:26
It looks like you're having a problem with getting the right file format.

Grab an example that has an image already saved out in the right format to be loaded in, and see if that displays correctly. If it does, then you've just got to figure out the right output settings for your image.

Nintendo DS & Dominos :: DS Dominos
http://jt0.org
dononeton
20
Years of Service
User Offline
Joined: 12th Jun 2004
Location: Tusaloosa, AL : USA
Posted: 5th Aug 2007 19:43 Edited at: 6th Aug 2007 00:04
I have a question. I am all setup to build a DS game and use DeSmuME to run the game. http://www.palib.info/wiki/doku.php?id=day1 I am not sure what to buy to run it on my DS? I would like to run in using the DS game slot(slot 1?) After I get done can this game work on other DS's like a commerical game?


edit:
PAlib dose not support 3d? Do I have to use libnds for the 3d?


edit2:
I been playing around with this for a couple days now and it seems not to difficult. Just to be sure I notice the variables are declared like this.
so for a positive variable I would do


So when I declare a varible in c++ I would need to know the min and max value and use the correct Bit

example Object Numbers. In my game I need 10 objects then I would use




Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 6th Aug 2007 00:07
No, you can declare the normal types as well, int etc. but remember that the DS can't do floating point, so you'll occasionally have to convert from float before you but it through a function.

For 3D you need to use libnds and it gets pretty tricky. I just got 3D running on both screens at the same time, and it's taken me about three days!

If you get an R4 or M3 Simply, then yeah, it pretty much acts like a normal card, you can play it in anyone's DS.

You can definitely make some really nice looking games just with PAlib, and it is really easy.

-= Out here in the fields, I fight for my meals =-
dononeton
20
Years of Service
User Offline
Joined: 12th Jun 2004
Location: Tusaloosa, AL : USA
Posted: 6th Aug 2007 00:27
Thanks Chris K I am planning to make a 2d game using PAlib then on to 3d using libnds. I am glad I can play the game on any DS. My kids will love to play my game on there DS's



jaden decar
18
Years of Service
User Offline
Joined: 26th Jan 2007
Location:
Posted: 6th Aug 2007 02:03
hey guys, sorry to bother you again, but i'm still having trouble with my sprites. I am still using libnds, but whenever I run my code now (previously posted) using a gfx2gba generated sprite, it won't show up at all, just a black screen. Any idea on what I should enter for the gfx2gba parameters for a mode 5 game?
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 6th Aug 2007 04:13
mode 5 only refers to the background type. Basically, in that mode, you can have a scaled/rotated large background.

Infact, you don't even need to have a background setup to use sprites.
Object Attribute Memory (OAM, or Sprite Memory) is completely separate from background memory as long as you specify that with vramSetMainBanks() or vramSetBankX().

Again, I suggest getting a working example (maybe one from the ndsexamples package available with devkitpro), then once you understand how that works, try using your own image. If it suddenly breaks, then you haven't saved your image out in the right way.

Also, in your code above, I can't see anywhere where it would even render. You're returning before you can see a single vertical blank.

Change the main to read something like:


Nintendo DS & Dominos :: DS Dominos
http://jt0.org
jaden decar
18
Years of Service
User Offline
Joined: 26th Jan 2007
Location:
Posted: 6th Aug 2007 04:58 Edited at: 6th Aug 2007 05:22
Ok, well, I tried putting it into an example, and it doesn't show up still.

EDIT: Ok, well I plugged it back into my code and got a wierd 64x64-ish block-like thing, here's what it looks like:



EDIT2: Forgot to put in my updated code:

Login to post a reply

Server time is: 2025-05-22 04:21:13
Your offset time is: 2025-05-22 04:21:13