📄 setup_tab_reeng.c
字号:
#if defined(BBK_DSS_555_DVD)||defined(BBK_DV911S)
if (idString==STR_OS_RETURN_MAIN_SETUP)
idString=STR_OS_EXIT_MENU;
#endif
#else
if (idString==STR_OS_RETURN_MAIN_SETUP) // no main page, so this item changes to exit_setup_menu
idString=STR_OS_EXIT_MENU;
#endif
#ifdef SUPER_DEFAULT_OSD_LANG
if((page==CUSTMPAGEINDEX)&&(index_y==CUSTMOSDITEM)&&(setupLevel!=1))
{
str = lang_names[osd_font_mode][id];
}
else
#endif
str = _OsdMessegeFont1[osd_font_mode][idString];
#ifdef SUPPORT_DISPLAY_MENU
if((In_Display_Menu()) && (index_y == PBC_MENU_ITEM)\
&& (cd_type_loaded == CDDVD))
{
BYTE buf[7];
osd_DrawString(SETUP_MENU_XSTART_PLUS+6, index_y+SETUP_MENU_YSTART_PLUS, str, cFont, cBackground);
psprintf(buf,"GOTO");
osd_DrawString(SETUP_MENU_XSTART_PLUS+1, index_y+SETUP_MENU_YSTART_PLUS, buf, cFont, cBackground);
}
else
if(index_y != BATTERY_ITEM)
#endif//end #ifdef SUPPORT_DISPLAY_MENU
osd_DrawString(xStart+xOffset, yStart, (char *)str, cFont, cBackground);
#ifdef VIDEO_SETUP_NEW_GUI//zhaoyanhua add 2004-1-7 18:36
if(page == VIDEOPAGE)
{
if(setup_item[page][index_y][0] == SET_SCALE)
{
if(updowngray)
cFont = 4;//HLCOLOR
else
cFont = SFONTCOLOR;
setup_VideoItemValue(index_y, cFont,SBGCOLOR);//show value with HL color.
} //draw_3rd_menu();
}
#endif //VIDEO_SETUP_NEW_GUI
#ifdef SUPPORT_DISPLAY_MENU
if(In_Display_Menu())
{
Set_Update_Item_Flag();
if(updowngray == 1)
show_display_item_content(index_y,SANTIFONTCOLOR,SANTIBGCOLOR);
else
show_display_item_content(index_y,SFONTCOLOR,SBGCOLOR);
}
#endif
}
#endif // end of DVD_SETUP_REENG
UINT16 run_save_unChk_cmd(UINT8 save)
{
int test,i,j;
UINT16 unChksum;
unChksum=0;
setup_VA2sel();
for(i=0;i<(MAX_SETUP_PAGE+MAX_CUSTM_SETUP_PAGE);i++) {
#if defined(BBK_NEW_SETUP)&&defined(BBK_DV961_DVD)
if(i == ONEKEYPASSPAGE)
continue;
//not calculate the last item :RETURN_TO_MAIN_PAGE
for(j=1;j<=(MAX_PAGE_ITEM-1);j++)
#else
for(j=1;j<=MAX_PAGE_ITEM;j++)
#endif
{
#ifdef SELECT_MEDIA_IN_SETUPMENU //Maoyong 2004-8-10 17:28 check sum not consider media switch
if( setup_item[i][j][1]==STR_OS_MEDIA_TYPE )
continue;
#endif
//rating and password
if((setup_item[i][j][1]==STR_OS_RATING)||(setup_item[i][j][1]==STR_OS_PASSWORD) )//||(setup_item[i][j][1]==STR_OS_REGION_CODE))
continue; //grade item need not load default value
#ifdef SUPER_DEFAULT_OSD_LANG
if(i==CUSTMPAGEINDEX)
{
if(setup_item[i][j][1]==STR_OS_OSD)
continue;
}
#endif
unChksum+=(UINT16)(setup_sel[i][j]);
}
}
if(save==1)
{
test=WriteToI2c(0xa0, sizeof(UINT32)+sizeof(setup_VA), (BYTE *)&unChksum, 2);
#ifdef MONE_SETUP
if(test==1)
printf("SAVE unChksum=%d,sizeof(setup_VA)=%d OK\n",unChksum,sizeof(setup_VA));
else
printf("SAVE unChksum=%d,sizeof(setup_VA)=%d ERROR\n",unChksum,sizeof(setup_VA));
#endif
}
return unChksum;
}
//modified by JS //for setup reengineering //20040810
//void run_save_sel_cmd(BYTE page,BYTE index)
void run_save_sel_cmd(BYTE value, BYTE index)
{
BYTE *p;
#ifdef MONE_SETUP
printf("\n SSSSSSSSSSSSS run_save_sel_cmd value:%d index:%d\n", value, index);
#endif
#if defined(BBK_NEW_SETUP)&&defined(BBK_DV961_DVD)
if(page == ONEKEYPASSPAGE)
return;
#endif
if(index>=MAX_SETUP_VA)
return;
//run_save_romChk_cmd();//terry,2003/12/15 05:11PM
p=(BYTE *)&setup_VA[index];
WriteToI2c(0xa0, sizeof(UINT32)+index, p, 1);
run_save_unChk_cmd(1);
}
void run_save_total_sel(void)
{
BYTE *p;
//UINT8 setup_VA[64] = {};
int test;
#ifdef MONE_SETUP
printf(">>>>> RUN TOTAL SEL CMD\n");
#endif
setup_sel2VA();
/*
int i;
for(i=0; i<MAX_SETUP_VA; i++)
{
printf("run_save_total_sel>>> setup_VA[%d] = %x\n", i, setup_VA[i]);
}
*/
//run_save_romChk_cmd();
p=(BYTE *)setup_VA;
test=WriteToI2c(0xa0, sizeof(UINT32), p, sizeof(setup_VA));
run_save_unChk_cmd(1);
}
//added by JS //for setup reengineering //20040810
void run_save_userSet_cmd(UINT8 *update)
{
int test;
#ifdef MONE_SETUP
printf("!!!run_save_userSet_cmd\n");
#endif
test=WriteToI2c(0xa0, sizeof(UINT32)+sizeof(setup_VA)+2, update, sizeof(update));
}
#ifdef SETUP_DONT_PAUSE//terry,2004/2/23 03:58PM
UINT8 user_set_write_cnt=sizeof(t_USER_SET);
void polling_10ms_save(void)
{
int test;
if(user_set_write_cnt<sizeof(t_USER_SET))
{
test=WriteToI2c(0xa0, sizeof(UINT32)+sizeof(setup_VA)+2+user_set_write_cnt, (BYTE *)&UserSet+user_set_write_cnt,1);
user_set_write_cnt++;
//printf("-%d",user_set_write_cnt);
}
}
#endif
void run_save_total_userSet(void)
{
int test;
#ifdef NEW_SEARCH_OSD
// YW:020725
//sound_type = SETUP_SPK_DOWNMIX;
//sound_type = ITEM_SPK_DOWNMIX[sound_type];
//JS 20040820 //for setup reengineering
UINT16 P, I;
P=setup_getItemPos(STR_OS_DOWNMIX_SETUP);
I=P&0xff;
P=P>>8;
sound_type=setup_item[P][I][setup_VA[SETUP_VA_DOWNMIX]];
#endif
#ifdef MONE_SETUP
printf("!!!run_save_total_userSet\n");
#endif
#ifdef SETUP_DONT_PAUSE//4-2-14 13:45
user_set_write_cnt=0;
printf("sizeof(t_USER_SET):%d\n",sizeof(t_USER_SET));
//polling_10ms_save();
#else
test=WriteToI2c(0xa0, sizeof(UINT32)+sizeof(setup_VA)+2, (BYTE *)&UserSet, sizeof(t_USER_SET));
#endif
#ifdef MONE_SETUP
/*
{
int i, j;
for (i=0; i<4; i++) {
for (j=0; j<7; j++) {
printf("setup_sel[%d][%d]=%d\n", i, j, setup_sel[i][j]);
}
}
}
*/
#endif
}
void setup_save_exit(void)
{
if (cd_type_loaded==CDDVD)
nav_param_by_user();
/* //marked by JS 20040820
if (full_scrn&CUSTM) {
SETUP_GRADE = SETUP_CUSTM_GRADE;
}
*/
run_save_total_userSet();
}
int setup_IsLock()//nono 20020707
{
if ( UserSet.parental_ststus==C_LOCK)
return 1;
else
return 0;
}
#if 0//ndef DVD_SETUP_REENG
void show_lock(int s,int mode)
{
//s : 0:lock 1:unlock
//mode : 0:normal 1:ANTI
int font,bg;
const char *str;
UserSet.parental_ststus=s;
setup_sel[page][index_y] = (MIN_ITEM_SEL+s);
if(mode)
{
font=SANTIFONTCOLOR;
bg=SANTIBGCOLOR;
}
else
{
#ifdef JIEKE_DVD
font = SBLACKCOLOR;
#else
font = SFONTCOLOR;
#endif
bg = SBGCOLOR;
}
str = _OsdMessegeFont1[osd_font_mode][STR_OS_LOCK+s];
#ifdef TONIC_DVD
if(ShowPasswordErr==0)
osd_DrawString(SETUP_SUB_XSTART+1, submenuStart+1, (char *)str , font, bg);
else
osd_DrawString(SETUP_SUB_XSTART+1, submenuStart+1, "ERROR" , font, bg);
#else//#ifdef TONIC_DVD
osd_DrawString(SETUP_SUB_XSTART+1, submenuStart+1, (char *)str , font, bg);
#endif//#ifdef TONIC_DVD
}
#endif
#if 0//ndef SETUP_DVD_REENG
const char * setup_SetItemString()
{
const char *str;
if(page==LANGPAGE)
{
if (id==STR_OS_OFF)
str = _OsdMessegeFont1[osd_font_mode][id];
else
str = lang_names[osd_font_mode][id];
}
#ifdef SUPER_DEFAULT_OSD_LANG
else if((page==CUSTMPAGEINDEX)&&(index_y==CUSTMOSDITEM))
str = lang_names[osd_font_mode][id];
#endif
else
str = _OsdMessegeFont1[osd_font_mode][id];
return str;
}
#endif
void setup_password(void)
{
setup_setPasswd();
}
void show_password(BYTE num)
{
setup_showPasswd(num);
}
void reset_passwd_cnt(void) /*jhuang 2001/5/17 05:13PM*/
{
tmp_passwd = 0;
digit_cnt = 0;
}
void read_custm_setup_select(void)
{
reset_passwd_cnt(); /*jhuang pending 2001/5/15 08:16PM*/
UserSet.parental_ststus=C_UNLOCK;
/* //marked by JS 20040820
SETUP_CUSTM_GRADE=SETUP_GRADE;
page=CUSTMPAGEINDEX;
*/
}
#ifdef RCD_GPIO_CONTROL
#define RCD_GPIO (1<<GPIO_N)
#define is_gpio_high (regs0->gpio_in[GPIO_N/16]&RCD_GPIO)
void set_region(void)
{
regs0->gpio_master[GPIO_N/16] |= RCD_GPIO;
regs0->gpio_oe[GPIO_N/16] &= ~RCD_GPIO;
if (is_gpio_high)
NP_P_RCD=0;
else
NP_P_RCD=0x01<<(CUS_RCD-1);
}
#else
void set_region(void)
{
UINT8 i,region;
if(UserSet.P_RCD)
{
NP_P_RCD= 0x01 << (UserSet.P_RCD-1);
}else
{
#ifdef NAV_DBG
printf("Region code:%x\n",pDSV->VMG_CAT_RM);
#endif
NP_P_RCD=0; //terry,2002/5/29 06:58PM
for(i=0,region=1;i<8;i++)
{
if( !(pDSV->VMG_CAT_RM&(region<<i)) )
{
NP_P_RCD=0x01 << i;
#ifdef NAV_DBG
printf("Region code:%x\n",i);
#endif
break;
}
}
#ifdef BBK_DVD//terry,2003/11/18 04:48PM
if(pDSV->VMG_CAT_RM==0) NP_P_RCD=0x4;//terry,2003/11/18 04:44PM,for CONAIR,BBK
#endif
}
}
#endif
void setup_ShowVolCtrlConfig()
{
return;
#if 0
const char *str;
BYTE fontColor;
BYTE i;
if ( (page!=AUDPAGE) ||
(index_y!=DIGIOUTITEM)
)
{
return;
}
if (SETUP_SPDIF!=SPDIFBITSTREAM) {
fontColor = SFONTCOLOR;
} else {
if ( (coding_mode_now&(AUDIF_CODING_MODE_DTS|
AUDIF_CODING_MODE_DTSCD|
//AUDIF_CODING_MODE_PCM| //DTSCD-BITSTREAM MODE, Jeff 20020719
AUDIF_CODING_MODE_AC3)
)||(cd_subtype==CD_DTS) )//nono 2-7-25 17:29
{
fontColor = SFONTCOLOR;
//fontColor = SGRAYCOLOR;
} else {
fontColor = SFONTCOLOR;
}
}
for (i=VOLCTRLSTART; i<=VOLCTRLEND; i++) {
if (coding_mode_now==AUDIF_CODING_MODE_LPCM) { //Jeff 20020703
if (i==KEYITEM) {
fontColor = SFONTCOLOR;
//fontColor = SGRAYCOLOR;
} el
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -