Japanese
PROGRAMMER'S GUIDEMPEG library
Back | ■
MPEG library

Appendix A

A.1 Supplementary information


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


1. Precautions for use

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

(2) Restrictions on the use of MPST flag
If the application clears the MPST flag or sets the MPEG interrupt mask, 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 default transfer functions in host transfer mode
When using the default transfer function, the MPEG library uses the DMA library to launch SCU-DMA. The level used is 0.
Therefore, you must enable level 0-DMA interrupts by running the INT_ChgMsk function as follows:
(Please refer to the DMA/interrupt related documentation for details.)

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

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

(5) Precautions when using SCU-DMA
Since A-Bus access is prohibited during SCU-DMA transfer, use of all MPEG library functions is prohibited. Please 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 within interrupt processing.


2. How to set MPEG audio output

To play MPEG audio and actually output audio, you need 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 CD-DA.

(1) SCSP settings
There are three methods to configure SCSP:

  1. Configure directly on 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: In practice, set an upper limit on 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 technical information below for the transmission level.

Reference
SEGASATURN Developer's Information STN-29
" About CD-DA volume settings "


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