#110947 - DimondEdge - Sun Dec 03, 2006 3:52 am
Hi all!
I want to display a background image with some overlayed text, (in ASM) and I don't know what to do at all.
Oh, I forgot. gcc -S will not work, my whole Cygwin env got screwed up somehow.
Thanks!
DE
#110960 - Ant6n - Sun Dec 03, 2006 7:28 am
if you don't know what to do at all, why use asm?
you could use visual ham, its a legacy windows IDE that can display text.
or you could use tonc's tutorial on how to display text:
http://user.chem.tue.nl/jakvijn/tonc/toc.htm
this is also a good place to start alltogether if you want to learn gba.
also the complete gba/ds reference (also includes all the arm/thumb instructions and timings): http://nocash.emubase.de/gbatek.htm
Here is what i find a good arm reference at times
http://www.ee.ic.ac.uk/pcheung/teaching/ee2_computing/arm/Progtech.pdf
#110961 - tepples - Sun Dec 03, 2006 7:31 am
DevkitARM has nothing to do with Cygwin; instead, it relies on MinGW and MSYS, which make a much thinner UNIX compatibility layer than Cygwin.
First display a background image in mode 0 by cutting it up into tiles. This will involve setting up DISPCNT, BG0CNT, BG0HOFS, BG0VOFS, and the palette, loading the tile data into VRAM, and loading a map into one of the 32 map spaces (31 is probably free).
Then try displaying one of these images, and draw the tiles that correspond to "HELLO WORLD".
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#111007 - DimondEdge - Sun Dec 03, 2006 3:25 pm
tepples wrote: |
First display a background image in mode 0 by cutting it up into tiles. This will involve setting up DISPCNT, BG0CNT, BG0HOFS, BG0VOFS, and the palette, loading the tile data into VRAM, and loading a map into one of the 32 map spaces (31 is probably free).
Then try displaying one of these images, and draw the tiles that correspond to "HELLO WORLD". |
How do I do any of that? I'm very newbish with ASM. Are there any examples that you could give me? Thanks!
#111085 - Miked0801 - Mon Dec 04, 2006 1:06 am
Hi, I've never cut a quality gem-stone before (but have seen others do it), I would love to use this sledge-hammer to do it. Can you help me out?
#111097 - DimondEdge - Mon Dec 04, 2006 2:41 am
Miked0801 wrote: |
Hi, I've never cut a quality gem-stone before (but have seen others do it), I would love to use this sledge-hammer to do it. Can you help me out? |
I have done things like this in C, and simply would like to experement with ASM. If you think, for some reason, that I am unable to do it, then just don't help.
Yeah, it may be hard, but that's my own problem, right?
(Also, this is not ment to be a flame, sorry if it sounds like one)
#111102 - DekuTree64 - Mon Dec 04, 2006 3:06 am
DimondEdge wrote: |
I have done things like this in C, and simply would like to experement with ASM. |
So, you understand the exact steps your code needs to take (which registers to set, where to put graphics in VRAM, etc.), but just aren't familiar enough with the instruction set to do it? If that's the case, then I might suggest that your first goal be to write a very simple function that you can call from C code. Once you have that going, you can gradually do more and more complicated things, until you don't need any C at all to get graphics displaying.
Reading through some of the posts on this forum would be a good starting point. I've given a few examples of how to write basic functions myself, and there are plenty of other useful discussions to learn from too.
Quote: |
Yeah, it may be hard, but that's my own problem, right? |
I think that was precisely Mike's point, that you're asking for help on how to do something the hard way when it wasn't clear that you could do it the easy way either.
_________________
___________
The best optimization is to do nothing at all.
Therefore a fully optimized program doesn't exist.
-Deku
#111196 - Miked0801 - Mon Dec 04, 2006 8:15 pm
Appologies dimondedge. I was feeling a bit trolly that day and your name put that gem-stone thing into my mind without me realizing it :)
Deku summed up my point for me in a much nicer way...
#111202 - DimondEdge - Mon Dec 04, 2006 9:03 pm
No hard feelings. Any ways, I guess I wasn't clear enough in my first post that I've done this kind of stuff in C. I'm going to follow deku's advice, calling ASM from C. I'm going to need to re-install devkitADV tho, everything's messed up... :(
#111220 - kusma - Mon Dec 04, 2006 11:28 pm
DimondEdge wrote: |
No hard feelings. Any ways, I guess I wasn't clear enough in my first post that I've done this kind of stuff in C. I'm going to follow deku's advice, calling ASM from C. I'm going to need to re-install devkitADV tho, everything's messed up... :( |
While you're at it, install devkitPro instead (www.devkitpro.org), devkitAdv is outdated...