📄 main.lst
字号:
203 4 }
204 3 }
205 2
206 2 SlowTimeHandler();
207 2
208 2 VD_DSP_Processor();
209 2 Menu_OsdHandler();
210 2
211 2 #if TV_ENABLE
212 2 if (TV_SearchHandle())
213 2 continue;
214 2 #endif
215 2
216 2 #if( ENABLE_PAL_SWITCH_HANDLER )
217 2 //if( g_ucmsVDCtl2&MSVD_CTL2_FLAG_PAL_SWITCH )
218 2 msVDPalSwitchHandler();
219 2 #endif
220 2
221 2 SyncModeHandler();
222 2 Power_PowerHandler();
223 2
224 2 #if GAME_ENABLE
GameHandle();
#endif
227 2
228 2 #ifdef IR_DEBUG_EN
DebugIRHandler();
#endif
231 2
232 2 FlagCheckHandler();
233 2 VD_DSP_Processor();
234 2
235 2 #if(ENABLE_CHECK_AUTO_H_TOTAL)
*** WARNING C322 IN LINE 235 OF ..\..\kernal\main.c: unknown identifier
msCheckBK0_57_Value();
#endif
C51 COMPILER V8.01 MAIN 11/28/2006 08:08:04 PAGE 5
238 2
239 2
240 2 #if(ENABLE_DDC2BI)
msDDC2BICommandHandler();
#endif
243 2 }
244 1 }
245
246 void VD_DSP_Processor(void)
247 {
248 1 BYTE ucBank;
249 1
250 1 if( IsVideoPortInUse() && PowerOnFlag)
251 1 {
252 2 if( g_ucmsVDCtl2&MSVD_CTL2_FLAG_AGC_PROCESSOR )
253 2 VD_AGC_Processor();
254 2
255 2 #if( ENABLE_SECAM )
256 2 if( g_ucmsVDCtl2&MSVD_CTL2_FLAG_SECAM )
257 2 msVDSecamHandler();
258 2 #endif
259 2
260 2 #if( ((DSP_RUN_MODE == DSP_RUN_MODE_POLLING)||(DSP_RUN_MODE == DSP_RUN_MODE_TIMER_AND_POLLING)) )
261 2 //if( g_ucmsVDCtl&MSVD_CTL_FLAG_VSYNC )
262 2 {
263 3 VD_DSP();
264 3
265 3 ucBank = msReadByte( BK0_00_REGBK);
266 3 msWriteByte( BK0_00_REGBK, REG_BANK3_COMB );
267 3 if( msVDGetVTotal() > 566 ) // 50Hz
268 3 msWriteByteMask(BK3_40_TIMDETCFGA, 0x03, 0x03); // Force 625 lines
269 3 else
270 3 msWriteByteMask(BK3_40_TIMDETCFGA, 0x02, 0x03); // Force 525 lines
271 3 msWriteByte( BK0_00_REGBK, ucBank );
272 3 }
273 2 #endif
274 2
275 2 #ifdef VD_PATCH_005
if( g_ucmsVDCtl2&MSVD_CTL2_FLAG_PATCH5 )
msVD_Patch_005( 0 );
#endif
279 2
280 2 //if( g_ucmsVDCtl2&MSVD_CTL2_FLAG_AFEC )
281 2 //msVDAFECHandler();
282 2 }
283 1 }
284
285 void Init_Device(void)
286 {
287 1 if (PowerOnFlag)
288 1 Power_TurnOnGreenLed();
289 1
290 1 #if TV_ENABLE
291 1 TV_ChannelInit();
292 1 #endif
293 1
294 1 msInitdevAudio();
295 1
296 1 #if PanelLG07_AT
msWriteByte(BK0_00_REGBK, REG_BANK1_ADC_ACE_MCU); // Switch to Bank 1 for Turn off VGH and VGL
msWriteByte(BK1_4A, 0x00);
msWriteByte(BK1_4B, 0x40);
C51 COMPILER V8.01 MAIN 11/28/2006 08:08:04 PAGE 6
msWriteByte(BK0_00_REGBK, REG_BANK_SCALER); // Switch to Bank 0
#endif
302 1 }
303
304 void StartConfig(void)
305 {
306 1 while((msReadByte(BK0_00_REGBK)&0xC0)!= 0x80)
307 1 ;
308 1
309 1 msSoftwareReset(SWR_B|REGR_B, 10);
310 1 devAudioWrite(0);
311 1 }
312
313 void SyncModeHandler(void)
314 {
315 1 #if GAME_ENABLE
if (g_bGameEnable)
return;
#endif
319 1
320 1 if(IsVideoPortInUse())
321 1 {
322 2 VD_DSP_Processor();
323 2
324 2 #if(ENABLE_MONITOR_VTOTAL)
msMonitorVTotal( 0 );
#endif
327 2
328 2 vdMonitorInput();
329 2
330 2 vdModeHandler();
331 2 VD_DSP_Processor();
332 2 }
333 1 #if VGA_ENABLE
334 1 else
335 1 {
336 2 if (!g_ucModeDetectCounter || g_bInputTimingChangeFlag)
337 2 {
338 3 msMonitorInputTiming();
339 3 g_ucModeDetectCounter=10;
340 3 }
341 2 msModeHandler();
342 2 }
343 1 #endif
344 1 }
345
346 #if TV_ENABLE
347 BOOL TV_SearchHandle(void)
348 {
349 1 if(!IsTVInUse())
350 1 return FALSE;
351 1
352 1 if(g_bTVAutoScanChannelEnable)
353 1 {
354 2 TV_ChannelAutoScan();
355 2 return TRUE;
356 2 }
357 1 else if(g_bTVManualSearchEnable)
358 1 {
359 2 TV_ChannelManualScan();
360 2 return TRUE;
361 2 }
C51 COMPILER V8.01 MAIN 11/28/2006 08:08:04 PAGE 7
362 1
363 1 if (g_bTVManualStore)
364 1 {
365 2 SaveChannelData( g_TVChSetting.ucCurChannelNO, &chData );
366 2 g_bTVManualStore = FALSE;
367 2 }
368 1
369 1 return FALSE;
370 1 }
371 #endif
372
373 void FlagCheckHandler(void)
374 {
375 1 #if GAME_ENABLE
if (g_ucMenuPageIndex!=GameMenu&&g_bGameEnable)
g_bGameEnable=0;
#endif
379 1
380 1 MenuStatusCHK();
381 1
382 1 if(ReDrawCurrentOSDFlag)//for time set
383 1 {
384 2 ReDrawCurrentOSDItem(1);
385 2 ReDrawCurrentOSDItem(2);
386 2 ReDrawCurrentOSDItem(3);
387 2 Clr_ReDrawCurrentOSDFlag();
388 2 }
389 1
390 1 #if TV_ENABLE
391 1 if(ChannelChangFlag)
392 1 {
393 2 TV_SetCh();
394 2 Clr_ChannelChangFlag();
395 2 }
396 1 #endif
397 1
398 1 if(ShowSourceFlag)
399 1 {
400 2 DrawShowSourcemenu();
401 2 Clr_ShowSourceFlag();
402 2 }
403 1
404 1 #ifdef Multi_language
if(RedrawSystemMenuFlag)
{
DrawSystemMenu();
Clr_RedrawSystemMenuFlag();
}
#endif
411 1 }
C51 COMPILATION COMPLETE. 2 WARNING(S), 1 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -