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

📄 mstar.lst

📁 Maria2 CarTV 20060707 Tony
💻 LST
📖 第 1 页 / 共 5 页
字号:
1016   1      
1017   1          msSetOutputTiming( OUTPUT_FREERUN );
1018   1          msWriteRegsTbl(tFreeRunModeTbl);
*** ERROR C202 IN LINE 1018 OF ..\..\KERNAL\MSTAR.C: 'tFreeRunModeTbl': undefined identifier
1019   1      
1020   1          Set_FreeRunModeFlag();
1021   1      
1022   1          msWriteByte (BK0_00_REGBK, ucBank); // recovery bank
1023   1      }
1024          
1025          void msSetOutputTiming( BYTE ucOutputTimingCtl )
1026          {
1027   1          BYTE ucBank; // bank buffer
1028   1      
1029   1          ucBank = msReadByte(BK0_00_REGBK); // store bank
1030   1      
1031   1          //printf("\r\nmsSetOutputTiming(%x)", ucOutputTimingCtl);
1032   1      
1033   1          msWriteByte(BK0_00_REGBK, REG_BANK_SCALER);
1034   1      
C51 COMPILER V8.01   MSTAR                                                                 11/28/2006 08:08:06 PAGE 19  

1035   1          msSetOutputSyncControl( ucOutputTimingCtl );
1036   1      
1037   1          if( ucOutputTimingCtl&OUTPUT_FREERUN )
1038   1          {
1039   2              msWriteWord(BK0_4F_VDTOT_H, PanelVTotal - 1);  // output vtotal
*** ERROR C202 IN LINE 1039 OF ..\..\KERNAL\MSTAR.C: 'PanelVTotal': undefined identifier
1040   2              msWriteWord(BK0_55_HDTOT_H, PanelHTotal - 1);  // output htotal
*** ERROR C202 IN LINE 1040 OF ..\..\KERNAL\MSTAR.C: 'PanelHTotal': undefined identifier
1041   2          }
1042   1          else
1043   1          {
1044   2              //msWriteWord(BK0_4F_VDTOT_H, 0x7FF); // output vtotal
1045   2          }
1046   1      
1047   1          SetOutputClock( ucOutputTimingCtl );
1048   1      
1049   1          msWriteByte(BK0_00_REGBK, ucBank);
1050   1      }
1051          
1052          void SetCaptureWindow()
1053          {
1054   1          BYTE ucBank;
1055   1      
1056   1          ucBank = msReadByte(BK0_00_REGBK); // store bank
1057   1      
1058   1          msWriteByte(BK0_00_REGBK, REG_BANK_SCALER);
1059   1          #if VGA_ENABLE
1060   1          if (IsVGAInUse())
1061   1          {
1062   2              msWriteWord(BK0_06_SPRVST_H, g_ModeSetting.VStart);
1063   2              msWriteWord(BK0_08_SPRHST_H, g_ModeSetting.HStart);
1064   2          }
1065   1          else
1066   1          #endif
1067   1          {
1068   2      
1069   2              msWriteWord(BK0_06_SPRVST_H, g_WindowInfo.V_CapStart);
1070   2              msWriteWord(BK0_08_SPRHST_H, g_WindowInfo.H_CapStart);
1071   2          }
1072   1          msWriteWord(BK0_0A_SPRVDC_H, g_WindowInfo.V_CapSize);
1073   1          msWriteWord(BK0_0C_SPRHDC_H, g_WindowInfo.H_CapSize+8);
1074   1      
1075   1      #if(ENABLE_MONITOR_VTOTAL)
                  if( IsVideoPortInUse() )
                      msMonitorVTotal( 1 ); // Init
              #endif
1079   1      
1080   1          msWriteByte(BK0_00_REGBK, ucBank); // recovery bank
1081   1      }
1082          
1083          void SetDisplayWindow()
1084          {
1085   1          BYTE ucBank; // bank buffer
1086   1      
1087   1          ucBank = msReadByte(BK0_00_REGBK); // store bank
1088   1      
1089   1          msWriteByte(BK0_00_REGBK, REG_BANK_SCALER);
1090   1      
1091   1          msWriteWord(BK0_49_SIHST_H, PanelHStart); // Image H start
*** ERROR C202 IN LINE 1091 OF ..\..\KERNAL\MSTAR.C: 'PanelHStart': undefined identifier
1092   1          msWriteWord(BK0_4D_SIHEND_H, PanelHStart + PanelWidth - 1); // Image H end
*** ERROR C202 IN LINE 1092 OF ..\..\KERNAL\MSTAR.C: 'PanelHStart': undefined identifier
C51 COMPILER V8.01   MSTAR                                                                 11/28/2006 08:08:06 PAGE 20  

1093   1      
1094   1          msWriteWord(BK0_41_VFDEST_H, PANEL_DE_VSTART); // DE V start
*** ERROR C202 IN LINE 1094 OF ..\..\KERNAL\MSTAR.C: 'PANEL_DE_VSTART': undefined identifier
1095   1      
1096   1          if(IsVGAInUse())
1097   1              {
1098   2                  msWriteWord(BK0_45_VFDEEND_H, PanelHeight-1);
*** ERROR C202 IN LINE 1098 OF ..\..\KERNAL\MSTAR.C: 'PanelHeight': undefined identifier
1099   2                  msWriteWord(BK0_4B_SIVEND_H, PanelHeight-1);
*** ERROR C202 IN LINE 1099 OF ..\..\KERNAL\MSTAR.C: 'PanelHeight': undefined identifier
1100   2              }
1101   1          else
1102   1              {
1103   2                  msWriteWord(BK0_45_VFDEEND_H, PanelVdeEnd-1);
*** ERROR C202 IN LINE 1103 OF ..\..\KERNAL\MSTAR.C: 'PanelVdeEnd': undefined identifier
1104   2                  msWriteWord(BK0_4B_SIVEND_H, PanelVSiEnd-1);
*** ERROR C202 IN LINE 1104 OF ..\..\KERNAL\MSTAR.C: 'PanelVSiEnd': undefined identifier
1105   2              }
1106   1      
1107   1      
1108   1          msWriteByte(BK0_00_REGBK, ucBank); // recovery bank
1109   1      }
1110          
1111          void msProgDigitalWin( BYTE ucOutputTimingCtl )
1112          {
1113   1          BYTE ucVideoSystem;
1114   1          //printf("\r\nmsProgDigitalWin(),%d", g_wCRT_OutVFreq);
1115   1      
1116   1          if( IsSrcHasSignal() && ((ucOutputTimingCtl&3)==0))
1117   1          {
1118   2              ucVideoSystem = g_VdInfo.ucVideoSystem;
1119   2          }
1120   1          else // No signal or Freerun
1121   1          {
1122   2              if( g_InOutCtl.inOutVFreq == 50)
1123   2                  ucVideoSystem = SIG_PAL;
1124   2              else
1125   2                  ucVideoSystem = SIG_NTSC;
1126   2          }
1127   1      
1128   1      
1129   1          g_WindowInfo.H_CapStart= tMsVDCapture[ucVideoSystem].VideoHStart;
*** ERROR C202 IN LINE 1129 OF ..\..\KERNAL\MSTAR.C: 'tMsVDCapture': undefined identifier
1130   1          g_WindowInfo.V_CapStart = tMsVDCapture[ucVideoSystem].VideoVStart;
*** ERROR C202 IN LINE 1130 OF ..\..\KERNAL\MSTAR.C: 'tMsVDCapture': undefined identifier
1131   1          g_WindowInfo.H_CapSize = tMsVDCapture[ucVideoSystem].HRange;
*** ERROR C202 IN LINE 1131 OF ..\..\KERNAL\MSTAR.C: 'tMsVDCapture': undefined identifier
1132   1          g_WindowInfo.V_CapSize = tMsVDCapture[ucVideoSystem].VRange;
*** ERROR C202 IN LINE 1132 OF ..\..\KERNAL\MSTAR.C: 'tMsVDCapture': undefined identifier
1133   1      
1134   1          if(IsSVideoInUse())
1135   1          {
1136   2              g_WindowInfo.H_CapStart=(BYTE)(g_WindowInfo.H_CapStart+tSvideoCaptureOffset[ucVideoSystem].SVideoH
             -StartOffset);
*** ERROR C202 IN LINE 1136 OF ..\..\KERNAL\MSTAR.C: 'tSvideoCaptureOffset': undefined identifier
1137   2              g_WindowInfo.V_CapStart=(BYTE)(g_WindowInfo.V_CapStart+tSvideoCaptureOffset[ucVideoSystem].SVideoV
             -StartOffset);
*** ERROR C202 IN LINE 1137 OF ..\..\KERNAL\MSTAR.C: 'tSvideoCaptureOffset': undefined identifier
1138   2          }
1139   1      
1140   1          CalculateAspectRatio();
1141   1      
C51 COMPILER V8.01   MSTAR                                                                 11/28/2006 08:08:06 PAGE 21  

1142   1          SetDisplayWindow();
1143   1      
1144   1          SetCaptureWindow();
1145   1          SetScalingRatio(1);
1146   1      }
1147          
1148          void msProgWindow( BYTE ucOutputTimingCtl )
1149          {
1150   1          #if VGA_ENABLE
1151   1          if( IsVGAInUse())
1152   1              msProgAnalogWin();
1153   1          else
1154   1          #endif
1155   1              msProgDigitalWin( ucOutputTimingCtl );
1156   1      }
1157          
1158          BOOL IsSrcHasSignal(void)
1159          {
1160   1          #if VGA_ENABLE
1161   1          if( IsVGAInUse())
1162   1          {
1163   2              if( g_bInputTimingChangeFlag || SyncLossState() || UnsupportedModeFlag )
1164   2                  return FALSE;
1165   2          }
1166   1          else // Digital port
1167   1          #endif
1168   1          {
1169   2              if( (SIG_NONE == g_VdInfo.ucVideoSystem)
1170   2                ||(0 ==(g_VdInfo.wVideoStatus&VD_HSYNC_LOCKED)))
1171   2                  return FALSE;
1172   2          }
1173   1          return TRUE;
1174   1      }
1175          
1176          
1177          void SetOutputTimingAndWindow( BYTE ucOutputTimingCtl )
1178          {
1179   1          // Get input sync info
1180   1          if( IsSrcHasSignal() || (ucOutputTimingCtl&OUTPUT_SNOW) ) // Has signal or snow
1181   1          {
1182   2              GetInputSignalHV();
1183   2          }
1184   1          else // No signal or Freerun
1185   1          {
1186   2              g_InOutCtl.inOutVFreq = 60;
1187   2      
1188   2              if( g_InOutCtl.inOutVFreq == 50 )
1189   2              {
1190   3                  g_InOutCtl.inHFreq = 15625;
1191   3                  g_InOutCtl.inVTotal = 625;
1192   3              }
1193   2              else // 60 Hz
1194   2              {
1195   3                  g_InOutCtl.inHFreq = 15734;
1196   3                  g_InOutCtl.inVTotal = 525;
1197   3              }
1198   2              g_InOutCtl.inHPeriod = MST_CLOCK_HZ/g_InOutCtl.inHFreq;
1199   2          }
1200   1      
1201   1          msProgWindow( ucOutputTimingCtl );
1202   1          msSetOutputTiming( ucOutputTimingCtl ); // This function must after msProgWindow()
1203   1      
C51 COMPILER V8.01   MSTAR                                                                 11/28/2006 08:08:06 PAGE 22  

1204   1          #if (PANEL_TYPE>=PanelSHARP08_DT) //for digital panel only
                  if(ucOutputTimingCtl&OUTPUT_SNOW) // Has signal or snow
                      msWriteRegsTbl(tTVSnowModeTbl);
                  #endif
1208   1      }
1209          
1210          void msSetScaler(void)
1211          {
1212   1      #if (!WidePanel)
*** WARNING C322 IN LINE 1212 OF ..\..\kernal\mStar.c: unknown identifier
1213   1         msLoadModeIndexTBL(tModeIndexTbl);
1214   1      #else
              
                BYTE  ucBank;
                WORD  ulNewHsize,uwInput_H_Resol,uwTemp;
                DWORD ulH_Scaling_Factor, ulTemp;
              
                  ucBank = msReadByte(BK0_00_REGBK); // store bank
                  msWriteByte( BK0_00_REGBK, REG_BANK_SCALER); // bank 1
              
                  if (g_VideoSetting.Scaling==Scaling_Full)
                  {
                  #if VGA_ENABLE
                      if(IsVGAInUse())
                              SetScalingRatio( g_InOutCtl.bInterlace );
                      else
                  #endif
                     SetScalingRatio( 1 );
                     msWriteWord(BK0_49_SIHST_H, PanelHStart);         // horizontal DE start
                     msWriteWord(BK0_43_HFDEST_H, PanelHStart);         // horizontal DE start
                     msWriteWord(BK0_4D_SIHEND_H, (PanelHStart + PanelWidth - 1)); // Image H end
                     msWriteWord(BK0_47_HFDEEND_H, (PanelHStart+ PanelWidth - 1));   // horizontal DE end
              
                     msLoadModeIndexTBL(tModeIndexTbl);
                     //printMsg("test 169");
                  }
                  else
                  {
                    msWriteByte(BK0_38_NLDTI, 0x00);                          // Disable Nonlinear scaling function
              
                    //ulNewHsize=PANEL_DOT_HEIGHT;//X*4/3=>4:3,X/3=>3dot in 1 pixel
                    //ulNewHsize=ulNewHsize*PanelHeight;
                    //ulNewHsize=ulNewHsize/PANEL_DOT_WIDTH;
                    //ulNewHsize=(ulNewHsize*SCAL_RATIO_NUMERATOR)/(SCAL_RATIO_DENOMINATOR*3);
                    ulNewHsize=PanelWidth*3/4;
              
                    uwInput_H_Resol = msReadWord(BK0_0C_SPRHDC_H);//Get Input H resolution
              
                    //New start point
                    uwTemp = PanelHStart+ (PanelWidth- ulNewHsize )/2;
                    msWriteWord(BK0_49_SIHST_H,uwTemp);//new Start    //BK0_48_SIHST_L, BK0_49_SIHST_H
                    msWriteWord(BK0_43_HFDEST_H,uwTemp);
              
                    // New end point
                    msWriteWord(BK0_4D_SIHEND_H,uwTemp+ulNewHsize);//new End //BK0_4C_SIHEND_L, BK0_4D_SIHEND_H
                    msWriteWord(BK0_47_HFDEEND_H,uwTemp+ulNewHsize);
              
                    // Get new scaling factor
                    ulH_Scaling_Factor = (DWORD)ulNewHsize <<20 ;
                    ulTemp = (DWORD)uwInput_H_Resol*(SCAL_CUTOFF_RESOL - SCAL_CUTOFF_H_PER);
                    ulH_Scaling_Factor /= (ulTemp/SCAL_CUTOFF_RESOL);
              
C51 COMPILER V8.01   MSTAR                                                                 11/28/2006 08:08:06 PAGE 23  

                    // Mask the front and back block
                    // msWriteWord(BK0_5D_FRAME_COLOR_2,0);//BK0_5C_FRAME_COLOR_1, BK0_5D_FRAME_COLOR_2
          

⌨️ 快捷键说明

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