Manual
Page 1
THIS DOCUMENT IS PRINTED ON DIN A5 SIZE PAPER (148mm x 210mm)! Version: 1.01 by Nintendo CO., LTD. Note: Game BoyTM, Game Boy PocketTM, Super Game BoyTM and Game Boy ColorTM are registered trademarks of Anthrox, GABY, Marat Fayzullin, Pascal Felber, Paul Robson, Martin Korth, kOOPa, Bowser Contents: Assembly Language Commands, Timings and Opcodes, and everything you always wanted to know about GB but were afraid to 1999 by DP Game BoyTM CPU Manual Sources by: Pan of Nintendo CO., LTD. © 1989 to ask.
THIS DOCUMENT IS PRINTED ON DIN A5 SIZE PAPER (148mm x 210mm)! Version: 1.01 by Nintendo CO., LTD. Note: Game BoyTM, Game Boy PocketTM, Super Game BoyTM and Game Boy ColorTM are registered trademarks of Anthrox, GABY, Marat Fayzullin, Pascal Felber, Paul Robson, Martin Korth, kOOPa, Bowser Contents: Assembly Language Commands, Timings and Opcodes, and everything you always wanted to know about GB but were afraid to 1999 by DP Game BoyTM CPU Manual Sources by: Pan of Nintendo CO., LTD. © 1989 to ask.
Manual
Page 2
... 2.5.2. Power Up Sequence 17 2.7.2. Stop Mode 19 2.7.3. Low-Power Mode 19 2.8. Sprite RAM Bug 27 2.9. Timer 30 2.11. Foreword Game BoyTM CPU Manual Table of 8kB Internal RAM 9 2.5.3. Terms 5 2.3. Game Boy Specs 6 2.4. Echo of Contents 1. Tiles 22 2.8.2. Interrupts 32 2.12.1. Interrupt Descriptions 34 2.13. Hardware specifications 5 2.1. Forward 5...2.8.3. Special Registers 35 2.13.1. 1. Foreword 4 2. Reserved Memory Locations 10 2.6. Special modi 17 2.7.1. Video 22 2.8.1. Serial I /O 9 2.5.4. I/O Registers 35 Page 2 V 1.01
... 2.5.2. Power Up Sequence 17 2.7.2. Stop Mode 19 2.7.3. Low-Power Mode 19 2.8. Sprite RAM Bug 27 2.9. Timer 30 2.11. Foreword Game BoyTM CPU Manual Table of 8kB Internal RAM 9 2.5.3. Terms 5 2.3. Game Boy Specs 6 2.4. Echo of Contents 1. Tiles 22 2.8.2. Interrupts 32 2.12.1. Interrupt Descriptions 34 2.13. Hardware specifications 5 2.1. Forward 5...2.8.3. Special Registers 35 2.13.1. 1. Foreword 4 2. Reserved Memory Locations 10 2.6. Special modi 17 2.7.1. Video 22 2.8.1. Serial I /O 9 2.5.4. I/O Registers 35 Page 2 V 1.01
Manual
Page 3
... Registers 61 3.2.1. Jumps 111 3.3.9. Rotates & Shifts 99 3.3.7. Calls 114 3.3.10. Main Action Window 121 4.5. Appendix A 134 5.1. Game Boy command overview 61 3.1. Stack Pointer 63 3.3. Foreword 119 4.2. SGB Border 120 4.4. Foreword 61 3.2. Program Counter 63 3.2.4. Super Game Boy commands 119 4.1. Commands 122 5. Commands 65 3.3.1. 8-Bit Loads 65 3.3.2. 16-Bit Loads 76 3.3.3. 8-Bit ALU 80 3.3.4. 16...
... Registers 61 3.2.1. Jumps 111 3.3.9. Rotates & Shifts 99 3.3.7. Calls 114 3.3.10. Main Action Window 121 4.5. Appendix A 134 5.1. Game Boy command overview 61 3.1. Stack Pointer 63 3.3. Foreword 119 4.2. SGB Border 120 4.4. Foreword 61 3.2. Program Counter 63 3.2.4. Super Game Boy commands 119 4.1. Commands 122 5. Commands 65 3.3.1. 8-Bit Loads 65 3.3.2. 16-Bit Loads 76 3.3.3. 8-Bit ALU 80 3.3.4. 16...
Manual
Page 4
...for the hardware. DP Page 4 V 1.01 1. Also, a timing diagram of three major parts. Foreword This Document was ment to be found in paragraph 1. The third is a summary of ASM commands is a mixture of several documents from 'Game Boy Assembly Language Primer (GALP) V1.0'by Pan ..., Martin Korth, kOOPa. It was designed to start right off coding for Nintendo Super Game Boy speciffic programming by kOOPa and Bowser. The documents consists of a typical read and write operation on a real Game Boy can be a complete handbook to help you will be found in the Appendix...
...for the hardware. DP Page 4 V 1.01 1. Also, a timing diagram of three major parts. Foreword This Document was ment to be found in paragraph 1. The third is a summary of ASM commands is a mixture of several documents from 'Game Boy Assembly Language Primer (GALP) V1.0'by Pan ..., Martin Korth, kOOPa. It was designed to start right off coding for Nintendo Super Game Boy speciffic programming by kOOPa and Bowser. The documents consists of a typical read and write operation on a real Game Boy can be a complete handbook to help you will be found in the Appendix...
Manual
Page 5
... 2. Hardware specifications 2. Any reference to inform a user on the hand-held game machine known as Game Boy, manufactured and designed by DP Page 5 Terms GB = Original GameBoy (GameBoy Classic) GBP = GameBoy Pocket/GameBoy Light GBC = GameBoy Color SGB = Super GameBoy by Nintendo Co., LTD. Forward: The following was typed up for educational purposes and...
... 2. Hardware specifications 2. Any reference to inform a user on the hand-held game machine known as Game Boy, manufactured and designed by DP Page 5 Terms GB = Original GameBoy (GameBoy Classic) GBP = GameBoy Pocket/GameBoy Light GBC = GameBoy Color SGB = Super GameBoy by Nintendo Co., LTD. Forward: The following was typed up for educational purposes and...
Manual
Page 6
...# of an 8080 except there are no exchange instructions. Processor The GameBoy uses a computer chip similar to the Z80, some instructions Page 6 V 1.01 Game Boy Specs Game BoyTM CPU Manual 2.3. It contains all of the instructions of sprites: 40 • Max # sprites/line: 10 • Max sprite size: 8x16 ....17 Hz for SGB) • Sound: 4 channels with stereo sound • Power: DC6V 0.7W (DC3V 0.7W for GB Pocket) Nintendo documents describe the CPU & instructions speed in machine cycles while this document describes them in clock cycles. In many ways the processor is the ...
...# of an 8080 except there are no exchange instructions. Processor The GameBoy uses a computer chip similar to the Z80, some instructions Page 6 V 1.01 Game Boy Specs Game BoyTM CPU Manual 2.3. It contains all of the instructions of sprites: 40 • Max # sprites/line: 10 • Max sprite size: 8x16 ....17 Hz for SGB) • Sound: 4 channels with stereo sound • Power: DC6V 0.7W (DC3V 0.7W for GB Pocket) Nintendo documents describe the CPU & instructions speed in machine cycles while this document describes them in clock cycles. In many ways the processor is the ...
Manual
Page 21
... by DP Page 21 interrupted nop ; (See WARNING above.) ld a,(VblnkFlag) or a ; button inputs ; Below is suggested code for Game Boy programs: ; **** Main Game Loop **** Main: halt ; Clear V-Blank flag call call Controls Game ; The first HALT causes the second HALT to be repeated, which therefore causes the following command (=itself) to be repeated...
... by DP Page 21 interrupted nop ; (See WARNING above.) ld a,(VblnkFlag) or a ; button inputs ; Below is suggested code for Game Boy programs: ; **** Main Game Loop **** Main: halt ; Clear V-Blank flag call call Controls Game ; The first HALT causes the second HALT to be repeated, which therefore causes the following command (=itself) to be repeated...
Manual
Page 61
CPU Registers 3.2.1. The F register is indirectly accessible by the by pairing them up in the following manner: AF,BC,DE, & HL. Game BoyTM CPU Manual 3. It has eight 8-bit registers A,B,C,D,E,F,H,L and two 16bit registers SP & PC: 15..8 7..0 A F B C D E H L SP PC Some instructions, however, allow you to use the ... those trying to understand assembly language specific to the Intel 8080, Intel 8085, & Zilog Z80 microprocessors. Generally The GameBoy has instructions & registers similar to GameBoy. 3.2. Game Boy command overview 3.1. Game Boy command overview 3.
CPU Registers 3.2.1. The F register is indirectly accessible by the by pairing them up in the following manner: AF,BC,DE, & HL. Game BoyTM CPU Manual 3. It has eight 8-bit registers A,B,C,D,E,F,H,L and two 16bit registers SP & PC: 15..8 7..0 A F B C D E H L SP PC Some instructions, however, allow you to use the ... those trying to understand assembly language specific to the Intel 8080, Intel 8085, & Zilog Z80 microprocessors. Generally The GameBoy has instructions & registers similar to GameBoy. 3.2. Game Boy command overview 3.1. Game Boy command overview 3.
Manual
Page 62
...last math operation or if register A is used to the current stack position. 3.2.2. 3.2.1. Generally Game BoyTM CPU Manual programmer and is the smaller value when executing the CP instruction. Page 62 V 1.01 The PC, or Program Counter, register points to the next instruction to be executed in the... last math operation. • Carry Flag (C): This bit is set if a carry occurred from the lower nibble in the Game Boy memory.
...last math operation or if register A is used to the current stack position. 3.2.2. 3.2.1. Generally Game BoyTM CPU Manual programmer and is the smaller value when executing the CP instruction. Page 62 V 1.01 The PC, or Program Counter, register points to the next instruction to be executed in the... last math operation. • Carry Flag (C): This bit is set if a carry occurred from the lower nibble in the Game Boy memory.
Manual
Page 119
Super Game Boy commands 4. Foreword Super GameBoy Commands, Extracted by kOOPa, 15-Feb-98 Last updated by: Bowser, 13-June-98 Updates: Block Area mode ($...of the first byte represent the number of this document and contains what are preceded by DP Page 119 Unused bits in the SGB. Game BoyTM CPU Manual 4. As far as SGB onscreen colors are concerned there are several different types of the commands listed below are called the...to be set to 0. Most of palettes in a SGB command transfer should be sent. One type is the System color palette. Super Game Boy commands 4.1.
Super Game Boy commands 4. Foreword Super GameBoy Commands, Extracted by kOOPa, 15-Feb-98 Last updated by: Bowser, 13-June-98 Updates: Block Area mode ($...of the first byte represent the number of this document and contains what are preceded by DP Page 119 Unused bits in the SGB. Game BoyTM CPU Manual 4. As far as SGB onscreen colors are concerned there are several different types of the commands listed below are called the...to be set to 0. Most of palettes in a SGB command transfer should be sent. One type is the System color palette. Super Game Boy commands 4.1.