Nintendo GAME BOY Programming Manual page 67

Hide thumbs Also See for GAME BOY:
Table of Contents

Advertisement

Chapter 2: Display Functions
1.8.2 DMA Transfers in CGB
Using the Earlier DMA Transfer Method
This DMA method transfers only 40 x 32 bits of data from 0-DFFFh to OAM (FE00h-FE9Fh).
The transfer starting address can be specified as 0-DFFFh in increments of 100h. The transfer
method is the same as that used in DMG, but when data are transferred from 8000h-9FFFh
(LCD display RAM area), the data transferred are those in the bank specified by bit 0 of register
VBK. When transferring data from D000h-DFFFh (unit working RAM area), the data transferred
are those in the bank specified by the lower 3 bits of register SVBK.
Note:
When the CPU is operating at double-speed, the transfer rate is also doubled.
Using the New DMA Transfer Method
The DMA transfer method provided for DMG has been augmented in CGB with the following
DMA transfer functions.
1. Horizontal Blanking DMA Transfer
Sixteen bytes of data are automatically transferred from the user program area (0-7FFFh) and
external and unit working RAM area (A000h-DFFFh) to the LCD display RAM area (8000h-
9FFFh) during each horizontal blanking period. The number of lines transferred by DMA in a
horizontal blanking period can be specified as 1-128 by setting register HDMA5.
CPU
processing is halted during a DMA transfer period.
2. General-Purpose DMA Transfers
Between 16 and 2048 bytes (specified in 16-byte increments) are transferred from the user
program area (0-7FFFh) and external and unit working RAM area (A000h-DFFFh) to the LCD
display RAM area (8000h-9FFFh). As with horizontal blanking DMA transfers, CPU operation is
halted during the DMA transfer period.
The unit working RAM area (D000h-DFFFh) selected as the transfer source is the bank specified
by register SVBK.
The LCD display RAM area (8000h-9FFFh) selected as the transfer destination is the bank
specified by register VBK.
67

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents