#175265 - OverMyHedge - Tue Oct 26, 2010 1:27 pm
This is pretty much all devKitPro console related...I dove into some DS example's for quite a while playing around planning to make an RPG game once I found an artist, not the problem though. As the name suggest's I stepped in way over my head, figuring from the code I was tampering with I got the extremely stupid assumtion since it has only three header file's that the code beneath the example's would be simple(till i realized two hearder's were creating during the make process) C related code, honestly better at C for DOS than Visual C++), I prefer ground up hard code not pointer's and getting mixed up in thing's that are created before I got there, I hate what they did to VB from 6.0 to studio (I started in QB, but really learned in VB 4) I prefer the declaration's. Well...talk about gettin hit in the head with a brick, i'm not a book type learner and reading code backword's without comment's isn't my thing either since decompilation is just insulting. To keep this as short and simple as I can, I know the basic's of coding great, but wasn't considering I just stepped into a console world. So i'm bound by what was made before me, including grit, charas and pern as the worst of it. Was wondering if someone had the time to waste on a more than willing learner to give me the basic idea of what the heck i'm doing on a DS console (at the moment). I wanna write my own graphic routine's and memory access to the graphic's etc. or at least learn how to manipulate what's there. And I have the general knowledge such as access to the graphic's memory on a DOS screen, but not the patience to read 7000 line's of code or example's with bad comment's to get the drift. Personally I love to teach what I know to a willing "begginner" so to speak, so I guess I was hoping someone else might as well. It's late i'm exhausted and I didn't exactly hunt the site before the post, but I know it would be alot better to learn from another person. More than willing to help with anything someone might be working on or planning to work on in return, after and while learning. No ASM experience worth speaking of sadly, too dam hard too learn without help. I do understand binary, hex, octal, general memory addresses etc...Well i'm rambling, if anyone has half a thought to help me out just IM me at UnSedadated@aim.com an find out if ur wasting your time that way, rather than me listing what I can and can't do here. Thank's, and not even for this...if I gotta trial an error every line of code made in devKitPro to learn I will, and I see alot of name's on this site that are on alot of the stuff i'm using or have already read, you guy's rock for opening these door's, and for that I thank you...regardless if this post get's torn off the board ten minute's from now. Later. Didn't see the poll ;) bet I get alotta laugh's, even I think i'm crazy for asking.
#175293 - gauauu - Tue Oct 26, 2010 3:14 pm
Don't worry, we don't think you're insane, and your post won't get pulled down. That being said, the single-paragraph wall of text that you posted wasn't very conducive to us reading it and quickly figuring out what you need help with.
While it's possible somebody may respond and give you 1 on 1 help, people here generally prefer to refer somebody to docs and tutorials, then answer specific questions when people need help.
Have you worked through any tutorials?
Tonc is the best place to start. It focuses on GBA development, but most of it is applicable to the DS. There are plenty of other tutorials out there if you search the web.
If you have looked at them, and are having specific trouble, ask us specific questions. If you haven't looked at them, do that first.
Good luck!
#175322 - sverx - Wed Oct 27, 2010 2:29 pm
gauauu wrote: |
people here generally [...] answer specific questions when people need help. |
That's the key. When you'll start coding you first few lines taking inspiration from an example you read somewhere (in a tutorial, for instance) you'll probably hit some problems, and here's when you'll come here and ask 'Does anybody knows why I can't turn on that pixel on a 256 color BMP background?' and we'll say 'because you should access video RAM with a whole word or halfword, not a byte'.
:)
#175323 - Drovor - Wed Oct 27, 2010 2:38 pm
#175325 - OverMyHedge - Wed Oct 27, 2010 3:34 pm
Ya, i've been working through the tutorial's for NDS takin simple step's because i'm waitin on my artist anyway(my BIG mistake), i'm really looking for something more of an old school mod direct to the graphic's memory but with the ability to load all or partial graphic file's generally, like in DOS the screen was a simple array Screen[0, 0] etc. in pixel's or something like MemDC and SelectObj (again if it ain't pixel's i'm lost) I never even saw the point for any other scale but then again I don't do measurement's such as building a house etc.
Am I just not finding these function's? I'll take a look at your link next time I wake up lol, nighthawk and the board was down while I was up. And I understand the samples quite well, separately, but I never got into all these other file type's sadly, even makefile's(pathetic) and I have the readme file's for them all but half of the option's arn't even in them, for example I went to what was supposed to be grit's homepage as far as devKP was concerned and downloaded the newest version (not installed yet) cause I also downloaded the manual and the animate_'simple' example for nds uses more line's than the manual explain's and to make it more confusing it uses them in the makefile not the grit file(neither of which i'm familiar with, don't ask me how I avoided learning to use makefile's but I did) which then make's more file's and it's just like wtf
I rather know how to access the layer's,pixel's and file's myself and just set up my own module(which I will document to the exteme and send anywhere I think it will be posted, especially here and devKitPro's homepage).
I'm ADHD so generally no patience for book's and even in the examples if I didn't know wtf I was doing I would be lost, cause there is pretty much no comment's, especially about grit and makefile's...I have put my own character from charas into the animate_simple nds example transparent with a little grief cause the size is wrong for the example and I just plain and simply hate art but I tried making a mixture of the backround example and the sprite example and forget it because of the makefile's*that would be a helpfull explanation seeing as makefile's are probably where i'm getting screwed up so bad).
Generally I can't focus on paper or example's unless they are nicely commented or i'm workin with somebody to keep interested, explaining why I asked for direct help (which is alot to ask of when u don't know anyone here and have never been seen around, which change's as of yesterday). Maybe even a group project to join that is making their own stuff along the way, even if it does use grit and pern (i'm trying to avoid them simply to give my artist more freedom and I don't like how the file type's are pretty much unreadable before the compiler stage, is that unix/linux? Cause I don't understand why you would make a half compiled style file for a compiler, except to mark block's/bits/position's etc. but i've done that with an exe storage program and my block's still looked similar to ini style file's).
I was gonna do Charas' author and the world a favor and make a program to resize/rearrange the pixel's in each item so they could be used in any size cause that part bite's (no offense intended, just a suggestion that i'll have to drop) when all that's needed is a little movement for some pic's and a slight size adjustment for most of the rest, but I can't open the file types in any editor and I didn't bother trying to figure out what (most likely small or simple) changes or encryption was used to create the file type.
Anyway, one thing I keep thinking would be a good idea is getting into a newly started group project that has no intention of using the pre-made graphic editor's and don't mind the question's(good luck finding that, eh?) they would be suprised how fast I pick up once I get a general idea, then adding my own detailed comment's for myself or if it's free source everybody who end's up in this position.
This is getting long again so i'll ask a simple question, "how can I get direct access to the graphic's in pixel format without ASM". Half the reason I don't know how to create a makefile is because I wanted more access than even VC++ gave me and headed to DOS interrupt's, creating a small window's clone with my own mouse pointer's in hex?
I believe after drawing them in binary, it's been a while (my fav. the middle finger for a link lol) a single window and button with functionality(that looked exactly like windows) before I quit. Most people wanna rise up with the time's where as I wanna go back to the bottom of most thing's and understand it all. I don't even like using control's or anything on my project's, I prefer to recreate my own. Matter of fact, aside from the basic control's in each language I can't think of anything i've made that has any on it. Which was a mistake seeing how usefull excel and many other program's are becoming for speed and mathmatical accuracy among other thing's.
Anyway's thank's for the warm welcome I was seriously debateng on never coming back except to read the poll lol till I got the e-mail (but your wrong, i'm fuckin nut's lol...genius and insanity are a very thin line as most people here probably know, I don't think i've met a totally down to earth inside the box programmer who had a hint of potential yet).
I just realzed something, all that may be no help, considering I would probably never be able to take picture's and draw them myself keeping up with game speed at the same time, so this would probably help more..."how would I load any single picture I choose from a png file into the array format of the nds animate_simple example onto the screen directly with the option of choosing my own size etc.". Again (for real this time) i'm off and thank's for the don't fuckin give up speech and the link, i'll check it out.
You guy's got a non irc chat? lol I talk way too fuckin much, every ? I try to ask I figure out why it won't help etc. (slap) that's better lol, ok gonna read (uggghhh) first then blabber (I'll try to keep them short and specific for now on, here's simple...i dunno wtf im doing cause this language is coded so differently I don't know what to ask lol, but this long ass post with no direct question I definatly see your point), just don't send me too examples or post's that don't explain what they are doing with the code please...they will do me no good...BB after I check out the link.
Later (not gonna "not" post this) but I just got two more post's lol and I get your point's and if they are the same example's that come with devKit, yes i'm working in one. As explained above with a few question's my mind raced over. But I figured that would be my response on a board. Never hurt's to ask though, if you guy's laughed me off the board, I wouldn't want your help anyway lol, but you seem like pretty good peep's and as much as I have trouble just sitting here alone (why I asked about a chat) i'll try and take the advice.
Thank's again!
#175326 - OverMyHedge - Wed Oct 27, 2010 4:07 pm
Skip my ?'s for now, tonc gave me half right off the bat as soon as it told me the pixel position's I knew exactly what the code meant on the first example, i'll read first. : )~ Thank's fella's.
#175327 - Dwedit - Wed Oct 27, 2010 4:27 pm
Still unreadable.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."
#175328 - ScottLininger - Wed Oct 27, 2010 5:43 pm
Carriage returns, please, or no one will ever read your posts, much less answer any questions (presumably) buried in the text.
:)
-Scott
_________________
Some of my GBA projects
#175331 - OverMyHedge - Thu Oct 28, 2010 12:15 am
Like the quote Dwedit
Now are you simply talking line feed's
like
this
or do I need to turn on the coding to add them?
Sound's like a dumb ? but you never know considering there's different coding style's for the post's.
And you can ignore my question's earlier thank's to a few link's that actually explain thing's i'm gonna try to measure up the patience to figure this out.
The first GBA example from Tonc already answered my main question, and I feel stupid even for asking after seeing three line's of code and getting the drift right away.
Thank's for the attempt ar reading my garbage looking post's though lol, let me know if this came out better.
I'll be doing some reading now that I have something to read that explain's itself before I bother you guy's again, but i'll be around. Later.
#175336 - headspin - Thu Oct 28, 2010 7:32 am
Break your posts up into paragraphs. It's painful to read such a large post like that.
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game
#175338 - elwing - Thu Oct 28, 2010 7:56 am
wow, my first wall of text of the day... and it was a mighty one :) welcome there
#175345 - wintermute - Fri Oct 29, 2010 12:32 am
I just edited that second post and broke it up into paragraphs, hopefully that'll give you an idea of what people are expecting. The main problem is that the original was just a wall of text & most people just go cross eyed and can't read it.
A few questions ...
What do you mean by a "half compiled style file"?
By Charas do you mean http://charas-project.net/ ?
What's a "non IRC chat"? We do have an IRC channel for ds development but otherwise there's the forums here and on devkitPro.org.
Some tips ...
The newest version of grit is distributed with devkitARM, there's no need to download or install it.
The DS isn't particularly well suited to pixels - it can handle them but you'll have to implement all kinds of things in software that the hardware can do for free. Maps, tiles and sprites is pretty much where it's at unless you want to do something 3D.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog
#175351 - ant512 - Fri Oct 29, 2010 11:20 am
If you really want to do things with pixels:
http://bitbucket.org/ant512/woopsigfx/wiki/Home
It's a C++ library that gives you a fairly decent set of 2D drawing functions, including pixels, lines, rectangles, ellipses and text rendering. The full feature set can be seen here:
http://bitbucket.org/ant512/woopsigfx/wiki/Features
It can be used when the DS is set up for either framebuffer or MODE_5_2D graphics. There are a couple of examples that show how to get up and running.
#175356 - sgeos - Fri Oct 29, 2010 7:58 pm
The tutorials should cover the basics. After you understand the basics, you might want to consider reading GBAtek, unless a better resource has appeared while I wasn't looking. Everything is documented, and there isn't really a way to get around reading documentation.
You might find that people are more responsive if you stick to asking one concise self contained question at a time.
As this is a technical forum where English is used, basic grammar proficiency is expected. (Paragraphs, punctuation, capitalization, etc.) Proof reading is also highly encouraged.
#175360 - OverMyHedge - Sun Oct 31, 2010 12:12 pm
First thing's first, hello elwing. Sorry about that, just try to understand I havn't really ever been a board person, and it's been quite a while since i've actually even asked for help...not to mention I was practically sleep typing those post's.
ant512, sgeos: Thank you for the link's, i'll be looking into them even if pixel's are not the way to go ( why re-invent the wheel ), it never hurt's to learn or at least have it documented for later anyway's.
Beside's the three line's starting Tonc's First GBA Example pretty much showed me how ignorant I was sbout that.
Headspin: I do understand why they were complaining so I may break thing's up smaller than a paragraph if they get long, but no need for the definition lol.
Ok...got quite a few responses I didn't expect since I told everyone to forget it for now. Along with a bot haha, should've expected that. So I will try to respond too as many as I can remember.
Wintermute:
Q. What do you mean by a "half compiled style file"?
A. Meaning the file is not plain text like an INI for example.
Q. By Charas do you mean http://charas-project.net/ ?
A. Yes, I have no art skill's at all, unless I draw in binary or code for some reason lol.
But the file type's just don't want to load in any program except Charas, and considering how many freeeware art program's I own to try an make up for my lack of skill ( that use FreeImage )...it wouldn't work if I tried.
I'm not sure if Charas is open source but it's better just to ask the author anyway, since they have a much better idea than me and i'm not sure if it is legal to edit those file's in the first place. Didn't think of that at the time.
Anyway having to load them one at a time ruined the concept of coding a general size/position correction method, which I was hoping would have allowed anyone to use almost any size on any size model. It was just a thought, I can correct single peice's as I go along if needed.
Q. What's a "non IRC chat"? We do have an IRC channel for ds development but otherwise there's the forums here and on devkitPro.org.
A. My stupidity lol. I was on AOL and AIM last time I even used a chat and was always warned away from IRC chat's, due to what i'm assuming back then was the simple access people could gain to your computer if you didn't know what you were doing.
Thank's for the tip's...I kinda figured the pixel idea was dumb after asking what I did, and 3D should definately wait till I have 2D down.
As for Grit...I knew that but I was looking for the manual not the program, and that was where the example sent me and also why I never installed it. It must have been older because the manual didn't explain half the code being used in the example anyway.
I simply wanted to add a background to my NDS Animate_Simple example, attempting to mix the 256 Bitmap example into it because it seemed to to be the simplest one. And failing of course because of the Makefile's/Grit file's although I tried putting what wasn't in one into the other the best I could, and even though it would have left me with more issue's like scrolling the background with the character etc., it was a start at least.
So I guess my real major problem start's with learning Makefile's, then onto Grit and I don't even know what to do about Pern Editor lol.
I tried simply putting a self drawn bitmap in place of the file they used for most of the example's and got nothing but a blank screen, maybe it was the quality of the file.
I didn't see how big of a problem that could cause until copying my character into Animate_Simple and getting him transparent succesfully. I havn't tried messing with Pern since, hoping there was a way around that at least.
It just seem's like more a pain than it would be to code my own, of course I know nothing of all the layer's yet so I could be dead wrong there.
Aside from any direction that could help with the file type's giving me problem's or maybe an example of the two example's I mentioned earlier being mixed , and of course an explanation of what was changed and why so I know where I went wrong ( which would really be appreciated since it would probably put it all in perspective )...
I was curious where I went wrong here in the commented section.
This is from the NDS Animate_Simple example and the goal was to reverse the picture loading so she would do "the moonwalk" so to speak, without editing the Png file itself ( which was the only way I could accomplish it ).
This is when I started digging lower to find out how she was loaded in the first place, considering aside from Gfx+= 32*32 there is nothing even resembling coordinated's it has to set at some level of code I figured that has to be the loading size.
Now I tried changing the "i" in each one of the two line's that used it separately for each of the Case Statement's still to no avail.
And a complete reverse of the FOR statement doesn't work because the picture goes Up, Left, Down, Right...so doing that make's the Up/down pic's the Left/Right pic's and the Left/Right pic's the Up/Down pic's. Fixable, but confusing later on...especially if it turn's into a huge project.
And "for" the record lol...I don't think my Switch Statement is set up right at all, but it's all that would compile for me and my VC6 help say's that's how it's done although my brain say's it's not. The first two line's show how I see it being set up. I assume it's something really stupid, but of course I still have to know what.
[code]
// case 1, 2, 3:
// case ((i >= 1) and (i <= 3)): Which I put in an integer before the Switch Statment, not as an equation.
void initWoman(Woman *sprite, u8* gfx)
{
int i;
for(i = 0; i < 12; i++)
{
/*switch (i) {
case 1:
case 2:
case 3:
sprite->sprite_gfx_mem[i + 6] = oamAllocateGfx(&oamSub, SpriteSize_32x32, SpriteColorFormat_256Color);
dmaCopy(gfx, sprite->sprite_gfx_mem[i + 6], 32*32);
case 4:
case 5:
case 6:
sprite->sprite_gfx_mem[i + 6] = oamAllocateGfx(&oamSub, SpriteSize_32x32, SpriteColorFormat_256Color);
dmaCopy(gfx, sprite->sprite_gfx_mem[i + 6], 32*32);
case 7:
case 8:
case 9:
sprite->sprite_gfx_mem[i - 6] = oamAllocateGfx(&oamSub, SpriteSize_32x32, SpriteColorFormat_256Color);
dmaCopy(gfx, sprite->sprite_gfx_mem[i - 6], 32*32);
case 10:
case 11:
case 12:
sprite->sprite_gfx_mem[i - 6] = oamAllocateGfx(&oamSub, SpriteSize_32x32, SpriteColorFormat_256Color);
dmaCopy(gfx, sprite->sprite_gfx_mem[i - 6], 32*32);
}*/
// This would be commented if the Switch Statement worked except the last line "GfX+= 32*32" or else it will load normal every time no matter what.
sprite->sprite_gfx_mem[i] = oamAllocateGfx(&oamSub, SpriteSize_32x32, SpriteColorFormat_256Color);
dmaCopy(gfx, sprite->sprite_gfx_mem[i], 32*32);
gfx+= 32*32;
}
}
[/code]
Oh BTW if you redid my post, i'm not seeing it. But I did see my last post compared to the original's...an damn, I see why i'm getting so many responses on just that lol.
Hope this is much better, and as always thank you everyone.
#175372 - Miked0801 - Thu Nov 04, 2010 1:19 am
you need break; in each of your switch catagories or the compiler will just fall through on each line.
#175373 - OverMyHedge - Thu Nov 04, 2010 10:43 am
Damn. I was thinking one section at a time, not three, like I had shown in what I thought it should have been coded as...
[code]case 1,2,3:[/code]
In which case a break wouldn't be needed, I knew it was something dumb.
Thank You.
#175374 - OverMyHedge - Thu Nov 04, 2010 12:52 pm
Didn't help that the case started at zero and ended at eleven either ;)~
Word to the wise: Stay away from the new Zone Alarm Firewall, it continually erased and refused to let me save my project. I just had to recode the whole thing.
#175376 - kusma - Thu Nov 04, 2010 10:56 pm
OverMyHedge wrote: |
Damn. I was thinking one section at a time, not three, like I had shown in what I thought it should have been coded as...
In which case a break wouldn't be needed, I knew it was something dumb.
Thank You. |
It would still have been needed. switch-case isn't just a series of if-elseifs, it's much more powerful than that.
#175378 - OverMyHedge - Fri Nov 05, 2010 3:17 am
I would say your right...I never questioned it because I always used break, exit, goto etc, to escape it just for safety sake, but I do believe in Visual Basic which is where I started as far as 6 Pro (have VS 8 pro, but why relearn VB in that?) the Select Case does not repeat after one situation is found.
As in 1, 2, 3 it would only resume if it found another case such as 4,5,6 but a long time without a computer could make me wrong in that as well, an i'm not gonna install it to see if i'm right lol.
So instead i'll simply say thank's for the input and whenever I use VB 6 again i'll find out just for curiousities sake.
#175379 - elwing - Fri Nov 05, 2010 7:30 am
kusma wrote: |
it's much more powerful than that. |
please note that I'm NOT asking you to use that...
Duff's device I was just thinking it might be apropriate to show different use of a switch case...
also do note that using this kind of "optimisation" often fall in the class of "early optimisation" and all "the roots of all evils" things... and I in fact expect a good compiler to use this kind of trick in a more efficient way than I would implement it.
#175380 - ant512 - Fri Nov 05, 2010 2:12 pm
OverMyHedge wrote: |
I would say your right...I never questioned it because I always used break, exit, goto etc, to escape it just for safety sake, but I do believe in Visual Basic which is where I started as far as 6 Pro (have VS 8 pro, but why relearn VB in that?) the Select Case does not repeat after one situation is found.
As in 1, 2, 3 it would only resume if it found another case such as 4,5,6 but a long time without a computer could make me wrong in that as well, an i'm not gonna install it to see if i'm right lol.
So instead i'll simply say thank's for the input and whenever I use VB 6 again i'll find out just for curiousities sake. |
Unfortunately, VB != C. Or, for those still stuck in the VB mindset, VB <> C.
#175381 - OverMyHedge - Sat Nov 06, 2010 11:49 am
Oh so true lol. It just kinda got stuck their from year's of VB and not many of C when I lost year's of practice, exactly why I said I would not relearn VB in visual studio...it became generally a Visual C++ code style so to use a lesser language would be worthless.
As far as this "Evil"? What are we talking? You kinda made me not wanna try it the way it was described, but I do love low level anything.
And in actuality it was not the case statement at all, matter of fact whatever happened between my upgraded version of devKitPro and Zone Alarm...when I recoded it and made her walk the opposite way the picture's were reversed automatically as I thought should've happened.
But when I was having the problem it was the fact I was starting with 1 not 0 (light switch anyone), I think it would have worked without break believe it or not.
But rather be safe than sorry alway's.
What if the Switch Statement was for deletion or something of the sort, i've lost project's from forgetting to avoid the dot in a file search and deleting my whole computer, live and learn I guess.
By th way the C and VB not equal's was pretty funny. At least I havn't fallen that far.
Till next time...
#175382 - keldon - Sat Nov 06, 2010 11:37 pm
The tutorials at cplusplus.com are really helpful. I like this makefile tutorial [link], and DevkitPro comes with great makefiles to get you started, as does the tonc tutorial code.
#175420 - OverMyHedge - Thu Nov 18, 2010 2:03 am
Thank's keldon, i'm sorry I didn't see your post way before but I appreciate it.
I'll be checkin it out, especially the Makefile link that's one of my nastier problem's.
And to anyone who replied and got a stupid message from my email lmao, sorry it was for a toolbag annoying me and I forgot it was there until someone told me.