Download Document
Showing pages : 1 - 4 of 356
This preview has blurred sections. Sign up to view the full version! View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: i. Tonc v1.4 : Table of Contents i.1. Preface i Contents 1 ii Introduction to Tonc 3 i.2. GBA Basics 1 GBA Hardware 8 2 Setting up a development environment 12 3 My First GBA Demo 26 4 Video Introduction 33 5 The bitmap modes 42 6 The GBA keypad 70 7 Sprite and tiled background overview 76 8 Regular sprites 82 9 Regular tiled backgrounds 86 i.3. GBA Extended 10 The affine transformation matrix 113 11 Affine sprites 121 12 Affine tiled backgrounds 135 13 Graphic effects 142 14 Direct Memory Access 155 15 Timers 163 16 Hardware interrupts 167 17 BIOS calls 180 18 Beep! GBA sound introduction 189 i.4. Advanced / Applications 19 Text systems 201 20 Mode 7 225 21 More Mode7 tricks 233 22 Tonc's Text Engine 259 23 Whirlwind tour of ARM assembly 298 24 The Lab 338 i.5. Appendixes A Numbers, bits and bit operations 346 B Fixed-point math & LUTs 362 C Vector and matrix math 375 D More on makefiles and compiler options 384 E Make via editors 390 F References 398 G Change log 402 i.6. On revisions Tonc v1.4 is final. Yeah, I said that about v1.0 as well, but this time I mean it. Really. Honest. Cross my heart and hope to Tonc : GBA Programming in rot13 1 of 356 die, etc, etc. Well barring minor errata, this will be final. Honest, cross my heart, yadda yadda yadda. Modified Aug 15, 2008, J Vijn . Get all Tonc files here Tonc : GBA Programming in rot13 2 of 356 Fig ii.1 : directories. ii. Introduction to Tonc Organisation Terminology and Notation Prerequisites On errors, suggestions ii.1. Organisation TONC consists of three parts: a text section, the actual tutorial, a code section, which contains all the source code and makefiles of the various demos, and a bin section that contains binaries of the demo. Though they are separate zip files, they work best when used together. You can find the zip files further down this page. If you unzip them in one directory, say tonc , you'll get the structure depicted in fig ii.1. ii.1.1. Tonc text The text section covers the principles of GBA programming in detail. The focus here is not so much on how to get something done, but how things actually work , and why it's done the way it's done. After that the how often comes naturally. Every chapter has one of more demonstrations of the covered theory, and a brief discussion of the demo itself. Please, do not make the mistake of only reading the demo discussion: to properly understand how things work you need to read the text in full. While there are optional parts, and whole pages of boring text that seem to have little to do with actual GBA coding, they are there for a reason, usually there's extra conceptual information or gotchas. At first, the text part had only very little code in it, because I figured the demo code would be at hand and flicking between them would not be annoying. Well, I've realized that I figured wrong and am in the process of including more of the code into these pages; maybe not quite enough to copy-paste and get a clean compile, but enough to go with the...
View Full Document