Japanese
PROGRAMMER'S GUIDECD communication I/F (CD part)
Back | ■
CD communication interface user's manual (CD part)

Function details-9


8.2.9 Register access

When accessing the interrupt factor register and interrupt mask register (obtaining, clearing, and setting values), the lower 16 bits are valid.

 one
View
table
 Title

function specification

 Function

Obtain data transfer register pointer

 Function Name[--]

CDC_GetDataPtr

 No

9.1

Format
Uint32 *CDC_GetDataPtr(void)
input
none
output
none
function value
Register pointer (address value)
function
Get the data transfer register (DATATRNS) pointer.

(1) Access method
There are three types of data transfer methods for data transfer registers and MPEG registers:

DMA transfers by the CPU and software transfers require longword (32-bit) access to registers. In other words, the data to be transferred is in units of long words (even words).
Longword accessed data is stored in the order of upper word and lower word. When transferring odd words of data, the lower word of the last longword access is undefined.

(2) volatile declaration
When assigning a pointer to a variable, a volatile declaration is required to prevent incorrect optimization.

example
volatile Uint32 *ptr;
ptr=CDC_GetDataPtr();

 one
View
table
 Title

function specification

 Function

Obtaining interrupt factor register value

 Function Name[--]

CDC_GetHirqReq

 No

9.2

Format
Sint32 CDC_GetHirqReq(void)
input
none
output
none
function value
Register value...See data specifications (Constant) for bit names.
function
Get the value of the interrupt factor register (HIRQREQ).

 one
View
table
 Title

function specification

 Function

Clearing the interrupt factor register

 Function Name[--]

CDC_ClrHirqReq

 No

9.3

Format
void CDC_ClrHirqReq(Sint32 bitpat)
input
bitpat: Clear bit pattern (set the bits you want to clear to 0, and set the others to 1)
output
none
function value
none
function
Clears the interrupt factor register according to the specified bit pattern.
remarks
The CMOK flag in the interrupt factor register is used by the CD communication interface, so clearing it by the application program is prohibited. Also, the DCHG flag is cleared by the BOOT ROM when checking the disk, so do not clear it when initializing the application program. (As an exception, it can be cleared only during DCHG interrupt processing.)

 one
View
table
 Title

function specification

 Function

Obtain interrupt mask register value

 Function Name[--]

CDC_GetHirqMsk

 No

9.4

Format
Sint32 CDC_GetHirqMsk(void)
input
none
output
none
function value
Register value...See data specifications (Constant) for bit names.
function
Get the value of the interrupt mask register (HIRQMSK).

 one
View
table
 Title

function specification

 Function

Setting the interrupt mask register

 Function Name[--]

CDC_SetHirqMsk

 No

9.5

Format
void CDC_SetHirqMsk(Sint32 bitpat)
input
bitpat: Mask bit pattern (set the bits you want to mask to 0, and set the others to 1)
output
none
function value
none
function
Sets the interrupt mask register according to the specified bit pattern.

 one
View
table
 Title

function specification

 Function

Obtain MPEG register pointer

 Function Name[--]

CDC_GetMpegPtr

 No

9.6

Format
Uint32 *CDC_GetMpegPtr(void)
input
none
output
none
function value
Register pointer (address value)
function
Gets the pointer to the MPEG register (MPEGRGB).
The MPEG register is accessed in the same way as the data transfer register. For precautions, see Obtaining the data transfer register pointer ( CDC_GetDataPtr ).

Back | ■
PROGRAMMER'S GUIDECD communication I/F (CD part)
Copyright SEGA ENTERPRISES, LTD., 1997