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 > Need major help - mutiple questions

#138522 - ubercatch22 - Sat Aug 25, 2007 12:59 am

Hey I need some major help with devkitpro r20

my questions:

how can i get a background on the touch screen
how can i put sprites on the touch screen and top screen
how can i print text on top of a background

PLZ HELP ME and dont give the : go look on the various tutorials or find it online, also dont say go look in the examples cause i have checked and the examples dont specify what in need. I know there are background example put it is only for the top screen (not touch) and the sprites one is sprites created through the ds.All the manuals that give in sight DONT HELP either cause the are all outdated or not complete(which are most likely outdated)

plz anyone that can help post and thanks you

#138523 - calcprogrammer1 - Sat Aug 25, 2007 1:08 am

If you're just starting DS Development, I suggest PAlib (www.palib.info), it is a programming library that uses easy codes where you don't have to deal with VRAM or anything, just use PA_LoadEasyBg() to load backgrounds, PA_CreateSprite() to create sprites, and top screen is 1 and bottom is 2. I use it for a lot of stuff, though it's not good for things that want to boot other programs or do anything with external libraries (Libfat works fine though).
_________________
DS Firmware 1, Datel Games n' Music card / Chism's FW hacked GBA MP v2 CF

There's no place like 127.0.0.1.

#138524 - ubercatch22 - Sat Aug 25, 2007 1:25 am

I can but then i really cant

im doing this for long term school project so i need to use the most non pre rewriten stuff possible in this case the hardest


thanks though


Last edited by ubercatch22 on Sat Aug 25, 2007 7:30 am; edited 1 time in total

#138528 - relpats_eht - Sat Aug 25, 2007 4:07 am

Based on reading your posts in this thread, I believe even palib would be a bit above your head. Everything you requested is in the examples and is covered in tutorials. You are either lying (about having checked the examples and tutorials) or you just aren't proficient yet. Now, granted, there is no one example or tutorial that specifies exactly what you need but all the information is there.

Unfortunately, I really don't feel like explaining things at the moment, so all I have is criticism.
_________________
- relpats_eht

#138529 - ubercatch22 - Sat Aug 25, 2007 4:13 am

OMG i have checked im woking on things but i have checked and still havent been able to find out how to have a background image in the touch screen and the sprite tutorials dosent include the sprite like i said. i worked with that but when i compile i get a messed up background with legit sprites. which dosent tell me how to incorperate the image like th background tutorial does

#138531 - calcprogrammer1 - Sat Aug 25, 2007 4:56 am

I doubt he's lying...I read many libnds tutorials too, and I still can't do more than a text console, and even that's hard...mainly due to the lack of documentation, sure there are plenty of tutorials, but I want to know what each command does. PAlib has a command reference, something I'd really like to have for libnds, a full, complete command reference. If I were you, I'd at least try PAlib, and once you're familiar with it, you'll have a better understanding of how to do some things, then you can transition to the harder libnds coding.
_________________
DS Firmware 1, Datel Games n' Music card / Chism's FW hacked GBA MP v2 CF

There's no place like 127.0.0.1.

#138532 - ubercatch22 - Sat Aug 25, 2007 5:08 am

Thanks you fro backing me up i appreciate it

can i use palab just for reference i would just have to look in the library right? cause i tryed palab and it wont work for me probaly cause i did something wrong or do i need ham cause i dont have that

#138533 - calcprogrammer1 - Sat Aug 25, 2007 5:13 am

Follow the wiki tutorials at PAlib's site, it says you can use Visual C++ 2005 Express + the PAlib appwizard (which works for libnds as well) so you can use a good IDE for your DS. I've had no problems using the VC++ method, and it works with libfat and everything. PAlib also has full source code, so you can read it for reference too.
_________________
DS Firmware 1, Datel Games n' Music card / Chism's FW hacked GBA MP v2 CF

There's no place like 127.0.0.1.

#138537 - relpats_eht - Sat Aug 25, 2007 7:11 am

The libnds documentation fully explains the console setup functions. There is also an example using sprites and making them appear on the sub-screen just means you put SUB_ in front of some of the registers.
_________________
- relpats_eht

#138538 - LiraNuna - Sat Aug 25, 2007 7:18 am

Did any of you actually read tutorials?

My tutorials are very simple to follow, at least for background setup.

Quote:
PLZ HELP ME and dont give the : go look on the various tutorials or find it online, also dont say go look in the examples cause i have checked and the examples dont specify what in need.

Quote:
im doing this for school so i need to use the most non pre rewriten stuff possiblein this case the hardest


You simply want us to solve your homework, then ?
_________________
Private property.
Violators will be shot, survivors will be shot again.

#138539 - ubercatch22 - Sat Aug 25, 2007 7:23 am

I am pretty sure that the sprite graphix the goes ON THE TOP OF THE SCREEN is crap the example sprite_bitmap. i dont want a black ground for my background. i have tryed to put a FULLY WORKING background image which get screwed but horrible when i use the code from the usless example. i have spen hours playing with the code with no luck. so unless you can help and give me insight to how to actually do it without only giving hints i would stop replying.

#138540 - ubercatch22 - Sat Aug 25, 2007 7:26 am

LiraNuna wrote:
Did any of you actually read tutorials?

My tutorials are very simple to follow, at least for background setup.

Quote:
PLZ HELP ME and dont give the : go look on the various tutorials or find it online, also dont say go look in the examples cause i have checked and the examples dont specify what in need.

Quote:
im doing this for school so i need to use the most non pre rewriten stuff possiblein this case the hardest


You simply want us to solve your homework, then ?
thanks for the help but i need to find out how to put sprites on the main screen

#138541 - ThousandKnives - Sat Aug 25, 2007 7:40 am

ubercatch22 wrote:
I am pretty sure that the sprite graphix the goes ON THE TOP OF THE SCREEN is crap the example sprite_bitmap. i dont want a black ground for my background. i have tryed to put a FULLY WORKING background image which get screwed but horrible when i use the code from the usless example. i have spen hours playing with the code with no luck. so unless you can help and give me insight to how to actually do it without only giving hints i would stop replying.

It's true that the example is for putting sprites on the top screen. Putting things on the bottom screen is pretty easy, but I certainly wouldn't say that there is any good tutorial for it.

That being said you shouldn't expect anyone here to lay things out on a silver platter. You were given plenty of suggestions on the backgrounds, which you later said you had solved, but apparantly now you haven't? As for the sprites, given where you are at it seems you should focus on getting them to work on the main screen before jumping ahead to putting them on the sub screen.

Once you have an understanding for how the sprite setup works and what everything means, you should browse through the libnds header files and look for where the definitions used in the sprite example are, nearby each of those should be the equivalent definition to use for setting things up on the subscreen. Like relpats_eht said, mostly you just need to add Sub or SUB_ or _SUB to the various function and constant names.

Try looking in:
DevKitPro\libnds\include\nds\memory.h
DevKitPro\libnds\include\nds\arm9/video.h

#138542 - ubercatch22 - Sat Aug 25, 2007 7:55 am

wait wait wait ok let me get some things straight here

I have got the backgrounds to work on the main screen only cause that the only one im focused on for now. I do thanks you and the other that helped me very much in accomplishing that and i appreciate it.

Now i have moved on to adding sprites like i have stated and i dont know how to get both the background and the sprites up at the same time(truely i dont know how to get the sprites)

i have looked over the Pataer soft intro to ds programming but it seems to be out of date, because i get a lot of error after i compile i even if i copy all the source code and try to fix it.

i just am asking fro an up to date tutorial that will tell me how to put sprites in and that dosent include palib

#138550 - omaremad - Sat Aug 25, 2007 12:30 pm

The complex 2d turorial shows how to use sprites loaded from .pcx files, to make .pcx files use GIMP and under image set mode to indexed. Since sprites use diffrent vram banks from backgrounds there isnt much code that is diffrent from plain sprites.

Sprites have a priority attribute, a higher one means its on a higher layer (make sure its greater than your BG).

The TONC tutorials are very good at explaining the principals of 2D hardware, for example code reads ndslib headers or go to chris double's website.

For Easy Bg creation i reccomend usenti over gfx2gba since a gui is nicer.

#138551 - Lick - Sat Aug 25, 2007 12:50 pm

Learn how the hardware works before learning the API. You don't know enough about the DS hardware, yet.

Read TONC and Liranuna's tutorials.
_________________
http://licklick.wordpress.com

#138563 - tepples - Sat Aug 25, 2007 7:36 pm

Have you tried to get things to work on the Game Boy Advance system first? GBA emulation is still more complete, and the skills you learn on the GBA 2D graphics hardware transfer easily to the DS 2D graphics hardware.

omaremad wrote:
For Easy Bg creation i reccomend usenti over gfx2gba since a gui is nicer.

True, using a GUI may be nicer the first time, or if you do not plan to change the background after you have converted it. But if you use a command line, then you can stick it in the makefile and have it automatically re-convert the image every time you rebuild the project if you have changed the original image.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#138565 - ubercatch22 - Sat Aug 25, 2007 7:41 pm

tepples wrote:
Have you tried to get things to work on the Game Boy Advance system first? GBA emulation is still more complete, and the skills you learn on the GBA 2D graphics hardware transfer easily to the DS 2D graphics hardware.

omaremad wrote:
For Easy Bg creation i reccomend usenti over gfx2gba since a gui is nicer.

True, using a GUI may be nicer the first time, or if you do not plan to change the background after you have converted it. But if you use a command line, then you can stick it in the makefile and have it automatically re-convert the image every time you rebuild the project if you have changed the original image.


I that and converter, but i will look into the gba code. Unfortunaly i wouldent know how to convert it to a ds code but if you can help out or give a link where that do that whatever it would be greatly appreciated

#138581 - omaremad - Sun Aug 26, 2007 1:14 am

I recommended usneti so he can actually learn by pushing diffrent export buttons and seeing what the final result is in the headers. Tbh i only got the hang of tiled gfx through experimenting in usneti's options (some weird options sparked reading starting points).