⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 password.c

📁 OSD显示,单片机实现,ICCAVR! 代码风格严谨,为高人所写.我仅为了上传换取资料
💻 C
📖 第 1 页 / 共 2 页
字号:
                version_show_entry=VER_SHOW_VIA_NORMAL;
#endif
                display_custm_menu();
                return;
            }
         }
#ifdef AD_TCL    //2004-3-22 12:57 lijd 
        else if (rx==inter_Pass[inter_count])
            {
                inter_count++;
                if(inter_count>=4) 
                {
                    psprintf(linebuf,INTER_VER);           
                    strcpy(RegionValStr[REGION2], linebuf);
                    PrintOsdMsg(STR_OS_SPACE, REGION2, 1, 1);
                    inter_count=0;
                    return;
                }
            }
        else if (rx==macro_Pass[macro_count])
            {
                macro_count++;
                if(macro_count>=4) 
                {
                    psprintf(linebuf,MACRO_VER);           
                    strcpy(RegionValStr[REGION2], linebuf);
                    PrintOsdMsg(STR_OS_SPACE, REGION2, 1, 1);
                    macro_count=0;
                    return;
                }
            }
#endif
        else 
        {
            #ifdef AD_TCL//2004-3-22 14:51 lijd
        macro_count=0;
            inter_count=0;
            #endif
            custm_count=0;
        }
        
#ifdef SUPPORT_PASSWD2        
        if(rx==Custm_Password1[custm_count1]) 
        {
            custm_count1++;
            if(custm_count1>=4) 
            {                
#ifdef QSI_PLATFORM //qsi: added by johnson 20040713
                version_show_entry=VER_SHOW_VIA_SPECIAL;
#endif
                display_custm_menu();
                only_disp_setup_menu=1;
                return;
            }
        } else 
        {
            custm_count1=0;
        }
        
        if(only_disp_setup_menu==1)
        {
            ExitSetupPage(1);
            only_disp_setup_menu = 0;
        }
#endif


#ifdef SUPPORT_PASSWD3
        if( full_scrn==(SETUP|CUSTM) )
        {
            if(rx==Custm_Password3[custm_count3]) 
            {
                custm_count3++;
                if(custm_count3>=4) 
                {
                    setup_audio_mode=1;
                        chg_audio_default_mode();
                }
            } else 
            {
                custm_count3=0;
            }
    }
#endif

#ifdef DVD_SERVO
        if(rx==Servo_Password[servo_count]) { //Jeff 20030818
            servo_count++;
            if(servo_count>=8) {
                servo_count=0;
                psprintf(RegionValStr[REGION2], "%s", GetServoCodeVersion());
                PrintOsdMsg(STR_OS_SPACE, REGION2, 10, 1);
                return;
            }
        } else {
            servo_count=0;
        }
#endif

        #ifdef WATCH_LOADER_ID                
        if(rx==Loader_Password[LoaderId_count]) {
        
            extern char Loader_ID[28];//kenny 2002/11/22
            
            LoaderId_count++;
            if(LoaderId_count>=4) {
                LoaderId_count=0;
                                        
                psprintf(RegionValStr[REGION3], "LOADER ID: %s", &Loader_ID[0]);
                PrintOsdMsg(STR_OS_SPACE, REGION3, 0, 1);
                
                return;
            }
        } else {
            LoaderId_count=0;
        }
        #endif //#ifdef WATCH_LOADER_ID

        #if defined (SUPPORT_SPG_GAME) && !defined (DVDRELEASE) && defined (SPG_ICE)               
        if(rx==ICE_Password[ICEId_count]) {
            extern void FS_ICEMainLoop();
          
            ICEId_count++;

            if(ICEId_count>=4) {
                ICEId_count=0;
                FS_ICEMainLoop();                     
                return;
            }
        } else {
            ICEId_count=0;
        }
        #endif //#ifdef WATCH_LOADER_ID

    } //if( (play_state==VCD_STATE_IDLE)||(play_state==VCD_STATE_OPEN) )

}

#ifdef PULIANG_PASSWORD     //yaowh add 04-12-22
static inline void puliang_chk_password(UINT8 rx)
{
    if ( (rx==Custm_Password[custm_count])&&(full_scrn&SETUP) )
    {
        custm_count++;
        if(custm_count>=4) 
        {
            display_custm_menu();
            return;
        }
    }
    else if( (rx==Custm_Password_1[custm_count_1])&&(play_state==VCD_STATE_OPEN) )
    {
        custm_count_1++;
        if(custm_count_1>=4) 
        {
            PrintOsdMsg(FIRM_WARE_VER , REGION1, 0, 0);
            return;
        }
    }             
    else if( (rx==Custm_Password_2[custm_count_2])&&(play_state==VCD_STATE_OPEN) )
    {
        custm_count_2++;
        if(custm_count_2>=4) 
        {
            PrintOsdMsg(REGION_CODE , REGION1, 0, 0);
            return;
        }
    }
    else 
    {
        custm_count_1=0;
        custm_count_2=0;
        custm_count=0;
    }
}
#endif  //#ifdef puliang_password

static inline void eastech_chk_password(UINT8 rx __attribute__((unused)))
{
#ifdef EASTECH_PASSWORD
    //printf("enter2\n");
    //printf("enter_display_flag= %x\n",enter_display_flag);
    //printf("------------\n");
    //printf("play_state= %x\n",play_state);
    if( (play_state==VCD_STATE_OPEN)&&(enter_display_flag)) //||(play_state==VCD_STATE_OPEN) ) 
    {
        //printf("enter-------------1\n");
           if (full_scrn&SETUP) 
            {
                    custm_count=0;
            }
           if(custm_count==0)
           {
            temp_data[0]=0;
            temp_data[1]=0;
            temp_data[2]=0;
            temp_data[3]=0;
           }
        temp_data[custm_count]=rx;
        custm_count++;

        if(temp_data[0]==Custm_version[0] && 
        temp_data[1]==Custm_version[1] && 
        temp_data[2]==Custm_version[2])
        {
            psprintf(linebuf,"%s %d ",VERSION_INFORMATION_STRING,UserSet.P_RCD);
            //psprintf(linebuf,VERSION_INFORMATION_STRING);        
            strcpy(RegionValStr[REGION2], linebuf);
            PrintOsdMsg(STR_OS_SPACE, REGION2, 1, 1);
            timeout_osd[REGION2]= 3*OSD_TIMEOUT;            
            custm_count=0;
            enter_display_flag=0;
            return;
        }
        if(temp_data[0]==Custm_Password[0] && 
        temp_data[1]==Custm_Password[1] && 
        temp_data[2]==Custm_Password[2]&&
        temp_data[3]==Custm_Password[3])
        {
            display_custm_menu();
            enter_display_flag=0;
            custm_count=0;
                    return;
        }
        if(custm_count>4)
        {
            custm_count=0;
            enter_display_flag=0;
        }
        return;
    }
#endif//#ifdef EASTECH_PASSWORD
}
 #ifdef MIDI_EJECT_PASSWORD    //ouyang add for eject password 2004-11-20 15:10
     
UINT8 midi_open_pwd_start = 0;
UINT8 midi_open_pwd_finished = 0;    
static inline int midi_eject_chk_password(UINT8 rx)
{
    if(midi_open_pwd_start)
    {
           if (full_scrn&SETUP) 
            {
             midi_open_count=0;
            }
           if(midi_open_count==0)
           {
            temp_num[0]=0;
            temp_num[1]=0;
            temp_num[2]=0;
            temp_num[3]=0;
           }
            temp_num[midi_open_count]=rx;
           if( rx != IRC_EJECT )
            midi_open_count++;
            else
             midi_open_count=0;
printf("========temp_num================= %d %d %d %d =====\n",temp_num[0],temp_num[1],temp_num[2],temp_num[3]);
printf("========midi_open_password ====== %d %d %d %d =====\n",midi_open_password[0],midi_open_password[1],midi_open_password[2],midi_open_password[3]);
        if(temp_num[0]==midi_open_password[0] && 
        temp_num[1]==midi_open_password[1] && 
        temp_num[2]==midi_open_password[2]&&
        temp_num[3]==midi_open_password[3])
        {
            if( rx == IRC_SELECT ){
            //enter_display_flag=0;
            midi_open_pwd_finished=1;
            ircmd_eject_toggle();
            midi_open_count=0;
            return 0;
       }            
        }else
        {
            extern void CleanSysMessage(BYTE);
//            extern void osd_Clear_Region(BYTE reg, BYTE bkColor);
            if( rx == IRC_SELECT ){//xlluo modify here 11:16 2004-12-21
                midi_open_pwd_start     =0;    
                midi_open_pwd_finished  =0; 
                midi_open_count=0;
                CleanSysMessage(1);
               }     
        }
        if(midi_open_count>4)
        {
            midi_open_count=0;
            //enter_display_flag=0;
        }
//        return 1;
    }
    return 1;
}

#endif//#ifdef MIDI_EJECT_PASSWORD    //ouyang add for eject password 2004-11-20 15:10


void chk_password(UINT8 rx)
{
#ifdef PASSWORD
	#if defined( EASTECH_PASSWORD )
        eastech_chk_password(rx);
    #elif defined(PULIANG_PASSWORD)     //yaowh add 04-12-22
        puliang_chk_password(rx);
    #elif defined(ORITRON_PASSWORD)//libing 2005-4-25 10:56
        oritron_chk_password(rx);  
    #elif defined( MIDI_EJECT_PASSWORD )   //ouyang add for eject password 2004-11-20 15:10
        if (!midi_eject_chk_password(rx)) return;
        standard_chk_password(rx);        //ouyang 2004-12-3 11:39
    #else
        standard_chk_password(rx);
    #endif
#endif //#ifdef PASSWORD

    safe_srn_off();

    if(old_key==rx)
    {
        UINT16 stmp = regs0->rtc_15_0;
        int diff = stmp-timestamp_key;

        #ifdef Ti3001_OSD_UI_1      // AMP osd timeout=2*OSD_TIMEOUT //jason 2-10-4 15:34
        if (diff < OSD_TIMEOUT*2)
        #elif defined(NEW_UART_COMMAND)
        if(diff< OSD_TIMEOUT*2)
        #else
        if (diff < OSD_TIMEOUT)
        #endif
        {
            if(action_click)
                timestamp_key = regs0->rtc_15_0;

            action_click=1;
            //printf("action\n");
        }else
        {
            timestamp_key = regs0->rtc_15_0;
            action_click=0;
            //printf("action time out\n");
        }
    }else
    {
        timestamp_key = regs0->rtc_15_0;
        action_click=0;
        //printf("difference key\n");
    }

    #ifndef IR_TOOL
    #ifdef IR_DBG
    printf("\n\n-----IR input, rx:%x ,cmd:%s -----\n",rx,irc_func_str[rx]);
    #endif
    #endif

    if(system_state!=SYSTEM_IDLE)
    {
        ircmd_pre_paser(rx);
    }
    old_key=(BYTE)rx;
}



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -