📄 m16cmv.h
字号:
#define SDRAM_BASE_CACHED 0x88000000
#define SDRAM_BASE_UNCACHED 0xa8000000
#define SDRAM_BASE SDRAM_BASE_CACHED
#define OSD_START (1296)
#define OSD_SIZE (45) // Last 512-Byte used for UART
#define COMM_START (OSD_START + OSD_SIZE)
#define COMM_END (1728)
#ifdef SUPPORT_SDRAM_FONT
#define FONT_START (2048)
#define FONT_END (2951) // (2048 + (8 + 9 + 523 + 977 + 59 + 229) / 2))
#endif
#define FIFO_START (2998)
#define FIFO_END (3008)
#define USER_START (3008)
#define USER_END (3012)
#define CALC_START (3012)
#define CALC_END (3022)
#define HOST_START (3022)
#define HOST_END (3032)
#define MENU_START (3032)
#define MENU_END (3033)
#define DBUS_START (3072 + 0)
#define DBUS_END (3072 + 100)
#define DATA_START (4096)
#define DATA_END (6144)
#define GRAPH_Y_START (7168)
#define GRAPH_Y_END (7168 + 396 * 1) // For 704 * 576
#define GRAPH_C_START (7168 + 396 * 1)
#define GRAPH_C_END (7168 + 396 * 3 / 2)
#define FRAME_Y_START (7762) // For 504 * 576
#define FRAME_Y_END (7762 + 284 * 1)
#define FRAME_C_START (7762 + 284 * 1)
#define FRAME_C_END (7762 + 284 * 3 / 2)
#if 0 // def SUPPORT_STORE_PSD_TBL
#ifdef SUPPORT_ESP
#define VCD_CACHE_START (1704)
#else
#define VCD_CACHE_START (640)
#endif
#else
#define VCD_CACHE_START (2033)
#endif
#define CDROM_CACHE_START (1955)
#define SECT_INFO (2037)
#define SECT_ENTRIES (2039)
#define DISC_INFO_Y (2041)
#define PIC_INFO_Y (2041)
#define PIC_INFO_X (512)
#define DMARAM_BUF_Y (2042)
#define QUANT_BUF_Y (2043)
#if 0 // def SUPPORT_STORE_PSD_TBL
#ifdef SUPPORT_ESP
#define PSD_TBL_ADR 1712 // store 4k PSD table
#else
#define PSD_TBL_ADR (VCD_CACHE_START + 9) // store 4k PSD table
#endif
#endif
#define DMARAM_BUF_XS 256
/************************************************************************
* CACHE LINE
************************************************************************/
#define MP3SECT_CACHE_LINES 9
#define SECT_CACHE_LINES 1
/************************************************************************
* BUFFER LINE WIDTH
************************************************************************/
#define VBV_W 1024 /* VIDEO buf width */
#define ABV_W 1024 /* AUDIO buf width */
#define SBV_W 1024 /* SUP buf width */
#define OBV_W 1024 /* OSD buf width */
#define CBV_W 1024 /* DISC input buf width */
#define MP3_ABV_W 1024
/************************************************************************
* anchors
************************************************************************/
#define MEM_EVBYA (regs0->evbya)
#define MEM_EABYA (regs0->eabya)
#define MEM_SUPYA (regs0->supya)
#define MEM_CDYA (regs0->cdya)
#define MEM_OSDYA (regs0->osdya)
#define MEM_AUDYA (regs0->audya)
#define MEM_IOPYA (regs0->iopya)
#define MEM_REF0_LUMA (regs0->ref0_luma)
/************************************************************************
* COMBO VCD FRAME BUFFER COMPRESS
************************************************************************/
#define RF_VC_I_811 (1 << 8)
#define RF_VC_P_811 (1 << 7)
#define RF_VC_B_811 (1 << 6)
#define RF_VC_I_411 (0 << 8)
#define RF_VC_P_411 (0 << 7)
#define RF_VC_B_411 (0 << 6)
#define RF_VC_I_888 (0 << 4)
#define RF_VC_I_766 (1 << 4)
#define RF_VC_I_666 (2 << 4)
#define RF_VC_I_8655 (3 << 4)
#define RF_VC_P_888 (0 << 2)
#define RF_VC_P_766 (1 << 2)
#define RF_VC_P_666 (2 << 2)
#define RF_VC_P_8655 (3 << 2)
#define RF_VC_B_888 (0 << 0)
#define RF_VC_B_766 (1 << 0)
#define RF_VC_B_666 (2 << 0)
#define RF_VC_B_8655 (3 << 0)
#define MEM_411888 0x00
#define MEM_411766 0x01
#define MEM_411666 (0x02 | (1 << 9))
#define MEM_4118655 0x03
#define MEM_811888 RF_VC_B_811
#define MEM_811766 0x41
#define MEM_811666 0x42
#define MEM_8118655 0x43
/************************************************************************
* VCD/SVCD FRAME BUFFER CONFIG
************************************************************************/
#ifdef SUPPORT_CD_MOVE
#define VIDEO_COMPRESS 0
/*======================================
* CD_MOVE Play SVCD in SDRAM
*======================================*/
#define MEM_REF0_LUMA_DEF 0
#define MEM_REF0_CHROMA_DEF 576
#define MEM_REF1_LUMA_DEF 576 + 288
#define MEM_REF1_CHROMA_DEF 576 + 288 + 576
#define MEM_BIDIR_LUMA_DEF 0
#define MEM_BIDIR_CHROMA_DEF 576 + 576
#define MEM_EVBYA_DEF 1728
#ifdef SUPPORT_AUD_MOVE
#define MEM_EABYA_DEF 1900
#define MEM_CDDA_EABYA_DEF 1890
#else
#define MEM_EABYA_DEF 1890
#endif
#define MEM_SUPYA_DEF 1900
#define MEM_AUDMOVE_EABYA_DEF 1664 // only needed in AUDMOVE
#define MEM_CDMOVE_CDYA_DEF 640 // only needed in CDMOVE
#define MEM_CDYA_DEF 1929 // 1932 // enhance echo
#define MEM_OSDYA_DEF OSD_START // 1929
#define MEM_AUDYA_DEF 1945 // 1948 // enhance echo
#define MEM_RODATA_DEF 1973 // fixed for reference tag
#define MEM_SERVO_DEF 2015
#define MEM_IOPYA_DEF 2035 // 2032
/*======================================
* CD_MOVE Play VCD in SDRAM
*======================================*/
#define MEM_VCD_REF0_LUMA_DEF 0
#define MEM_VCD_REF0_CHROMA_DEF 288
#define MEM_VCD_REF1_LUMA_DEF 288 + 144
#define MEM_VCD_REF1_CHROMA_DEF 288 + 144 + 288
#define MEM_VCD_BIDIR_LUMA_DEF 864
#define MEM_VCD_BIDIR_CHROMA_DEF 864 + 288
#define MEM_VCD_EVBYA_DEF 1856
#define MEM_VCD_EABYA_DEF 1902
#define MEM_VCD_SUPYA_DEF 1912
#define MEM_VCD_FUDU_DEF 1922 // 1923 // enhance echo
#define MEM_CDMOVE_VCD_CDYA_DEF 640 // only needed in CDMOVE
#define MEM_VCD_CDYA_DEF 1929 // 1932 // enhance echo
#define MEM_VCD_OSDYA_DEF OSD_START // 1929
#define MEM_VCD_AUDYA_DEF 1945 // 1948 // enhance echo
#define MEM_VCD_RODATA_DEF 1973 // fixed for reference tag
#define MEM_VCD_SERVO_DEF 2015 // fixed for reference tag
#define MEM_VCD_IOPYA_DEF 2035
/*======================================*/
#else // Not SUPPORT_CD_MOVE
/*======================================*/
#define VIDEO_COMPRESS 0
/*======================================
* NO CD_MOVE Play SVCD in SDRAM
*======================================*/
#define MEM_REF0_LUMA_DEF 0
#define MEM_REF0_CHROMA_DEF 576
#define MEM_REF1_LUMA_DEF 576 + 288
#define MEM_REF1_CHROMA_DEF 576 + 288 + 576
#define MEM_BIDIR_LUMA_DEF 0
#define MEM_BIDIR_CHROMA_DEF 576 + 576
#define MEM_EVBYA_DEF 1728 // extend video buffer to show hires
#define MEM_EABYA_DEF 1900
#define MEM_SUPYA_DEF 1910
#define MEM_AUDMOVE_EABYA_DEF 1664 // only needed in AUDMOVE
#define MEM_CDMOVE_CDYA_DEF 640
#define MEM_CDYA_DEF 1956
#define MEM_OSDYA_DEF 1986
#define MEM_AUDYA_DEF 2003
#define MEM_IOPYA_DEF 2035
/*======================================
* NO CD_MOVE Play VCD in SDRAM
*======================================*/
#define MEM_VCD_REF0_LUMA_DEF 0
#define MEM_VCD_REF0_CHROMA_DEF 288
#define MEM_VCD_REF1_LUMA_DEF 288+144
#define MEM_VCD_REF1_CHROMA_DEF 288+144+288
#define MEM_VCD_BIDIR_LUMA_DEF 864
#define MEM_VCD_BIDIR_CHROMA_DEF 864+288
#define MEM_VCD_EVBYA_DEF 1856
#define MEM_VCD_EABYA_DEF 1902
#define MEM_VCD_SUPYA_DEF 1912
#define MEM_CDMOVE_VCD_CDYA_DEF 640 // only needed in CDMOVE
#define MEM_VCD_CDYA_DEF 1946
#define MEM_VCD_OSDYA_DEF 1986
#define MEM_VCD_AUDYA_DEF 2003
#define MEM_VCD_IOPYA_DEF 2035
#endif SUPPORT_CD_MOVE
/************************************************************************
* High resolution
************************************************************************/
#define HIRES_VIDEO_COMPRESS (RF_VC_I_811 | \
RF_VC_P_811 | \
RF_VC_B_811 | \
RF_VC_I_666 | \
RF_VC_P_666 | \
RF_VC_B_666)
/*======================================
* HIRES---FRAME BUFFER CONFIG
*======================================*/
#define HIRES_FRAMEBUF_START 0
#define HIRES_REF0_LUMA 0
#define HIRES_REF0_CHROMA 576
#define HIRES_REF1_LUMA 0 // 576 + 576
#define HIRES_REF1_CHROMA 576 // 576 + 576 + 288
#define HIRES_BIDIR_LUMA 0
#define HIRES_BIDIR_CHROMA 576 // 576 + 576
#ifdef SUPPORT_CD_MOVE
#define MP3_REF0_LUMA_DEF 0
#define MP3_REF1_LUMA_DEF 864
#define MP3_REF1_CHROMA_DEF 1440 // swap REF1 & REF0 for Game load
#define MP3_REF0_CHROMA_DEF 576
#define MP3_BIDIR_LUMA_DEF MP3_REF1_LUMA_DEF
#define MP3_BIDIR_CHROMA_DEF MP3_REF1_CHROMA_DEF
#define MP3_EVBYA_DEF 1728
#define MP3_EABYA_DEF MP3_EVBYA_DEF
#define MP3_CDYA_DEF 1793
/*
#define MP3_CDMOVE_CDYA_DEF 710
*/
#define MP3_CDMOVE_CDYA_DEF 640
#define MP3_AUDYA_DEF 1792 // 1793 // enhance echo
#define MP3_CODE_DEF 1861 // 1862 // enhance echo
#define MP3_OSDYA_DEF OSD_START // 1906
#define MP3_FUDU_DEF 1922 // 1923 // enhance echo
#define MP3_DIR_START 1922 // extend mp3 file storage
#define MP3_FILE_START 1925 // extend mp3 file storage
#define MP3_RODATA_DEF 1973
#define MP3_SERVO_DEF 2015
#define MP3_IOPYA_DEF 2035
/*
#define MP3_ECHOYA_DEF 1951
*/
/*======================================*/
#else // Not SUPPORT_CD_MOVE
/*======================================*/
#define MP3_REF0_LUMA_DEF 0
#define MP3_REF1_LUMA_DEF MP3_REF0_LUMA_DEF
#define MP3_REF0_CHROMA_DEF 1152
#define MP3_REF1_CHROMA_DEF MP3_REF0_CHROMA_DEF
#define MP3_BIDIR_LUMA_DEF MP3_REF0_LUMA_DEF
#define MP3_BIDIR_CHROMA_DEF MP3_REF0_CHROMA_DEF
#define MP3_EVBYA_DEF 1440
#define MP3_EABYA_DEF MP3_EVBYA_DEF
#define MP3_CDYA_DEF 1655
#define MP3_OSDYA_DEF 1855
#define MP3_AUDYA_DEF 1875
#define MP3_DIR_START 1955
#define MP3_FILE_START 1965
#define MP3_IOPYA_DEF 2035
/*
#define MP3_ECHOYA_DEF 1951
*/
#endif
/************************************************************************
* starts
************************************************************************/
#define AWV_XS (0)
#define VBV_YS (MEM_EVBYA)
#define ABV_YS (MEM_EABYA)
#define SBV_YS (MEM_SUPYA)
#define CBV_YS (MEM_CDYA)
#define OBV_YS (OSD_START) // (MEM_OSDYA)
#define AWV_YS (MEM_AUDYA)
#define IOP_YS (MEM_IOPYA)
#ifdef SUPPORT_CD_MOVE
#define MP3_VBV_YS (MP3_EVBYA_DEF)
#define MP3_ABV_YS (MP3_EABYA_DEF)
#define MP3_CBV_YS (MP3_CDYA_DEF)
#define MP3_OBV_YS (OSD_START) // (MP3_OSDYA_DEF)
#define MP3_IOP_YS (MP3_IOPYA_DEF)
#else
#define MP3_VBV_YS (MP3_EVBYA_DEF)
#define MP3_ABV_YS (MP3_EABYA_DEF)
#define MP3_CBV_YS (MP3_CDYA_DEF)
#define MP3_OBV_YS (MP3_OSDYA_DEF)
#define MP3_IOP_YS (MP3_IOPYA_DEF)
#endif
/************************************************************************
* ends
************************************************************************/
#define VBV_YE (MEM_EABYA)
#define ABV_YE (MEM_SUPYA)
#ifndef SUPPORT_CD_MOVE
#define SBV_YE (MEM_CDYA)
#else
#define SBV_YE (MEM_OSDYA)
#endif
#define CBV_YE (MEM_AUDYA) // (MEM_OSDYA)
#define OBV_YE (OSD_START + OSD_SIZE) // (MEM_AUDYA)
#define IOP_YE (SECT_INFO)
#ifdef SUPPORT_CD_MOVE
#define MP3_VBV_YE (MP3_AUDYA_DEF)
#define MP3_ABV_YE (MP3_AUDYA_DEF)
#define MP3_CBV_YE (MP3_FUDU_DEF) // (MP3_OSDYA_DEF)
#define MP3_OBV_YE (OSD_START + OSD_SIZE) // (MP3_FUDU_DEF)
#define MP3_IOP_YE (SECT_INFO)
#else
#define MP3_VBV_YE (MP3_CDYA_DEF)
#define MP3_ABV_YE (MP3_CDYA_DEF)
#define MP3_CBV_YE (MP3_OSDYA_DEF)
#define MP3_OBV_YE (MP3_AUDYA_DEF) // (MP3_DIR_START)
#define MP3_IOP_YE (SECT_INFO)
#endif
/************************************************************************
* HEIGHT
************************************************************************/
#define VBV_H (VBV_YE - VBV_YS)
#define ABV_H (ABV_YE - ABV_YS)
#define AUDMOVE_ABV_H (MEM_EVBYA_DEF - MEM_AUDMOVE_EABYA_DEF)
#define VCD_CDMOVE_CBV_H (640)
#define SVCD_CDMOVE_CBV_H (640)
#define MP3_CDMOVE_CBV_H (640)
#define CBV_H (CBV_YE - CBV_YS)
#define OBV_H (OBV_YE - OBV_YS)
#define SBV_H (SBV_YE - SBV_YS)
#define IOP_H (IOP_YE - IOP_YS)
#define MP3_VBV_H (MP3_VBV_YE - MP3_VBV_YS)
#define MP3_ABV_H (MP3_ABV_YE - MP3_ABV_YS)
#define MP3_CBV_H (MP3_CBV_YE - MP3_CBV_YS)
#define MP3_OBV_H (MP3_OBV_YE - MP3_OBV_YS)
#define MP3_IOP_H (MP3_IOP_YE - MP3_IOP_YS)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -