Describe constants, data types, access macros, etc. used in the MPEG communication interface.
| data | data name | number | |
|---|---|---|---|
| constant | Constant | 20.0 | |
| Status and MPEG report | Status & MPEG Report | 21.0 | |
| MPEG operation status | actst | 21.1 | |
| Operation section counter | vcnt | 21.2 | |
| Picture information | pict | 21.3 | |
| MPEG/Audio status | stat_a | 21.4 | |
| MPEG/Video status | stat_v | 21.5 | |
| MPEG interrupt factor flag | Intreq | 22.0 | |
| data type | 23.0 | ||
| MPEG status information | CdcMpStat | 23.1 | |
| time code | CdcMpTc | 23.2 | |
| MPEG decoder connection destination parameters | CdcMpCon | 23.3 | |
| MPEG stream parameters | CdcMpStm | 23.4 | |
| Screen special effect parameters | CdcMpVeff | 23.5 | |
one | Title | Data | Data Name | No |
| constant name | explanation |
|---|---|
| CDC_ERR_MP_COMU | The MPCM flag is not set to 1 when issuing the command. |
| constant name | explanation |
|---|---|
| CDC_MPSTF_CUR | Specifying the current connection destination/stream |
| CDC_MPSTF_NEXT | Specifying the next connection destination/stream |
| constant name | value | explanation | |||
|---|---|---|---|---|---|
| CDC_MPNT_NSX | 352 | NTSC | Ordinary | size | X direction |
| CDC_MPNT_NSY | 240 | Y direction | |||
| CDC_MPNT_NPX | 351 | Coordinate | X direction | ||
| CDC_MPNT_NPY | 239 | Y direction | |||
| CDC_MPNT_HSX | 704 | High-definition | size | X direction | |
| CDC_MPNT_HSY | 480 | Y direction | |||
| CDC_MPNT_HPX | 703 | Coordinate | X direction | ||
| CDC_MPNT_HPY | 479 | Y direction | |||
| CDC_MPPL_NSX | 352 | PAL | Ordinary | size | X direction |
| CDC_MPPL_NSY | 288 | Y direction | |||
| CDC_MPPL_NPX | 351 | Coordinate | X direction | ||
| CDC_MPPL_NPY | 287 | Y direction | |||
| CDC_MPPL_HSX | 704 | High-definition | size | X direction | |
| CDC_MPPL_HSY | 576 | Y direction | |||
| CDC_MPPL_HPX | 703 | Coordinate | X direction | ||
| CDC_MPPL_HPY | 575 | Y direction | |||
one | Title | Data | Data Name | No |
byte 0 1 2 3 4 5 6 7
+--------+--------+--------+--------+---------+--------+---------+---------+
| Status | Report |
+--------+--------+--------+--------+---------+--------+---------+---------+
MPEG Report
byte 1 2 3 4 5 6
+--------+--------+--------+--------+--------+--------+
| actst | vcnt | pict | stat_a | stat_v |
+--------+--------+--------+--------+--------+--------+
actst: MPEG operation status
vcnt: Operation interval (VSYNC) counter
pict: Picture information
stat_a: MPEG/Audio status
stat_v: MPEG/Video status
one | Title | Data | Data Name | No |
bit 7 6 5 4 3 2 1 0
┌─┬─┬─┬─┬─┬─┬─┬─┐
actst│−│ │ │ │ Initial value: 19H
└─┴─┴─┴─┴─┴─┴─┴─┘
│ │ │
│ │ └────MPEG/Video operating status
│ │
│ └────────MPEG decoding status
│ CDC_MPASTD_STOP 1: Stopped 0: Decoding
│
└────────────MPEG/Audio operating status
| MPEG/Video operating status | MPEG/Audio operating status | explanation | ||
|---|---|---|---|---|
| constant name | value | constant name | value | |
| CDC_MPSTV_STOP | 01H | CDC_MPSTA STOP | 10H | Stop |
| CDC_MPSTV_PREP1 | 02H | CDC_MPSTA PREP1 | 20H | Preparation 1 |
| CDC_MPSTV_PREP2 | 03H | CDC_MPSTA PREP2 | 30H | Preparation 2 |
| CDC_MPSTV_TRNS | 04H | CDC_MPSTA TRNS | 40H | Transfer (playback) |
| CDC_MPSTV_CHNG | 05H | CDC_MPSTA CHNG | 50H | switching |
| CDC_MPSTV_RCV | 06H | CDC_MPSTA RCV | 60H | Resurrection process |
Input picture start code
┌───────┐────────────→┌────────┐
Initial │Stopped│ │Decoding│
state └───────┘←────────────└────────┘
Sequence end input
one | Title | Data | Data Name | No |
one | Title | Data | Data Name | No |
bit 7 6 5 4 3 2 1 0
┌─┬─┬─┬─┬─┬─┬─┬─┐
pict│−│−│−│−│−│ │ Initial value: 00H
└─┴─┴─┴─┴─┴─┴─┴─┘
└──Picture type being decoded
| constant name | explanation |
|---|---|
| CDC_MPPICT_I | I picture |
| CDC_MPPICT_P | P picture |
| CDC_MPPICT_B | B picture |
| CDC_MPPICT_D | D picture |
one | Title | Data | Data Name | No |
bit 7 6 5 4 3 2 1 0
┌─┬─┬─┬─┬─┬─┬─┬─┐
stat_a│ │ │ │ │ │−│−│ │
└┬┴┬┴┬┴┬┴┬┴─┴─┴┬┘
│ │ │ │ │ └─CDC_MPSTA_DEC 1: Decoding in progress
│ │ │ │ └───────CDC_MPSTA_ILG 1: Audio illegal
│ │ │ └─────────CDC_MPSTA_BEMPTY 1: Buffer section is empty
│ │ └───────────CDC_MPSTA_ERR 1: Audio error occurred
│ └─────────────CDC_MPSTA_OUTL 1: Left channel is being output
└───────────────CDC_MPSTA_OUTR 1: Right channel is being output
| bit | flag | explanation |
|---|---|---|
| 0 | Audio decoding operation | Indicates that the audio decoder is operating. (0: Stopped) |
| 3 | audio illegal | Indicates that there is an abnormality in the MPEG/Audio layer, sampling frequency, or bit rate. |
| 4 | audio buffer section empty | Indicates that the audio buffer section is empty and there is no more stream data for audio playback. |
| 5 | audio error | Indicates that an audio-related error has occurred. The error cause can be obtained using the CDC_MpGetInt function. |
| 6 | left channel output | Indicates that the left channel is being output. (0: muted) |
| 7 | right channel output | Indicates that the right channel is being output. (0: muted) |
one | Title | Data | Data Name | No |
bit 7 6 5 4 3 2 1 0
┌─┬─┬─┬─┬─┬─┬─┬─┐
stat_v│ │ │ │ │ │ │ │ │
└┬┴┬┴┬┴┬┴┬┴┬┴┬┴┬┘
│ │ │ │ │ │ │ └─CDC_MPSTV_DEC 1: Decoding in progress
│ │ │ │ │ │ └───CDC_MPSTV_DISP 1: Picture displayed
│ │ │ │ │ └─────CDC_MPS TV_PAUSE 1: Pausing
│ │ │ │ └───────CDC_MPSTV_FREEZE 1: Freezing
│ │ │ └─────────CDC_MPSTV_LSTPIC 1: Displaying the last picture
│ │ └───────────CDC_MPSTV_FIELD 1: Odd field
│ └─────────────CDC_MPSTV_UPDPIC 1: Picture updated
└───────────────CDC_MPSTV_ERR 1: Video error occurred
bit 15 13 11 9
14 12 10 8
┌─┬─┬─┬─┬─┬─┬─┬─┐
stat_v│ │−│−│ │ │−│−│ │
└┬┴─┴─┴┬┴┬┴─┴─┴┬┘
│ │ │ └─CDC_MPSTV_RDY 1: Ready for output
│ │ └───────CDC_MPSTV_1STPIC 1: Displaying first picture
│ └─────────CDC_MPSTV_BEMPTY 1: Buffer section is empty
└───────────────Undefined
| bit | flag | explanation |
|---|---|---|
| 0 | Video decoding operation | Indicates that the video decoder is operating. (0: Stopped) When this flag is 1, if there is an empty frame bank, the decoder performs decoding using that bank. |
| 1 | picture display | Indicates that a decoded picture is being displayed. |
| 2 | Pause | Indicates that the video decoder is paused. |
| 3 | Freeze | Indicates that the video decoder is frozen. |
| 4 | Final picture display | Indicates that the currently displayed picture is the last picture of the stream. |
| 5 | odd field (Frame synchronization signal) | Indicates that an odd field is being displayed. (1: even field) When outputting to VDP2, the frame starts with an odd field and consists of two fields. |
| 6 | Picture update | Indicates that the picture has been updated. Changes in units of 2 operation sections (VSYNC x 2 or CDC_MpOutDsync). It becomes 1 when the display is updated and when a picture is discarded in a frozen state. |
| 7 | video error | Indicates a video-related error. The error cause can be obtained using the CDC_MpGetInt function. |
| 8 | Ready for output | Indicates that the image can now be output. It becomes 1 when the number of decoded frame banks becomes two (I, P). When decoding is started in the paused state, the output preparation completion flag becomes 1 without being displayed. If you move frame by frame in this state, the first image will be output immediately. |
| 11 | First picture display | Indicates that the currently displayed picture is the first picture of the stream. "First" refers to the media or decoding order, not the display order. |
| 12 | Video buffer section empty | Indicates that the video buffer section is empty and there is no more stream data for video playback. |
one | Title | Data | Data Name | No |
MPEG interrupt factor flag
byte 0 1 2 3
┌─────────┬─────────┬─────────┬─────────┐
│ − │Audio │ Video │
│ │Interrupt│ Interrupt │
└─────────┴─────────┴─────────┴─────────┘
bit 7 6 5 4 3 2 1 0
┌─┬─┬─┬─┬─┬─┬─┬─┐
│ │ │ │ │ │ │ │ │ Initial value: 00H
└┬┴┬┴┬┴┬┴┬┴┬┴┬┴┬┘
│ │ │ │ │ │ │ └─CDC_MPINT_VSRDY 1: V stream ready
│ │ │ │ │ │ └───CDC_MPINT_VSCHG 1: V stream switching complete
│ │ │ │ │ └─────CDC_MPINT_VORDY 1: Video output ready
│ │ │ │ └───────CDC_MPINT_VOSTRT 1: Start video output
│ │ │ └─────────CDC_MPINT_VDERR 1: Video decoding error
│ │ └───────────CDC_MPINT_VSERR 1: V stream data error
│ └─────────────CDC_MPINT_VBERR 1: V buffer partition connection error
└───────────────CDC_MPINT_VNERR 1: Next V stream data error
bit 15 13 11 9
14 12 10 8
┌─┬─┬─┬─┬─┬─┬─┬─┐
│ │ │ │ │ │ │ │ │ Initial value: 00H
└┬┴┬┴┬┴┬┴┬┴┬┴┬┴┬┘
│ │ │ │ │ │ │ └─CDC_MPINT_PSTRT 1: Picture start detection
│ │ │ │ │ │ └───CDC_MPINT_GSTRT 1: GOP start detection
│ │ │ │ │ └─────CDC_MPINT_SQEND 1: Sequence end detection
│ │ │ │ └───────CDC_MPINT_SQSTRT 1: Sequence start detection
│ │ │ └─────────CDC_MPINT_VTRG 1: V sector trigger bit detection
│ │ └───────────CDC_MPINT_VEOR 1: V sector EOR bit detection
│ └─────────────CDC_MPINT_ATRG 1: A sector trigger bit detection
└───────────────CDC_MPINT_AEOR 1: A sector EOR bit detection
bit 23 21 19 17
22 20 18 16
┌─┬─┬─┬─┬─┬─┬─┬─┐
│ │ │ │ │ │ │ │ │ Initial value: 00H
└┬┴┬┴┬┴┬┴┬┴┬┴┬┴┬┘
│ │ │ │ │ │ │ └─CDC_MPINT_ASRDY 1: A stream ready
│ │ │ │ │ │ └───CDC_MPINT_ASCHG 1: A stream switching complete
│ │ │ │ │ └─────CDC_MPINT_AORDY 1: Audio output ready
│ │ │ │ └───────CDC_MPINT_AOSTRT 1: Start audio output
│ │ │ └─────────CDC_MPINT_ADERR 1: Audio decoding error
│ │ └───────────CDC_MPINT_ASERR 1: A stream data error
│ └─────────────CDC_MPINT_ABERR 1: A buffer partition connection error
└───────────────CDC_MPINT_ANERR 1: Next A stream data error
one | Title | Data | Data Name | No |
| access macro | mold | explanation |
|---|---|---|
| CDC_MPSTAT_STS(mpstat) | Uint8 | Status (see CD part) |
| CDC_MPSTAT_AST(mpstat) | Uint8 | MPEG operation status |
| CDC_MPSTAT_VCNT(mpstat) | Uint16 | Operating interval (VSYNC) counter |
| CDC_MPSTAT_PICT(mpstat) | Uint8 | Picture information |
| CDC_MPSTAT_STA(mpstat) | Uint8 | MPEG/Audio status |
| CDC_MPSTAT_STV(mpstat) | Uint16 | MPEG/Video status |
| access macro | explanation |
|---|---|
| CDC_MPGET_STC(mpstat) | Get status code from MPEG status information |
| CDC_MPGET_ASTV(mpstat) | Obtain MPEG/Video operating status from MPEG status information |
| CDC_MPGET_ASTA(mpstat) | Obtain MPEG/Audio operating status from MPEG status information |
one | Title | Data | Data Name | No |
| access macro | mold | explanation |
|---|---|---|
| CDC_MPTC_HOUR(mptc) | Uint8 | Time (0-23) |
| CDC_MPTC_MIN(mptc) | Uint8 | Minutes (0-59) |
| CDC_MPTC_SEC(mptc) | Uint8 | seconds (0-59) |
| CDC_MPTC_PIC(mptc) | Uint8 | Picture (0-63) |
one | Title | Data | Data Name | No |
| access macro | mold | explanation |
|---|---|---|
| CDC_MPCON_CMOD(mpcon) | Uint8 | connection mode |
| CDC_MPCON_LAY(mpcon) | Uint8 | Layer specification and picture search specification |
| CDC_MPCON_BN(mpcon) | Uint8 | buffer partition number |
bit 7 6 5 4 3 2 1 0
┌─┬─┬─┬─┬─┬─┬─┬─┐
│ │−│−│−│−│ │ │ │ Initial value: 00H Unchanged: CDC_PARA_NOCHG
└┬┴─┴─┴─┴─┴┬┴┬┴┬┘
│ │ │ └─CDC_MPCMOD_EOR 1: Switch by EOR detection
│ │ └───CDC_MPCMOD_SEC 1: Switch by SEC detection
│ └─────CDC_MPCMOD_DEL 1: Delete sectors within the partition
└────────────────1: Do not change settings 0: Change settings
bit 7 6 5 4 3 2 1 0
┌─┬─┬─┬─┬─┬─┬─┬─┐
│ │ │ │ │ │ │ │ Initial value: 00H Unchanged: CDC_PARA_NOCHG
└┬┴┬┴─┴─┴┬┴┬┴┬┴┬┘
│ │ │ │ │ │ └─CDC_MPCMOD_EOR 1: Switch by EOR detection
│ │ │ │ │ └───CDC_MPCMOD_SEC 1: Switch by SEC detection
│ │ │ │ └─────CDC_MPCMOD_DEL 1: Switch by sector within partition Erase
│ │ │ └───────CDC_MPCMOD_IGPTS 1: Do not identify PTS
│ │ └──────────Video decode buffer clearing method
│ │ 0 (00B): Do not clear
│ │ 1 (01B ): Clear VBV (CDC_MPCMOD_VCLR)
│ │ 2 (10B): Clear VBV+WBC (CDC_MPCMOD_VWCLR)
│ └─────────────CDC_MPCMOD_BEF (always specify 0 in GAME-CD)
└───────────────1: Do not change settings 0: Change the settings
| constant name | explanation |
|---|---|
| CDC_MPCMOD_EOR CDC_MPCMOD_SEC | Specify conditions for natural switching. The EOR bit/SEC (system end code) detection bits can be combined using OR conditions. If the next stream is unregistered, this condition becomes the termination condition. |
| CDC_MPCMOD_DEL | During decoding, sectors within the buffer section are erased. (0: keep) |
| CDC_MPCMOD_IGPTS | Transfer the sector to the decoder without identifying the PTS. Sectors without PTS can also be transferred. However, an inconsistency occurs in the synchronization of audio and video. |
| CDC_MPCMOD_VCLR CDC_MPCMOD_VWCLR | Specifies the method for clearing the video decoding buffer when connecting to the first stream. It is not a clear method when switching. Valid only when setting the current connection destination. |
| CDC_MPCMOD_BEF | The termination condition is determined before the rear aperture. Be sure to specify 0 for normal GAME-CD. When getting a value, 0 is always returned. (Video CD only) |
| access macro | mold | explanation |
|---|---|---|
| CDC_MPLAY_SYS | 00H | System layer...Initial value |
| CDC_MPLAY_AUDIO | 01H | video layer |
bit 7 6 5 4 3 2 1 0
┌─┬─┬─┬─┬─┬─┬─┬─┐
│ │−│−│−│−│−│ │ Initial value: 00H
└─┴─┴─┴─┴─┴─┴─┴┬┘
│ └─Layer specification
└──────────────Picture search specification
| constant name | value | explanation |
|---|---|---|
| CDC_MPLAY_SYS | 00H | System layer...Initial value |
| CDC_MPLAY_VIDEO | 01H | video layer |
| constant name | value | explanation |
|---|---|---|
| CDC_MPSRCH_OFF | 00H | Do not search for pictures...Initial value |
| CDC_MPSRCH_VIDEO | 80H | Do a picture search |
| CDC_MPSRCH_AV | C0H | Discard audio data according to picture search |
| stream | Cancellable state | irrevocable condition |
|---|---|---|
| starting stream | Stop, Preparation 1, Preparation 2 | Transfer (play), switch, restore |
| Next stream | Stop, Preparation 1, Preparation 2, Transfer | switching |
one | Title | Data | Data Name | No |
| constant name | value | explanation |
|---|---|---|
| CDC_MPSTM_SMOD(mpstm) | Uint8 | stream mode |
| CDC_MPSTM_ID(mpstm) | Uint8 | Stream number (stream ID) |
| CDC_MPSTM_CN(mpstm) | Uint8 | channel number |
bit 7 6 5 4 3 2 1 0
┌─┬─┬─┬─┬─┬─┬─┬─┐
│ │−│ │ │−│−│ │ │ Initial value: 00H Unchanged: CDC_PARA_NOCHG
└┬┴─┴┬┴┬┴─┴─┴┬┴┬┘
│ │ │ │ └─CDC_MPSMOD_SNSET 1: Set the stream number
│ │ │ └───CDC_MPSMOD_SNIDF 1: Identify the stream number
│ │ └─────────CDC_MPSMOD_CNSET 1: Set the channel number Do
│ └───────────CDC_MPSMOD_CNIDF 1: Identify the channel number
└───────────────1: Do not change the settings 0: Change
one | Title | Data | Data Name | No |
| constant name | value | explanation |
|---|---|---|
| CDC_MPVEF_ITP(mpvef) | Uint8 | Interpolation mode |
| CDC_MPVEF_TRP(mpvef) | Uint8 | transparent bit mode |
| CDC_MPVEF_MOZH(mpvef) | Uint8 | Horizontal mosaic mode |
| CDC_MPVEF_MOZV(mpvef) | Uint8 | Vertical mosaic mode |
| CDC_MPVEF_SOFTH(mpvef) | Uint8 | horizontal blur mode |
| CDC_MPVEF_SOFTV(mpvef) | Uint8 | Vertical blur mode |
bit 7 6 5 4 3 2 1 0
┌─┬─┬─┬─┬─┬─┬─┬─┐
│ │−│−│−│ │ │ │ │ Initial value: 00H Unchanged: CDC_PARA_NOCHG
└┬┴─┴─┴─┴┬┴┬┴┬┴┬┘
│ │ │ │ └─CDC_MPITP_YH 1: Perform horizontal interpolation of Y
│ │ │ └───CDC_MPITP_CH 1: Perform horizontal interpolation of C
│ │ └─────CDC_MPITP_YV 1: Perform vertical interpolation of Y
│ └───────CDC_MPITP_CV 1: Perform vertical interpolation of C
└───────────────1: Do not change settings 0: Change
bit 7 6 5 4 3 2 1 0
┌─┬─┬─┬─┬─┬─┬─┬─┐
│ │−│−│−│−│ │ │ Initial value: 00H Unchanged: CDC_PARA_NOCHG
└┬┴─┴─┴─┴─┴┬┴─┴─┘
│ │ │
│ │ └──Brightness level
│ └─────CDC_MPTRP_MAG 1: Enlarge the transparent area
└─────────────────1: Do not change settings 0: Change
| constant name | value | explanation |
|---|---|---|
| CDC_MPTRP_DFL | 00H | Normal (no transparent bit processing) |
| CDC_MPTRP_64 | 01H | brightness 64 |
| CDC_MPTRP_96 | 02H | brightness 96 |
| CDC_MPTRP_128 | 03H | brightness 128 |
| value | explanation |
|---|---|
| 00H | Normal (no mosaic applied)...Initial value |
| 01H~0AH(n)00H | 2 times the nth power (2,4,8,16,32,64,128,256,512,1024 times) |
| FFH | Do not change settings (CDC_PARA_NOCHG) |
bit 7 6 5 4 3 2 1 0
┌─┬─┬─┬─┬─┬─┬─┬─┐
│ │−│−│−│−│−│−│ │ Initial value: 00H Unchanged: CDC_PARA_NOCHG
└┬┴─┴─┴─┴─┴─┴─┴┬┘
│ └─CDC_MPSOFT_ON 1: Blur
└───────────────1: Do not change settings 0: Change
★ PROGRAMMER'S GUIDE ★ CD communication I/F (MPEG part)