亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? gamectrl.c

?? 一個兩碟控制的VCD的代碼,兩碟之間的轉動及連續播放,已大量生產的CODE.
?? C
?? 第 1 頁 / 共 4 頁
字號:
            /* We only care the case when system code matches */
            if (((dataIR >> 6) & 0x1f) == sysIRcode) {
                unsigned int prevctlbit;
                prevctlbit = IR_ctlbit;

                IR_ctlbit = (dataIR >> 11) & 1;
                if ((unsigned int) IR_ctlbit != prevctlbit) {
                    int tmp = (dataIR >> 12) & 1;
                    if (tmp) tmp = 0x40;
                    codeIR = (dataIR & 0x3f) | tmp | 0x100;
                    IR_rep_cnt = 0;
                } else
                  IR_rep_cnt++;
                IR_int_time = (unsigned int) mvd[riface_timer2];
            }
            stateIR = IR_IDLE;
        }
    }
}
#endif /* IR_PHILIPS */


/* Interrupt via 3881 */
void IR_recv_interrupt_service(status)
unsigned int status;
{
    unsigned char width;
    int overflow = 0;
    int clear = 0x4;

    if (status & 0x80) {
	overflow = 1;			/* 3881's clock overflowed	*/
	clear = 0x84;			/* Clear the overflow bit	*/
    }

    width = DSC_cmd(dsc_ir_diffm, 0);	/* Get the counter		*/
    DSC_cmd(dsc_sys_status, clear);	/* Clear 3881's IR int		*/
    mvd[riface_clear_dbgirq] = 0;	/* Clear 3210's debug_irq	*/

#if (IR_NEC || IR_SANYO)
    IR_core_NEC((unsigned int) width, overflow);
#endif /* IR_NEC || IR_SAYNO */

#ifdef IR_PHILIPS
    if (!trigger_edge)
        DSC_INIT_IR(1, DSC_RISING_EDGE, 0);         /* detect rising edge   */
    else
        DSC_INIT_IR(1, DSC_FALLING_EDGE, 0);        /* detect falling edge  */

    IR_core_Philips((unsigned int) width);
    trigger_edge = 1-trigger_edge;

#endif /* IR_PHILIPS */
}

#else
/* For the original style of IR handling */

/************************************************************************
 * Local typedef.							*
 ************************************************************************/
typedef struct {
    unsigned char  level;	/* Assert this output level		*/
    unsigned char  next;	/* Goto this state			*/
    unsigned short timer;	/* Timer1 value (need to << 9)		*/
} IR_XMIT_INFO;


/************************************************************************
 * Local variables.							*
 ************************************************************************/

#ifdef IRQSHARE
PRIVATE unsigned int	xor1value = 1;
#endif IRQSHARE

/* For IR receiving */
PRIVATE	unsigned int	prevIRtime = 0;	/* Last time IR intr. happens	*/
PRIVATE	unsigned short	dataIR;		/* System/customer IR code	*/
PRIVATE	unsigned int	diffIR[2];	/* Array to store time gap	*/
PRIVATE	char 		cntIRchg = 0;	/* Number of unprocessed IR intr*/
PRIVATE	char 		cntIRbits = 0;	/* Number of IR sys/cust. bits	*/
PRIVATE	char		killIR = 0;	/* Whether to "kill" next IR bit*/
PRIVATE volatile char	stateIR = IR_IDLE; /* IR state machine state	*/

#ifdef IR_SANYO
PRIVATE	unsigned short IR_sanyo_codebar;/* Sanyo IR only		*/
#endif /* IR_SAYNO */

#ifdef IRREP
PRIVATE unsigned char   previous_data;  /* Record the previous id code  */
#endif

#ifdef IRXMT
/* For IR transmission */
PRIVATE	unsigned char	IR_xmit_state	 = IR_XMIT_IDLE;
PRIVATE	unsigned char	IR_xmit_bitcount = 0;
PRIVATE	unsigned int	IR_xmit_code;
PRIVATE	char		origConnectInOut;

/* State machine for transmitting IR					*/
PRIVATE IR_XMIT_INFO IR_xmit_array[] = {	/* Current state	*/
    {0, IR_XMIT_LEADER_LOW,  IRW_LEADER_LOW},	/* IR_XMIT_IDLE		*/
    {1, IR_XMIT_LEADER_HIGH, IRW_LEADER_HIGH},	/* IR_XMIT_LEADER_LOW	*/
    {0, IR_XMIT_GAP,         IRW_GAP_LOW},	/* IR_XMIT_LEADER_HIGH	*/
    {0, IR_XMIT_GAP,         IRW_GAP_LOW},	/* IR_XMIT_DATA		*/
    {1, IR_XMIT_DATA,        IRW_DATA_ONE},	/* IR_XMIT_GAP		*
						 * (Possible targets 	*
						 * are IDLE, DATA, and	*
						 * REP_HIGH1)		*/
    {0, IR_XMIT_REP_LOW1,    IRW_REP_LOW1},	/* IR_XMIT_REP_HIGH1	*/
    {1, IR_XMIT_REP_HIGH2,   IRW_REP_HIGH2},	/* IR_XMIT_REP_LOW1	*/
    {0, IR_XMIT_REP_LOW2,    IRW_REP_LOW2},	/* IR_XMIT_REP_HIGH2	*/
    						/* IR_XMIT_REP_LOW2	*
						 * (disable timer1)	*/
};
#endif

/************************************************************************
 * Local routines.							*
 ************************************************************************/
PRIVATE	void		IR_core_NEC(int);
PRIVATE	void		IR_core_Philips(int);

#ifdef IRXMT
PRIVATE	void		RISC_start_timer1(unsigned int);
#endif

/************************************************************************
 * Start timer1 (for transmitting IR signals)				*
 ************************************************************************/
#ifdef IRXMT
PRIVATE void RISC_start_timer1(period)
unsigned int period;
{
    mvd[riface_clear_timer1] = 0;
    mvd[riface_timer1] = 0 - (period << 9);
    /* 
     * Since this routine will be called repeatedly, it is better
     * to enable interrupt outside.
     */
}
#endif

/*
 * Initialization. Properly set internal XOR's input value, then turn
 * on interrupt.
 */
void IR_init()
{
#ifdef IRQSHARE
    CLEAR_IRXOR;
/*    SET_XOR1;
    xor1value = 1;*/
    CLEAR_XOR1;
    xor1value = 0;
#else

#ifdef FLIP_IR
    /*
     * If incoming IR signal is flipped, then the first incoming edge
     * will be a rising edge, so we need to clear the build-in
     * XOR gate.
     */
    CLEAR_IRXOR;
#else
    SET_IRXOR; 	/* Set IR XOR to high at first */
#endif

#endif IRQSHARE

#ifdef IRXMT
    if (!connect_inout) {
	OUTIR_HIGH;	/* IR output */
    }
#endif

    ASSIGN_SYSCODE;	/* initialize sys code */
#ifdef IR_SANYO
    IR_sanyo_codebar = (~sysIRcode) & 0x1fff;
#endif /* IR_SANYO */

#if defined(WEBDVD) && defined(SLAVE)
    CLEAR_AUX0;
    _8259_ICW = 0x16;
    _8259_OCW = 0;
    SET_AUX0;
#endif

    mvd[riface_clear_dbgirq] = 0;		/* Clear debug_irq	*/
    enable_int(debug);
}


#if (IR_NEC || IR_SANYO)
PRIVATE void IR_core_NEC(falling_edge)
int falling_edge;
{
    unsigned int *ir_tbl;

#define LEADER_LOW_MIN	ir_tbl[0]
#define LEADER_LOW_MAX	ir_tbl[1]
#define LEADER_HIGH_MIN	ir_tbl[2]
#define LEADER_HIGH_MAX	ir_tbl[3]
#define DATA_1_MIN	ir_tbl[4]
#define DATA_1_MAX	ir_tbl[5]
#define DATA_0_MIN	ir_tbl[6]
#define DATA_0_MAX	ir_tbl[7]
#ifdef IRREP
#define REPEAT_HIGH_MIN ir_tbl[8]
#define REPEAT_HIGH_MAX ir_tbl[9]
#define REPEAT_DATA_MIN	ir_tbl[10]
#define REPEAT_DATA_MAX ir_tbl[11]
#endif

    ir_tbl = IR_powerup_tbl;

    /* First IR interrupt should be a falling edge */
    if (stateIR == IR_IDLE) {
	if (falling_edge) stateIR = IR_LEADER_LOW;
	else cntIRchg = prevIRtime = 0;
    }

    /*
     * We only process things when we get 2 bits (i.e. 2 time period).
     */
    if (cntIRchg == 2) {
	unsigned char data;
	char reset = 0;
	unsigned int  width;

	cntIRchg = 0;
	width = diffIR[1];

	if (stateIR == IR_CUSTOM) {/* Put most common case first */
	    /*
	     * We are collecting system code or custom code
	     */
	    width += diffIR[0];	/* Get data + gap */
	    dataIR <<= 1;
	    if ((width >= DATA_1_MIN) && (width <= DATA_1_MAX)) {
		dataIR |= 0x1;
	    } else if ((width < DATA_0_MIN) || (width > DATA_1_MAX)) {
#ifdef IR_NEC
		/*
		 * I am assert kill here because we may not recognize
		 * the singal because our checks are too tight; yet
		 * the external micro controller can still recognize it.
		 * By killing it, we guarantee that external logic won't
		 * recognize it.
		 *
		 * However, there may also be a downside: if IR input
		 * has noise, the external micro controll may still
		 * properly receive signal if we don't kill the input;
		 * if killIR is asserted, then this may be a problem.
		 */
		killIR = 1;
		reset = 1;
#endif /* IR_NEC */

#ifdef IR_SANYO
		if (cntIRbits == 0) {
		    /* 
		     * SANYO's repeat is the same as leader low/high.
		     * So we may mistaken repeat as a new code. So if
		     * we are broken on the first bit of new cutsom code,
		     * we shall assume it is a new code overall.
		     *
		     * The last one is probably a repeat, so this is
		     * really the first bit of leader low.
		     */
		    cntIRchg = 1;	/* We just need one more edge */
		    stateIR = IR_LEADER_LOW;
		} else {
		    killIR = 1;
		    reset = 1;
		}
#endif /* IR_SANYO */
	    }

	    cntIRbits++;

#ifdef IR_NEC
	    /* First 16 bits are syscode */
	    if ((cntIRbits == 16) && (dataIR != sysIRcode)) 
		reset = 1;

	    if (cntIRbits == 24) {
#ifdef CUST71

	      data = dataIR & 0x01;
	      if (data)
		reset = 1;
	      else
#endif
	      {
		/*
	 	* We will not wait for data bar. Base on data, we'll
	 	* decide whether we want to pass the IR to CD loader.
	 	* If we decided that the code shouldn't be passed on,
	 	* we'll intentionally destroy the output IR so CD
		* loader will not get it.
		*/
		data = dataIR & 0xff;
		/* reverse data bits to fit look up table */
		mvd[riface_reflect] = data;
		data = mvd[riface_reflect];
#ifdef IRREP
		previous_data = data;
#endif
		codeIR = data | 0x100;	/* Indicate a new code */
		/* Get the kill bit from the kill IR table */
#ifdef IRXMT
		killIR = tblKillIR[data >> 3] & ptrLshift[data & 7];
#endif
	      }
	    } else if (cntIRbits == 32) reset = 1;
#endif /* IR_NEC */

#ifdef IR_SANYO
	    if (cntIRbits == 13) {
		dataIR &= 0x1fff;
		if (dataIR != sysIRcode) reset = 1;
		dataIR = 0;
	    } else if (cntIRbits == 26) {
		unsigned short tmp = (~sysIRcode) & 0x1fff;
		if (dataIR != tmp) reset = 1;
		dataIR = 0;
	    } else if (cntIRbits == 34) {
		data = dataIR;
		mvd[riface_reflect] = data;
		data = mvd[riface_reflect];
		codeIR = data;
		dataIR = 0;
	    } else if (cntIRbits == 42) {
		data = dataIR;
		mvd[riface_reflect] = data;
		data = ~(mvd[riface_reflect]);
		if (data == codeIR) {
		    codeIR = data | 0x100;
		} else codeIR = 0;
		reset = 1;
	    }
#endif /* IR_SANYO */
	} else if (stateIR == IR_LEADER_LOW) {
	    if ((width >= LEADER_LOW_MIN) && (width <= LEADER_LOW_MAX)) {
	        stateIR = IR_LEADER_HIGH;
	        cntIRchg = 1; /* We'll only collect 1 change next time */
	    } else reset = 1;
#ifdef IRREP
        } else if (stateIR == IR_REPEAT) {
	    if ((width >= REPEAT_DATA_MIN) && (width <= REPEAT_DATA_MAX)) { 
		/* the width is 0.56 ms */
		if (repeat_IRkey_allowed(previous_data))
		    codeIR = previous_data | 0x100; /* Indicate a new code */
	    }
	    reset = 1;
#endif
        } else {
	    /* stateIR has to be equal to IR_LEADER_HIGH */
	    if ((width >= LEADER_HIGH_MIN) && (width <= LEADER_HIGH_MAX)) {
	        dataIR = cntIRbits = 0;
	        stateIR = IR_CUSTOM;
#ifdef IRREP
	    } else if ((width >= REPEAT_HIGH_MIN) &&
		       (width <= REPEAT_HIGH_MAX)) { 
		/* if the width is 2.25 ms, it is repeat code leader */
		cntIRchg = 1; /* We'll only collect 1 change next time */
		stateIR = IR_REPEAT;
#endif
	    } else reset = 1;
	}

        if (reset) {
	    /* Reset all, start from the very beginning */
	    stateIR = IR_IDLE; 
	    cntIRchg = prevIRtime = 0; 
	}
    }
}
#endif /* IR_NEC || IR_SAYNO */

#ifdef IR_PHILIPS
PRIVATE unsigned int    data_half = 0;	/* Mark whether or nor have half_bit
                                           data before edge of intr. coming*/
PRIVATE void IR_core_Philips(falling_edge)
int falling_edge;
{
    unsigned int *ir_tbl;
    unsigned int width;
    int reset;
    int is_half_bit;
    int is_full_bit;

#define HALFBIT_MIN     ir_tbl[0]
#define HALFBIT_MAX     ir_tbl[1]
#define ONEBIT_MIN      ir_tbl[2]
#define ONEBIT_MAX      ir_tbl[3]

    ir_tbl = T_IR_powerup_tbl;

    width = diffIR[0];
    cntIRchg = 0;
    reset = 0;
    is_half_bit = (width >= HALFBIT_MIN) && (width <= HALFBIT_MAX);
    is_full_bit = (width >= ONEBIT_MIN)  && (width <= ONEBIT_MAX);

    if (stateIR == IR_IDLE) {
        if (falling_edge) stateIR = IR_LEADER;
        else prevIRtime = 0;
    } else if (stateIR == IR_LEADER) {
	/* We shall get a rising edge, since the first bit is fixed */
	dataIR = 0;
	cntIRbits = 0;
	stateIR = IR_CUSTOM;

	if (is_half_bit) data_half = 0;
	else if (is_full_bit) data_half = 1;
	else {
	    stateIR = IR_IDLE;
	    prevIRtime = 0;
	}
    } else {
	if (data_half) {
	    /* 
	     * We were in half bit position, so this edge shall either
	     * conclude the previous cycle or go the the half position
	     * of the next bit. Record the last bit.
	     */
	    dataIR <<= 1;
	    if (falling_edge) dataIR |= 1;
	    cntIRbits++;

	    if (is_half_bit) data_half = 0;
	    else if (!is_full_bit) reset = 1;
	} else {
	    /* 
	     * We started at a sampling cycle, so we shall only get half bit,
	     * otherwise, something is wrong!
	     */
	    if (is_half_bit) data_half = 1;
	    else reset = 1;
	}

	if ((cntIRbits == 12) && !falling_edge && data_half) {
	    /* This is the last rising edge, no more. So collect the bit */
	    dataIR <<= 1;
	    dataIR |= 1;
	    cntIRbits = 13;
	}

	if (reset) {
	    /* 
	     * Abnormal exist. Maybe we are out of sync. If this
	     * is falling edge, maybe this is the sync of a new
	     * input!
	     */
	    stateIR = IR_IDLE;
	    if (falling_edge) stateIR = IR_LEADER;
	} else if (cntIRbits == 13) {
	    /* We only care the case when system code matches */
	    if (((dataIR >> 6) & 0x1f) == sysIRcode) {
		unsigned int prevctlbit;
		prevctlbit = IR_ctlbit;

		IR_ctlbit = (dataIR >> 11) & 1;
		if ((unsigned int) IR_ctlbit != prevctlbit) {
		    int tmp = (dataIR >> 12) & 1;
		    if (tmp) tmp = 0x40;
		    codeIR = (dataIR & 0x3f) | tmp | 0x100;
		    IR_rep_cnt = 0;
		} else
		  IR_rep_cnt++;
		IR_int_time = (unsigned int) mvd[riface_timer2];
	    }
	    stateIR = IR_IDLE;
	}
    }
}
#endif /* IR_PHILIPS */

