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

📄 osd.lst

📁 myson的MTV332的DEMO程序 主要功能有菜单的设计和无线遥控以及视频参数的调节
💻 LST
📖 第 1 页 / 共 5 页
字号:
1077   1      //        gotoxy(start_x,start_y);
1078   1      //        gotoxy(0,9);
1079   1      //        PrintByteString(progbar,30,MainPageCharColor);
1080   1              byMTV_OSDRA=start_y |Address;
1081   1              byMTV_OSDCA=start_x;
1082   1              for (i=BarSt;i< BarLen;i++)
1083   1                      byMTV_OSDDT0= _COBAR_EMPTY;
1084   1      
1085   1              //Painting for line color               
1086   1              byMTV_OSDRA=start_y |Attribute;
1087   1              byMTV_OSDCA=start_x;                    //painting the column j
1088   1              for (i=BarSt;i< BarLen;i++)
1089   1                      byMTV_OSDDT0=0x02;                //green color
1090   1      }
1091          
1092          void ShowBar1(BYTE start_x,BYTE start_y,BYTE value)
1093          {
1094   1              BYTE j=24;  //define in final position
1095   1              if( value <= 100)
1096   1                      j= value / 4;      //Get Major posittion
1097   1              else
1098   1                      j=24;           //More then 100 , must limit at 100
1099   1      
1100   1              if (j >24)
1101   1                      j=24;
1102   1                
1103   1              //Painting for Block char
1104   1              byMTV_OSDRA=start_y |Address;
C51 COMPILER V7.09   OSD                                                                   09/06/2006 13:39:48 PAGE 19  

1105   1              byMTV_OSDCA=start_x+ j;//start_x+ (j*2);
1106   1              byMTV_OSDDT0= _COBAR_BLOCK;
1107   1      
1108   1              //Painting for Block color              
1109   1              byMTV_OSDRA=start_y |Attribute;
1110   1              byMTV_OSDCA=start_x+j;                  //painting the column j
1111   1      
1112   1              switch (value %4)
1113   1              {
1114   2                      case 0:
1115   2                              byMTV_OSDDT0= 0x12;     break;          //Blue color
1116   2                      case 1:
1117   2                              byMTV_OSDDT0= 0x52;     break;          //Green Color
1118   2                      case 2:
1119   2                              byMTV_OSDDT0= 0x42;     break;          //Red color
1120   2                      case 3:
1121   2                              byMTV_OSDDT0= 0x62;     break;          //Blue+Red color
1122   2              }
1123   1      }
1124          
1125          //code BYTE CharData[]={_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_A,_B,_C,_D,_E,_F};
1126          
1127          void ShowProgress(BYTE *prog)
1128          {
1129   1              BYTE msgbuf[]={0x00,0x00};      //BYTE msgbuf[4]={0x00,0x00,0x00,0x00};
1130   1              WORD temp;//,temp1;
1131   1      
1132   1              GetProgressData(prog[3]);
1133   1      
1134   1              if(prog[3]!=InputSource)
1135   1              {
1136   2        //0°63 only 64 level
1137   2                      temp = (ItemValue.value - ItemValue.min)*100
1138   2                              /(ItemValue.max - ItemValue.min);
1139   2      
1140   2                      msgbuf[1] = HexTab[(temp%10)]; //HexTab[(temp1%10)]; 
1141   2                      msgbuf[0] = HexTab[(temp/10)]; //HexTab[(temp1/10)]; 
1142   2      
1143   2                      gotoxy(BarSt,ValueY);
1144   2                      switch(prog[3])
1145   2                      {
1146   3                              case BRIGHT_BRIGHTNESS:
1147   3                                      PrintByteString(Brightness_Item,sizeof(Brightness_Item),MainPageCharColor);
1148   3                                      break;
1149   3      
1150   3                              case COLOR_SATURATION:  
1151   3                                      PrintByteString(Saturation_Item,sizeof(Saturation_Item),MainPageCharColor);
1152   3                                      break;                          
1153   3      
1154   3                              case COLOR_HUE: 
1155   3                                      PrintByteString(Hue_Item,sizeof(Hue_Item),MainPageCharColor);
1156   3                                      break;
1157   3      
1158   3                              case BRIGHT_CONTRAST:                           
1159   3                                      PrintByteString(Contrast_Item,sizeof(Contrast_Item),MainPageCharColor);
1160   3                                      break;
1161   3      
1162   3                              case BRIGHT_SUBCONTRAST:                                
1163   3                                      PrintByteString(SubContrast_Item,sizeof(SubContrast_Item),MainPageCharColor);
1164   3                                      break;
1165   3      
1166   3                            case SHARPNESS:
C51 COMPILER V7.09   OSD                                                                   09/06/2006 13:39:48 PAGE 20  

1167   3                                   PrintByteString(Sharpness_Item,sizeof(Sharpness_Item),MainPageCharColor);
1168   3                                      break;
1169   3      
1170   3                              case ROTATION:
1171   3                                    break;
1172   3      
1173   3                              case GammaVg1:
1174   3                                      PrintByteString(GammaVg1_Str_Item,sizeof(GammaVg1_Str_Item),MainPageCharColor);
1175   3                                    break;
1176   3      
1177   3                              case GammaVg2:
1178   3                                      PrintByteString(GammaVg2_Str_Item,sizeof(GammaVg2_Str_Item),MainPageCharColor);
1179   3                                    break;
1180   3      
1181   3                              case Vcomamp:
1182   3                                      PrintByteString(VCOMAMP_Str_Item,sizeof(VCOMAMP_Str_Item),MainPageCharColor);
1183   3                                    break;
1184   3      
1185   3                              case Vcomdc:
1186   3                                      PrintByteString(VCOMDC_Str_Item,sizeof(VCOMDC_Str_Item),MainPageCharColor);
1187   3                                      break;
1188   3      
1189   3                              case Drivered:
1190   3                                      PrintByteString(DriveRed_Str_Item,sizeof(DriveRed_Str_Item),MainPageCharColor);
1191   3                                      break;
1192   3      
1193   3                              case Drivegreen:
1194   3                                      PrintByteString(DriveGreen_Str_Item,sizeof(DriveGreen_Str_Item),MainPageCharColor);
1195   3                                      break;
1196   3      
1197   3                              case Driveblue:
1198   3                                      PrintByteString(DriveBlue_Str_Item,sizeof(DriveBlue_Str_Item),MainPageCharColor);
1199   3                                      break;
1200   3      
1201   3                              case OSDHPosi:
1202   3                                      PrintByteString(OSDH_Item,sizeof(OSDH_Item),MainPageCharColor);
1203   3                                      break;
1204   3      
1205   3                              case OSDVPosi:
1206   3                                      PrintByteString(OSDV_Item,sizeof(OSDV_Item),MainPageCharColor);
1207   3                                      break;
1208   3      
1209   3                              case WHITELIMITE:
1210   3                                      PrintByteString(WhiteLimiter_Item,sizeof(WhiteLimiter_Item),MainPageCharColor);
1211   3                                      break;
1212   3      
1213   3                              case BLACKLIMITE:
1214   3                                      PrintByteString(BlackLimiter_Item,sizeof(BlackLimiter_Item),MainPageCharColor);
1215   3                                      break;
1216   3      
1217   3                              case Video_VPosi:
1218   3                                      PrintByteString(VerticalPos_Item,sizeof(VerticalPos_Item),MainPageCharColor);
1219   3                                      break;
1220   3      
1221   3                              case Video_HPosi:
1222   3                                      PrintByteString(HoriPos_Item,sizeof(HoriPos_Item),MainPageCharColor);
1223   3                                      break;          
1224   3      
1225   3                              /*
1226   3                              case HsyncStITEM:                               
1227   3                                      PrintByteString(HsyncStStr,15,MainPageCharColor);
1228   3                                      break;
C51 COMPILER V7.09   OSD                                                                   09/06/2006 13:39:48 PAGE 21  

1229   3                              
1230   3                              case HsyncEndITEM:                              
1231   3                                      PrintByteString(HsyncEndStr,15,MainPageCharColor);
1232   3                                      break;*/
1233   3                      }
1234   2                      
1235   2      
1236   2                      //New method for Necvox only modify block place
1237   2                      ShowEmptyBar1(BarSt,BarY);  //Only special to paint a 0~15 green line
1238   2                      ShowBar1(prog[0],prog[1],temp); //The Showbar1 only show 1 block
1239   2                      gotoxy(ValueX,ValueY);// Value char put at [29,6]
1240   2                      //PrintByteString(msgbuf,ValueLen,MainPageProcessColor);
1241   2                      PrintValue(temp,MainPageProcessColor);
1242   2              }
1243   1              else
1244   1                      ShowInputSource(ItemValue.value);
1245   1      }
1246          
1247          
1248          void ProgressSelect(BYTE *progress)
1249          {
1250   1              EnableOSD(); //
1251   1      
1252   1              if(!bMenuFlag)
1253   1              {
1254   2                      ShowProgress(progress);
1255   2                      bMenuFlag = 1;
1256   2                      return;
1257   2              }
1258   1      
1259   1              if(KeyNo != NOKEY || IR_Key != IR_No_Key)
1260   1                      OsdTimer = OSD_OFFTIME;
1261   1      
1262   1              if(OsdTimer == 0)
1263   1              {
1264   2                      bMenuFlag = 0;
1265   2                      MenuProcess = Disp_Entry;
1266   2              }
1267   1      
1268   1              if(KeyNo == DOWNKEY|| IR_Key == IR_Left_Key)                    
1269   1              {
1270   2                      if(progress[3] != InputSource)
1271   2                      {
1272   3                              if(ItemValue.value == ItemValue.min)
1273   3                                      return;
1274   3                              if(ItemValue.value > ItemValue.min)
1275   3                                      ItemValue.value--;
1276   3                              else
1277   3                                      ItemValue.value = ItemValue.min;
1278   3                      }
1279   2                      else
1280   2                      {
1281   3                              if(ItemValue.value == 0)
1282   3                                      ItemValue.value = 3;
1283   3                              else if(ItemValue.value == 3)
1284   3                                      ItemValue.value = 2;
1285   3                              else if(ItemValue.value == 2)
1286   3                                      ItemValue.value = 1;
1287   3                              else if(ItemValue.value == 1)
1288   3                                      ItemValue.value = 0;
1289   3                      }
1290   2                      SetProgressData(progress[3]);
C51 COMPILER V7.09   OSD                                                                   09/06/2006 13:39:48 PAGE 22  

1291   2                      ShowProgress(progress); 
1292   2                          //ShowSubMenu(3);                   // Mark in 050807 for disable sub menu
1293   2              }
1294   1              else if(KeyNo == UPKEY || IR_Key == IR_Right_Key)
1295   1              {
1296   2                      if(progress[3] != InputSource)
1297   2                      {
1298   3                              if(ItemValue.value == ItemValue.max)
1299   3                                      return;
1300   3                              if(ItemValue.value < ItemValue.max)
1301   3                                      ItemValue.value++;
1302   3                              else
1303   3                                      ItemValue.value = ItemValue.max;                                
1304   3                      }
1305   2                      else
1306   2                      {
1307   3                              if(ItemValue.value == 0)
1308   3                                      ItemValue.value = 1;
1309   3                              else if(ItemValue.value == 1)
1310   3                                      ItemValue.value = 2;
1311   3                              else if(ItemValue.value == 2)
1312   3                                      ItemValue.value = 3;
1313   3                              else if(ItemValue.value == 3)
1314   3                                      ItemValue.value = 0;
1315   3                      }
1316   2                      SetProgressData(progress[3]);
1317   2                      ShowProgress(progress);                         
1318   2                         //ShowSubMenu(2);            // Mark in 050807       for disable sub menu
1319   2              }
1320   1                      
1321   1              else  if(KeyNo == SELECTKEY || IR_Key == IR_Menu_Key || KeyNo == MENUKEY)
1322   1              {        
1323   2                      bMenuFlag=0;
1324   2                      bSubMenuFlag=0;
1325   2                      bClrFlag=0;
1326   2                      if(progress[3] == InputSource)
1327   2                      {
1328   3                              SetInputSource();
1329   3                      }
1330   2                      switch(MenuFlagState)
1331   2                      {
1332   3                              case 0:
1333   3                                      MenuProcess = Disp_VideoMenu;
1334   3                                      break;
1335   3                              case 1:
1336   3                                       MenuProcess = GammaPWM;
1337   3                                      break;
1338   3                              case 2:
1339   3                                      MenuProcess = DispContBright;
1340   3                                      break;
1341   3                              case 3:
1342   3                                      MenuProcess = OSDSetup;
1343   3                                      break;
1344   3                              case 4:
1345   3                                      MenuProcess = Disp_VideoPos;
1346   3                                      break;
1347   3                      

⌨️ 快捷键说明

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