misctbl.c
来自「一个不错的硬盘播放器程序,包含VFD显示程序,红外线遥控程序,硬盘读写程序,及解」· C语言 代码 · 共 245 行
C
245 行
/* Copyright 1996, ESS Technology, Inc. *//* SCCSID @(#)misctbl.c 1.14 2/17/98 *//* * $Log$ */#include "common.h"#include "tdm.h"/************************************************************************ * For TDM. * ************************************************************************/#if 0/* From tdm.h *//* * Notice that endian settings for video data are just oppposit to the * real data format since transport automaticaly flips the endian. * For CDDA, endian settings are the same as data format since we * flip it again at the output of the transport. */typedef struct { unsigned short slot; /* tdmslot value */ unsigned short delay; /* tdmdelay value */ unsigned short ctl; /* tdmctl value */ unsigned short low; /* Don't turn on TDM if lower than this */} TDM_settings;typedef struct { TDM_settings cd[2];} TDM_SETTING;#endifTDM_SETTING tdmsettings[] = { /* CDROM */ /* AUDIO CD */#ifdef P315 {{{0x2d, 0xf, 0x8060, 16}, {0x2d, 0xf, 0x8060, 40}}}, /* MITSUBISHI */#else {{{0x0f, 0xd, 0x8060, 8}, {0x0f, 0xd, 0x8060, 24}}}, /* TOSHIBA TC9263F */ {{{0x2d, 0xd, 0x8120, 16}, {0x1b, 0xd, 0x8060, 16}}}, /* SANYO */ {{{0x2d, 0xf, 0x8060, 16}, {0x1b, 0xd, 0x8060, 40}}}, /* PHILIPS */ {{{0x1b, 0xd, 0x8060, 0}, {0x1b, 0xd, 0x8060, 0}}}, /* SONY */ {{{0x66, 0xd, 0x8060, 0}, {0x66, 0xd, 0x8060, 0}}}, /* MATSUSHITA */#if 0 /* Technics MN6626. Outputs 32b SONY format */ {{{0x33, 0xd, 0x8060, 0}, {0x33, 0xd, 0x8060, 0}}}, /* YAMAHA */#endif#endif};/************************************************************************ * For IR. * ************************************************************************//* Timer values when CPU is running at full speed */unsigned int IR_powerup_tbl[] = {#ifdef IR_PHILIPS /* For Philips format */ CPUCLK * 50, /* minimum length of half bit */ CPUCLK * 130, /* maximum length of half bit */ CPUCLK * 140, /* minimum length of one bit */ CPUCLK * 240, /* maximum length of one bit */#else /* For NEC and SANYO formats */ CPUCLK * 880, /* Leader low minimum */ CPUCLK * 920, /* Leader low maximum */ CPUCLK * 430, /* Leader high minimum */ CPUCLK * 470, /* Leader high maximum */ CPUCLK * 205, /* Data 1 minimum */ CPUCLK * 245, /* Data 1 maximum */ CPUCLK * 92, /* Data 0 minimum */#ifdef IRREP CPUCLK * 132, /* Data 0 maximum */ CPUCLK * 205, /* Repeat high minimun */ CPUCLK * 245, /* Repeat high mazimun */ CPUCLK * 36, /* Repeat data minimum */ CPUCLK * 76 /* Repeat data maxmun */#else CPUCLK * 132 /* Data 0 maximum */#endif#endif};/* Timer values when CPU is running at power-down speed */unsigned int IR_powerdn_tbl[] = {#ifdef IR_PHILIPS /* For Philips format */ IDLECLK * 50, /* minimum length of half bit */ IDLECLK * 130, /* maximum length of half bit */ IDLECLK * 140, /* minimum length of one bit */ IDLECLK * 240, /* maximum length of one bit */#else /* For NEC and SANYO formats */ IDLECLK * 880, /* Leader low minimum */ IDLECLK * 920, /* Leader low maximum */ IDLECLK * 430, /* Leader high minimum */ IDLECLK * 470, /* Leader high maximum */ IDLECLK * 205, /* Data 1 minimum */ IDLECLK * 245, /* Data 1 maximum */ IDLECLK * 92, /* Data 0 minimum */#ifdef IRREP IDLECLK * 132, /* Data 0 maximum */ IDLECLK * 205, /* Repeat high minimun */ IDLECLK * 245, /* Repeat high mazimun */ IDLECLK * 36, /* Repeat data minimum */ IDLECLK * 76 /* Repeat data maxmun */#else IDLECLK * 132 /* Data 0 maximum */#endif#endif /* else of IR_PHILIPS */};/************************************************************************ * VP entries * ************************************************************************/unsigned short VP_ucode_offset1[] = { /* 3210 before 3210T */ 0x1891, /* Frame_int */ 0x18d3, /* Restore_UV_from_fifth */ 0x18d0, /* Save_UV_in_fifth */ 0x19e2, /* dpcm */ 0x19e9, /* mpeg1_intra */ 0x18d9, /* kcross_fade */ 0x18fb, /* karaoke */ 0x132a, /* clearing_DC */ 0x132d, /* mpg_audio_synth32 */ 0x16bf, /* mpg_audio_synwindow18 */ 0x179b, /* mpg_volume_stereoint */ 0x1769, /* mpg_audio_average */ 0x17b1 /* interleave */};unsigned short VP_ucode_offset2[] = { /* 3210T and later */ 0x113d, /* Frame_int */ 0x117f, /* Restore_UV_from_fifth */ 0x117c, /* Save_UV_in_fifth */ 0x11d5, /* dpcm */ 0x11dc, /* mpeg1_intra */ 0x12bb, /* kcross_fade */ 0x12dd, /* karaoke */ 0x1331, /* clearing_DC */ 0x1334, /* mpg_audio_synth32 */ 0x16a3, /* mpg_audio_synwindow18 */ 0x175c, /* mpg_volume_stereoint */ 0x1744, /* mpg_audio_average */ 0x1770 /* interleave */};/************************************************************************ * Display palette (fancy start-up screen). * ************************************************************************/struct { unsigned char component[3];} palette_std[] = { {0x6b, 0x00, 0x00}, /*white*/ {0x27, 0x0d, 0xb2}, /*yellow*/ {0x0b, 0xb2, 0x1a}, /*cyan*/ {0xfa, 0xbf, 0xcd}, /*green*/ {0xdf, 0x41, 0x33}, /*magenta*/ {0xce, 0x4e, 0xe6}, /*red*/ {0xb2, 0xf3, 0x4e}, /*blue*/ {0x80, 0x00, 0x00}, /*black*/ {0xe4, 0xf3, 0x4e}, /*custom*/ {0xa0, 0x00, 0x00}, /*custom*/ {0xa0, 0x00, 0x00}, /*custom*/ {0xa0, 0x00, 0x00} /*custom*/}; /************************************************************************ * For spatializer. * ************************************************************************/unsigned int bp_ham[] = {#if 0 /* Surround */ 0x1d07249e, 0x01dbf3c1, 0xfe05fda7, 0xffcdff10, 0xffebff6b, 0xfff0ff93, 0xfff3ffa7, 0xfff4ffb1, 0x0000004f, 0x000c0059, 0x000d006d, 0x00100095, 0x001500f0, 0x00330259, 0x01fb0c3f, 0xfe25db62, 0xe2f90000, 0x00000000, /* 3D surround (wider) */ 0x3d0f478d, 0xe8e6e927, 0xf333f86c, 0x0273fa3c, 0xfbcdfd14, 0x026ffcc2, 0xfd24fdf9, 0x0201fe14, 0x000001ec, 0xfdff0207, 0x02dc033e, 0xfd9102ec, 0x043305c4, 0xfd8d0794, 0x0ccd16d9, 0x171ab873, 0xc2f10000, 0x00000000,#endif /* first */ 0x18c320f7, 0xf6a4eb88, 0xfd81fff8, 0x00190049, 0x00060037, 0xffff0027, 0xffff0018, 0x00010009, 0x0000fff7, 0xffffffe8, 0x0001ffd9, 0x0001ffc9, 0xfffaffb7, 0xffe70008, 0x027f1478, 0x095cdf09, 0xe73d0000, 0x00000000, /* second */ 0x1ddb1616, 0xdad90072, 0x0116fdce, 0x00e8fe69, 0x00b8fea4, 0x009ffecd, 0x0087fef4, 0x006aff1e, 0x000000e2, 0xff96010c, 0xff790133, 0xff61015c, 0xff480197, 0xff180232, 0xfeeaff8e, 0x2527e9ea, 0xe2250000, 0x00000000, /* Hall (widest) */ 0x1d07249e, 0x01dbf3c1, 0xfe05fda7, 0xffcdff10, 0xffebff6b, 0xfff0ff93, 0xfff3ffa7, 0xfff4ffb1, 0x0000004f, 0x000c0059, 0x000d006d, 0x00100095, 0x001500f0, 0x00330259, 0x01fb0c3f, 0xfe25db62, 0xe2f90000, 0x00000000, /* Vocal cut */ 0xfccc0799, 0x0733f833, 0x02000e33, 0x0b33fbcc, 0xff000100, 0xf3ccfd99, 0x05cc0233, 0x0b990933, 0x0b990933, 0x0b990233, 0x05ccfd99, 0xf3cc0100, 0xff00fbcc, 0x0b330e33, 0x0200f833, 0x07330799, 0xfccc0000, 0x00000000};/************************************************************************ * Key shift related. * ************************************************************************/#define Quarter_Tone#ifdef Quarter_Toneint vp_key_port[] = { 0x004c0c43, 0x004e0483, 0x00510cc4, 0x005410c6, 0x00560cc8, 0x0058094a, 0x005a05ce, 0x00000000, 0x006685ef, 0x0068896b, 0x006c90e7, 0x006f8ce5, 0x007284a4, 0x00759424, 0x0078a863};#elseint vp_key_port[] = { 0x00403821, 0x00441481, 0x00482842, 0x004c0c43, 0x00510cc4, 0x00560cc8, 0x005a05ce, 0x00000000, 0x006685ef, 0x006c90e7, 0x007284a4, 0x0078a863, 0x0080b842, 0x00888c61, 0x0090d821};#endif/************************************************************************ * NGAME related. * ************************************************************************/unsigned char NGAME_clr_ram[] = { 0x78, 0xD8, 0xA9, 0x00, 0xA2, 0x00, 0x95, 0x00, 0x9D, 0x00, 0x01, 0x9D, 0x00, 0x02, 0x9D, 0x00, 0x03, 0x9D, 0x00, 0x04, 0x9D, 0x00, 0x05, 0x9D, 0x00, 0x06, 0x9D, 0x00, 0x07, 0xE8, 0xD0, 0xE6, 0x4C, 0x20, 0x80, 0x40, 0x00, 0x00, 0x00, 0x00};unsigned char NGAME_reset_vector[] = { 0xfb, 0x80, 0xfc, 0x00, 0xfd, 0x80, 0xfe, 0x23, 0xff, 0x80};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?