/*
 * DBG IRQ  INTERUPT SERVICE for IR
 *
 * This routine recognizes IR input and selectively retransmit signals.
 */
void IR_recv_interrupt_service()
{

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产伦一区二区三区观看方式 | 精品免费日韩av| 国产肉丝袜一区二区| 一区二区三区四区蜜桃| 国产一区二区在线影院| 678五月天丁香亚洲综合网| 国产精品乱人伦一区二区| 麻豆91免费观看| 色一区在线观看| 国产精品毛片a∨一区二区三区 | 欧美日韩电影一区| 中文字幕一区二区三区不卡| 久久精品国产99国产| 欧美伊人久久久久久久久影院 | 亚洲男帅同性gay1069| 国产乱理伦片在线观看夜一区| 欧美日韩国产一级二级| 亚洲欧美区自拍先锋| 国产电影一区二区三区| 精品日韩99亚洲| 另类人妖一区二区av| 911国产精品| 亚洲aⅴ怡春院| 欧美在线观看一区| 一区二区不卡在线视频 午夜欧美不卡在| 黑人巨大精品欧美一区| 欧美一区二区三区影视| 亚洲成人激情社区| 在线免费观看视频一区| 亚洲精品成人a在线观看| 91蜜桃网址入口| 国产精品久久久久久久岛一牛影视 | 欧美天堂亚洲电影院在线播放| 香蕉av福利精品导航| 秋霞午夜鲁丝一区二区老狼| 91蜜桃视频在线| 国产91清纯白嫩初高中在线观看| 日韩福利视频导航| 麻豆高清免费国产一区| 国产精品你懂的在线欣赏| 国产精品区一区二区三| 中文字幕一区二区三区在线播放| 欧美激情一区二区三区四区| 亚洲卡通动漫在线| 97久久精品人人做人人爽| 国产精品久久夜| 91在线小视频| 亚洲一区在线观看免费观看电影高清| 色88888久久久久久影院按摩| 亚洲人亚洲人成电影网站色| 92国产精品观看| 午夜精品久久久久久不卡8050| 欧美欧美午夜aⅴ在线观看| 美女一区二区三区| 久久精品无码一区二区三区| 99久久久无码国产精品| 亚洲电影一级片| 日韩视频在线永久播放| 国产麻豆精品在线| 亚洲人xxxx| 欧美肥妇毛茸茸| 国产综合色产在线精品| 亚洲天堂免费在线观看视频| 99久久99久久精品免费看蜜桃| 亚洲成av人影院| 精品国产一区二区三区av性色| 成人精品免费网站| 亚洲mv大片欧洲mv大片精品| 欧美成人欧美edvon| 东方欧美亚洲色图在线| 一区二区三区精品在线| 精品欧美一区二区三区精品久久| 国产一区二区在线观看免费| 亚洲一区二区av电影| 日韩一区二区三区视频| 99久久精品99国产精品| 日韩高清在线电影| 自拍偷在线精品自拍偷无码专区| 7777精品伊人久久久大香线蕉| 国产成人精品免费视频网站| 亚洲一区二区中文在线| 国产欧美综合在线| 欧美一级片免费看| 日本黄色一区二区| 国产成人精品免费看| 日韩av网站免费在线| 亚洲三级理论片| 久久久久国产免费免费 | 精品精品国产高清一毛片一天堂| 91免费在线播放| 国产一区二区视频在线播放| 视频在线观看91| 亚洲色图另类专区| 亚洲午夜羞羞片| 欧美精品自拍偷拍| 日韩精品免费专区| 欧美zozozo| 91一区一区三区| 美日韩一区二区三区| 99久久精品国产一区| 五月综合激情婷婷六月色窝| 欧美精品一二三区| 激情文学综合丁香| 综合久久久久综合| 国产日韩欧美亚洲| 欧美大黄免费观看| 91麻豆精品国产91| 欧美日韩一区二区三区四区五区| 97精品久久久午夜一区二区三区 | 日本久久一区二区三区| 高清不卡在线观看av| 国产一区二区福利视频| 老司机精品视频导航| 日韩电影在线观看电影| 日韩高清在线一区| 奇米综合一区二区三区精品视频| 亚洲制服欧美中文字幕中文字幕| 亚洲免费在线看| 亚洲老司机在线| 一区二区国产视频| 亚洲成av人片观看| 蜜臀av一区二区在线观看| 免费观看一级特黄欧美大片| 中文字幕av一区 二区| 国产精品色一区二区三区| 自拍偷自拍亚洲精品播放| 亚洲精品久久嫩草网站秘色| 亚洲精品视频在线观看网站| 亚洲综合一区二区精品导航| 视频一区在线播放| 久久不见久久见免费视频1| 国产另类ts人妖一区二区| 成人av资源网站| 欧美性色综合网| 欧美一区二区福利视频| 久久免费午夜影院| 亚洲欧美日韩中文播放| 亚洲国产成人91porn| 日韩精品欧美精品| 国产老妇另类xxxxx| 99re在线视频这里只有精品| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 欧美调教femdomvk| 欧美精品一区二区三区四区 | 亚洲精品国产高清久久伦理二区| 一区二区在线电影| 日本不卡中文字幕| 国产91清纯白嫩初高中在线观看 | 91精品婷婷国产综合久久性色 | 日韩视频中午一区| av在线不卡网| 欧美视频一区在线观看| 国产精品美女久久久久aⅴ国产馆| 99r国产精品| 日本不卡免费在线视频| 美日韩一区二区三区| 国产高清精品在线| 色婷婷一区二区三区四区| 精品少妇一区二区| 一色桃子久久精品亚洲| 日本va欧美va瓶| 国产高清视频一区| 制服丝袜国产精品| 亚洲日本va在线观看| 色婷婷综合视频在线观看| 蜜臀a∨国产成人精品| av欧美精品.com| 337p粉嫩大胆噜噜噜噜噜91av| 国产精品美女久久久久久久| 亚洲bt欧美bt精品777| 99久久伊人网影院| 日韩免费电影网站| 亚洲主播在线观看| 成人黄页毛片网站| 久久久综合视频| 日韩精品色哟哟| 一本色道久久综合亚洲91| 久久久亚洲高清| 五月婷婷激情综合| 91麻豆自制传媒国产之光| 亚洲精品一区在线观看| 日韩国产欧美三级| 欧美视频日韩视频| 亚洲精品中文在线| 福利视频网站一区二区三区| 欧美大片拔萝卜| 蜜桃av噜噜一区| 欧美一区二区人人喊爽| 亚洲国产成人av好男人在线观看| 99re在线精品| 亚洲免费av高清| 91在线高清观看| 中文字幕一区二区三| www.亚洲精品| 中文字幕亚洲电影| 成人激情小说网站| 中文字幕亚洲一区二区av在线| 成人成人成人在线视频| 国产丝袜欧美中文另类| 国产福利一区在线|