★ PROGRAMMER'S GUIDE ★ CD communication I / F (MPEG part)Describe the function specifications of the MPEG communication interface.
[SR]: Update status and MPEG report ┐ [S-]: Update only the status ├─────┐ [-]: Do not update (do not issue command) ┘ │ │ << Example of function title >> ↓ ┌───────┬──────────┬────────────────┬────┐ │ Title │ Function │ Function Name [SR] │ No │ No │ │ Function specifications │ MPEG playback │ CDC_MpPlay │ 20.7 │ └───────┴──────────┴────────────────┴────┘
[L]: LONG WAIT can occur ┐
[S]: SHORT WAIT can occur ├──┐
[LS]: LONG, SHORT WAIT may occur ┘│
│
<< Example of function list >> ↓
┌──────────────┬──────────────────┬────┐
│ Decoding method setting │ CDC_MpSetDec [LS] │ 20.8 │
└──────────────┴──────────────────┴────┘
| function | Function name | number | |
|---|---|---|---|
| MPEG decoder | 20.0 | ||
| Get current MPEG status information | CDC_MpGetCurStat | 20.1 | |
| Get last MPEG status information | CDC_MpGetLastStat | 20.2 | |
| Get MPEG interrupt factor | CDC_MpGetInt | 20.3 | |
| MPEG interrupt mask setting | CDC_MpSetIntMsk | 20.4 | |
| MPEG decoder initialization | CDC_MpInit | 20.5 | |
| MPEG operation mode setting | CDC_MpSetMode [S] | 20.6 | |
| MPEG playback | CDC_MpPlay [S] | 20.7 | |
| Decoding method setting | CDC_MpSetDec [LS] | 20.8 | |
| Sending a decode sync signal | CDC_MpOutDsync [LS] | 20.9 | |
| Get video timecode | CDC_MpGetTc [S] | 20.10 | |
| -Getting the Dio time stamp | CDC_MpGetPts | 20.11 | |
| MPEG stream | 21.0 | ||
| Setting the connection destination of the MPEG decoder | CDC_MpSetCon [LS] | 21.1 | |
| Get the connection destination of the MPEG decoder | CDC_MpGetCon | 21.2 | |
| Switching the connection destination of the MPEG decoder | CDC_MpChgCon [LS] | 21.3 | |
| MPEG stream settings | CDC_MpSetStm [LS] | 21.4 | |
| Get MPEG stream | CDC_MpGetStm | 21.5 | |
| Get stream image size | CDC_MpGetPictSiz [S] | 21.6 | |
| MPEG display screen | 22.0 | ||
| Image display | CDC_MpDisp [S] | 22.1 | |
| Framebuffer window position setting | CDC_MpSetWinFpos | 22.2 | |
| Framebuffer window magnification setting | CDC_MpSetWinFrat | 22.3 | |
| Display window position setting | CDC_MpSetWinDpos | 22.4 | |
| Display window size setting | CDC_MpSetWinDsiz | 22.5 | |
| Display wind offset setting | CDC_MpSetWinDofs | 22.6 | |
| Border color settings | CDC_MpSetBcolor | 22.7 | |
| Fade settings | CDC_MpSetFade [S] | 22.8 | |
| Screen special effects settings | CDC_MpSetVeff [S] | 22.9 | |
| MPEG frame buffer | 23.0 | ||
| Extraction of image data | CDC_MpGetImg [L] | 23.1 | |
| Image data window position setting | CDC_MpSetImgPos | 23.2 | |
| Image data window size setting | CDC_MpSetImgSiz | 23.3 | |
| Loading from the image data window | CDC_MpReadImg | 23.4 | |
| Export to image data window | CDC_MpWriteImg | 23.5 | |
| MPEG sector buffer | 24.0 | ||
| Read sector from MPEG sector buffer | CDC_MpReadSct | 24.1 | |
| Exporting sectors to the MPEG sector buffer | CDC_MpWriteSct | 24.2 | |
| List | Title | Function | Function Name [SR] | No |
| List | Title | Function | Function Name [-] | No |
| List | Title | Function | Function Name [S-] | No |
| List | Title | Function | Function Name [SR] | No |
| List | Title | Function | Function Name [SR] | No |
| Constant name | explanation |
|---|---|
| OFF OFF | Stop …… Initial value |
| ON | Start-up |
| List | Title | Function | Function Name [SR] | No |
| Constant name | explanation |
|---|---|
| CDC_MPACT_NMOV | Video playback mode …… Initial value |
| CDC_MPACT_NSTL | Still image playback mode |
| CDC_MPACT_HMOV | High-definition video playback mode (not supported) |
| CDC_MPACT_HSTL | High-definition still image playback mode |
| CDC_MPACT_SBUF | MPEG sector buffer mode |
| CDC_PARA_NOCHG | Do not change settings |
| Constant name | explanation |
|---|---|
| CDC_MPDEC_VSYNC | Decoding by VSYNC synchronization …… Initial value |
| CDC_MPDEC_HOST | Decoding by host synchronization (DSYNC is sent at the instruction of the host) |
| CDC_PARA_NOCHG | Do not change settings |
| Constant name | explanation |
|---|---|
| CDC_MPOUT_VDP2 | Output to VDP2 …… Initial value |
| CDC_MPOUT_HOST | Output to host (extract from MPEG register) |
| CDC_PARA_NOCHG | Do not change settings |
bit 7 6 5 4 3 2 1 0 ┌─┬─┬─┬─┬─┬─┬─┬─┐ │ │ − │ − │ − │ − │ − │ │ │ Initial value: 00H Unchanged: CDC_PARA_NOCHG └┬┴─┴─┴─┴─┴─┴┬┴┬┘ │ │ └─1: Non-interlaced 0: Interlaced │ └─── 1: PAL 0: NTSC └─────────────── 1: Do not change the setting 0: Change
| List | Title | Function | Function Name [SR] | No |
| plymod | : MPEG playback mode |
| tmod_a | : MPEG / Audio transfer mode |
| tmod_v | : MPEG / Video transfer mode |
| dec_v | : MPEG / Video decode switch |
| Constant name | explanation |
|---|---|
| CDC_MPPLY_SYNC | Synchronous playback mode …… Initial value |
| CDC_MPPLY_INDP | Independent playback mode |
| CDC_PARA_NOCHG | Do not change settings |
| Constant name | explanation |
|---|---|
| CDC_MPTRN_AUTO | Automatic transfer mode …… Initial value |
| CDC_MPTRN_FORCE | Forced transfer mode |
| CDC_PARA_NOCHG | Do not change settings |
| Transfer mode | explanation |
|---|---|
| Automatic forwarding | When data of STD buffer size + 16KB is stored in the CD buffer, Start transferring and decoding to the VBV buffer. |
| Forced transfer | Transfer / decoding is started regardless of the state of the CD buffer. |
| Transfer mode | explanation |
|---|---|
| Automatic forwarding | When the data for two sectors is stored in the CD buffer, transfer / decoding is started. For synchronous playback, decoding starts when the first picture of the video is displayed. |
| Forced transfer | Regardless of the state of the CD buffer or the state of the video Start transfer / decoding. |
| Constant name | explanation |
|---|---|
| OFF OFF | Decoding stop |
| ON | Decoding start …… Initial value |
| CDC_PARA_NOCHG | Do not change the setting …… Normally specified value |
caution![]() | The MPEG decoder starts decoding by connecting to the buffer partition. The start / end of decoding must not be controlled by executing this function. When the connection by the CDC_MpSetCon function or the forced switching by the CDC_MpChgCon function is executed, decoding starts regardless of this switch. (Even if decoding is stopped.) Use the CDC_MpChgCon function to kill the decoding. |
|---|
| List | Title | Function | Function Name [SR] | No |
| mute | : MPEG / Audio mute (lower 8 bits are valid) |
| pautim | : MPEG / Video pause timing (lower 16 bits are valid) |
| frztim | : MPEG / Video freeze timing (lower 16 bits are valid) |
bit 7 6 5 4 3 2 1 0 ┌─┬─┬─┬─┬─┬─┬─┬─┐ │ │ − │ − │ − │ − │ │ │ │ Initial value: 00H Unchanged: CDC_PARA_NOCHG └┬┴─┴─┴─┴─┴┬┴┬┴┬┘ │ │ │ └─CDC_MPMUT_R 1: Mute the right channel │ │ └─── CDC_MPMUT_L 1: Mute the left channel │ └───── CDC_MPMUT_DFL 1: Fixed value (must be specified) └─────────────── 1: Do not change the setting 0: Change
| Constant name | explanation |
|---|---|
| 0000H | Pose (re-pause during pause: frame-by-frame) …… Initial value |
| 0001H | Unpause |
| 0002H ~ FFFEH | Frame interval until repause (slow playback interval) |
| FFFFH | Do not change the setting (CDC_PARA_NOCHG) |
| Constant name | explanation |
|---|---|
| 0000H | Freeze (refreeze during freeze) …… Initial value |
| 0001H | Unfreeze |
| 0002H ~ FFFEH | Frame interval until refreeze (strobe playback interval) |
| FFFFH | Do not change the setting (CDC_PARA_NOCHG) |
| List | Title | Function | Function Name [SR] | No |
caution![]() | Specification restrictions on picture start code (PSC) detection <BR> For video streams with a picture period of M ≤ 3, PSC detection and DSYNC transmission can be synchronized except for the last 3 frames of the stream. That is, PSC detection can be used as the DSYNC transmission timing. (PSC detection is notified by the video interrupt bit8 of the MPEG interrupt factor flag.) However, when the last 3 frames of the stream and M ≧ 4, PSC detection and DSYNC transmission do not have a one-to-one correspondence. In this case, PSC detection cannot be used, and it is necessary to take the synchronization timing by the method (2) above. |
|---|
| List | Title | Function | Function Name [S-] | No |
| bnk | : Currently displayed frame bank number (0-3) |
| pictyp | : Picture type |
| tr | : Temporal reference (lower 8 bits are valid) |
| mptc | : Time code |
| 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 | Function | Function Name [S-] | No |
| List | Title | Function | Function Name [SR] | No |
| next | : Next stream flag |
| mpcon_a | : MPEG / Audio connection destination parameters |
| mpcon_v | : MPEG / Video connection destination parameters |
| Constant name | explanation |
|---|---|
| CDC_MPSTF_CUR | Current connection destination setting (starting stream) |
| CDC_MPSTF_NEXT | Registration of the next connection destination (next stream) |
| List | Title | Function | Function Name [S-] | No |
| mpcon_a | : MPEG / Audio connection destination parameters |
| mpcon_v | : MPEG / Video connection destination parameters |
| Constant name | explanation |
|---|---|
| CDC_MPSTF_CUR | Get current connection (starter stream) |
| CDC_MPSTF_NEXT | Get the next connection destination (next stream) |
| List | Title | Function | Function Name [SR] | No |
| chg_a | : MPEG / Audio connection switching flag |
| chg_v | : MPEG / Video connection switching flag |
| clr_a | : MPEG / Audio clear method |
| clr_v | : MPEG / Video clearing method |
| Constant name | explanation |
|---|---|
| CDC_MPCOF_ABT | Detachment (forced termination) |
| CDC_MPCOF_CHG | Forced switching |
| CDC_PARA_NOCHG | Do not change settings |
| Constant name | explanation |
|---|---|
| CDC_MPCLA_OFF | Do not clear (data for one sector is transferred) |
| CDC_MPCLA_ON | Immediately clear one sector buffer |
| Constant name | explanation |
|---|---|
| CDC_MPCLV_FRM | Immediately clear VBV and WBC (waiting for display MPEG framebuffer) |
| CDC_MPCLV_VBV | Clear VBV at the next I or P picture start |
| List | Title | Function | Function Name [SR] | No |
| next | : Next stream flag |
| mpstm_a | : MPEG / Audio stream parameters |
| mpstm_v | : MPEG / Video stream parameters |
| Constant name | explanation |
|---|---|
| CDC_MPSTF_CUR | Current stream settings (starting stream) |
| CDC_MPSTF_NEXT | Registration of the next stream (next stream) |
| List | Title | Function | Function Name [S-] | No |
| mpstm_a | : MPEG / Audio stream parameters |
| mpstm_v | : MPEG / Video stream parameters |
| Constant name | explanation |
|---|---|
| CDC_MPSTF_CUR | Get current stream (starting stream) |
| CDC_MPSTF_NEXT | Get the next stream (next stream) |
| List | Title | Function | Function Name [S-] | No |
| siz_h | : Horizontal image size (in pixels) |
| siz_v | : Vertical image size (in pixels) |
| List | Title | Function | Function Name [SR] | No |
| dspsw | : Display switch (display ON / OFF on VDP2) |
| fbn | : Frame bank number (0-3) …… Valid in still image playback mode |
| Constant name | explanation |
|---|---|
| OFF OFF | Not displayed in VDP2 …… Initial value |
| ON | Display on VDP2 |
| List | Title | Function | Function Name [SR] | No |
| chgflg | : Setting change flag (OFF: Register setting value, ON: Change setting to registered value) |
| fpx | : Upper left X coordinate of framebuffer window |
| fpy | : Upper left Y coordinate of framebuffer window |
| Coordinate | Normal output mode | High definition output mode | |
|---|---|---|---|
| NTSC | fpx | 0 to 351 (CDC_MPNT_NPX) | 0 to 703 (CDC_MPNT_HPX) |
| fpy | 0 to 239 (CDC_MPNT_NPY) | 0 to 479 (CDC_MPNT_HPY) | |
| PAL | fpx | 0 to 351 (CDC_MPPL_NPX) | 0 to 703 (CDC_MPPL_HPX) |
| fpy | 0 to 287 (CDC_MPPL_NPY) | 0 to 575 (CDC_MPPL_HPY) | |
| List | Title | Function | Function Name [SR] | No |
| chgflg | : Setting change flag (OFF: Register setting value, ON: Change setting to registered value) |
| frx | : X-direction enlargement ratio of frame buffer window (lower 16 bits are valid) |
| fry | : Y-direction enlargement ratio of frame buffer window (lower 16 bits are valid) |
bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ │ C │ │ ← ─────── A───────── → │ D │ ← ─ B─ → │ └┬┴┬┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴┬┴─┴─┴─┘ │ │ ↑ │ ↑ │ │ Enlargement ratio │ Correction coefficient │ │ │ │ │ │ └─ Correction coefficient polarity │ │ │ └──────────── Preserve value 1: Do not change 0: Change └────────────── Reduce flag 1: Reduce 0: Enlarge
| C | D | Expansion rate | |
|---|---|---|---|
| expansion | 0 | 0 | A + 2-1 / B |
| 0 | 1 | A + 1 + 1 / B | |
| Shrink | 1 | 0 | 1 / (A + 1-1 / B) |
| 1 | 1 | 1 / (A + 1 / B) |
| List | Title | Function | Function Name [SR] | No |
| chgflg | : Setting change flag (OFF: Register setting value, ON: Change setting to registered value) |
| dpx | : Upper left X coordinate of the display window |
| dpy | : Upper left Y coordinate of the display window |
| Coordinate | Normal output mode | High definition output mode | |
|---|---|---|---|
| NTSC | dpx | 0 to 351 (CDC_MPNT_NPX) | 0 to 703 (CDC_MPNT_HPX) |
| dpy | 0 to 239 (CDC_MPNT_NPY) | 0 to 479 (CDC_MPNT_HPY) | |
| PAL | dpx | 0 to 351 (CDC_MPPL_NPX) | 0 to 703 (CDC_MPPL_HPX) |
| dpy | 0 to 287 (CDC_MPPL_NPY) | 0 to 575 (CDC_MPPL_HPY) | |
| List | Title | Function | Function Name [SR] | No |
| chgflg | : Setting change flag (OFF: Register setting value, ON: Change setting to registered value) |
| dsx | : X-direction size of the display window |
| dsy | : Display window Y direction size |
| Coordinate | Normal output mode | High definition output mode | |
|---|---|---|---|
| NTSC | dsx | 0 to 352 (CDC_MPNT_NSX) | 0 to 704 (CDC_MPNT_HSX) |
| dsy | 0-240 (CDC_MPNT_NSY) | 0 to 480 (CDC_MPNT_HSY) | |
| PAL | dsx | 0 to 352 (CDC_MPPL_NSX) | 0 to 704 (CDC_MPPL_HSX) |
| dsy | 0 to 288 (CDC_MPPL_NSY) | 0 to 576 (CDC_MPPL_HSY) | |
| List | Title | Function | Function Name [SR] | No |
| chgflg | : Setting change flag (OFF: Register setting value, ON: Change setting to registered value) |
| dox | : Display window X-direction offset |
| doy | : Display window Y-direction offset |
| offset | initial value | Setting range | remarks |
|---|---|---|---|
| dox | 150 | 18-704 | Border color display on the entire surface when dox ≤ 17 |
| doy | 38 | 8 to 480 | Border color display on the entire surface when doy ≤ 7 |
| List | Title | Function | Function Name [SR] | No |
Initial value: 8000H (border color output) bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ │ │ ← ─ B data ─ → │ ← ─ G data ─ → │ ← ─ R data ─ → │ └┬┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘ │ └── Transparent bit 1: Output border color 0: Do not output (transparent state)
| List | Title | Function | Function Name [SR] | No |
| gain_y | : Luminance signal gain (-8 to 7, initial value: 0) |
| gain_c | : Color difference signal gain (-8 to 7, initial value: 0) |
Gain setting value | -8 | -7 | -6 | -5 | -4 | -3 | -2 | -1 | 0 | +1 | +2 | +3 | +4 | +5 | +6 | +7 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Double rate | 0 | 1/8 | 2/8 | 3/8 | 4/8 | 5/8 | 6/8 | 7/8 | 1 | 9/8 | 10/8 | 10/8 | 12/8 | 12/8 | 2 | 2 |
| List | Title | Function | Function Name [SR] | No |
| List | Title | Function | Function Name [S-] | No |
| List | Title | Function | Function Name [SR] | No |
| fbn | : Frame bank number (0-3) |
| ipx | : Upper left X coordinate of the image data window |
| ipy | : Upper left Y coordinate of the image data window |
| Coordinate | Normal output mode | High definition output mode | |
|---|---|---|---|
| NTSC | ipx | 0 to 351 (CDC_MPNT_NPX) | 0 to 703 (CDC_MPNT_HPX) |
| ipy | 0 to 239 (CDC_MPNT_NPY) | 0 to 479 (CDC_MPNT_HPY) | |
| PAL | ipx | 0 to 351 (CDC_MPPL_NPX) | 0 to 703 (CDC_MPPL_HPX) |
| ipy | 0 to 287 (CDC_MPPL_NPY) | 0 to 575 (CDC_MPPL_HPY) | |
| List | Title | Function | Function Name [SR] | No |
| fbn | : Frame bank number (0-3) |
| isx | : X-direction size of the image data window |
| isy | : Y-direction size of the image data window |
| Coordinate | Normal output mode | High definition output mode | |
|---|---|---|---|
| NTSC | isx | 0 to 352 (CDC_MPNT_NSX) | 0 to 704 (CDC_MPNT_HSX) |
| isy | 0-240 (CDC_MPNT_NSY) | 0 to 480 (CDC_MPNT_HSY) | |
| PAL | isx | 0 to 352 (CDC_MPPL_NSX) | 0 to 704 (CDC_MPPL_HSX) |
| isy | 0 to 288 (CDC_MPPL_NSY) | 0 to 576 (CDC_MPPL_HSY) | |
| List | Title | Function | Function Name [SR] | No |
| srcfbn | : Reading source frame bank number (0-3) |
| fln_y | : Aperture number for luminance data (Y) |
| fln_cr | : Aperture number for color difference data (Cr) |
| fln_cb | : Aperture number for color difference data (Cb) |
| List | Title | Function | Function Name [SR] | No |
| bn_y | : Buffer partition number for luminance data (Y) |
| bn_cr | : Buffer partition number for color difference data (Cr) |
| bn_cb | : Buffer partition number for color difference data (Cb) |
| dstfbn | : Export destination frame bank number (0 to 3) |
| clrmod | : Erase mode of sectors in buffer partition |
| Constant name | explanation |
|---|---|
| OFF OFF | Preserve (do not erase) sectors in the buffer partition |
| ON | Erase the sectors in the buffer partition |
| List | Title | Function | Function Name [SR] | No |
| srcmsp | : Reading source MPEG sector position |
| snum | : Number of sectors |
| dstfln | : Aperture number |
| List | Title | Function | Function Name [SR] | No |
| srcbn | : Buffer partition number |
| sp | : Sector position (CDC_SPOS_END: Indicates the last sector of the partition) |
| snum | : Number of sectors (CDC_SNUM_END: Indicates the number of sectors from sp to the end of the partition) |
| dstmsp | : Export destination MPEG sector position |
★ PROGRAMMER'S GUIDE ★ CD communication I / F (MPEG part)