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

The lower 16 bits are valid for access (value acquisition, clearing, setting) of the interrupt cause register and interrupt mask register.

 List
 Title

Function specifications

 Function

Get data transfer register pointer

 Function Name [-]

CDC_GetDataPtr

 No

9.1

Form
Uint32 * CDC_GetDataPtr (void)
input
none
output
none
Function value
Register pointer (address value)
function
Gets a pointer to the data transfer register (DATATRNS).

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

Registers must be accessed longword (32-bit) for CPU-based DMA transfers and software transfers. In other words, the data to be transferred is in longword (even word) units.
Data that has been accessed for a long word is stored in the order of upper word and lower word. When transferring odd-word data, the subword 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 ();

 List
 Title

Function specifications

 Function

Acquisition of interrupt cause register value

 Function Name [-]

CDC_GetHirqReq

 No

9.2

Form
Sint32 CDC_GetHirqReq (void)
input
none
output
none
Function value
Register value …… Refer to the data specification (Constant) for the bit name.
function
Acquires the value of the interrupt cause register (HIRQREQ).

 List
 Title

Function specifications

 Function

Clear interrupt factor register

 Function Name [-]

CDC_ClrHirqReq

 No

9.3

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

 List
 Title

Function specifications

 Function

Get interrupt mask register value

 Function Name [-]

CDC_GetHirqMsk

 No

9.4

Form
Sint32 CDC_GetHirqMsk (void)
input
none
output
none
Function value
Register value …… Refer to the data specification (Constant) for the bit name.
function
Gets the value of the interrupt mask register (HIRQMSK).

 List
 Title

Function specifications

 Function

Interrupt mask register setting

 Function Name [-]

CDC_SetHirqMsk

 No

9.5

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

 List
 Title

Function specifications

 Function

Get MPEG register pointer

 Function Name [-]

CDC_GetMpegPtr

 No

9.6

Form
Uint32 * CDC_GetMpegPtr (void)
input
none
output
none
Function value
Register pointer (address value)
function
Acquires a pointer to the MPEG register (MPEGRGB).
The access method of the MPEG register is the same as that of the data transfer register. For notes, etc., refer to Obtaining the data transfer register pointer ( CDC_GetDataPtr).

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