AGB Programming Manual Version 1.1
Total Page:16
File Type:pdf, Size:1020Kb
April 2, 2001 AGB Programming Manual Version 1.1 ã 1999 - 2001 Nintendo of America Inc. AGB Programming Manual “Confidential” This document contains confidential and proprietary information of Nintendo and is also protected under the copyright laws of the United States and other countries. No part of this document may be released, distributed, transmitted or reproduced in any form or by any electronic or mechanical means, including information storage and retrieval systems, without permission in writing from Nintendo. ã 1999 - 2001 Nintendo of America Inc. TM and â are trademarks of Nintendo ©1999 - 2001 Nintendo of America Inc. 2 D.C.N. AGB-06-0001-002B4 AGB Programming Manual Introduction Introduction 2.9" WIDE TFT COLOR CHARACTER/BITMAP BG PCM STEREO SOUND MULTIPLAY COMMUNICATION COLOR GRAPHIC EFFECTS 32768 COLORS COMPATIBLE FOR CGB 32BIT RISC CPU 16MHz Game Boy Advanced (AGB) stresses portability and focuses on 2D rather than 3D image processing functions, resulting in a cutting-edge portable game device with revolutionary capabilities. It provides window-like functions, rotation, scaling, a blending, and fade-in/fade-out features that can be combined to produce exactly the image representations desired. Additionally, the bitmap image-rendering function, with its two modes (double buffering mode for rewriting full-screen images in real time and single buffering mode for stills), can be used to handle realistic images that are indistinguishable from actual photographs. The 2.9-inch-wide reflective TFT color LCD screen provides a clear display with little afterimage. In addition to Game Boy Color compatible sound, AGB has a PCM stereo sound generator. Multiple tracks can be played simultaneously by overlapping them using the CPU. L and R buttons have been added to the Controller. The broader range of control provided also expands the breadth of game designs possible. Although AGB uses a 32-bit RISC CPU whose computing performance and data processing capabilities far surpass those of Game Boy Color, it consumes little power, allowing approximately 15 hours of continuous play. This is made possible by the inclusion of the various types of RAM on a single custom chip. Furthermore, software for AGB can be developed using the C language, minimizing the cost of development equipment. This favorable development environment and the high level of freedom of the system configuration allow one to build a profound world of play in which anyone can become absorbed. With its extremely high-performance computational and data processing capabilities as a foundation, AGB provides greater image and sound representation capabilities, making the pursuit of fun its essential aim. The purpose of this high level of performance is to bring unique game ideas fully to life. AGB is an innovation born from experience. While providing backwards compatibility with the enormous software resources available for the 100 million Game Boy units in use worldwide, it also breaks new ground for portable game devices. ©1999 - 2001 Nintendo of America Inc. 3 D.C.N. AGB-06-0001-002B4 AGB Programming Manual Revision History Revision History Version Date Description 0.3.6.2 12/21/1999 -Minor modification. ( Numbering for items: P81,P82,P149), (Reference to chapter removed) -Deleted 14.3 0.3.6.3 01/05/2000 -Minor modification. -Corrected BG Offset Registers diagrams -Corrected the diagrams of Registers for Setting the Direction Parameters of BG data. -Corrected diagram of the Sound 1 Duty Cycle. -Corrected the name of d05 bit for the DISPCNT Register. -Added the description of Bit map BG mode. -Corrected the SIO Timing Chart of Normal Serial Communication. -Changed the diagrams and descriptions of the Sound Control Registers. -Added the formula for calculating the number of OBJs that can be displayed on 1 line. 0.4.0 01/25/2000 -Changed specifications. *Changed CPU internal working RAM memory capacity, and created CPU external working RAM. *Changed the bit structures of DMA control registers. *Deleted Infrared Communication functions. *Created the interrupt IME register, and changed the bit structures of IE and IF registers. *Changed the number of colors that can be displayed to 32,768. *Changed the specifications of Normal Serial Communication (Bit width, communication speed) *Changed the specifications of Multi SIO Communication (UART system). *Changed the center coordinate of OBJ Rotation to dot boundary. *Added UART system communication function. 02/09/2000 -Added the Complete Block Diagram. 0.4.1 02/22/2000 -Modified the description of Direct Sounds, and corrected register 02/24/2000 R bit structure. 02/25/2000 -Added the PWM sampling cycle control function. -Changed the method to specify OBJ size. -Corrected misprints in the communication control register. 0.4.1.1 03/08/2000 -Added the description of ROM registration data. 03/10/2000 -Improved the description of interrupt and multiple interrupt process. 03/10/2000 -Improved the description of system call and multiple system call process. 0.4.1.2 04/06/2000 -Added the description of UART system communication. ©1999 - 2001 Nintendo of America Inc. 4 D.C.N. AGB-06-0001-002B4 AGB Programming Manual Revision History Version Date Description 0.4.1.3 05/08/2000 -Corrected [Sound 1 Usage Notes]. -In 1) Normal Communication of Communication Functions, mentioned not to use a cable. 05/16/2000 -Added the diagram of Multi Player AGB Game Link cable connection. 05/25/2000 -Changed the diagram in System-Allocated Area in Working RAM, and deleted “(Tentative)”. -Revised ROM registration data. -Corrected the description of internal shift clock of normal SIO control register. -Newly added the description of “AGB Game Link cable” in the chapter of Communication Functions. -Corrected Overview of Screen Sizes for Text BG Screens in “Rendering Functions”. 0.4.1.4 05/29/2000 -Added the description for the device type of ROM Registration Data. -Corrected “Fault Function” to ”Halt Function.” -Corrected the diagram of “AGB Game Link cable.” 0.4.1.5 06/01/2000 -Corrected the attributes of timer setting values register from W to R/W. -Added one sentence to 1) of 15.2.1. Normal Interrupt and 15.2.2. Multiple Interrupts respectively. -Emphasized the prohibition of use of cable for normal SIO communication. 0.4.1.6 06/26/2000 -Modified the connection diagram of the multi-play cable. -Added the transition diagram of the multi-play communication data. -Modified the description of "16-Bit Multi-play Communication". 0.4.1.7 08/10/2000 -Modified the description of an error flag for the multi=play control register. -Modified the description of a valid flag for all the DMA control registers. -Added the number of transfer when 0 is set for the DMA word count register. 0.4.1.8 10/16/2000 -Added cautions to the priority setting of OBJ. -Added a description and cautions to Sound 1,2,3, and 4. -Added the description to "Mapping of character data". -Revised the description in SIOCNT[d14] and [06] of UART communication register. -Revised the connection diagram of 16 bit multi-play communication. -Added a description to all sound operation modes of the sound control register. -Revised the itemized description of Chapter 10 "Sound". ©1999 - 2001 Nintendo of America Inc. 5 D.C.N. AGB-06-0001-002B4 AGB Programming Manual Revision History Version Date Description 1.0 12/01/2000 -Deleted the checksum of ROM registration data and revised the diagram. -Revised the diagram for "AGB Game Link Cable" in the "Communication Function". -Revised the number of DMG sold from tens of millions to a hundred million in the introduction of AGB. -Revised the hours you can play continuously from "about 20 hours" to "about 15 hours". -Revised the illustrations of the AGB hardware and the Multi Player AGB Game Link cable in the multi play communication diagram. -Added the description of the timing chart for normal SIO communication. -Added a caution in the DMA valid flag of all the DMA control registers. -Added a caution in the master start bit of the multi-play control register. -Revised the multi-play timing chart. -Revised the memory map for system reserve area in the work RAM. -Added a caution to "Communication Function". -Revised the first sentence in "UART Communication". Added "Relation between Data register, FIFO and Shift register". -Revised the expression of [Cautions] to a more specific expression [Cautions for ~~]. -Added a description of X coordinate and Y coordinate for OAM. Added the diagram to Y coordinate. -Revised the description of the pre-fetch buffer flag in the Game Pak memory wait control register. -Added cautions to the description of the input/output select flag in the R register of general communication. 1.01 2/01/2001 -Modified the description of pin 31 in the Game Pak bus. -Revised the cancel conditions for the Stop function in the power-down mode. -Added additional descriptions and cautions for the initialization flag of Sound 1. 1.02 2/13/2001 -Modified the description of "8-Bit/32-Bit Normal Communication Function" summary in "Communication" chapter. -Added a paragraph to "Selecting Communication Function" in "Communication" chapter. 1.04 3/1/2001 -Specified the method to control the OBJ display individually in the description of the double size flag and the rotation/scaling flag for OAM attribute 0. -Added the description of display synchronization DMA to DMA3. -Added the description of the DMA problem and how to avoid it at the end of the chapter on DMA. *Added the restrictions to the description of the repeat flag in DMA3. *Updated the timing chart and the cable connection diagram for the multi- play communication. *Revised the description of the normal serial communication cautions. ©1999 - 2001 Nintendo of America Inc. 6 D.C.N. AGB-06-0001-002B4 AGB Programming Manual Revision History 1.1 4/2/2001 - Changed the picture in the AGB introduction in the beginning paragraph.