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

📄 osdmenu.lst

📁 车载DVD osdIC TW8816原厂代码
💻 LST
📖 第 1 页 / 共 5 页
字号:
 982   2      
 983   2                      MenuTitle = MenuChild;  //  Restore the Menu status.
 984   2                      title_item = cursor_item;
 985   2                      MenuChild = MenuTitle[title_item].Child;
 986   2                      cursor_item = temp_cursor;
 987   2              
 988   2                      //DoAction(EXITMENU);
 989   2                      
 990   2                      if( DisplayInputHold ) DisplayInput();
 991   2                      else if( IsAudioMuteOn() ) DisplayMuteInfo();
 992   2                      return;
 993   2              }
 994   1      
 995   1              #ifdef DEBUG_OSD
                      dPrintf("\r\n++(OSDHighMenu_sub) OSDMenuLevel:%d", (WORD)OSDMenuLevel );
                      #endif
 998   1              
 999   1              MenuFormat = ( CODE_P struct MenuType *) MenuTitle[title_item].TypeData;
1000   1      
1001   1              OSDMenuLevel--; // Up Menu tree
1002   1      
1003   1              if(OSDMenuLevel == 1){  // Top Menu Level
1004   2                      cur_osdwin = OSDMENU_TOPWIN;//Window #4
1005   2                      DisplayOSDMenu();
1006   2              }
1007   1              else
1008   1              {
1009   2                      DrawMenulist(0); // Redraw List and contents.
1010   2                      DisplayCursor();
1011   2              }
1012   1              
1013   1              // 3D Effect Cursor Top
1014   1              if(OSDMenuLevel == 1) {
1015   2                      WriteDecoder(TW88_WINNUM, OSDCURSORWINDOW-1);
1016   2                      WriteDecoder(TW88_WINATTR, OSD_Window_Attr(WINDOW_3D_TOP,BG_COLOR_BLACK|EXTENDED_COLOR,0,WINDOW_3D_ENABL
             -E,WINDOW_ENABLE));    
1017   2              }
1018   1      
1019   1              return;
1020   1      }
1021          
1022          
1023          BYTE DoAction(BYTE id)
1024          {
1025   1              BYTE ret = 1;
1026   1      
1027   1              #ifdef DEBUG_OSD
                      dPrintf("\r\n++(DoAction) id:0x%x", (WORD)id );
                      #endif
1030   1              switch( id ) {
1031   2      
1032   2              case CHANGE_TO_COMPOSITE:
1033   2              case CHANGE_TO_SVIDEO:
1034   2              case CHANGE_TO_COMPONENT:
1035   2      
1036   2              #ifdef SUPPORT_TV
1037   2              case CHANGE_TO_TV:
1038   2              #endif
1039   2      
1040   2              #ifdef SUPPORT_PC
C51 COMPILER V7.50   OSDMENU                                                               04/01/2008 15:02:25 PAGE 18  

1041   2              case CHANGE_TO_PC:
1042   2              case CHANGE_TO_DIGITALVGA:
1043   2              #endif
1044   2      
1045   2              #ifdef SUPPORT_DTV
                      case CHANGE_TO_DTV:
                      #endif
1048   2      
1049   2                                                                      ChangeInput( id & 0x0f );                       
1050   2                                                                      break;
1051   2                                                              
1052   2              #ifdef SUPPORT_PC
1053   2              case AUTOADJUST:                        
1054   2                                                                      AutoAdjust();
1055   2                                                                      break;
1056   2              /*case AUTOADJUST2:                     ret = DetectAndSetForVGAInput(2);
1057   2                                                                      LCDPowerON(0);  //HHY 1.63
1058   2                                                                      SetOSDLastKeyInTime();
1059   2                                                                      ClearCursor();
1060   2                                                                      cursor_item = 0;
1061   2                                                                      DisplayCursor();                
1062   2                                                                      break;*/
1063   2              case RESET_PCVALUE:                     ClearOSDInfo();
1064   2                                                                      ResetPanelAttributeValue();
1065   2                                                                      ResetPCValue();
1066   2                                                                      ResetOSDValue();
1067   2                                                                      ResetAudioValue();
1068   2                                                                      break;
1069   2      
1070   2              case PCCOLORADJUST:                     
1071   2                                                                      break;
1072   2              #endif
1073   2              
1074   2              
1075   2              case RESET_VIDEOVALUE:          ClearOSDInfo();
1076   2                                                                      ResetVideoValue();
1077   2                                                                      ResetOSDValue();
1078   2                                                                      ResetAudioValue();
1079   2                                                                      break;
1080   2      
1081   2              #ifdef SUPPORT_TV
1082   2              case SCAN_CHANNEL:                      ClearOSDInfo();
1083   2                                                                      DisplayScanTV();                
1084   2                                                                      delay(50);                              //protect for repeat key
1085   2                                                                      ScanTVChannel();
1086   2                                                                      ClearScanTV();                  
1087   2                                                                      break;
1088   2      
1089   2              #ifdef PAL_TV
1090   2              case EDIT_CHANNEL:                      ChannelEdit_Window();
1091   2                                                                      ChannelEdit_Flag = 1;
1092   2                                                                      break;
1093   2              #endif // PAL_TV
1094   2              #endif // SUPPORT_TV
1095   2      
1096   2      //----
1097   2              case DISP_INFO:                         DisplayInfo_OSD();      
1098   2                                                                      displayOnValueWindow = 1;
1099   2                                                                      break;
1100   2      
1101   2              case TOHIGHMENU:                        OSDHighMenu_sub();                                              
1102   2                                                                      break;
C51 COMPILER V7.50   OSDMENU                                                               04/01/2008 15:02:25 PAGE 19  

1103   2      
1104   2              case EXITMENU:                          CloseOSDMenu(); 
1105   2                                                                      if( DisplayInputHold ) DisplayInput();
1106   2                                                                      else if( IsAudioMuteOn() ) DisplayMuteInfo();
1107   2                                                                      break;
1108   2              }
1109   1              return ret;
1110   1      }
1111          
1112          
1113          BYTE GetNextCursorMenuItem( CODE_P struct DefineMenu *DMp, BYTE itemno, BYTE flag)
1114          {
1115   1              BYTE new_cursor;
1116   1      
1117   1              switch( flag ) {
1118   2              case UP:        new_cursor = GetUpperMenuItem( /*DMp,*/ itemno );               break;
1119   2              case DN:        new_cursor = GetLowerMenuItem( DMp, itemno );           break;
1120   2              }
1121   1              return new_cursor;
1122   1      }
1123          
1124          //============== Public functions =================================================
1125          //CODE BYTE TryAgainMsg[]={ "Try again."};
1126          
1127          BYTE SaveValue1(void)
1128          {
1129   1      //      BYTE          /*ret=0,*/ addroff;
1130   1      
1131   1              switch( MenuChild[cursor_item].Type )   {
1132   2              
1133   2              case NUMBER:
1134   2                      switch ( MenuChild[cursor_item].Id ) {
1135   3      
1136   3                              case SLEEP_TIMER:               SetSleepTimer( OSDItemValue );  
1137   3                                                                              return 1;       //break;
1138   3                              }
1139   2                              //ret = 1;
1140   2                              break;
1141   2              
1142   2              default:        break;
1143   2              }
1144   1      
1145   1              return 0;       
1146   1      }
1147          
1148          void ClearValueWin(void)
1149          {
1150   1              SaveValue1();
1151   1              //ShowOSDWindow(OSDBARWINDOW, FALSE);
1152   1              val_osdwin = 0xff;
1153   1              OnChangingValue = 0;
1154   1      }
1155          
1156          void OSDCursorMove(BYTE flag )
1157          {
1158   1              BYTE new_cursor, old_cursor;
1159   1              WORD dat;
1160   1      
1161   1              #ifdef DEBUG_OSD
                      dPrintf("\r\n++(OSDCursorMove)cursor_item:%d __", (WORD)cursor_item);
                      #endif
1164   1      
C51 COMPILER V7.50   OSDMENU                                                               04/01/2008 15:02:25 PAGE 20  

1165   1                    if (displayOnValueWindow) return;
1166   1                      #ifdef PAL_TV
1167   1                      if( ChannelEdit_Flag ) return;
1168   1                      #endif
1169   1                      
1170   1                      if( MenuChild[ cursor_item ].Id == PC_COLOR_TEMP && GetPCColorTempModeEE() != 3 ) return; // User
1171   1                      if( MenuChild[ cursor_item ].Id == VIDEO_MODE && GetVideoModeEE() != 3 ) return; // User
1172   1      
1173   1                      new_cursor = GetNextCursorMenuItem( MenuChild, cursor_item, flag );     // Get item to move
1174   1                      
1175   1                      if( new_cursor ==NIL ) {                
1176   2                              BYTE i;
1177   2                              if( flag == UP )
1178   2                                      for(i=0; i<8; ){
1179   3                                              new_cursor=i;
1180   3                                              if( (i=GetLowerMenuItem(MenuChild, i) ) == NIL) break;
1181   3                                              
1182   3                                      }
1183   2                                      //new_cursor = MenuFormat->height - 1;
1184   2                              else
1185   2                                      new_cursor = 0;
1186   2                      }
1187   1      
1188   1                      if( OnChangingValue )   {
1189   2                              ClearValueWin();
1190   2                      }
1191   1                      if( OSDMenuLevel != 1) ClearCursor();
1192   1      
1193   1                      old_cursor = cursor_item;
1194   1                      cursor_item = new_cursor;
1195   1                      if(OSDMenuLevel == 1)
1196   1                      { 
1197   2                              WaitEndofDisplayArea(); 
1198   2                              dat = GetOSDWindowY(OSDCURSORWINDOW);
1199   2                              dat += (cursor_item-old_cursor)*(0x0a);
1200   2                              SetOSDWindowY_TW88(OSDCURSORWINDOW,dat);
1201   2                              WriteDecoder(TW88_WINNUM, OSDCURSORWINDOW-1);
1202   2                              WriteDecoder(TW88_WINSADDRLO, cursor_item*2);   
1203   2      
1204   2                              DisplayOSDMenu();
1205   2      
1206   2                      }
1207   1                      else    {
1208   2              
1209   2                      if( MenuChild[ old_cursor ].Id == OSDLANG)
1210   2                                      DrawMenulist(0); //             Recover Attr. and menu Data list
1211   2                              DisplayCursor();
1212   2                      }
1213   1      }
1214          
1215          void OSDValueUpDn(BYTE flag)
1216          {
1217   1              CODE_P BYTE *ptr;
1218   1              WORD val;
1219   1              WORD addr;
1220   1      //      BYTE len1;
1221   1      
1222   1              addr = OSDMENU_SUBADDR;
1223   1              addr = addr + MAX_DESC + (cursor_item+1)*MenuFormat->width;
1224   1      
1225   1              switch ( MenuChild[cursor_item].Type ) {
1226   2              
C51 COMPILER V7.50   OSDMENU                                                               04/01/2008 15:02:25 PAGE 21  

1227   2              case BAR:       
1228   2                                      val = SetItemValue(MenuC

⌨️ 快捷键说明

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