PROGRAMMER'S GUIDEDMA library
■ | Advance
DMA library

1. 1. guide


1.1 Purpose

DMA performs data transfer processing on behalf of the CPU in order to reduce the load on the CPU. This library provides the basic functionality of DMA.

1.2 Overview

DMA is provided on two devices, the CPU and the SCU. The library supports both.
The function provided high-level and low-level libraries for each of the CPU and SCU.

The contents of the high-level and low-level functions are explained below.

The main differences between CPU and SCU applications are described below (see the hardware manual for details).

1.3 Precautions for use

1.4 Calling sequence

The following is the calling sequence for DMA transfers.

#define SCLA_CFRAME ((void *) 0x5e60000) / * VDP2 VRAM scroll factor address * /
#define K_NUM (424) / * Scroll coefficient data size * /
Uint32 scl_k_data [512]; / * Scroll coefficient data area of work RAM * /
...
void copyToData ()
{
     DMA_ScuCopyMem (SCLA_CFRAME, scl_k_data, K_NUM);
/ * Data transfer from work RAM to VDP2 VRAM * /
     ...
     if (DMA_ScuResult () == DMA_SCU_BUSY) {/ * Check the end of DMA_ScuCopyMem () * /
     ...
     }
}


■ | Advance
PROGRAMMER'S GUIDEDMA library
Copyright SEGA ENTERPRISES, LTD., 1997