★ PROGRAMMER'S GUIDE ★ CD communication I / F (MPEG part)Describe constants, data types, access macros, etc. used in the MPEG communication interface.
| data | Data name | number | |
|---|---|---|---|
| constant | Constant | 20.0 | |
| Status and MPEG reports | Status & MPEG Report | 21.0 | |
| MPEG operation status | actst | 21.1 | |
| Operating interval 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 | |
| Timecode | CdcMpTc | 23.2 | |
| MPEG decoder connection destination parameter | CdcMpCon | 23.3 | |
| MPEG stream parameters | CdcMpStm | 23.4 | |
| Screen special effects parameters | CdcMpVeff | 23.5 | |
List | Title | Data | Data Name | No |
| Constant name | explanation |
|---|---|
| CDC_ERR_MP_COMU | The MPCM flag is not set to 1 when the command is issued. |
| 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 | Usual | 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 | Usual | 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 | |||
List | 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 List | 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: Stop 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 processing |
Picture start code input ┌─────┐──────────── → ┌─────┐ Initial state │ Stopped │ │ Decoding │ └─────┘ ← ────────────└─────┘ Sequence end input
List | Title | Data | Data Name | No |
List | 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 |
List | Title | Data | Data Name | No |
bit 7 6 5 4 3 2 1 0
┌─┬─┬─┬─┬─┬─┬─┬─┐
stat_a │ │ │ │ │ │ │ − │ − │ │
└┬┴┬┴┬┴┬┴┬┴─┴─┴┬┘
│ │ │ │ │ └─CDC_MPSTA_DEC 1: Decoding operation │ │ │ │ └─────── CDC_MPSTA_ILG 1: Audio illegal │ │ │ └───────── │ │ └─────────── CDC_MPSTA_ERR 1: Audio error occurred │ └───────────── CDC_MPSTA_OUTL 1: Left channel output └─────── ──────── CDC_MPSTA_OUTR 1: Right channel 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, and bit rate. |
| 4 | Audio buffer partition empty | Indicates that the audio buffer partition is empty and there is no stream data for audio playback. |
| 5 | Audio error | Indicates an audio-related error. The error cause can be obtained by the CDC_MpGetInt function. |
| 6 | Left channel output | Indicates that the left channel is being output. (0: Mute) |
| 7 | Right channel output | Indicates that the right channel is being output. (0: Mute) |
List | Title | Data | Data Name | No |
bit 7 6 5 4 3 2 1 0
┌─┬─┬─┬─┬─┬─┬─┬─┐
stat_v │ │ │ │ │ │ │ │ │ │ │
└┬┴┬┴┬┴┬┴┬┴┬┴┬┴┬┘
│ │ │ │ │ | │ └─────── CDC_MPSTV_FREEZE 1: Freezing │ │ │ │ └───────── CDC_MPSTV_LSTPIC 1: Final picture display │ │ └─────────── CDC_MPSTV_FIELD 1 : Odd field │ └───────────── CDC_MPSTV_UPDPIC 1: Picture updated └─────────────── CDC_MPSTV_ERR 1: Video error occurred bit 15 14 13 12 11 10 9 8
┌─┬─┬─┬─┬─┬─┬─┬─┐
stat_v │ │ − │ − │ │ │ − │ − │ │
└┬┴─┴─┴┬┴┬┴─┴─┴┬┘
│ │ │ └─ CDC_MPSTV_RDY 1: Ready for output │ │ └─────── CDC_MPSTV_1STPIC 1: Displaying the first picture ──────────── Indefinite| bit | flag | explanation |
|---|---|---|
| 0 | Video decoding operation | Indicates that the video decoder is operating. (0: Stopped) When this flag is 1, if there is a free frame bank, the decoder decodes in that bank. |
| 1 | Picture display | Indicates that the decoded picture is being displayed. |
| 2 | Pause | Indicates that the video decoder is paused. |
| 3 | Freeze | Indicates that the video decoder is freezing. |
| 4 | Final picture display | Indicates that the currently displayed picture is the last picture in the stream. |
| 5 | Odd field (frame sync signal) | Indicates that the odd field is being displayed. (1: Even field) When outputting to VDP2, the frame starts from an odd number field and becomes one frame with two fields. |
| 6 | Picture update | Indicates that the picture has been updated. 2 Changes in operation section units (VSYNC x 2 or CDC_MpOutDsync). It becomes 1 when the display is updated and when the picture is discarded in the frozen state. |
| 7 | Video error | Indicates that a video-related error has occurred. The error cause can be obtained by the CDC_MpGetInt function. |
| 8 | Ready for output | Indicates that the image can be output. When the number of decoded frame banks is two (I, P), it becomes 1. When decoding is started in the paused state, the output ready flag is set to 1 without being displayed. As soon as frame advance is performed in this state, the first image is output. |
| 11 | First picture display | Indicates that the currently displayed picture is the first picture in the stream. The head is the order on the media or the decoding, not the display order. |
| 12 | Video buffer partition empty | Indicates that the video buffer partition is empty and there is no stream data for video playback. |
List | 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 completed │ │ │ │ │ └───── CDC_MPINT_VORDY 1: Ready for video output │ │ │ │ └─────── 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 14 13 12 11 10 10 9 ┌─┬─┬─┬─┬─┬─┬─┬─┐ │ │ │ │ │ │ │ │ │ │ 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: EOR bit detection of V sector │ └───────────── CDC_MPINT_ATRG 1: A sector trigger bit detection └─────────────── CDC_MPINT_AEOR 1: EOR bit detection of A sector
bit 23 22 21 20 21 20 19 18 ┌─┬─┬─┬─┬─┬─┬─┬─┐ │ │ │ │ │ │ │ │ │ │ Initial value: 00H └┬┴┬┴┬┴┬┴┬┴┬┴┬┴┬┘ │ │ │ │ │ │ │ │ └─ CDC_MPINT_ASRDY 1: A stream ready │ │ │ │ │ │ └─── CDC_MPINT_ASCHG 1: A stream switching completed │ │ │ │ │ └───── CDC_MPINT_AORDY 1: Ready for audio output │ │ │ │ └─────── 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
List | 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) | Get MPEG / Video operating status from MPEG status information |
| CDC_MPGET_ASTA (mpstat) | Get MPEG / Audio operating status from MPEG status information |
List | 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) |
List | 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: Erase sectors in partition ────── 1: Do not change the setting 0: Change
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_IGPTS 1: Do not identify PTS │ │ └────────── Video decode buffer clear 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 for GAME-CD) └─────────────── 1: Do not change the setting 0: Change
| Constant name | explanation |
|---|---|
| CDC_MPCMOD_EOR CDC_MPCMOD_SEC | Specify the conditions for natural switching. Each bit of EOR bit / SEC (system end code) detection can be combined according to the OR condition. If the next stream is not registered, this condition becomes the end condition. |
| CDC_MPCMOD_DEL | When decoding, the sectors in the buffer partition are erased. (0: Hold) |
| CDC_MPCMOD_IGPTS | Transfer sectors to the decoder without identifying the PTS. Sectors without PTS can also be transferred. However, inconsistency occurs in audio / video synchronization. |
| CDC_MPCMOD_VCLR CDC_MPCMOD_VWCLR | Specify the clear method of the video decode buffer when connecting to the starting stream. It is not a clear method when switching. It is valid only when setting the current connection destination. |
| CDC_MPCMOD_BEF | The end condition is judged in front of the rear throttle. Be sure to specify 0 for normal GAME-CD. 0 is always returned when the value is acquired. (For 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 designation └────────────── Picture search designation
| 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 perform picture search …… Initial value |
| CDC_MPSRCH_VIDEO | 80H | Do a picture search |
| CDC_MPSRCH_AV | C0H | Discard audio data according to picture search |
| stream | Cancelable state | Irreversible state |
|---|---|---|
| Starting stream | Stop, prepare 1, prepare 2 | Transfer (play), switch, revive |
| Next stream | Stop, prepare 1, prepare 2, transfer | switching |
List | 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 │ │ └────────── Do │ └─────────── CDC_MPSMOD_CNIDF 1: Identify the channel number └─────────────── 1: Do not change the setting 0: Change
List | 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: Horizontal interpolation of Y │ │ │ └─── CDC_MPITP_CH 1: Horizontal interpolation of C │ │ └───── CDC_MPITP_YV 1: Vertical interpolation of Y ─────── CDC_MPITP_CV 1: Perform vertical interpolation of C └─────────────── 1: Do not change the setting 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 the setting 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) …… Initial value |
| 01H ~ 0AH (n) 00H | 2 to the nth root (2,4,8,16,32,64,128,256,512,1024 times) |
| FFH | Do not change the setting (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 the setting 0: Change
★ PROGRAMMER'S GUIDE ★ CD communication I / F (MPEG part)