GameBoy Advance Barebones: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
Nathan (talk | contribs)
No edit summary
Nathan (talk | contribs)
No edit summary
Line 152:
In mode 3, VRAM is a 16-bit bitmap; when we make a halfword pointer for it, each entry is a pixel. This bitmap itself is the same size as the screen (240x160) and because of the way bitmaps and C matrices work, by using something of the form ‘array[y*width + x]’ are the contents of coordinates (x, y) on screen. That gives us our 3 pixel locations. We fill these with three 16-bit numbers that happen to be full red, green and blue in 5.5.5 BGR format. Or is that RGB, I always forget. In any case, that's what makes the pixels appear. After that there is one more important line, which is the infinite loop. Normally, infinite loops are things to be avoided, but in this case what happens after main() returns is rather undefined because there's little to return to, so it's best to avoid that possibility.
 
[[CategoriesCategory: ARM]]
[[CategoriesCategory: GameBoy]]