PROGRAMMER'S GUIDEMPEG library
Back | ■
MPEG library

Appendix A

A.1 Supplementary explanation


This is an addition to the main text of the manual.


1. 1. Precautions for use

(1) State of MPCM flag
When calling the functions of this library, make sure to call them with the MPCM flag ON.

(2) Restrictions on the use of MPST flags
If the MPST flag is cleared or the MPEG interrupt mask is set in the application, the operation of the following functions is not guaranteed.

(3) How to change the display window offset
If you want to change the display window offset in your application, use the CDC_MpSetWinDofs function of the CD communication interface.

(4) Restrictions on the use of the default transfer function in host transfer mode
If you use the default transfer function, the MPEG library uses the DMA library to invoke SCU-DMA. The level used is 0.
Therefore, it is necessary to execute the INT_ChgMsk function to enable level 0-DMA interrupts as follows.
(Refer to the DMA / interrupt related documents for details.)

/ * Allow SCU-DMA0 end interrupt * /
INT_ChgMsk (INT_MSK_DMA0, INT_MSK_NULL);

This process is executed in the GFS_Init function of the file system library (Ver.1.11 or later), so it is not usually necessary to execute it in the application.

(5) Precautions when using SCU-DMA
Since A-Bus access is prohibited during SCU-DMA transfer, the use of all MPEG library functions is prohibited. Note that the default transfer function also uses SCU-DMA.

(6) Function call by interrupt
The use of MPEG library functions other than MPG_CaptStat is prohibited in interrupt processing.


2. MPEG audio output setting method

In order to play MPEG audio and actually output audio, it is necessary to make the same settings for SCSP as for CD-DA.
In terms of hardware, the MPEG audio decoding result is output as the same signal as the CD-DA.

(1) SCSP settings
There are the following three methods for setting SCSP.

  1. Set directly to the hardware (SCSP).

    / * SCSP settings * /
    * ((Uint16 *) 0x25b00216) = 0x00ff;
    * ((Uint16 *) 0x25b00236) = 0x00ef;
    * ((Uint16 *) 0x25b00400) = 0x000f;
    

  2. Set using the Sound I / F library.

    / * Setting by SND I / F function * /
    / * Note: Actually, set the upper limit of the number of loops * /
    while (SND_SetCdDaLev (6, 6) == SND_RET_NSET);
    while (SND_SetCdDaPan (-15, 15) == SND_RET_NSET);
    while (SND_SetTlVl (15) == SND_RET_NSET);
    

(2) Sending level
Please refer to the following technical information for the transmission level.

Consideration
SEGASATURN Developer's Information STN-29
" Regarding the setting of CD-DA volume "


Back | ■
PROGRAMMER'S GUIDEMPEG library
Copyright SEGA ENTERPRISES, LTD., 1997