#15745 - x86asm - Wed Jan 28, 2004 9:55 pm
Hi, I just wanna dabble into GBA programming a bit, I have a firm understanding of both x86 and Z80 assembly as well as low level C so learning the ARM7 asm/C won't be much of a problem for me. Any who,since you guys know this stuff better than I, I have a few questions:
1. How is the GBA's ARM7 with 2D rasterization? Does it do well ?
2. To start off I would like to have some text on the screen, maybe a program that displays the ARM's register values upon entry into a program, something simple. To get started I would like to know if the graphics data the VDP takes is planar (please don't say this :( ) or linear (ahhh, better :D).
Thanks for your time :D
_________________
Hello Everyone :D
#15747 - DekuTree64 - Wed Jan 28, 2004 10:41 pm
By 2D rasterization, do you mean like blitting sprites pixel by pixel in bitmap mode? You can do that, but the hardware is designed to do the exact same thing for you. Not many games actually use the bitmap modes, they're only really good for 3D and demo-type effects that need to dynamically generate stuff.
As for your test program, I would suggest doing some simple sprite and tile BG displaying before tangling with text. GBA has no built-in text system, so you have to make your own. Even so it's not hard to do once you have a grasp of the hardware. For a simple fixed-width font, all you have to do is draw one tile for each character, copy them into your tile memory, and loop through your string setting the tile indices on the screen to the characters in the string. I think there's a section in the FAQ about text too.
_________________
___________
The best optimization is to do nothing at all.
Therefore a fully optimized program doesn't exist.
-Deku
#15771 - Blacken - Thu Jan 29, 2004 7:47 pm
Fixed-width seems easy enough...but what about variable-width? The only thing I can think of is using sprites for letters, and that could get a little nasty, hogging up some of the sprites. Though I imagine there's a way to dynamically load what you need on the fly, if a little slowly.
#15773 - poslundc - Thu Jan 29, 2004 8:12 pm
See this topic.
The long and the short of it are that the two options are basically using sprites (in which case there is a raster trick to get around the limitations of OAM, but it's a bit tricky) or using text backgrounds and dynamically blitting your font to the background's VRAM.
I use the latter system (as do many games including Zelda, Sword of Mana, etc.) but the former is also quite well-proven if your game isn't too heavy on the rot/scale sprites and you don't mind the hassle of juggling OAM entries (Golden Sun uses it, for one).
Dan.
#15774 - sajiimori - Thu Jan 29, 2004 8:13 pm
Edit: I've been scooped.
You can dynamically blit variable-width text into sprite or background tiles. It can be a little awkward because you aren't drawing into an LFB. The hardware won't help much here, but the technique is used a lot anyway.