display_hl.h
上传用户:poi891205
上传日期:2013-07-15
资源大小:9745k
文件大小:74k
源码类别:

DVD

开发平台:

C/C++

  1. /*
  2. *  Sunplus search function  
  3. *  Creat by terry
  4. */
  5. //
  6. // DispCookOSD0
  7. //      Prepare the content of OSD0 to temp buffer
  8. //      (from OSD0_TEMP_YA-th KBytes in DRAM, size=38*16*1*24*4/8=7104 Bytes)
  9. //
  10. //      input   : bChange
  11. //                  1 : re-generate all content
  12. //                  0 : only update timing display parts
  13. //                dwTime :
  14. //                  < 0 : remain time (-00:00:00)
  15. //                  > 0 : elapsed time( 00:00:00)
  16. //
  17. //      output  : none
  18. //
  19. //      side-effect : none
  20. //
  21. //      notes:
  22. //      0     5          15  18   22  25
  23. //      CD    TRACK      SPK PBC  REP TIME
  24. //      VCD   TRACK      SPK PBC  REP TIME
  25. //      SVCD  TRACK      SPK PBC  REP TIME
  26. //      DVD   TITLE      CHAPTER      TIME
  27. //      MP3   TRACK      SPK      REP TIME
  28. //
  29. //      Color table
  30. //          palette_16color_setup(defined in osd1.c)
  31. //
  32. //===========================================================================================
  33. // debug option
  34. //===========================================================================================
  35. #undef io_write
  36. #define io_write(x);
  37. #ifdef SUPPORT_CDG //Jeff 20020824
  38. #include "cdg.h"
  39. extern UINT8   bReadSubChannel;
  40. #endif
  41. #include "sinf.h"
  42. #include "kinf.h"//wangap
  43. #ifdef MIX_CDMP3_DISC_DISPLAY_REAL_CD_TRK //linrc add 2004-10-29 11:16
  44. #include "cdxa.h"
  45. #endif
  46. #if defined (DISPLAY_MP4_VER_PI) || defined(DISPLAY_MP4_AV_INFO)  //Maoyong 2004.06.29
  47. #include "fsNav.h"
  48. #include "avi_if.h"
  49. #include "audcodec.h"
  50. #endif
  51. #ifdef OSD_BMP
  52. #include "osd_BmpUI.h"
  53. #include "fsNAV.h"
  54. #endif
  55. #ifdef MP3_2GOTO_TYPE
  56. #include "fsNAV.h"
  57. #endif
  58. #ifdef DIV_GOTO_DISPLAY   
  59. #ifdef NINTAUS_OSD_STR   //2004-2-16 10:58张宇P
  60. #define REGION2_FONTCOLOR    2//word color
  61. #define REGION2_NUMCOLOR     2 //number color
  62. #else
  63. #define REGION2_FONTCOLOR    8//word color
  64. #define REGION2_NUMCOLOR     7 //number color
  65. #endif
  66. #define REGION2_BKCOLOR      10//background color
  67. #define REGION2_RCOLOR       10//region color
  68. #define REGION2_HL_COLOR     4//to hilight
  69. #endif
  70. //===========================================================================================
  71. // function
  72. //===========================================================================================
  73. #ifndef DIV_GOTO_DISPLAY
  74. void hi_light_time(int pos)
  75. {
  76. //skip the TT and CH characters
  77. #if defined (OSD_BMP_DISPLAY_TT_TIME) || defined(OSD_BMP_DISPLAY_CH_TIME)
  78. if(cd_type_loaded == CDDVD)
  79.     pos += 3 * DISP_LITTLE_CHAR_WIDTH;
  80. #endif
  81.     
  82.     int time=0,shift_base=0;
  83.     
  84.     if((index_x-5)<=1)
  85.     {
  86. time=goto_hour;
  87. shift_base=4;
  88.     }
  89.     else if((index_x-5)<=3)
  90.     {
  91. time=goto_min;
  92. shift_base=3;
  93.     }
  94.     else if((index_x-5)<=5)
  95.     {
  96. time=goto_sec;
  97. shift_base=2;
  98.     }
  99.     
  100. #ifdef OSD_BMP_DISPLAY //There is no blank in front of the time string in osd_bmp_display,feeling 20040920
  101. shift_base += 1;
  102. #endif
  103.     
  104.     if((index_x-5)%2==0)//even
  105.     {
  106. psprintf(linebuf, "%01d", time/10); 
  107. io_write("i");
  108. #ifdef SDRAM_16Mb_Mode
  109. do_DispOSD0String(pos+(index_x-shift_base), 0, linebuf, 0, 2);
  110. #elif defined (OSD_BMP_DISPLAY)
  111.         do_DispOSD0LittleString(pos+(index_x-shift_base)* DISP_LITTLE_CHAR_WIDTH, 12, linebuf, DISP_GBLUE, DISP_GREEN);//in bmp display,time shows little character,feeling 200408
  112. #else
  113.         do_DispOSD0String(pos+(index_x-shift_base), 0, linebuf, 2, 4);
  114. #endif        
  115. }
  116.     else
  117.     {
  118. psprintf(linebuf, "%01d", time%10); 
  119. io_write("h");
  120. #ifdef SDRAM_16Mb_Mode
  121. do_DispOSD0String(pos+(index_x-shift_base), 0, linebuf, 0, 2);  
  122. #elif defined(OSD_BMP_DISPLAY)
  123.         do_DispOSD0LittleString(pos+(index_x-shift_base)* DISP_LITTLE_CHAR_WIDTH, 12, linebuf, DISP_GBLUE, DISP_GREEN);//in bmp display,time val shows little character,feeling200408
  124. #else
  125.         do_DispOSD0String(pos+(index_x-shift_base), 0, linebuf, 2, 4);  
  126. #endif
  127.         
  128.     }   
  129. }   
  130.    
  131. void hi_light_chapter(int id,int pos)//kenny 2002/4/13
  132. {
  133.     if(index_x==2)
  134.     {
  135.         psprintf(linebuf, "%01d",id/100);  
  136.         io_write("g");
  137. #ifdef SDRAM_16Mb_Mode
  138. do_DispOSD0String(pos, 0, linebuf,  0, 2);
  139. #elif defined(OSD_BMP_DISPLAY)
  140.         do_DispOSD0LittleString(pos, 12, linebuf, DISP_GBLUE, DISP_GREEN);//in bmp display,title val shows little character,feeling
  141. #else
  142.         do_DispOSD0String(pos, 0, linebuf, 2, 4);
  143. #endif
  144.         
  145.     }
  146.     else if(index_x==3)
  147.     {
  148.         psprintf(linebuf, "%01d",(id%100)/10);     
  149.         io_write("f");
  150. #ifdef SDRAM_16Mb_Mode
  151. do_DispOSD0String(pos+1, 0, linebuf, 0, 2);
  152. #elif defined (OSD_BMP_DISPLAY)
  153.         do_DispOSD0LittleString(pos+1*DISP_LITTLE_CHAR_WIDTH, 12, linebuf, DISP_GBLUE, DISP_GREEN);//in bmp display,title val shows little character,feeling
  154. #else
  155.         do_DispOSD0String(pos+1, 0, linebuf, 2, 4);            
  156. #endif
  157.         
  158.     }
  159.     else if(index_x==4)
  160.     {
  161.         psprintf(linebuf, "%01d",id%10);       
  162.         io_write("e");
  163. #ifdef SDRAM_16Mb_Mode        
  164.         do_DispOSD0String(pos+2, 0, linebuf, 0, 2);    
  165. #elif defined(OSD_BMP_DISPLAY)
  166.         do_DispOSD0LittleString(pos+2*DISP_LITTLE_CHAR_WIDTH, 12, linebuf, DISP_GBLUE, DISP_GREEN);//in bmp display,title val shows little character,feeling
  167. #else
  168. do_DispOSD0String(pos+2, 0, linebuf, 2, 4);    
  169. #endif
  170.     }
  171. }   
  172. //Maoyong 2004.04.28 marked MP3_DIRECT_SELECT
  173. //#ifdef MP3_DIRECT_SELECT
  174. //zhaoyanhua modify the function to  show 4 digits when CDROM.3-7-16 16:43
  175. void hi_light_title(int id, int pos)
  176. {
  177.     if (cd_type_loaded == CDROM)
  178.     {
  179.      int id0 = 0,id1= 0,id2=0,id3=0;
  180.      id0 = id/1000;
  181.      id1 = (id%1000)/100;
  182. id2 = ((id%1000)%100);
  183.      id2 = id2/10;
  184.     id3 = (id%1000)%100;
  185. id3 = id3%10;
  186.     if(index_x==0)
  187.     {
  188.          psprintf(linebuf, "%01d",id0);
  189.         io_write("d");
  190. #ifdef SDRAM_16Mb_Mode
  191. do_DispOSD0String(pos, 0, linebuf, 0, 2);
  192. #elif defined(OSD_BMP_DISPLAY)
  193.             do_DispOSD0LittleString(pos, 12, linebuf, DISP_GBLUE, DISP_GREEN);//in bmp display,title val shows little character,feeling
  194. #else
  195.         do_DispOSD0String(pos, 0, linebuf, 2, 4);
  196. #endif
  197.     }
  198.     else if(index_x==1)
  199.     {
  200.          psprintf(linebuf, "%01d",id1);
  201.         io_write("c");
  202. #ifdef SDRAM_16Mb_Mode
  203. do_DispOSD0String(pos+1, 0, linebuf, 0, 2);
  204. #elif defined(OSD_BMP_DISPLAY)
  205.             do_DispOSD0LittleString(pos+1*DISP_LITTLE_CHAR_WIDTH, 12, linebuf, DISP_GBLUE, DISP_GREEN);//in bmp display,title val shows little character,feeling
  206. #else
  207.         do_DispOSD0String(pos+1, 0, linebuf, 2, 4);
  208. #endif
  209. }
  210.        else if(index_x==2)
  211.      {
  212.          psprintf(linebuf, "%01d",id2);
  213.          io_write("c");
  214. #ifdef SDRAM_16Mb_Mode
  215. do_DispOSD0String(pos+2, 0, linebuf, 0, 2);
  216. #elif defined(OSD_BMP_DISPLAY)
  217.             do_DispOSD0LittleString(pos+2*DISP_LITTLE_CHAR_WIDTH, 12, linebuf, DISP_GBLUE, DISP_GREEN);//in bmp display,title val shows little character,feeling
  218. #else
  219.         do_DispOSD0String(pos+2, 0, linebuf, 2, 4);
  220. #endif
  221.       }
  222.       else if(index_x==3)
  223.      {
  224.          psprintf(linebuf, "%01d",id3);
  225.          io_write("c");
  226. #ifdef SDRAM_16Mb_Mode
  227. do_DispOSD0String(pos+3, 0, linebuf, 0, 2);
  228. #elif defined(OSD_BMP_DISPLAY)
  229.             do_DispOSD0LittleString(pos+3*DISP_LITTLE_CHAR_WIDTH, 12, linebuf, DISP_GBLUE, DISP_GREEN);//in bmp display,title val shows little character,feeling
  230. #else
  231.          do_DispOSD0String(pos+3, 0, linebuf, 2, 4);
  232. #endif
  233. }
  234. }
  235. else  //not CDROM
  236. {
  237. if(index_x==0)
  238.      {
  239.          psprintf(linebuf, "%01d",id/10);
  240.          io_write("d");
  241.     
  242.     #ifdef SDRAM_16Mb_Mode
  243. do_DispOSD0String(pos, 0, linebuf, 0, 2);
  244.     #elif defined (OSD_BMP_DISPLAY)
  245.             do_DispOSD0LittleString(pos, 12, linebuf, DISP_GBLUE, DISP_GREEN);//in bmp display,title val shows little character,feeling
  246. #else
  247.           do_DispOSD0String(pos, 0, linebuf, 2, 4);
  248. #endif
  249.      }
  250.      else if(index_x==1)
  251.      {
  252.          psprintf(linebuf, "%01d",id%10);
  253.        io_write("c");
  254.     
  255.     #ifdef SDRAM_16Mb_Mode
  256. do_DispOSD0String(pos+1, 0, linebuf, 0, 2);
  257.     #elif defined(OSD_BMP_DISPLAY)
  258.             do_DispOSD0LittleString(pos+1*DISP_LITTLE_CHAR_WIDTH, 12, linebuf, DISP_GBLUE, DISP_GREEN);//in bmp display,title val shows little character,feeling
  259. #else
  260.           do_DispOSD0String(pos+1, 0, linebuf, 2, 4);
  261. #endif
  262.      }
  263. }
  264. }
  265. /*#else //not MP3_DIRECT_SELECT
  266. void hi_light_title(int id, int pos)
  267. {
  268.     if(index_x==0)
  269.     {
  270.         psprintf(linebuf, "%01d",id/10);    
  271.         io_write("d");
  272.         
  273. #ifdef SDRAM_16Mb_Mode
  274. do_DispOSD0String(pos, 0, linebuf, 0, 2);
  275. #else
  276.         do_DispOSD0String(pos, 0, linebuf, 2, 4);
  277. #endif
  278.         
  279.     }
  280.     else if(index_x==1)
  281.     {
  282.         psprintf(linebuf, "%01d",id%10);        
  283.         io_write("c");
  284. #ifdef SDRAM_16Mb_Mode 
  285. do_DispOSD0String(pos+1, 0, linebuf, 0, 2); 
  286. #else
  287.         do_DispOSD0String(pos+1, 0, linebuf, 2, 4); 
  288. #endif
  289.         
  290.     }
  291. }
  292. #endif  //end MP3_DIRECT_SELECT
  293. */
  294. #else//if defined DIV_GOTO_DISPLAY
  295. void hi_light_time(int pos)
  296. {
  297. BYTE buf[20];
  298. int time=0,shift_base=0;
  299.     
  300.     
  301.    // osd_draw_region_rect(pos*8,0,8*8,24,5,2);
  302.     if((index_x-5)<=1)
  303.     {
  304. time=goto_hour;
  305. shift_base=5;//shift_base=4;
  306.     }
  307.     else if((index_x-5)<=3)
  308.     {
  309. time=goto_min;
  310. shift_base=4;//shift_base=3;
  311.     }
  312.     else if((index_x-5)<=5)
  313.     {
  314. time=goto_sec;
  315. shift_base=3;//shift_base=2;
  316.     }
  317.     
  318.     if((index_x-5)%2==0)//even
  319.     {
  320. psprintf(buf, "%01d", time/10); 
  321. io_write("i");
  322. }
  323.     else
  324.     {
  325. psprintf(buf, "%01d", time%10); 
  326. io_write("h");        
  327.     }   
  328.   
  329. osd_DrawRegionString(pos+(index_x-shift_base), 0, buf, REGION2_NUMCOLOR, REGION2_HL_COLOR, 2);
  330.    
  331. }
  332. void hi_light_chapter(int id, int pos)
  333. {
  334. BYTE buf[20];
  335. int shift = 0;
  336. //osd_draw_region_rect(pos, 0,2*16, 2*16 , 5,2);
  337. if(index_x == 2)
  338. {
  339. psprintf(buf, "%01d",id/100);  
  340. shift = 0;
  341. }
  342. else if(index_x== 3)
  343. {
  344. psprintf(buf, "%01d",(id%100)/10); 
  345. shift = 1;
  346. }
  347. else if(index_x==4)
  348. {
  349. psprintf(buf, "%01d",id%10); 
  350. shift = 2;
  351. }
  352. osd_DrawRegionString(pos+shift,0,buf,REGION2_NUMCOLOR, REGION2_HL_COLOR, 2);
  353. }
  354. void hi_light_title(int id, int pos)
  355. {
  356. BYTE  buf[20];
  357. int shift = 0;
  358. #ifdef MP3_DIRECT_SELECT//zhaoyanhua add 2004-2-16 11:20
  359.     if (cd_type_loaded == CDROM)
  360.     {
  361.      int id0 = 0,id1= 0,id2=0,id3=0;
  362.      id0 = id/1000;
  363.      id1 = (id%1000)/100;
  364. id2 = ((id%1000)%100);
  365.      id2 = id2/10;
  366.     id3 = (id%1000)%100;
  367. id3 = id3%10;
  368.         if(index_x == 0)
  369.         {
  370.             psprintf(buf, "%01d",id0);
  371.             shift = 0;
  372.         }
  373.         else if(index_x == 1)
  374.         {
  375.             psprintf(buf, "%01d",id1);
  376.             shift = 1;
  377.         }
  378.         else if(index_x == 2)
  379.         {
  380.             psprintf(buf, "%01d",id2);
  381.             shift = 2;
  382.         }
  383.         else if(index_x == 3)
  384.         {
  385.             psprintf(buf, "%01d",id3);
  386.             shift = 3;
  387.         }
  388.     }
  389.     else//cd_type_loaded != CDROM
  390. #endif//#ifdef MP3_DIRECT_SELECT
  391.     {
  392. if(index_x ==0)
  393. {
  394. psprintf(buf, "%01d",id/10); 
  395. shift = 0;
  396. }
  397. //osd_draw_region_rect(pos, 0,2*16, 2*16 , 5,2);
  398. else if(index_x == 1)
  399. {
  400. psprintf(buf, "%01d",id%10); 
  401. shift = 1;
  402. }
  403.     }//if (cd_type_loaded != CDROM)
  404. osd_DrawRegionString(pos+shift,0,buf, REGION2_NUMCOLOR, REGION2_HL_COLOR, 2);
  405. }
  406. #endif//ifndef DIV_GOTO_DISPLAY
  407. void time_trans2hms(void) //xyy 2003-7-29 11:42
  408. {
  409. UINT32 time=goto_time;
  410. goto_time=goto_time%10000000;
  411. goto_sec=time%100;            
  412. time=time/100;
  413. goto_min=time%100;
  414. time=time/100;
  415. goto_hour=time%100;             
  416. }
  417. #ifndef OSD_BMP_DISPLAY
  418. void Print2OSDmem(int id,int val,UINT8 pos)
  419. {
  420. BYTE    fontColor, bkColor; 
  421.     
  422. bkColor = DISP_SHADOW; //OSD shadow color
  423. fontColor = DISP_GREEN; //green
  424.     
  425. if(val) {       
  426. fontColor = DISP_YGREEN; //yellow-green                       
  427. #ifndef DIV_GOTO_DISPLAY//zhaoyanhua add 03-10-22 10:58
  428. if(full_scrn&GOTO) {    
  429. #ifdef NEW_GOTO//kenny 2002/4/13
  430. if(val&COOK_S_TIMER) {
  431. if(index_x>=5)
  432. {
  433. time_trans2hms();    //xyy 2003-7-29 11:42       
  434. #ifdef NOT_SHOW_TIME_IN_JPG
  435. if(Is_JPEG_STATE())
  436.        psprintf(linebuf, "       ");
  437. else
  438. psprintf(linebuf, " %02d:%02d:%02d", goto_hour, goto_min, goto_sec);  
  439. #else
  440. psprintf(linebuf, " %02d:%02d:%02d", goto_hour, goto_min, goto_sec);   
  441. #endif
  442. } else {
  443. #ifdef NOT_SHOW_TIME_IN_JPG
  444. if(Is_JPEG_STATE())
  445.        psprintf(linebuf, "       ");
  446. else
  447. psprintf(linebuf, " %02d:%02d:%02d", goto_hour, goto_min, goto_sec);  
  448. #else
  449. psprintf(linebuf, " %02d:%02d:%02d", goto_hour, goto_min, goto_sec);   
  450. #endif
  451. if((remain==DISC_REMAIN_TIME)||(remain==TRK_REMAIN_TIME)) // terry 2002/6/4 09:48PM : solve time in goto mode without '-'
  452. linebuf[0]='-';
  453. }
  454. } else 
  455. {
  456. #ifdef  NEW_DISPLAY_GOTO_OSD
  457.                                 if(pos!=POS_DVD_CHAP)
  458.                                 {
  459.                                     //if(dvd_title)
  460.                                     //liulifeng marked for when user goto
  461.                                     // first enter a big number ex.124, next enter a litte ex.018
  462.                                     // the display track not refresh immediately
  463.                                         id=dvd_title;
  464.                                     if(cd_type_loaded==CDDVD)
  465.                                         psprintf(linebuf, "T %02d/%02d", id, val);
  466.                                     else if (cd_type_loaded == CDROM)
  467.                                         psprintf(linebuf, " TRK %04d/%d", id, val);
  468.                                     else
  469.                                         psprintf(linebuf, " TRK %02d/%02d",id,val);
  470.                                 }
  471.                                 else
  472.                                 {
  473.                                     if(dvd_chapter) 
  474.                                         id=dvd_chapter;
  475.                                     psprintf(linebuf, "C %03d/%03d", id, val);
  476.                                 }
  477. #else//#ifdef  NEW_DISPLAY_GOTO_OSD
  478. if(pos!=COOK_CHP_VAL) 
  479. {//title            
  480. //if(dvd_title)
  481.                     //liulifeng marked for when user goto
  482.                     // first enter a big number ex.124, next enter a litte ex.018
  483.                     // the display track not refresh immediately
  484. id=dvd_title;
  485. #ifdef MP3_2GOTO_TYPE
  486. if((!index_x) && (cd_type_loaded==CDROM) && (pFsJpeg->ControlArea == CNT_AREA_DIR))
  487.     id = pFsJpeg->fsnav_dir_now+1;
  488.                     #endif
  489.                     
  490. //Maoyong 2004.04.28 marked MP3_DIRECT_SELECT
  491. //#ifdef MP3_DIRECT_SELECT //zhaoyanhua add 3-7-16 16:47
  492. if (cd_type_loaded == CDROM)
  493. psprintf(linebuf, "%04d/%02d",id,val);
  494. else
  495. psprintf(linebuf, "%02d/%02d",id,val);
  496. //#else
  497. // psprintf(linebuf, "%04d/%02d",id,val);                  
  498. //#endif
  499. } else {
  500. if(dvd_chapter) 
  501. id=dvd_chapter;
  502. psprintf(linebuf, "%03d/%03d",id,val);          
  503. }
  504. #endif//#ifdef  NEW_DISPLAY_GOTO_OSD
  505. }   
  506. #else   //#ifdef NEW_GOTO
  507. if(val&COOK_S_TIMER) {
  508. if(index_x==2) {
  509. UINT32 time=goto_time;
  510.                     
  511. bkColor = DISP_GBLUE;                        
  512. fontColor = DISP_WHITE; 
  513. goto_time=goto_time%10000000;
  514. goto_sec=time%100;            
  515. time=time/100;
  516. goto_min=time%100;
  517. time=time/100;
  518. goto_hour=time%100;             
  519. psprintf(linebuf, " %02d:%02d:%02d", goto_hour, goto_min, goto_sec);            
  520. } else {
  521.                     psprintf(linebuf, " %02d:%02d:%02d", show_time_hh, show_time_mm, show_time_ss);
  522. }
  523. } else {
  524. if(pos!=COOK_CHP_VAL) {//title          
  525. if(index_x==0) {
  526. bkColor = DISP_GBLUE;                                
  527. fontColor = DISP_WHITE; 
  528. }
  529.                     
  530. if(index_x!=2) {
  531. if(dvd_title) {
  532. if(dvd_title>val)
  533. dvd_title=dvd_title%10;
  534.                             
  535. id=dvd_title;
  536. }
  537. }
  538. psprintf(linebuf, "%02d",id);                   
  539. } else {
  540. if(index_x==1) {
  541. bkColor = DISP_GBLUE;    
  542. fontColor = DISP_WHITE; 
  543. }
  544. if(index_x!=2) {
  545. if(dvd_chapter) {
  546. if(dvd_chapter>val)
  547. dvd_chapter=dvd_chapter%10;
  548.                             
  549. id=dvd_chapter;
  550. }
  551. }
  552. psprintf(linebuf, "%03d",id);   
  553. }
  554.                 
  555.                 io_write("9");
  556. #ifdef SDRAM_16Mb_Mode 
  557. do_DispOSD0String(pos, 0, linebuf, 2, 0); 
  558. #else
  559. do_DispOSD0String(pos, 0, linebuf, fontColor, bkColor); 
  560. #endif
  561. #ifdef DISP_REGION_BOTTOM
  562. if(OSD_ShowBottomDisp() == 1)
  563. bkColor = DISP_SHADOW_CDROM;
  564. else
  565. #endif//DISP_REGION_BOTTOM     
  566. bkColor = DISP_SHADOW; //OSD shadow color                
  567. if(pos==COOK_CHP_VAL) {
  568. pos+=3;
  569. psprintf(linebuf, "/%03d",val); 
  570. } else {
  571. pos+=2;
  572. psprintf(linebuf, "/%02d",val);
  573. }
  574. }               
  575. #endif//NEW_GOTO
  576. }
  577.         else 
  578. #endif//end ifndef DIV_GOTO_DISPLAY
  579.        if(val&COOK_S_TIMER)
  580.         {
  581.         
  582.         if ((cd_type_loaded == CDROM) && (Is_JPEG_STATE()))  // Add by David for Jpeg time display bug 2003-12-1 16:28
  583.                 {
  584.                     show_time_hh = 0;
  585.                     show_time_mm = 0;
  586.                     show_time_ss = 0;
  587.                 } 
  588.                  #ifdef NOT_SHOW_TIME_IN_JPG    //axel 2004/1/8 04:58PM        
  589.     #ifdef NOSHOW_CDROM_WHEN_DISP  //zhangyu 2004-6-14 20:35
  590.     if(!(pFsJpeg->gbfsPictureCD))
  591.     #endif
  592.         if(Is_JPEG_STATE())
  593.       psprintf(linebuf, "       ");
  594.     else
  595. #endif
  596. #ifdef NOSHOW_CDROM_WHEN_DISP
  597. if(!(pFsJpeg->gbfsPictureCD))
  598. #endif
  599. psprintf(linebuf, " %02d:%02d:%02d", show_time_hh, show_time_mm, show_time_ss);         
  600.             if((remain==DISC_REMAIN_TIME)||(remain==TRK_REMAIN_TIME)) // terry 2002/6/4 09:48PM : solve time in goto mode without '-'
  601.         #ifdef NOT_SHOW_TIME_IN_JPG    //Maoyong for not display "-" when jpeg 2004.02.13      
  602. if(!Is_JPEG_STATE())
  603. #endif
  604. linebuf[0]='-';
  605.             
  606.         }
  607.         else if(val&COOK_S_LANG)
  608.         {           
  609.          /* alan modifide 2002/5/30 09:53PM to cut SUP-LAN fit in display */
  610.          UINT8 *str=get_lang_name(id);
  611. BYTE len=strlen(str);
  612. //terry,2002/6/25 10:37AM
  613. //<bug> get_lang_name return const string        
  614. strcpy(linebuf,str);
  615.             if (!IsOSDChinese()||((linebuf[0]>='A')&&(linebuf[0]<='Z'))) 
  616.             {
  617. linebuf[MAX_ENG_WORDS]='';
  618.             } else 
  619.             {
  620. if (len>4){
  621. #if defined(USE_TCHINESE_OSD)//2-10-9 17:51
  622. psprintf(linebuf+2,"%s",TCh_yu);
  623. #else
  624.         #ifdef USE_KOREAN_OSD //clead korean 2003-10-23 
  625.         psprintf(linebuf+2,"%s",KCh_09);
  626.         #else
  627. psprintf(linebuf+2,"%s",Ch_yu2);
  628. #endif
  629. #endif
  630. }
  631. }
  632.                         
  633. } else if(val&COOK_S_MODE)
  634. {
  635. psprintf(linebuf,"%s",get_audio_mode());                
  636. }else if(full_scrn&MARK)//nono 2-6-22 0:28
  637. {
  638. psprintf(linebuf, "%d",id);
  639. }
  640.         else
  641. {
  642.                     #ifdef  NEW_DISPLAY_GOTO_OSD
  643.                             if(cd_type_loaded==CDDVD)
  644.                             {
  645.                                 if(pos==POS_DVD_TITLE)
  646.                                     psprintf(linebuf, "T %02d/%02d", id, val);
  647.                                 else if(pos==POS_DVD_CHAP)
  648.                                     psprintf(linebuf, "C %03d/%03d", id, val);
  649.                             }
  650.                             else
  651.                                 psprintf(linebuf, " TRK %d/%d", id, val);
  652.                     #else
  653. psprintf(linebuf, "%d/%d",id,val);
  654.                     #endif
  655. }
  656.         } else {
  657. if(id==STR_OS_ICON_REP0) {
  658. id+=rep_mode; 
  659. if(rep_mode == REPEAT_DISC)         // maybe add another icon for repeat directory,panxing, 2002-3-13
  660. id--;
  661. }
  662. //psprintf(linebuf,"%s",_OsdMessegeFont1[id][osd_font_mode]);               
  663. psprintf(linebuf,"%s",_OsdMessegeFont1[osd_font_mode][id]);
  664. if( (pos==COOK_CD)&&(t_disp%10==1) ) { //Jeff 20020607
  665. fontColor = DISP_ORANGE;
  666. }
  667. //else if( (id==STR_OS_ANGLE)||(id==STR_OS_SUBTITLE)||(id==STR_OS_AUDIO) )
  668.             //strcat1(linebuf,":");
  669. if(id==STR_OS_ICON_SPK) {
  670. fontColor = DISP_YGREEN; //yellow-green
  671. if (user_mute) 
  672. fontColor = DISP_GRAY; //gray              
  673. } else if(id==STR_OS_PBC) {    
  674. if ( IsPBCOn() ) 
  675. fontColor = DISP_YGREEN; //yellow-green
  676. else 
  677. //if 16Mb mode,not show PBC if PBC is OFF.
  678. //zhaoyanhua add 2003-11-13 15:51
  679. #ifdef SDRAM_16Mb_Mode
  680. linebuf[0]= '';
  681. #else
  682. fontColor = DISP_GRAY; //gray
  683. #endif
  684. }
  685.         }
  686.         {//bad designed , we maybe try other way.
  687. //int len=strlen(linebuf);
  688. //if((len+pos)>=37)
  689. //linebuf[len-1]=0;
  690. io_write("8");
  691. #ifdef SDRAM_16Mb_Mode
  692. do_DispOSD0String(pos, 0, linebuf, 2, 0);
  693. #else
  694. do_DispOSD0String(pos, 0, linebuf, fontColor, bkColor);
  695. #endif
  696. #ifndef DIV_GOTO_DISPLAY
  697. #ifdef NEW_GOTO//kenny 2002/4/13
  698. #ifdef  NEW_DISPLAY_GOTO_OSD
  699.                     if(full_scrn&GOTO) {
  700.                         if((index_x>=5)&&(val&COOK_S_TIMER))
  701.                             hi_light_time(pos);
  702.                         else if(pos==POS_DVD_CHAP) 
  703.                         {   
  704.                         if (cd_type_loaded != CDROM)
  705.                             hi_light_chapter(id, pos+OFFSET_CHAP);
  706.                         }
  707.                         else if(pos==POS_DVD_TITLE)
  708.                             if(cd_type_loaded==CDDVD)
  709.                                 hi_light_title(id, pos+OFFSET_TITLE);
  710.                             else
  711.                                 hi_light_title(id, pos+OFFSET_TRACK);
  712.                         }
  713. #else//#ifdef  NEW_DISPLAY_GOTO_OSD
  714. if(full_scrn&GOTO) {
  715. if((index_x>=5)&&(val&COOK_S_TIMER))
  716. hi_light_time(pos);
  717. else if(pos==COOK_CHP_VAL) 
  718. { //Maoyong 2004.04.28 marked MP3_DIRECT_SELECT
  719. //#ifdef MP3_DIRECT_SELECT  //zhaoyanhua add.  not Hilight  CHAP 3-7-16 16:17
  720. if (cd_type_loaded != CDROM)
  721. //#endif
  722. hi_light_chapter(id,pos);
  723. }
  724. else if(pos==COOK_TRK_VAL)
  725. hi_light_title(id,pos);
  726. }
  727. #endif//#ifdef  NEW_DISPLAY_GOTO_OSD
  728. #endif
  729. #endif//end ifndef DIV_GOTO_DISPLAY
  730.         }
  731. }
  732. #else //OSD_BMP_DISPLAY
  733. /*
  734.  * Description;
  735.  *      Print Bmp icon, origin size 16*24 string and little size string 8*12 to osd_temp_buf
  736.  *
  737.  * INPUT:
  738.  *      id  -->  when string, string id in _OsdMessegeFont1[][]
  739.  *      val  -->  0-->no change, COOK_S_TIME, COOK_S_LANG
  740.  *      pos   --> the xStart of display region 0; it has been defined in disp.c; it ranges 0 to 720
  741.  * Creator : feeling
  742.  * Date :  2004-8-14
  743.  *
  744.  */
  745. void Print2OSDmem(int id,int val,UINT32 pos)
  746. {
  747. //printf("id=%dn", id);
  748. //printf("pos = %dn", pos);
  749. BYTE    fontColor, bkColor; 
  750.     UINT8 disc_hour,disc_minute,disc_second;
  751.     UINT32 display_disc_time;
  752. //adjust xStart for cdrom
  753. /* if(cd_type_loaded == CDROM)
  754. {
  755.     #undef COOK_CD
  756.     #undef COOK_TRK
  757.     #undef COOK_TRK_VAL
  758. //     #undef COOK_CHP
  759. //     #undef COOK_CHP_VAL
  760.     #undef COOK_REP
  761.     #undef COOK_SPK
  762.     #undef COOK_CLOCK
  763.     #undef COOK_CLOCK_VAL
  764.     #define COOK_CD COOK_CDROM
  765.     #define COOK_TRK COOK_TRK_CDROM
  766.     #define COOK_TRK_VAL COOK_TRK_VAL_CDROM
  767. //     #define COOK_CHP COOK_CHP_CDROM
  768. //     #define COOK_CHP_VAL COOK_CHP_VAL_CDROM
  769.     #define COOK_REP COOK_REP_CDROM
  770.     #define COOK_SPK COOK_SPK_CDROM
  771.     #define COOK_CLOCK COOK_CLOCK_CDROM
  772.     #define COOK_CLOCK_VAL COOK_CLOCK_VAL_CDROM
  773. if(pos < COOK_CLOCK)
  774. {
  775.     pos = pos + 24;
  776. }
  777. else
  778. {     
  779.     pos = pos +6;
  780. }
  781. }//end if cd_type_loaded == CDROM
  782. */
  783. #ifdef OSD_BMP_DISPLAY_CH_TIME
  784. display_disc_time = dNx_pg_tm-dPg_tm;
  785. #elif defined (OSD_BMP_DISPLAY_TT_TIME)
  786. display_disc_time = disc_time;
  787. #else
  788. display_disc_time = disc_time;
  789. #endif
  790. tm2hms(display_disc_time,&disc_hour,&disc_minute,&disc_second);
  791. #ifdef DISP_REGION_BOTTOM
  792. if(OSD_ShowBottomDisp() == 1)
  793.         bkColor = DISP_SHADOW_CDROM;
  794.     else
  795. #endif//DISP_REGION_BOTTOM  
  796. bkColor = DISP_SHADOW; //OSD shadow color
  797. fontColor = DISP_FONT_GRAY; //grey 10
  798.     
  799. if(val) 
  800. {       
  801. fontColor = DISP_FONT_YELLOW; //yellow                      
  802. #ifndef DIV_GOTO_DISPLAY//zhaoyanhua add 03-10-22 10:58
  803. if(full_scrn&GOTO)
  804. {    
  805. #ifdef NEW_GOTO//kenny 2002/4/13
  806. if(val&COOK_S_TIMER) 
  807. {
  808. if(index_x>=5)
  809. {
  810. time_trans2hms();    //xyy 2003-7-29 11:42       
  811. if(cd_type_loaded == CDDVD)
  812. {
  813.     //draw the clock val, and it can be changed in different define on customer demand       
  814.     #ifdef OSD_BMP_DISPLAY_TT_TIME
  815.     psprintf(linebuf, "TT %02d:%02d:%02d/%02d:%02d:%02d", goto_hour, goto_min, goto_sec,disc_hour,disc_minute,disc_second);            
  816.     #elif defined(OSD_BMP_DISPLAY_CH_TIME)
  817.     psprintf(linebuf, "CH %02d:%02d:%02d/%02d:%02d:%02d", goto_hour, goto_min, goto_sec,disc_hour,disc_minute,disc_second);            
  818.     #else
  819.     psprintf(linebuf, "%02d:%02d:%02d/%02d:%02d:%02d", goto_hour, goto_min, goto_sec,disc_hour,disc_minute,disc_second);            
  820.     #endif
  821.     }//if(cd_type_loaded == CDDVD)
  822.     else
  823.     {
  824.     psprintf(linebuf, "%02d:%02d:%02d/%02d:%02d:%02d", goto_hour, goto_min, goto_sec,disc_hour,disc_minute,disc_second);            
  825.     } 
  826. }//if(index_x>=5) 
  827. else
  828. {
  829. if((remain==DISC_REMAIN_TIME)||(remain==TRK_REMAIN_TIME)) // terry 2002/6/4 09:48PM : solve time in goto mode without '-'
  830. {
  831.                         #ifdef NOT_SHOW_TIME_IN_JPG    //Maoyong for not display "-" when jpeg 2004.02.13      
  832.                         if(!Is_JPEG_STATE())
  833.                         #endif
  834. //draw remain time in display page 2 or 3
  835.                         psprintf(linebuf, "-%02d:%02d:%02d", goto_hour, goto_min, goto_sec);
  836.                     }//if((remain==DISC_REMAIN_TIME)||(remain==TRK_REMAIN_TIME))
  837. else
  838. {     
  839. if(cd_type_loaded == CDDVD)
  840. {     
  841.     #ifdef OSD_BMP_DISPLAY_TT_TIME
  842.     psprintf(linebuf, "TT %02d:%02d:%02d/%02d:%02d:%02d", goto_hour, goto_min, goto_sec,disc_hour,disc_minute,disc_second);            
  843.     #elif defined(OSD_BMP_DISPLAY_CH_TIME)
  844.     psprintf(linebuf, "CH %02d:%02d:%02d/%02d:%02d:%02d", goto_hour, goto_min, goto_sec,disc_hour,disc_minute,disc_second);            
  845.     #else
  846.     psprintf(linebuf, "%02d:%02d:%02d/%02d:%02d:%02d", goto_hour, goto_min, goto_sec,disc_hour,disc_minute,disc_second);            
  847.     #endif
  848.     }//if(cd_type_loaded == CDDVD)
  849.     else
  850.     {     
  851.     psprintf(linebuf, "%02d:%02d:%02d/%02d:%02d:%02d", goto_hour, goto_min, goto_sec,disc_hour,disc_minute,disc_second);        
  852.     }
  853. }//if((remain==DISC_REMAIN_TIME)||(remain==TRK_REMAIN_TIME))
  854. }
  855. } else //if(val&COOK_S_TIMER) 
  856. {
  857. if(pos!=COOK_CHP_VAL) 
  858. {//title            
  859. if(dvd_title) 
  860. id=dvd_title;
  861. if (cd_type_loaded == CDROM)
  862. psprintf(linebuf, "%04d/%02d",id,val);
  863. else
  864.     psprintf(linebuf, "%02d/%02d",id,val);
  865. } //if(pos!=COOK_CHP_VAL) 
  866. else 
  867. {
  868. if(dvd_chapter) 
  869. id=dvd_chapter;
  870. psprintf(linebuf, "%03d/%03d",id,val);          
  871. }//if(pos!=COOK_CHP_VAL) 
  872. }   //if(val&COOK_S_TIMER) 
  873. #else   //#ifndef NEW_GOTO
  874. if(val&COOK_S_TIMER) 
  875. {
  876. if(index_x==2)
  877.  {
  878. UINT32 time=goto_time;
  879.                     
  880. bkColor = DISP_GBLUE;                        
  881. fontColor = DISP_WHITE; 
  882. goto_time=goto_time%10000000;
  883. goto_sec=time%100;            
  884. time=time/100;
  885. goto_min=time%100;
  886. time=time/100;
  887. goto_hour=time%100;             
  888. psprintf(linebuf, "%02d:%02d:%02d", goto_hour, goto_min, goto_sec);            
  889. }//if(index_x==2)
  890. else 
  891. {
  892.                     psprintf(linebuf, "%02d:%02d:%02d", show_time_hh, show_time_mm, show_time_ss);
  893.                 }
  894. } //if(val&COOK_S_TIMER) 
  895. else 
  896. {
  897. if(pos!=COOK_CHP_VAL)
  898.                 {
  899.                     //title          
  900. if(index_x==0)
  901.                     {
  902. bkColor = DISP_GBLUE;                                
  903. fontColor = DISP_WHITE; 
  904. }
  905.                     
  906. if(index_x!=2) {
  907. if(dvd_title) {
  908. if(dvd_title>val)
  909. dvd_title=dvd_title%10;
  910.                             
  911. id=dvd_title;
  912. }
  913. }//if(index_x!=2)
  914.     psprintf(linebuf, "%02d",id);                   
  915.     } //if(pos!=COOK_CHP_VAL)
  916.     else 
  917.     {
  918. if(index_x==1) 
  919. {
  920. bkColor = DISP_GBLUE;    
  921. fontColor = DISP_WHITE; 
  922. }
  923. if(index_x!=2) {
  924. if(dvd_chapter) {
  925. if(dvd_chapter>val)
  926. dvd_chapter=dvd_chapter%10;
  927.                             
  928. id=dvd_chapter;
  929. }
  930. }//if(index_x!=2)
  931. psprintf(linebuf, "%03d",id);   
  932. }//if(pos!=COOK_CHP_VAL)
  933.                 
  934.                 io_write("9");
  935. #ifdef SDRAM_16Mb_Mode 
  936. do_DispOSD0String(pos, 0, linebuf, 2, 0); 
  937. #else
  938. if(cd_type_loaded != CDDVD && pos == COOK_TRK_VAL)//TRK occupy three char
  939. do_DispOSD0LittleString(pos+16,7,linebuf,fontColor,bkColor);
  940. else
  941. do_DispOSD0LittleString(pos,7,linebuf,fontColor,bkColor);
  942. do_DispOSD0String(pos, 2, linebuf_oriCh, fontColor, bkColor); 
  943. #endif
  944. #ifdef DISP_REGION_BOTTOM
  945. if(OSD_ShowBottomDisp() == 1)
  946.         bkColor = DISP_SHADOW_CDROM;
  947.     else
  948. #endif//DISP_REGION_BOTTOM          
  949.     bkColor = DISP_SHADOW; //OSD shadow color
  950. if(pos==COOK_CHP_VAL) {
  951. pos+=3*DISP_LITTLE_CHAR_WIDTH;
  952. psprintf(linebuf, "/%03d",val); 
  953. } else {
  954. pos+=2*DISP_LITTLE_CHAR_WIDTH;
  955. psprintf(linebuf, "/%02d",val);
  956. }
  957. }               
  958. #endif//NEW_GOTO
  959. }//end if full_scrn&GOTO
  960.         else 
  961. #endif//end ifndef DIV_GOTO_DISPLAY
  962. if(val&COOK_S_TIMER)
  963. {
  964.         
  965. if ((cd_type_loaded == CDROM) && (Is_JPEG_STATE()))  // Add by David for Jpeg time display bug 2003-12-1 16:28
  966.         {
  967.             show_time_hh = 0;
  968.             show_time_mm = 0;
  969.             show_time_ss = 0;
  970.         }            
  971. #ifdef NOT_SHOW_TIME_IN_JPG    //axel 2004/1/8 04:58PM        
  972. #ifdef NOSHOW_CDROM_WHEN_DISP  //zhangyu 2004-6-14 20:35
  973. if(!(pFsJpeg->gbfsPictureCD))
  974. #endif
  975. if(Is_JPEG_STATE())
  976. psprintf(linebuf, "       ");
  977. else
  978. #endif //NOT_SHOW_TIME_IN_JPG
  979. #ifdef NOSHOW_CDROM_WHEN_DISP
  980. if(!(pFsJpeg->gbfsPictureCD))     
  981. #endif
  982.         if((remain==DISC_REMAIN_TIME)||(remain==TRK_REMAIN_TIME)) // terry 2002/6/4 09:48PM : solve time in goto mode without '-'
  983.         {
  984.             #ifdef NOT_SHOW_TIME_IN_JPG    //Maoyong for not display "-" when jpeg 2004.02.13      
  985.             if(!Is_JPEG_STATE())
  986.             #endif
  987. {
  988. psprintf(linebuf, "-%02d:%02d:%02d", show_time_hh, show_time_mm, show_time_ss);
  989.   }
  990. }//if((remain==DISC_REMAIN_TIME)||(remain==TRK_REMAIN_TIME))
  991.         else
  992. {                  
  993. if(cd_type_loaded == CDDVD)
  994. {
  995.     #ifdef OSD_BMP_DISPLAY_TT_TIME
  996.     psprintf(linebuf, "TT %02d:%02d:%02d/%02d:%02d:%02d", show_time_hh, show_time_mm, show_time_ss,disc_hour,disc_minute,disc_second);            
  997.     #elif defined(OSD_BMP_DISPLAY_CH_TIME)
  998.     psprintf(linebuf, "CH %02d:%02d:%02d/%02d:%02d:%02d", show_time_hh, show_time_mm, show_time_ss,disc_hour,disc_minute,disc_second);            
  999.     #else
  1000.     psprintf(linebuf, "%02d:%02d:%02d/%02d:%02d:%02d", show_time_hh, show_time_mm, show_time_ss,disc_hour,disc_minute,disc_second);            
  1001.     #endif
  1002.             }
  1003. else
  1004. {
  1005. psprintf(linebuf, "%02d:%02d:%02d/%02d:%02d:%02d", show_time_hh, show_time_mm, show_time_ss,disc_hour,disc_minute,disc_second);            
  1006. }
  1007. }//end  if((remain==DISC_REMAIN_TIME)||(remain==TRK_REMAIN_TIME)) // terry 2002/6/4 09:48PM : solve time in goto mode without '-'
  1008.         }//end if(val&COOK_S_TIMER)
  1009.         
  1010.         else if(val&COOK_S_LANG)
  1011.         {           
  1012.          /* alan modifide 2002/5/30 09:53PM to cut SUP-LAN fit in display */
  1013.          UINT8 *str=get_lang_name(id);
  1014.     BYTE len=strlen(str);
  1015. //terry,2002/6/25 10:37AM
  1016. //<bug> get_lang_name return const string        
  1017.     strcpy(linebuf,str);
  1018.      if (!IsOSDChinese()||((linebuf[0]>='A')&&(linebuf[0]<='Z'))) 
  1019.      {
  1020.      linebuf[MAX_ENG_WORDS]='';
  1021.      } 
  1022.      else 
  1023.      {
  1024.      if (len>4)
  1025.      {
  1026. #if defined(USE_TCHINESE_OSD)//2-10-9 17:51
  1027.     psprintf(linebuf+2,"%s",TCh_yu);
  1028. #else
  1029.         #ifdef USE_KOREAN_OSD //clead korean 2003-10-23 
  1030.         psprintf(linebuf+2,"%s",KCh_09);
  1031.         #else
  1032.     psprintf(linebuf+2,"%s",Ch_yu2);
  1033.                     #endif
  1034. #endif //USE_TCHINESE_OSD
  1035. }//end if(len>4)
  1036. }// if (!IsOSDChinese()||((linebuf[0]>='A')&&(linebuf[0]<='Z'))) 
  1037. } //end   else if(val&COOK_S_LANG)
  1038. else if(val&COOK_S_MODE)
  1039. {
  1040. psprintf(linebuf,"%s",get_audio_mode());                
  1041. }else if(full_scrn&MARK)//nono 2-6-22 0:28
  1042. {
  1043. psprintf(linebuf, "%d",id);
  1044. }
  1045.     else//tt val,chapter val
  1046. {
  1047. if(cd_type_loaded == CDROM)
  1048.      psprintf(linebuf,"%03d/%03d",id,val);
  1049. else
  1050. psprintf(linebuf, "%02d/%02d",id,val);
  1051. }
  1052.         
  1053. if(cd_type_loaded != CDDVD && pos == COOK_TRK_VAL)//TRK occupy three char
  1054. do_DispOSD0LittleString(pos+16,12,linebuf,fontColor,bkColor);
  1055. else
  1056. do_DispOSD0LittleString(pos,12,linebuf, fontColor, bkColor);//display title val, chapter val,  time, audio val, and audio type
  1057. }//end if val
  1058. else 
  1059. {
  1060. if(id==STR_OS_ICON_REP0) 
  1061. {
  1062. id+=rep_mode; 
  1063. if(rep_mode == REPEAT_DISC)         // maybe add another icon for repeat directory,panxing, 2002-3-13
  1064. id--;
  1065. }
  1066. linebuf[0]= '';
  1067. if( (pos==COOK_CD) ) //display cd type bmp
  1068. switch(id)
  1069. {
  1070. case STR_OS_CDDA:
  1071.                     OSD_LayoutBmpDisplay(CD_BMP);
  1072.                     break;
  1073. case STR_OS_CDROM:
  1074.                     OSD_LayoutBmpDisplay(CDROM_BMP);
  1075.                     break;
  1076. case STR_OS_VCD10:
  1077.                 //case STR_OS_VCD20:     
  1078.                     OSD_LayoutBmpDisplay(VCD_BMP);
  1079.                     break;
  1080. case STR_OS_SVCD:     
  1081.                     OSD_LayoutBmpDisplay(SVCD_BMP);
  1082.                     break;
  1083. case STR_OS_DVD:     
  1084.                     OSD_LayoutBmpDisplay(DVD_BMP);
  1085.                     break;
  1086. }//end switch    
  1087. }//end if( (pos==COOK_CD) )
  1088.         //display TT ,CH and TRK char
  1089. else if ( (id == STR_OS_TT) || (id == STR_OS_CHP) || (id == STR_OS_TRACK))
  1090. {
  1091. psprintf(linebuf_oriCh,"%s",_OsdMessegeFont1[osd_font_mode][id]);
  1092. do_DispOSD0String(pos, 2, linebuf_oriCh, fontColor, bkColor);
  1093. }
  1094.         //display little string of t_disp = 2,  but not display string icon of audio , subtitle, angle, repeat, and speak
  1095. else if( (pos != COOK_AUDIO) && (pos != COOK_SUBTITLE)
  1096.     && (pos != COOK_ANGLE) && (pos != COOK_REP) 
  1097.     && (pos != COOK_SPK) && (pos != COOK_CLOCK)
  1098.     && (pos != COOK_PBC) && (pos != COOK_TRK)
  1099.     && (pos != COOK_CHP) && (pos != COOK_SPK_MP3))
  1100. {
  1101. psprintf(linebuf,"%s",_OsdMessegeFont1[osd_font_mode][id]);
  1102. do_DispOSD0LittleString(pos,12,linebuf, fontColor, bkColor);
  1103. }
  1104. else if(id==STR_OS_ICON_SPK)
  1105. {
  1106. OSD_LayoutBmpDisplay(VOLUME_ICON_BMP);
  1107. if (user_mute) 
  1108. {
  1109.     OSD_LayoutBmpDisplay(MUTE_ICON_BMP);
  1110. }
  1111. else if(id==STR_OS_PBC) //show PBC
  1112. {    
  1113. if ( IsPBCOn() ) 
  1114. fontColor = DISP_YGREEN; //yellow-green
  1115. else 
  1116. //if 16Mb mode,not show PBC if PBC is OFF.
  1117. //zhaoyanhua add 2003-11-13 15:51
  1118. #ifdef SDRAM_16Mb_Mode
  1119. linebuf[0]= '';
  1120. #else
  1121. fontColor = DISP_GRAY; //gray
  1122. #endif
  1123. psprintf(linebuf_oriCh,"%s",_OsdMessegeFont1[osd_font_mode][id]);
  1124. do_DispOSD0String(pos, 2, linebuf_oriCh, fontColor, bkColor);
  1125. }//end else if(id==STR_OS_PBC) 
  1126. else if(id == STR_OS_SUBTITLE)//show subtitle icon
  1127. {
  1128. OSD_LayoutBmpDisplay(SUB_TITLE_BMP);
  1129. }//end else if(id==STR_OS_SUBTITLE)
  1130. else if(id == STR_OS_ANGLE)//show angle icon
  1131. {
  1132. OSD_LayoutBmpDisplay(ANGLE_BMP);
  1133. }//end else if(id==STR_OS_ANGLE)
  1134. else if(id == STR_OS_AUDIO)//show audio language icon
  1135. {
  1136. OSD_LayoutBmpDisplay(LANGUAGE_BMP);
  1137. }//end else if(id==STR_OS_ANGLE)
  1138. else if(id == STR_OS_ICON_REP1)//show repeat1 icon
  1139. {
  1140. OSD_LayoutBmpDisplay(REPEAT_1_BMP);
  1141. }
  1142. else if (id == STR_OS_ICON_REPD)//show repeat all icon
  1143. {
  1144. OSD_LayoutBmpDisplay(REPEAT_ALL_BMP);
  1145. }
  1146. else if (id == STR_OS_ICON_REP0)//show repeat close icon
  1147. {
  1148. OSD_LayoutBmpDisplay(REPEAT_CLOSE_BMP);
  1149. }
  1150.         }
  1151.         {
  1152. io_write("8");
  1153. //#ifdef SDRAM_16Mb_Mode
  1154. // do_DispOSD0String(pos, 0, linebuf, 2, 0);
  1155. //#else
  1156. // do_DispOSD0String(pos, 2, linebuf_oriCh, fontColor, bkColor);
  1157. // do_DispOSD0LittleString(pos,12,linebuf, fontColor, bkColor);
  1158. //#endif
  1159. #ifndef DIV_GOTO_DISPLAY
  1160. #ifdef NEW_GOTO//kenny 2002/4/13
  1161. #ifdef  NEW_DISPLAY_GOTO_OSD
  1162. if(full_scrn&GOTO) 
  1163. {
  1164. if((index_x>=5)&&(val&COOK_S_TIMER))
  1165. hi_light_time(pos);
  1166. else if(pos==POS_DVD_CHAP) 
  1167. {   
  1168.                 if (cd_type_loaded != CDROM)
  1169.                     hi_light_chapter(id, pos+OFFSET_CHAP);
  1170. }
  1171. else if(pos==POS_DVD_TITLE)
  1172.                 if(cd_type_loaded==CDDVD)
  1173.                     hi_light_title(id, pos+OFFSET_TITLE);
  1174.   else
  1175. hi_light_title(id, pos+OFFSET_TRACK);
  1176. }
  1177. #else//#ifdef  NEW_DISPLAY_GOTO_OSD
  1178. if(full_scrn&GOTO)
  1179. {
  1180. if((index_x>=5)&&(val&COOK_S_TIMER))
  1181. {     
  1182. hi_light_time(pos);
  1183. }
  1184. else if(pos==COOK_CHP_VAL) 
  1185. { //Maoyong 2004.04.28 marked MP3_DIRECT_SELECT
  1186. if (cd_type_loaded != CDROM)
  1187. hi_light_chapter(id,pos);
  1188. }
  1189. else if(pos==COOK_TRK_VAL)
  1190. {     
  1191. if(cd_type_loaded != CDDVD)
  1192.                     hi_light_title(id,pos + 16);//TRK occupy three char
  1193.      else
  1194. hi_light_title(id,pos);//TT occupy two char
  1195. }
  1196. }
  1197. #endif//#ifdef  NEW_DISPLAY_GOTO_OSD
  1198. #endif//NEW_GOTO
  1199. #endif//end ifndef DIV_GOTO_DISPLAY
  1200.     }
  1201. }
  1202. #endif //OSD_BMP_DISPLAY
  1203. #ifdef DIV_GOTO_DISPLAY   
  1204. /*
  1205.  * Description:
  1206.  *      Draw informaiton to OSD.
  1207.  *
  1208.  */
  1209. void PrintGotoInfo2OSD(int id, int val,int pos,int type,BYTE need_hi)
  1210. {
  1211. memset(linebuf,0,40);
  1212.    
  1213.     //clear value 
  1214.     //zhaoyanhua add 2003-11-11 10:51
  1215.     if((index_x == 0))
  1216.         dvd_title = 0;
  1217.     else if(index_x == 2)
  1218.         dvd_chapter = 0;
  1219.     else if (index_x == 5)
  1220.         goto_time = 0;
  1221.    
  1222. if(val!= 0)
  1223. {
  1224. switch(type)
  1225. {
  1226. case TIME: 
  1227. if((index_x>=5))
  1228. {
  1229.             time_trans2hms();    //xyy 2003-7-29 11:42       
  1230. psprintf(linebuf, "%02d:%02d:%02d ", goto_hour, goto_min, goto_sec);            
  1231. }
  1232. else
  1233. {
  1234. psprintf(linebuf, "%02d:%02d:%02d ", goto_hour, goto_min, goto_sec);            
  1235. }
  1236. break;
  1237. case TITLE:
  1238.     //NOTE:
  1239.     //index_x<=1  when input show correct value
  1240.     //index_x>1 && dvd_title != id after select,show correct selected value.
  1241.     //zhaoyanhua add 2003-11-11 11:30
  1242. #ifdef MP3_DIRECT_SELECT//zhaoyanhua add 2004-2-16 11:01
  1243.     if(((cd_type_loaded == CDROM) && ((index_x <= 3) || ((index_x >3) &&(dvd_title)&&(dvd_title!= id)))) 
  1244.        ||((cd_type_loaded != CDROM) && ((index_x <= 1) || ((index_x >1) &&(dvd_title)&&(dvd_title!= id)))) 
  1245.        )
  1246. #else
  1247.     if((index_x <= 1) || ((index_x >1) &&(dvd_title)&&(dvd_title!= id)))
  1248.         #endif//#ifdef MP3_DIRECT_SELECT      
  1249.         id = dvd_title;        
  1250. #ifdef MP3_DIRECT_SELECT //zhaoyanhua add 3-7-16 16:47
  1251. if (cd_type_loaded == CDROM)
  1252. psprintf(linebuf, "%04d/%02d  ",id,val);
  1253. else
  1254. psprintf(linebuf, "%02d/%02d  ",id,val);
  1255. #else
  1256. psprintf(linebuf, "%02d/%02d  ",id,val);                  
  1257. #endif
  1258. break;
  1259. case CHARPTER:
  1260.     //NOTE:
  1261.     //index_x>=2 && index-x<=4  when input show correct value
  1262.     //index_x>4 && dvd_chapter != id after select,show correct selected value.
  1263.     //zhaoyanhua add 2003-11-11 11:30
  1264.     if (((index_x >=2)&&(index_x <=4)) || ((index_x>4)&&(dvd_chapter != id) &&(dvd_chapter))) 
  1265. id=dvd_chapter;
  1266. psprintf(linebuf, "%03d/%03d  ",id,val); 
  1267. break;
  1268. default:
  1269. break;
  1270.         }
  1271. }
  1272. else if((!val) &&(!type))
  1273. {
  1274. psprintf(linebuf,"%s",_OsdMessegeFont1[osd_font_mode][id]);
  1275. }
  1276. if(val == 0)//draw words. black
  1277. osd_DrawRegionString(pos,0,linebuf, REGION2_FONTCOLOR, REGION2_BKCOLOR, 2);
  1278. else
  1279. osd_DrawRegionString(pos,0,linebuf, REGION2_NUMCOLOR, REGION2_BKCOLOR, 2);
  1280. if((need_hi)&&(val))
  1281. {
  1282.     
  1283. if(((index_x>=5)&&(index_x<=10))&&(type == TIME))
  1284. hi_light_time(pos);
  1285. else if(((index_x >=2)&&(index_x<=4)) &&(type == CHARPTER))
  1286. {
  1287. #ifdef MP3_DIRECT_SELECT  //zhaoyanhua add.  not Hilight  CHAP 3-7-16 16:17
  1288. if (cd_type_loaded != CDROM)
  1289. #endif
  1290. //hi_light_chapter(id,pos);
  1291. hi_light_chapter(dvd_chapter,pos);//
  1292. }
  1293.     #ifdef MP3_DIRECT_SELECT//zhaoyanhua add 2004-2-16 11:08
  1294. else if(((index_x<=3) &&(type == TITLE) && (cd_type_loaded == CDROM))
  1295.         ||((index_x<=1) &&(type == TITLE) && (cd_type_loaded != CDROM)))
  1296.     #else
  1297. else if((index_x<=1) &&(type == TITLE))
  1298.     #endif        
  1299. //hi_light_title(id,pos);
  1300. hi_light_title(dvd_title,pos);
  1301. }
  1302. }
  1303. void ClearRegion2(void)
  1304. {
  1305.     //wanghaoying modified as zhaoyanhua told, 2003-11-13 18:35
  1306.     //the forth and the fifth parameter means that to use transparence color
  1307. //must clear osd .
  1308. osd_DrawRegionString(GOTO_TRK0,0,"                          ",0,0,2);
  1309. }
  1310. /*
  1311.  *Description:
  1312.  *     page:
  1313.  *     need_hi: if 0:not hilight
  1314.  *              if 1: hilight   
  1315.  */
  1316. void ShowSearchPage(BYTE page,BYTE need_hi)
  1317. {
  1318. switch(page)
  1319. {
  1320. case 0:
  1321. //show charpter:title
  1322.      //can search charpter and title
  1323.      if(cd_type_loaded!=CDDVD) 
  1324. int tt;
  1325. PrintGotoInfo2OSD(STR_OS_SELECT,0,GOTO_TRK0,0,need_hi); 
  1326. PrintGotoInfo2OSD(STR_OS_TRACK,0,GOTO_TRK0+4,0,need_hi);          
  1327. if(cd_type_loaded==CDROM) 
  1328. {
  1329. extern UINT16 mp3_file_count(void);
  1330. tt=mp3_file_count();//nono 2-4-22 14:05 for fuss           
  1331. if(play_state==VCD_STATE_STOP)                                        
  1332. disp_trk_now=tt;//nono 2-4-22 14:05 for fuss           
  1333. else 
  1334. {
  1335. tt=cd_total_trk();                                        
  1336. }
  1337. osd_DrawRegionString(GOTO_TRK0+8,0,"          ",REGION2_BKCOLOR,REGION2_BKCOLOR,2);
  1338. PrintGotoInfo2OSD(disp_trk_now,tt,GOTO_TRK0 + 10,TITLE,need_hi);
  1339. else 
  1340. {            
  1341. osd_DrawRegionString(GOTO_TRK0,0,"                      ",REGION2_RCOLOR,REGION2_BKCOLOR,2);
  1342. PrintGotoInfo2OSD(STR_OS_TT,0,GOTO_TRK0,0, need_hi);
  1343. PrintGotoInfo2OSD(get_tt_info(DISP_TT),get_tt_info(DISP_TT_Ns),GOTO_TRK0_VAL,TITLE,need_hi);               
  1344. PrintGotoInfo2OSD(STR_OS_CHP,0,GOTO_CHP0,0, need_hi);        
  1345. PrintGotoInfo2OSD(get_tt_info(DISP_CH),get_tt_info(DISP_CH_Ns),GOTO_CHP0_VAL,CHARPTER, need_hi);
  1346. }
  1347.      break;
  1348.      case 1:
  1349.      //show charpter : time
  1350.      if(cd_type_loaded == CDDVD)
  1351.      {
  1352.     
  1353.      osd_DrawRegionString(GOTO_TRK0,0,"                      ",REGION2_RCOLOR,REGION2_BKCOLOR,2); //linrc add 2004-7-6 14:28 I find it is a bug.so I modyfy
  1354.      PrintGotoInfo2OSD(STR_OS_TT,0,GOTO_TRK1,0,need_hi);  
  1355.                                   #ifndef  NINTAUS_DVD //2004-2-24 09:31张宇M
  1356. PrintGotoInfo2OSD(get_tt_info(DISP_TT),get_tt_info(DISP_TT_Ns),GOTO_TRK1_VAL,TITLE, need_hi); 
  1357.                                   #endif
  1358. PrintGotoInfo2OSD(STR_OS_TIME,0,GOTO_S_TIMER,0,need_hi);                
  1359. PrintGotoInfo2OSD(0,1,GOTO_TIMER_VAL,TIME,need_hi);              
  1360.      }
  1361.      else//VCD/CD    
  1362.      {
  1363.     
  1364.      //PrintGotoInfo2OSD(STR_OS_TRACK,0,GOTO_TRK1,0,need_hi);          
  1365.      PrintGotoInfo2OSD(STR_OS_DISCTIME,0,GOTO_TRK1,0,need_hi);                
  1366. osd_DrawRegionString(GOTO_TRK1+8,0,"          ",REGION2_BKCOLOR,REGION2_BKCOLOR,2);
  1367. PrintGotoInfo2OSD(0,1,GOTO_TRK1+10,TIME,need_hi);
  1368.      }
  1369.      break;
  1370.      case 2:
  1371.      if(cd_type_loaded == CDDVD)
  1372.      {
  1373.      //osd_DrawRegionString(GOTO_TRK0,0,"                      ",3,3,2);
  1374.      PrintGotoInfo2OSD(STR_OS_CHP,0,GOTO_CHP2,0, need_hi);        
  1375.                              #ifndef NINTAUS_DVD //2004-2-24 09:31张宇M
  1376. PrintGotoInfo2OSD(get_tt_info(DISP_CH),get_tt_info(DISP_CH_Ns),GOTO_CHP2_VAL,CHARPTER, need_hi);
  1377.  #endif
  1378. PrintGotoInfo2OSD(STR_OS_TIME,0,GOTO_S_TIMER,0,need_hi);                
  1379. PrintGotoInfo2OSD(0,1,GOTO_TIMER_VAL,TIME,need_hi);              
  1380.      }
  1381.      else// VCD/CD  
  1382.      {
  1383.      PrintGotoInfo2OSD(STR_OS_TRACK,0,GOTO_TRK1,0,need_hi);          
  1384.      PrintGotoInfo2OSD(STR_OS_TIME,0,GOTO_TRK1+4,0,need_hi);                
  1385. osd_DrawRegionString(GOTO_TRK1+8,0,"        ",REGION2_BKCOLOR,REGION2_BKCOLOR,2);
  1386. PrintGotoInfo2OSD(0,1,GOTO_TRK1+10,TIME,need_hi);  
  1387.      }
  1388.      break;
  1389.      default:
  1390.      break;
  1391.       
  1392. }
  1393. timeout_osd[2]= 3*OSD_TIMEOUT;
  1394. }
  1395. #endif//end DIV_GOTO_DISPLAY
  1396. #ifdef DISPLAY_MP4_VER_PI
  1397. static inline void disp_mp4_ver_pi(void)
  1398. {   
  1399. int i;
  1400.     avi_video_info info;
  1401.     get_avi_video_version(&info);
  1402.        
  1403.     strcpy(linebuf, "MPEG4");  
  1404. do_DispOSD0String(COOK_CD, 0, linebuf, DISP_ORANGE, DISP_SHADOW);
  1405. //version Promt symbol & version
  1406. strcpy(linebuf, "VER");
  1407. do_DispOSD0String(COOK_TRK+2, 0, linebuf, DISP_WHITE, DISP_SHADOW);
  1408. for(i = 0; i<5; i++)
  1409. linebuf[i] = info.version_str[i];
  1410. linebuf[5] = '';        
  1411.     do_DispOSD0String(COOK_TRK_VAL+2, 0, linebuf, DISP_YGREEN, DISP_SHADOW);
  1412.       
  1413.     strcpy(linebuf, "SIZE");
  1414. do_DispOSD0String(COOK_SPK+8, 0, linebuf, DISP_WHITE, DISP_SHADOW);         
  1415. psprintf(linebuf, "%dX%d", info.width,info.height);
  1416.     do_DispOSD0String(COOK_SPK+8+5, 0, linebuf, DISP_YGREEN, DISP_SHADOW);
  1417. }
  1418. #endif
  1419. #ifdef DISPLAY_MP4_AV_INFO  //Maoyong 2004.06.29. display MP4 video codec mode and audio coding mode
  1420. static inline void disp_mp4_av_info(void)
  1421. {
  1422.     int i;
  1423.     avi_video_info info;
  1424.     get_avi_video_version(&info);
  1425.     strcpy(linebuf, "MPEG4");
  1426. do_DispOSD0String(COOK_CD+1, 0, linebuf, DISP_ORANGE, DISP_SHADOW);
  1427. //version Promt symbol & version
  1428. strcpy(linebuf, "VIDEO");
  1429. do_DispOSD0String(COOK_TRK+2, 0, linebuf, DISP_WHITE, DISP_SHADOW);
  1430. for(i = 0; i<5; i++)
  1431. linebuf[i] = info.version_str[i];
  1432. linebuf[5] = '';
  1433.     do_DispOSD0String(COOK_TRK+8, 0, linebuf, DISP_YGREEN, DISP_SHADOW);
  1434. psprintf(linebuf, "%dX%d", info.width,info.height);
  1435.     do_DispOSD0String(COOK_TRK+8+6, 0, linebuf, DISP_YGREEN, DISP_SHADOW);
  1436.     //display dsp audio code mode
  1437.     strcpy(linebuf, "AUDIO");
  1438. do_DispOSD0String(COOK_TRK_VAL+18, 0, linebuf, DISP_WHITE, DISP_SHADOW);
  1439. printf("=========== coding mode now : %x==============n", coding_mode_now);
  1440.     if( coding_mode_now == AUDIF_CODING_MODE_AC3 )
  1441.         strcpy(linebuf, "AC3 ");
  1442.     else if( coding_mode_now == AUDIF_CODING_MODE_LPCM )
  1443.         strcpy(linebuf, "LPCM");
  1444.     else if( coding_mode_now == AUDIF_CODING_MODE_WMA )
  1445.         strcpy(linebuf, "WMA ");
  1446.     else if( coding_mode_now == AUDIF_CODING_MODE_DTS )
  1447.         strcpy(linebuf, "DTS ");
  1448.     else if( coding_mode_now == AUDIF_CODING_MODE_MP3 )
  1449.         strcpy(linebuf, "MP3 ");
  1450.     else
  1451.         strcpy(linebuf, "    ");
  1452.     do_DispOSD0String(COOK_TRK_VAL+18+6, 0, linebuf, DISP_YGREEN, DISP_SHADOW);
  1453.    
  1454. }
  1455. #endif
  1456. //Maoyong 2004.05.24 for display HDCD/DTSCD/CDG... sub cd type info
  1457. void DispCDSubtypeInfo(void)
  1458. {
  1459. #ifdef SDRAM_16Mb_Mode
  1460. #ifdef JUST_SHOW_CD_TYPE //Maoyong for NINTAUS not show CD ICON but type in icon pos 2004.02.11
  1461. do_DispOSD0String(COOK_CD, 0, linebuf, 2, DISP_SHADOW);
  1462. #else
  1463. do_DispOSD0String(COOK_PBC, 0, linebuf, 2, DISP_SHADOW);
  1464. #endif
  1465. #else
  1466. #ifdef JUST_SHOW_CD_TYPE
  1467. do_DispOSD0String(COOK_CD, 0, linebuf, DISP_ORANGE, DISP_SHADOW); //Jeff 20020413
  1468.     #else
  1469. do_DispOSD0String(COOK_PBC, 0, linebuf, DISP_YGREEN, DISP_SHADOW); //Jeff 20020413
  1470. #endif
  1471. #endif
  1472. //Maoyong 2004.05.24 moved from DispCookOSD0 for t_disp == 0
  1473. #if defined(SUPPORT_USB)
  1474. BYTE IsUSBCardReader(void);
  1475. #endif
  1476. void DispCDTypeInfo(void)
  1477. {
  1478.     //for special Card/Card reader meida type
  1479.     #if defined(SUPPORT_USB)||defined(SPHE8202_CARD_STORAGE) //Maoyong 2004.05.24
  1480.     #ifdef DISPLAY_MEDIA_TYPE           
  1481.     if( (cd_type_loaded == CDROM) && (media_type == MEDIA_CARD)  )
  1482.     {
  1483.         //Usb card and SD/MS/CF... treated as card, USB single device display USB
  1484.         #ifdef SUPPORT_USB
  1485.         if( (storage_type & USB_DEVICE) && (!IsUSBCardReader()) )
  1486.             strcpy(linebuf, "USB  ");           
  1487.         else
  1488.         #endif
  1489.             strcpy(linebuf, "CARD ");   //maybe can show card type/number for CARD_STORAGE
  1490.             
  1491.         do_DispOSD0String(0, 0, linebuf, DISP_ORANGE, DISP_SHADOW);    
  1492.         return; 
  1493.     } 
  1494.     #endif
  1495.     #endif
  1496.     
  1497.     #if  defined( SKYWORTH_DVD)||defined(NOSHOW_CDROM_WHEN_DISP) //wthsin 031021
  1498. if(cd_type_loaded==CDROM)  //CD-ROM Disk
  1499. {
  1500.     if(Is_MP3_STATE())
  1501.     {
  1502.         io_write("4");
  1503.         strcpy(linebuf, "MP3 ");
  1504.         do_DispOSD0String(0, 0, linebuf, DISP_ORANGE, DISP_SHADOW);
  1505.     }
  1506.     else if(Is_JPEG_STATE())
  1507.     {
  1508.          
  1509.         if(pFsJpeg->gbfsPictureCD) //Kodak Picture CD
  1510.         {
  1511.             #ifndef NOSHOW_CDROM_WHEN_DISP  //zhangyu 2004-6-14 19:35
  1512.           Print2OSDmem(osd_cd_id[0],0,COOK_CD);
  1513.             #else
  1514.            io_write("4");
  1515.              strcpy(linebuf, "PICTURE CD");
  1516.          do_DispOSD0String(25, 0, linebuf, DISP_ORANGE, DISP_SHADOW);
  1517.             #endif
  1518.         }
  1519.         else 
  1520.           
  1521.         {
  1522.             io_write("4");
  1523.             strcpy(linebuf, "JPEG");
  1524.         do_DispOSD0String(0, 0, linebuf, DISP_ORANGE, DISP_SHADOW);
  1525.     }  
  1526. }
  1527. else
  1528. {
  1529.      io_write("4");
  1530.      strcpy(linebuf, "MPEG");
  1531.      do_DispOSD0String(0, 0, linebuf, DISP_ORANGE, DISP_SHADOW);
  1532. }
  1533.     }
  1534. else //if(cd_type_loaded==CDROM)  //CD-ROM Disk
  1535. #endif 
  1536.   
  1537. #ifdef SHOW_DVD_ROM//20040210
  1538. if( (is_svo_dvd())&&(cd_type_loaded==CDROM) ) 
  1539. {
  1540.     strcpy(linebuf, "DVDROM");
  1541.     do_DispOSD0String(0, 0, linebuf, DISP_ORANGE, DISP_SHADOW);
  1542. }else
  1543. #endif//SHOW_DVD_ROM
  1544. #ifdef JUST_SHOW_CD_TYPE
  1545. if( cd_type_loaded != CDDA) //Maoyong 2004.02.11
  1546. #endif
  1547.     {
  1548.         #ifdef DVD_SERVO
  1549.         #if 1//20040219
  1550. if ((cd_type_loaded == CDVCD10) && (is_svo_dvd()))
  1551.     Print2OSDmem(osd_cd_id[CDDVD],0,COOK_CD);
  1552. else
  1553.         #endif
  1554.         #endif // DVD_SERVO
  1555. Print2OSDmem(osd_cd_id[cd_type_loaded],0,COOK_CD);
  1556. }
  1557. }
  1558. void DispCookOSD0(BYTE bChange)
  1559. {
  1560. #ifndef SDRAM_16Mb_Mode
  1561. UINT32  *buf;
  1562. #endif
  1563. int  id;//nono 2-7-12 20:36
  1564. #ifdef DISP_REGION_BOTTOM
  1565.     UINT8 uiRegion = OSD_GetTrueDispRegion();
  1566. #else
  1567. UINT8 uiRegion = 0;
  1568. #endif
  1569. if (t_disp==0) return;
  1570. t_disp=t_disp%10;
  1571. //Maoyong 2004.05.11 avoid bug, show mp4 info just for MP4 file in playing state 
  1572. #ifdef DISPLAY_MP4_VER_PI
  1573.     if( (cd_type_loaded == CDROM) && (t_disp == 2) ) 
  1574.     {
  1575.        if( (GetCurrentFileType() != CDROM_MP4) || (pFsJpeg->gifsState != FS_STATE_OTHER) )                           
  1576.         t_disp = 1;           
  1577.     }
  1578.     #endif
  1579.     
  1580. #ifndef SDRAM_16Mb_Mode
  1581.     #ifdef OSD_VARIABLE_TEMP_DISPLAY_BUF
  1582.         //different display bar has different background color.
  1583.         temp_region_top_buf = (UINT32 *)get_osdbuf_region_ptr(temp_region,0);
  1584.         temp_region_bottom_buf = (UINT32 *)get_osdbuf_region_ptr(temp_region,1);
  1585.     #else
  1586. buf = (UINT32 *)osd_temp_buf;
  1587. #endif
  1588. #endif
  1589. if (bChange) {
  1590. //clear all temp-buf, Jeff 20020618
  1591. //printf("changen");
  1592. #ifndef SDRAM_16Mb_Mode
  1593. #ifdef OSD_BMP_DISPLAY
  1594. #ifdef DISP_REGION_BOTTOM
  1595. if (OSD_ShowBottomDisp() == 1)
  1596. {
  1597.      #ifdef OSD_VARIABLE_TEMP_DISPLAY_BUF
  1598.      //display bar,height:32 piexl
  1599.      if (p_scan==1)
  1600.          memset(temp_region_top_buf,(DISP_SHADOW_CDROM<<12 |DISP_SHADOW_CDROM<<8 | DISP_SHADOW_CDROM << 4 | DISP_SHADOW_CDROM),32*360);
  1601.      else    
  1602.      {    
  1603.          memset(temp_region_top_buf,(DISP_SHADOW_CDROM<<12 |DISP_SHADOW_CDROM<<8 | DISP_SHADOW_CDROM << 4 | DISP_SHADOW_CDROM),28*180);
  1604.             memset(temp_region_bottom_buf,(DISP_SHADOW_CDROM<<12 |DISP_SHADOW_CDROM<<8 | DISP_SHADOW_CDROM << 4 | DISP_SHADOW_CDROM),28*180);
  1605.         }
  1606.         #else
  1607.     memset(buf,(DISP_SHADOW_CDROM<<12 |DISP_SHADOW_CDROM<<8 | DISP_SHADOW_CDROM << 4 | DISP_SHADOW_CDROM),12*1024);
  1608. #endif
  1609. }
  1610. else
  1611. #endif//DISP_REGION_BOTTOM
  1612. {
  1613. #ifdef OSD_VARIABLE_TEMP_DISPLAY_BUF
  1614.      if ( p_scan==1)
  1615. {
  1616.          //display bar,height:28 piexl
  1617.          memset(temp_region_top_buf,(DISP_SHADOW<<12 |DISP_SHADOW<<8 | DISP_SHADOW << 4 | DISP_SHADOW),28*360);
  1618.             //add a gray color bar,height:4 pixel
  1619.             memset(temp_region_top_buf + 7*360,0xffff,4*360);
  1620. }
  1621. else
  1622. {
  1623.             //display bar,height:28 piexl
  1624.             memset(temp_region_top_buf,(DISP_SHADOW<<12 |DISP_SHADOW<<8 | DISP_SHADOW << 4 | DISP_SHADOW),28*180);
  1625.             memset(temp_region_bottom_buf,(DISP_SHADOW<<12 |DISP_SHADOW<<8 | DISP_SHADOW << 4 | DISP_SHADOW),28*180);
  1626.             //add a gray color bar,height:4 pixel
  1627.             memset(temp_region_top_buf + 7*180,0xffff,4*180);
  1628.             memset(temp_region_bottom_buf + 7*180,0xffff,4*180);
  1629.         }
  1630.         #else
  1631.      memset(buf,(DISP_SHADOW<<12 |DISP_SHADOW<<8 | DISP_SHADOW << 4 | DISP_SHADOW),12*1024);    
  1632. buf = (UINT32 *)(osd_temp_buf + (region[uiRegion].osd_h-4)*region[uiRegion].osd_w);
  1633. memset(buf,0xffff,2*1024);//f presents display gray color
  1634.      #endif
  1635. }
  1636. #else
  1637. memset(buf,0,8*1024);
  1638. #endif
  1639. #else
  1640. {
  1641.         int i,j,line=12;
  1642.        
  1643.         if (p_scan)
  1644.         line=24;
  1645.        
  1646. pTopLine = (UINT32 *)(((BYTE *)get_osdbuf_baseptr()) + (region[uiRegion].osd_header[0]+OSD_DATA_OFFSET(region[uiRegion].osd_format))*32);
  1647. pBtmLine = (UINT32 *)(((BYTE *)get_osdbuf_baseptr()) + (region[uiRegion].osd_header[1]+OSD_DATA_OFFSET(region[uiRegion].osd_format))*32);
  1648.         for (i=0; i<line; i++) 
  1649.         {           
  1650.             for (j=0; j<38; j++) 
  1651.             {
  1652.                 pTopLine[38*i+j] = 0x0; //f is the color index(palette_16color_setup) of transparent color
  1653.                 if (p_scan==0)
  1654.                  pBtmLine[38*i+j] = 0x0; //0 is the transparent color
  1655.             }
  1656.         }
  1657. }
  1658. #endif//SDRAM_16Mb_Mode
  1659. if (cd_type_loaded==CDDA) 
  1660. {//Jeff 20020619
  1661. if (rep_ab_mode==REPEAT_AB_IDLE) 
  1662. //when cd_type_loaded=CDDA, system will check which cddaType(CDDA/DTSCD/HDCD),
  1663. //to reduce " " ,  "HD/DTS" string(on OSD) change
  1664. //we add this checking
  1665. cddaType = 0;
  1666. }
  1667. else 
  1668. {
  1669. #ifndef NO_CHANGE_HDCD_COLOR_WHEN_REPEAT_AB//zhaoyanhua add 2003-12-12 15:12
  1670. if (cddaType==1) 
  1671. { //HDCD
  1672. //strcpy(linebuf, "HDCD");
  1673. io_write("4");
  1674. #ifdef NO_SHOW_HDCD_ICON//nono 2003-10-24 13:58
  1675.                         strcpy(linebuf, "    "); //Jeff 20020413
  1676. #else//NO_SHOW_HDCD_ICON                        
  1677.                         strcpy(linebuf, "HDCD"); //Jeff 20020413
  1678. #endif//NO_SHOW_HDCD_ICON
  1679. //                    strcpy(linebuf, "HDCD");
  1680.                     DispCDSubtypeInfo();    //Maoyong 2004.05.24
  1681. }
  1682. #endif//NO_CHANGE_HDCD_COLOR_WHEN_REPEAT_AB
  1683. }
  1684. }
  1685.         
  1686. #ifdef OSD_BMP_DISPLAY
  1687. if(t_disp)
  1688.     DispCDTypeInfo();
  1689. #endif//OSD_BMP_DISPLAY
  1690. if(t_disp==1) { //Jeff 20020607
  1691.     
  1692. #ifndef OSD_BMP_DISPLAY
  1693. #ifndef NEW_DISPLAY_GOTO_OSD
  1694.     DispCDTypeInfo();   //Maoyong 2004.05.24 build function for code more clear
  1695. #endif//#ifndef NEW_DISPLAY_GOTO_OSD
  1696. #endif//OSD_BMP_DISPLAY
  1697.   
  1698. if(cd_type_loaded!=CDDVD) { 
  1699. int spk_pos,tt;
  1700. #ifdef MP3_2GOTO_TYPE
  1701. if(cd_type_loaded==CDROM)
  1702. {
  1703. if(pFsJpeg->ControlArea == CNT_AREA_FILE) 
  1704. Print2OSDmem(STR_OS_TRACK,0,COOK_TRK); 
  1705. else if(pFsJpeg->ControlArea == CNT_AREA_DIR)
  1706. Print2OSDmem(STR_OS_DIR,0,COOK_TRK);
  1707. }
  1708. else 
  1709. #endif 
  1710. //Print2OSDmem(STR_OS_TRACK,0,COOK_TRK);          
  1711. #ifdef VCD_GAME_NO_SHOW_TRACK  //gerry,2003-12-1 10:13
  1712. if (cd_type_loaded!=CDVCD20)
  1713. {
  1714. Print2OSDmem(STR_OS_TRACK,0,COOK_TRK);
  1715. }
  1716. else
  1717. {
  1718. if((bDiscType != NES_DISC) && (bDiscType != NES_DISC_CHKSUM))
  1719. Print2OSDmem(STR_OS_TRACK,0,COOK_TRK);          
  1720. }
  1721. #else
  1722. #ifndef NEW_DISPLAY_GOTO_OSD
  1723. Print2OSDmem(STR_OS_TRACK,0,COOK_TRK);  
  1724. #endif//#ifndef NEW_DISPLAY_GOTO_OSD
  1725. #endif //#ifdef VCD_GAME_NO_SHOW_TRACK           
  1726. if(cd_type_loaded==CDROM) 
  1727. {
  1728.     extern UINT16 mp3_file_count(void);
  1729.     
  1730.     #ifdef MP3_2GOTO_TYPE
  1731.     if(pFsJpeg->ControlArea == CNT_AREA_FILE) 
  1732.     tt=mp3_file_count();//nono 2-4-22 14:05 for fuss
  1733. else if(pFsJpeg->ControlArea == CNT_AREA_DIR)
  1734. {
  1735.     disp_trk_now = pFsJpeg->fsnav_dir_now+1;
  1736.     tt = pFsJpeg->count_dir[ FS_FUNC_MP3-FS_FUNC_MP3 ]; // yltseng 2004/04/12, fix from absolutely access to relative access
  1737.     }
  1738.     #else 
  1739. tt=mp3_file_count();//nono 2-4-22 14:05 for fuss           
  1740. #endif       
  1741. if(play_state==VCD_STATE_STOP)//Maoyong 2004.03.16                                        
  1742. disp_trk_now=tt;//nono 2-4-22 14:05 for fuss           
  1743. spk_pos=COOK_SPK_MP3;
  1744. } else 
  1745. {
  1746. tt=cd_total_trk();                                        
  1747. #ifdef MIX_CDMP3_DISC_DISPLAY_REAL_CD_TRK //linrc add 2004-10-29 11:16
  1748. /*when play the cd+mp3 disc(ABEX TEST CD 786),it display the real CD TRK*/
  1749.                 if((cd_type_loaded == CDDA)&&((pFsJpeg->cdrom.track_info[1]&0x40000000) == 0x40000000))
  1750.                 {
  1751.                     tt += 1;
  1752.                 }         
  1753.                 #endif                               
  1754. spk_pos=COOK_SPK;
  1755. #ifdef EASTWIN_PORTABLE_DVD
  1756. if(play_state==VCD_STATE_STOP)//tulijuan040824for for stop and goto command display 1 ofcdda and vcd 
  1757. disp_trk_now=1;
  1758. #endif
  1759. }
  1760. //Print2OSDmem(disp_trk_now,tt,COOK_TRK_VAL);                
  1761. #ifdef VCD_GAME_NO_SHOW_TRACK  //gerry,2003-12-1 10:14
  1762. if (cd_type_loaded!=CDVCD20)
  1763. {
  1764. Print2OSDmem(disp_trk_now,tt,COOK_TRK_VAL);                
  1765. }
  1766. else
  1767. {
  1768. if((bDiscType != NES_DISC) && (bDiscType != NES_DISC_CHKSUM))
  1769. Print2OSDmem(disp_trk_now,tt,COOK_TRK_VAL);
  1770. }          
  1771. #else
  1772. #ifdef NOCHANGE_DISPLAY_WHEN_PRESTOP
  1773. if((play_state==VCD_STATE_STOP)//get the current count of mp3 file
  1774. &&(resumeMSF!=0))//wuxiaofeng 2004-03-04
  1775. {
  1776. if(cd_type_loaded==CDROM)
  1777. disp_trk_now = FSGUI_GetDispTrack();
  1778. //if((cd_type_loaded==CDDA)||(cd_type_loaded==CDVCD20))
  1779. // disp_trk_now = cd_trk_now;              
  1780. else if(cd_type_loaded!=CDDVD)              //hq, 2004-3-7 16:20
  1781. {
  1782. /* marked by hq
  1783. printf("<%d,%d,%d,%d,%d,%d>",v11_trk_now,cd_trk_now,cd_trk_lo,cd_trk_hi,cd_trk_lo_now,disp_trk_now);
  1784. if(cd_trk_now >= show_trk_num(cd_trk_hi))             //hq, for CD, STOP Key-->PREVIEW Key, when finished, OSD don't display one more than cd_trk_hi. 2004-3-7 16:26
  1785. disp_trk_now = cd_trk_hi;
  1786. else
  1787. disp_trk_now = cd_trk_now; 
  1788. */
  1789. disp_trk_now = show_trk_num(cd_trk_now);
  1790. //printf("<%d,%d,%d,%d,%d,%d>",v11_trk_now,cd_trk_now,cd_trk_lo,cd_trk_hi,cd_trk_lo_now,disp_trk_now);
  1791. }
  1792. }
  1793. #endif          
  1794.                 #ifdef STOP_TRK_DISP_ZERO   //Maoyong 2004.06.30
  1795.                 if(play_state == VCD_STATE_STOP)
  1796.                     disp_trk_now = 0;
  1797.                 #endif
  1798.                 #ifdef MIX_CDMP3_DISC_DISPLAY_REAL_CD_TRK   //linrc add 2004-10-29 11:19
  1799.                 /*when play the cd+mp3 disc(ABEX TEST CD 786),it display the real CD TRK*/
  1800.                 if((cd_type_loaded == CDDA)&&((pFsJpeg->cdrom.track_info[1]&0x40000000) == 0x40000000)
  1801.                         &&(play_state==VCD_STATE_STOP))
  1802.                 {
  1803.                     disp_trk_now += 1;
  1804.                 } 
  1805.             #endif
  1806.                 #ifdef  NEW_DISPLAY_GOTO_OSD
  1807.                     Print2OSDmem(disp_trk_now,tt, POS_TRACK);                
  1808.                 #else
  1809.     Print2OSDmem(disp_trk_now,tt,COOK_TRK_VAL);                
  1810.                 #endif//#ifndef NEW_DISPLAY_GOTO_OSD
  1811. #endif//#ifdef VCD_GAME_NO_SHOW_TRACK
  1812.                 #ifndef NEW_DISPLAY_GOTO_OSD
  1813. #ifdef NOT_SHOW_SOME_INFO_IN_JPEG
  1814. if(!(Is_JPEG_STATE()))
  1815. #endif
  1816. {
  1817. #ifdef SDRAM_16Mb_Mode//2004-7-3 15:10
  1818.             if(user_mute)
  1819.                 Print2OSDmem(STR_OS_SPACE,0,spk_pos);
  1820.             else
  1821. #endif//SDRAM_16Mb_Mode
  1822. Print2OSDmem(STR_OS_ICON_SPK,0,spk_pos);
  1823. #ifdef VALID_PROGROM_REPEAT
  1824.                 if( (prog_cnt)&&(rep_mode == REPEAT_IDLE) )
  1825. #ifdef STOP_IN_PROG_END//zhuyanfeng 20041025//to avoid display err when use program repeat off function 
  1826. Print2OSDmem(STR_OS_ICON_REP0,0,COOK_REP);
  1827.                 #else
  1828. Print2OSDmem(STR_OS_ICON_REPD,0,COOK_REP);
  1829.                 #endif
  1830.                 else
  1831. #endif
  1832.              
  1833. #ifdef ICON_REPEAT_FOLDER    //zhuyf  2004-8-10 
  1834. if( rep_mode==REPEAT_DIRECTORY)
  1835.                  Print2OSDmem(STR_OS_ICON_REPF,0,COOK_REP);
  1836.                 else 
  1837.                 #endif
  1838. Print2OSDmem(STR_OS_ICON_REP0,0,COOK_REP);
  1839. }
  1840. if( (cd_type_loaded!=CDDA)&&(cd_type_loaded!=CDROM) ) {
  1841. Print2OSDmem(STR_OS_PBC,0,COOK_PBC);                    
  1842. }           
  1843.                 #endif//#ifndef NEW_DISPLAY_GOTO_OSD
  1844. } else {            
  1845.    
  1846.  #ifdef STOP_TRK_DISP_ZERO   //Maoyong 2004.06.30
  1847.                                 if(play_state == VCD_STATE_STOP)
  1848.                                 disp_trk_now = 0;
  1849.                  #endif      
  1850. #ifdef NOCHANGE_DISPLAY_WHEN_PRESTOP       //wuxiaofeng, 2004-3-9 21:54
  1851. if(play_state==VCD_STATE_STOP)
  1852. {
  1853.     if(resumeMSF)                     //Pre-stop in DVD, hq, 2004-3-9 21:58
  1854.     {
  1855. Print2OSDmem(STR_OS_TT,0,COOK_TRK); 
  1856. Print2OSDmem(pDSV->rsm_info[0].dRSM_TTN,get_tt_info(DISP_TT_Ns),COOK_TRK_VAL);
  1857. Print2OSDmem(STR_OS_CHP,0,COOK_CHP);
  1858. Print2OSDmem(pDSV->rsm_info[0].dRSM_PTTN,get_tt_info(DISP_CH_Ns),COOK_CHP_VAL);
  1859.         
  1860.     }else            //Stop in DVD, hq, 2004-3-9 21:59
  1861.      {
  1862.      Print2OSDmem(STR_OS_TT,0,COOK_TRK); 
  1863.         Print2OSDmem(get_tt_info(DISP_TT_Ns),get_tt_info(DISP_TT_Ns),COOK_TRK_VAL);
  1864.     Print2OSDmem(STR_OS_CHP,0,COOK_CHP);
  1865.     Print2OSDmem(get_tt_info(DISP_CH_Ns),get_tt_info(DISP_CH_Ns),COOK_CHP_VAL);
  1866.     }
  1867. }
  1868. else
  1869. #endif
  1870.                 {
  1871. #ifdef  NEW_DISPLAY_GOTO_OSD
  1872.                     Print2OSDmem(get_tt_info(DISP_TT),get_tt_info(DISP_TT_Ns), POS_DVD_TITLE);                
  1873.                     Print2OSDmem(get_tt_info(DISP_CH),get_tt_info(DISP_CH_Ns), POS_DVD_CHAP);
  1874. #else//#ifdef  NEW_DISPLAY_GOTO_OSD
  1875. Print2OSDmem(STR_OS_TT,0,COOK_TRK);     
  1876. Print2OSDmem(get_tt_info(DISP_TT),get_tt_info(DISP_TT_Ns),COOK_TRK_VAL);                
  1877. Print2OSDmem(STR_OS_CHP,0,COOK_CHP);
  1878. Print2OSDmem(get_tt_info(DISP_CH),get_tt_info(DISP_CH_Ns),COOK_CHP_VAL);
  1879. #endif//#ifdef  NEW_DISPLAY_GOTO_OSD
  1880. }
  1881. //Jeff 20020621
  1882. if (full_scrn&MARK)
  1883. mark_UpdateOSD();
  1884. }
  1885. //cook TIME icon
  1886. #ifdef REMAIN_TIME//nono 2-7-13 11:28 for fuss
  1887. //if(t_disp==1)
  1888. {
  1889. //printf("disp:polling_clock=%dn",polling_clock);
  1890. if(polling_clock<6)
  1891. if( (remain==DISC_REMAIN_TIME)||(remain==DISC_TIME) ) 
  1892. {
  1893. #ifdef REMIAN_TIME_SHOW_FONT
  1894. if(IsOSDChinese())
  1895. {
  1896. if(cd_type_loaded==CDDVD)
  1897. id = STR_OS_TITLE;
  1898. else
  1899. id = STR_OS_ALL;
  1900.     }else//if(IsOSDChinese())
  1901. id = STR_OS_ICON_T;
  1902. #else//#endif//REMIAN_TIME_SHOW_FONT
  1903. id = STR_OS_ICON_T;
  1904. #endif//REMIAN_TIME_SHOW_FONT
  1905. }else //if( (remain==TRK_REMAIN_TIME)||(remain==NO_REMAIN_TIME) )
  1906. {
  1907. #ifdef REMIAN_TIME_SHOW_FONT
  1908. if(IsOSDChinese())
  1909. {
  1910. if(cd_type_loaded==CDDVD)
  1911. id = STR_OS_CHAPTER;
  1912. else
  1913. id = STR_OS_TRACK;
  1914. }else
  1915. id = STR_OS_ICON_C;
  1916. #else//#endif//REMIAN_TIME_SHOW_FONT
  1917. id = STR_OS_ICON_C;
  1918. #endif//#endif//REMIAN_TIME_SHOW_FONT
  1919. }
  1920. //id=ClockPolling(1);
  1921. //printf("tn");
  1922. }
  1923. else //if(polling_clock>6)
  1924. //id=ClockPolling(0);
  1925. id = STR_OS_ICON_CLOCK;
  1926. //printf("clockn");
  1927. }
  1928. }
  1929. //Print2OSDmem(STR_OS_ICON_CLOCK,0,COOK_CLOCK);           
  1930. //Print2OSDmem(id,0,COOK_CLOCK);            //Mark by Maoyong 2004.02.13      
  1931. #else
  1932. //Print2OSDmem(STR_OS_ICON_CLOCK,0,COOK_CLOCK);     //Mark by Maoyong 2004.02.13      
  1933. id = STR_OS_ICON_CLOCK;
  1934. #endif
  1935. #ifdef NOT_SHOW_TIME_IN_JPG    //Maoyong for not display "-" when jpeg 2004.02.13      
  1936. if(Is_JPEG_STATE())
  1937. id = STR_OS_SPACE;
  1938. #endif
  1939. #ifndef NEW_DISPLAY_GOTO_OSD
  1940. #ifdef OSD_BMP_DISPLAY
  1941. OSD_LayoutBmpDisplay(CLOCK_ICON_BMP);
  1942. #else
  1943. #ifndef NO_DISP_CLOCK //xyy add for Oritron 2004-11-10 
  1944. Print2OSDmem(id,0,COOK_CLOCK);
  1945. #endif
  1946. #endif//OSD_BMP_DISPLAY
  1947. #endif//#ifndef NEW_DISPLAY_GOTO_OSD
  1948. } else if (t_disp==2) {//Jeff 20020607
  1949. #ifndef NEW_DISPLAY_GOTO_OSD
  1950. #if defined(DISPLAY_MP4_VER_PI) || defined(DISPLAY_MP4_AV_INFO) //Maoyong 2004.06.29
  1951.             if( (GetCurrentFileType() == CDROM_MP4) && (pFsJpeg->gifsState == FS_STATE_OTHER) )
  1952.             {                    
  1953.                 #ifdef DISPLAY_MP4_VER_PI
  1954.              disp_mp4_ver_pi();
  1955.              #elif defined(DISPLAY_MP4_AV_INFO)
  1956.              disp_mp4_av_info();
  1957.              #endif
  1958.              return;
  1959.             }
  1960.             #endif
  1961.         
  1962. int id,show;            
  1963. if(cd_type_loaded!=CDSVCD) {
  1964. Print2OSDmem(STR_OS_ANGLE,0,COOK_ANGLE);
  1965.                 
  1966. if(get_angle_Ns())
  1967. Print2OSDmem(NP_AGLN,get_angle_Ns(),COOK_ANGLE_VAL);          
  1968. else
  1969. Print2OSDmem(STR_OS_NONE,0,COOK_ANGLE_VAL);                      
  1970.                 
  1971. if(pDSV->CurrDomain==TT_DOM)
  1972. show=1;
  1973. else
  1974. show=0;
  1975. } else
  1976. show=1;
  1977.             
  1978. Print2OSDmem(STR_OS_AUDIO,0,COOK_AUDIO);                
  1979. #ifdef DVD_AUDIO
  1980. if (dAMG_LSN && (pDSV->tt_info.dTT_PB_TY&0x80))
  1981. {
  1982. if( show&&(pDSV->dAv_AST_Ns) )
  1983. Print2OSDmem((NP_ASLN&0x0001)+1,pDSV->dAv_AST_Ns,COOK_AUDIO_VAL);
  1984. else
  1985. Print2OSDmem(STR_OS_NONE,0,COOK_AUDIO_VAL);
  1986. Print2OSDmem(STR_OS_AUDIO,COOK_S_LANG,COOK_AUDIO_LANG);
  1987. Print2OSDmem(NP_ASTN,COOK_S_MODE,COOK_AUDIO_TYPE);
  1988. } else
  1989. #endif
  1990. if( ((NP_ASTN&0xf)<=8)&&show&&(pDSV->dAv_AST_Ns) ) {
  1991. /* alan 02-05-27 modified */
  1992. if (((NP_ASTN+1)>pDSV->dAv_AST_Ns)&&(pDSV->dAv_AST_Ns==1))
  1993. Print2OSDmem(1,pDSV->dAv_AST_Ns,COOK_AUDIO_VAL);
  1994. else 
  1995. {//terry,2003/12/15 02:27PM,for Real time Video Format PAL, Philips 3122-783-01941
  1996. Print2OSDmem(NP_ASTN-min_astn_id+1,pDSV->dAv_AST_Ns,COOK_AUDIO_VAL);
  1997. }
  1998. Print2OSDmem(STR_OS_AUDIO,COOK_S_LANG,COOK_AUDIO_LANG);
  1999. Print2OSDmem(NP_ASTN,COOK_S_MODE,COOK_AUDIO_TYPE);                
  2000. }else 
  2001. Print2OSDmem(STR_OS_NONE,0,COOK_AUDIO_VAL);                       
  2002. Print2OSDmem(STR_OS_SUBTITLE,0,COOK_SUBTITLE);
  2003. id=NP_SPSTN&0x3f;
  2004. //if( (NP_SPSTN&0x40)&&(id<=pDSV->dAv_SPST_Ns)&&show ) {
  2005. if( (NP_SPSTN&0x40)&&(pDSV->dAv_SPST_Ns)&&(id<=pDSV->dAv_SPST_Ns)&&show ) { //Jeff 20020629
  2006. Print2OSDmem(id+1,pDSV->dAv_SPST_Ns,COOK_SUBTITLE_VAL);     
  2007. Print2OSDmem(STR_OS_SUBTITLE,COOK_S_LANG,COOK_SUBTITLE_LANG);
  2008. } else {
  2009. Print2OSDmem(STR_OS_OFF,0,COOK_SUBTITLE_VAL);                
  2010. }               
  2011. //} else if (t_disp==3) {//Jeff 20020411
  2012. #endif//#ifdef NEW_DISPLAY_GOTO_OSD
  2013. } else if (t_disp==3) {//Jeff 20020607
  2014. //8:gree  15:shadow color       10:bright-orange        2:yellow
  2015. //Jeff 20020411
  2016. io_write("3");
  2017. psprintf(linebuf,"%s",_OsdMessegeFont1[osd_font_mode][STR_OS_MARK]);
  2018. #ifdef SDRAM_16Mb_Mode
  2019. do_DispOSD0String(0, 0, linebuf, 2, DISP_SHADOW);
  2020. #else
  2021. do_DispOSD0String(0, 0, linebuf, 8, DISP_SHADOW);
  2022. #endif
  2023. mark_UpdateOSD();
  2024. Print2OSDmem(0,COOK_S_TIMER,COOK_CLOCK_VAL);
  2025. }
  2026.         }   
  2027.         if (t_disp==1) { 
  2028. #ifndef NEW_DISPLAY_GOTO_OSD
  2029. #ifdef NOT_SHOW_SOME_INFO_IN_JPEG
  2030. if((Is_JPEG_STATE()))
  2031. {
  2032. if(pFsJpeg->gbfsPictureCD)     //hq,2004-3-4 20:40
  2033. {
  2034. do_DispOSD0String(COOK_CLOCK, 0, "PICTURE CD", DISP_YGREEN, DISP_SHADOW); 
  2035. }
  2036. else
  2037. {
  2038. do_DispOSD0String(COOK_CLOCK, 0, "JPEG PICTURE", DISP_YGREEN, DISP_SHADOW); 
  2039. }
  2040. }
  2041.                 // 2004/04/15 yltseng mark, SUPPORT_OTHER_NEXT_PREVIOUS flag is no more need
  2042. //#ifdef SUPPORT_OTHER_NEXT_PREVIOUS
  2043. else if(Is_OTHER_STATE())//wuxiaofeng 2004-03-17
  2044.                 {
  2045. do_DispOSD0String(COOK_CLOCK, 0, "          AV", DISP_YGREEN, DISP_SHADOW); 
  2046.                 }
  2047. //#endif//#ifdef SUPPORT_OTHER_NEXT_PREVIOUS
  2048. else
  2049. #endif
  2050. Print2OSDmem(0,COOK_S_TIMER,COOK_CLOCK_VAL);
  2051. /*Maoyong 2004.02.26
  2052.   avoid to mistake for a CDDA contain HDCD,DTS..., when stop state,
  2053.   clear cdda subtype
  2054. */
  2055. #ifdef JUST_SHOW_CD_TYPE
  2056. if( (cd_type_loaded==CDDA) && (play_state== VCD_STATE_STOP) )
  2057. {
  2058. strcpy(linebuf, "     ");  
  2059. do_DispOSD0String(COOK_CD, 0, linebuf, DISP_ORANGE, DISP_SHADOW);                 
  2060. return;
  2061. }
  2062. #endif
  2063. if ( (cd_type_loaded==CDDA) &&
  2064. (coding_mode_now!=AUDIF_CODING_MODE_DTSCD)
  2065. )
  2066. {
  2067. int     myCDDAType;
  2068. myCDDAType = getCDDAType();
  2069. #if defined(SUPPORT_CDG) && defined(JUST_SHOW_CD_TYPE)
  2070. get_cdkit_time(0);
  2071. if(track_play_diff_time < 2)
  2072. return;
  2073.     
  2074. if( (myCDDAType == 0) && (cd_subtype == CD_DA) )
  2075. {
  2076.     if((bReadSubChannel != 0) &&CDG_IsCDGNow())
  2077.     {
  2078.         cddaType = 0;
  2079.         strcpy(linebuf, "CDG  ");  
  2080.         //do_DispOSD0String(COOK_CD, 0, linebuf, DISP_ORANGE, DISP_SHADOW); //Jeff 20020413                 
  2081.     }
  2082.     else 
  2083.     {
  2084.         cddaType = 0;
  2085.         strcpy(linebuf, "CD   ");
  2086.     }         
  2087.         
  2088.     DispCDSubtypeInfo();    //Maoyong 2004.05.24
  2089. }
  2090. #endif//#if defined(SUPPORT_CDG) && defined(JUST_SHOW_CD_TYPE)
  2091. #ifndef NO_CHANGE_HDCD_COLOR_WHEN_REPEAT_AB//zhaoyanhua add 2003-12-12 14:54
  2092. if (myCDDAType!=cddaType)
  2093. #endif
  2094. {
  2095. cddaType = myCDDAType; //Jeff 20020617
  2096. if (myCDDAType==0)
  2097. {
  2098. //CDDA ICON
  2099. strcpy(linebuf, "    "); //Jeff 20020617
  2100. }
  2101. else
  2102. {
  2103. #ifdef JUST_SHOW_CD_TYPE//4-2-12 3:21
  2104.     if(cd_subtype == CDROM_UNSUPPORT)
  2105.     {        
  2106.         return;
  2107.     }
  2108. #endif//JUST_SHOW_CD_TYPE
  2109. //HDCD ICON
  2110.                         #ifdef NO_SHOW_HDCD_ICON//nono 2003-10-24 13:58
  2111.                         strcpy(linebuf, "    "); //Jeff 20020413
  2112. #else//NO_SHOW_HDCD_ICON                        
  2113.                         strcpy(linebuf, "HDCD"); //Jeff 20020413
  2114. #endif//NO_SHOW_HDCD_ICON
  2115. }
  2116.                     DispCDSubtypeInfo();    //Maoyong 2004.05.24
  2117. }
  2118. }
  2119. if ( (cd_type_loaded==CDDA) && 
  2120. (cd_subtype==CD_DTS) &&
  2121. (coding_mode_now&(AUDIF_CODING_MODE_DTSCD|AUDIF_CODING_MODE_PCM))
  2122. { //Jeff 20020415
  2123. //strcpy(linebuf, "DTS");
  2124. #ifdef NO_SHOW_DTS_ICON//nono 2003-11-24 10:52
  2125.                 strcpy(linebuf, "    ");
  2126. #else//NO_SHOW_DTS_ICON
  2127. #ifdef JUST_SHOW_CD_TYPE
  2128.                 strcpy(linebuf, "DTSCD");               
  2129. #else
  2130.                 strcpy(linebuf, "DTS ");               
  2131. #endif   
  2132. #endif//NO_SHOW_DTS_ICON
  2133.                 DispCDSubtypeInfo();    //Maoyong 2004.05.24
  2134. }
  2135. #ifdef SUPPORT_CDG
  2136. //if ((cd_subtype==CD_DA) && bReadSubChannel)//axelchen 2004/5/10 07:32pm 
  2137. //if ((cd_type_loaded==CDDA) && bReadSubChannel)// for mis-identfy CDG in VCD 2.0
  2138.     if ( ( (cd_type_loaded==CDDA)&&(cd_subtype==CD_DA)) && bReadSubChannel)//nono 4-5-12 22:53
  2139.     {
  2140. if (CDG_IsCDGNow())
  2141.   {
  2142.       #ifdef PULIANG_DVD
  2143.       strcpy(linebuf, "CD-G");//yaowh modify 04-12-17
  2144.       #else
  2145.                     strcpy(linebuf, "CDG");
  2146.                     #endif
  2147.                     DispCDSubtypeInfo();    //Maoyong 2004.05.24
  2148. }
  2149. }
  2150. #endif
  2151. //} else if (t_disp==3) { //Jeff 200204112
  2152. #endif//#ifdef NEW_DISPLAY_GOTO_OSD
  2153.         } else if (t_disp==3) { //Jeff 20020607
  2154. Print2OSDmem(0,COOK_S_TIMER,COOK_CLOCK_VAL);
  2155.         }
  2156. #ifdef NEW_DISPLAY_GOTO_OSD
  2157.             else if(t_disp==2)
  2158.             {
  2159.                 if(index_x<5) index_x=5;//move the cursor to the second page point time
  2160.                 Print2OSDmem(0,COOK_S_TIMER, POS_TIME);
  2161.             }
  2162. #endif
  2163. }
  2164. #ifdef MP3_NO_DISPLAY
  2165. void mp3_noshow_diplay()   //2004-4-22 04:40张宇P
  2166. {
  2167.        if(Is_MP3_STATE())
  2168.    {   
  2169.         char linebuf[40];
  2170.         int tt=0;
  2171.         tt=mp3_file_count();//cd_total_trk();
  2172.        if(disp_time != fore_disp_time)
  2173.        {
  2174.         FSGUI_FillFrameBuf(25,256,170,20,BK_GROUNDY, BK_GROUNDCRCB );
  2175.         fore_disp_time=disp_time;
  2176.        
  2177.         psprintf(linebuf, " %02d:%02d:%02d TRK%1d/%1d", show_time_hh, show_time_mm, show_time_ss,disp_trk_now,tt);
  2178.         FSGUI_ShowString(15,256,linebuf, FS_FONTCOLOR_FILE_Y1, FS_FONTCOLOR_FILE_CrCb1);
  2179.    
  2180.     hanyang_rep();//caohui 2004-4-22 21:00
  2181. }  
  2182. }
  2183. }
  2184. //#include ".\fs\fsGUI1.c"
  2185. //#include ".\fs\fsGUI_pub.c"
  2186. void hanyang_rep(void)   //caohui 2004-4-22 21:00
  2187. switch(rep_mode)
  2188. {
  2189.  case REPEAT_IDLE:
  2190.  FSGUI_FillFrameBuf(260,256,12,12,BK_GROUNDY, BK_GROUNDCRCB);
  2191. DrawFileIcon( 260,  256, 2);
  2192.  break;
  2193.     
  2194.  case REPEAT_DISC:
  2195.  FSGUI_FillFrameBuf(260,256,12,12,BK_GROUNDY, BK_GROUNDCRCB);
  2196. DrawFileIcon( 260,  256, 3);
  2197.  break;
  2198.  
  2199.  case REPEAT_DIRECTORY:
  2200.  FSGUI_FillFrameBuf(260,256,12,12,BK_GROUNDY, BK_GROUNDCRCB);
  2201. DrawFileIcon( 260,  256, 3);
  2202.      break;
  2203.  
  2204.  case REPEAT_TRACK:
  2205.  FSGUI_FillFrameBuf(260,256,12,12,BK_GROUNDY, BK_GROUNDCRCB);
  2206. DrawFileIcon(260, 256, 4);
  2207.      break;
  2208.     }
  2209. }
  2210. #endif  // #ifdef MP3_NO_DIPLAY