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

📄 access.lst

📁 Realtek 公司的RTD2523A芯片原厂source code,没有被修改过的。
💻 LST
📖 第 1 页 / 共 3 页
字号:
 590   3                  
 591   3                  do
 592   3                  {
 593   4                      RTDSendByte(m);
 594   4                  }
 595   3                  while (--len);
 596   3      
 597   3                  array   = array + 1;
 598   3              }
 599   2              else
 600   2              {
 601   3                  RTDSendAddr(array[1], 0, array[0]);
 602   3      
 603   3                  array   = array + 2;
 604   3                  do
 605   3                  {
C51 COMPILER V6.20c  ACCESS                                                                04/15/2004 12:59:25 PAGE 11  

 606   4                      RTDSendByte(*array++);
 607   4                  }
 608   3                  while (--len);
 609   3              }
 610   2      
 611   2      		RTDSendStop();
 612   2          }
 613   1          while (1);
 614   1      }
 615          
 616          void RTDOSDW(unsigned char code *array)
 617          {
 618   1          unsigned char   len;
 619   1          do
 620   1          {
 621   2              if (array[0] == _end_)     return;
 622   2              
 623   2              bRTD_SCSB   = 0;
 624   2              RTDSendAddr(OSD_ROW_90,WRITE,Y_INC);
 625   2              RTDSendByte(*array++);
 626   2              RTDSendByte(*array++);
 627   2              RTDSendStop();
 628   2      
 629   2              bRTD_SCSB   = 0;
 630   2              RTDSendAddr(OSD_DATA_92,WRITE,N_INC);
 631   2              do
 632   2              {
 633   3                  if (array[0] == _ext_)
 634   3                  {
 635   4                      if (array[2] == _bb_)
 636   4                      {
 637   5                          do
 638   5                          {
 639   6                              len = array[3] - 1;
 640   6                              RTDSendByte(_ext_ + array[1]);
 641   6                          }
 642   5                          while(len--);
 643   5                          
 644   5                          array += 4;
 645   5                      }
 646   4                      else
 647   4                      {
 648   5                          RTDSendByte(_ext_ + array[1]);
 649   5                          array += 2;
 650   5                      }
 651   4                  }
 652   3                  else if (array[1] == _bb_)
 653   3                  {
 654   4                      len = array[2] - 1;
 655   4                      do
 656   4                      {
 657   5                          RTDSendByte(*array);
 658   5                      }
 659   4                      while(len--);
 660   4                      
 661   4                      array += 3;
 662   4                  }
 663   3                  else
 664   3                      RTDSendByte(*array++);
 665   3              }
 666   2              while(array[0] != _nn_);
 667   2              
C51 COMPILER V6.20c  ACCESS                                                                04/15/2004 12:59:25 PAGE 12  

 668   2              array +=1 ;
 669   2              RTDSendStop();
 670   2          }
 671   1          while (1);
 672   1      }
 673          
 674          
 675          void RTDSetByte(unsigned char addr, unsigned char val)
 676          {
 677   1          // Set Write Address
 678   1          bRTD_SCSB   = 0;   
 679   1      
 680   1          RTDSendAddr(addr, 0, 1);
 681   1      
 682   1          // Write one Byte
 683   1          RTDSendByte(val);
 684   1      
 685   1      	RTDSendStop();
 686   1      }
 687          
 688          void RTDSetBit(unsigned char addr, unsigned char and, unsigned char or)
 689          {
 690   1          // Set Read Address
 691   1          bRTD_SCSB   = 0;
 692   1          RTDSendAddr(addr, 1, 1);
 693   1      
 694   1          // Read 1 Byte
 695   1          or      = (RTDGetByte() & and) | or;
 696   1      
 697   1      	RTDSendStop();
 698   1      
 699   1          // Set Write Address
 700   1          bRTD_SCSB   = 0;   
 701   1          RTDSendAddr(addr, 0, 1);
 702   1      
 703   1          // Write one Byte
 704   1          RTDSendByte(or);
 705   1      
 706   1      	RTDSendStop();
 707   1      }
 708          
 709          
 710          #if (VLC_COMPRESS)
 711          
 712          void Load_VLC_Font(unsigned char code *array, unsigned int start, unsigned int length)
 713          {
 714   1      	unsigned char m;
 715   1      	unsigned char ucVLD0, ucVLD1, ucVLD2;
 716   1      
 717   1      
 718   1      	start   += FONT_BASE_ADDRESS;
 719   1      
 720   1          bRTD_SCSB   = 0;   
 721   1          RTDSendAddr(OSD_ROW_90, WRITE, Y_INC);
 722   1          RTDSendByte((unsigned char)((start >> 8) & 0x000f) | 0xd0);
 723   1          RTDSendByte((unsigned char)(start & 0x00ff));
 724   1      	RTDSendStop();
 725   1      
 726   1          ucCnt       = 0;
 727   1      	ucByte_Temp = 0;
 728   1          pVLDArray   = array;
 729   1      
C51 COMPILER V6.20c  ACCESS                                                                04/15/2004 12:59:25 PAGE 13  

 730   1          bRTD_SCSB   = 0;   
 731   1          RTDSendAddr(OSD_DATA_92, WRITE, N_INC);
 732   1      	do
 733   1      	{
 734   2      		for (m = 0; m < 9; m++)
 735   2      		{
 736   3                  ucVLD0 = Get_VLD() << 4;
 737   3                  ucVLD0 |= Get_VLD();
 738   3                  ucVLD1 = Get_VLD() << 4;
 739   3                  ucVLD1 |= Get_VLD();
 740   3                  ucVLD2 = Get_VLD() << 4;
 741   3                  ucVLD2 |= Get_VLD();
 742   3      			
 743   3                  // Rearrange the byte order
 744   3                  RTDSendByte((ucVLD1 << 4) | (ucVLD2 & 0x0f));
 745   3                  RTDSendByte((ucVLD2 & 0xf0) | (ucVLD0 & 0x0f));
 746   3                  RTDSendByte((ucVLD0 & 0xf0) | (ucVLD1 >> 4));
 747   3              }
 748   2      	}
 749   1      	while (--length);
 750   1      
 751   1      	RTDSendStop();	
 752   1      }
 753          
 754          unsigned char Get_VLD()
 755          {
 756   1      	unsigned char   ucZero_Cnt  = 0;
 757   1      
 758   1      
 759   1          while (!Getbit())   ucZero_Cnt  += 1;
 760   1      
 761   1          // Issac
 762   1          // we can get speed advantage if the most case in font-map is 0.
 763   1          if (0 == ucZero_Cnt)    return 0;
 764   1      
 765   1          switch (ucZero_Cnt)
 766   1          {
 767   2          case 1 :
 768   2              return (Getbit() ? 15 : 1);
 769   2          case 2 :
 770   2              return (Getbit() ? 8 : 2);
 771   2          case 3 :
 772   2              return (Getbit() ? 7 : 12);
 773   2          case 4 :
 774   2              if (Getbit())
 775   2              {
 776   3                  return (Getbit() ? 9 : 4);
 777   3              }
 778   2              else
 779   2              {           
 780   3                  if (Getbit())
 781   3                  {
 782   4                      return (Getbit() ? 5 : 10);
 783   4                  }
 784   3                  else
 785   3                  {
 786   4                      return (Getbit() ? 11 : 3);
 787   4                  }
 788   3              }
 789   2          default :   // case 5 :                
 790   2              if (Getbit())
 791   2              {
C51 COMPILER V6.20c  ACCESS                                                                04/15/2004 12:59:25 PAGE 14  

 792   3                  return (Getbit() ? 13 : 14);
 793   3              }
 794   2              else
 795   2              {
 796   3                  Getbit();    
 797   3                  
 798   3                  // Issac :
 799   3                  // bBit should be always 1 if table is correct ....
 800   3                  
 801   3                  return 6;   // if (bBit)   return 6;
 802   3              }
 803   2          }
 804   1      }
 805          
 806          bit Getbit()
 807          {
 808   1          ucByte_Temp = (0 == ((ucCnt++) & 0x07)) ? *pVLDArray++ : (ucByte_Temp << 1);
 809   1      
 810   1          return (ucByte_Temp & 0x80);
 811   1      }
 812          
 813          #else   // Not using VLC_COMPRESS
              
              //length represent the number of character
              // character number of 1 bit font  = 1
              // character number of 2 bit font  = 2
              // character number of 4 bit font  = 4
              // length = (1 bit font amount) x 1 + (2 bit font amount) x 2 + (4 bit font amount) x 4
              void Load_Font(unsigned char code *array, unsigned int start, unsigned int length)
              {
                  unsigned char   m;
                  unsigned char   ucTemp0, ucTemp1, ucTemp2;
              
                  start = start * 9;
                  start += FONT_BASE_ADDRESS;
              
                  bRTD_SCSB   = 0;   
                  RTDSendAddr(OSD_ROW_90, WRITE, Y_INC);
                  RTDSendByte((unsigned char)((start >> 8) & 0x000f) | 0xd0);
                  RTDSendByte((unsigned char)(start & 0x00ff));
              	RTDSendStop();
              
              	bRTD_SCSB   = 0;   
              	RTDSendAddr(OSD_DATA_92, WRITE, N_INC);
                  do
                  {
                      for (m = 0; m < 9; m++)
                      {
                          ucTemp0 = *array++;
                          ucTemp1 = *array++;
                          ucTemp2 = *array++;
              
                          // Rearrange the byte order
                          RTDSendByte((ucTemp1 << 4) | (ucTemp2 & 0x0f));
                          RTDSendByte((ucTemp2 & 0xf0) | (ucTemp0 & 0x0f));
                          RTDSendByte((ucTemp0 & 0xf0) | (ucTemp1 >> 4));
                      }
                  }
                  while (--length);
              
              	RTDSendStop();
              }
C51 COMPILER V6.20c  ACCESS                                                                04/15/2004 12:59:25 PAGE 15  

              
              #endif
 856          
 857          
 858          #if (HDCP_ENABLE)
              void KEYCodeW(unsigned char code *array)
              {
                  unsigned int m;  
              
                 RTDSetBit(DVI_CTRL1_AF, 0x7f,0x00);  //Reset the HDCP key download index
                 RTDSetBit(DVI_CTRL1_AF, 0x7f,0x80);
              	
                  for(m = 0; m < 320; m++)   //Key 0 ~ Key39   
                  {
              		RTDSetByte(0xb1,array[m]);
                  }	
              
                  RTDSetBit(DVI_CTRL1_AF, 0x7f,0x00);  //Disable the Key Access Download port
                  RTDSetBit(TMDS_INPUT_ENA_A1, 0x7f, 0x00);   // Turn on HDCP DDC channel  
              }
              #endif


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =   1294    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =     21      23
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)

⌨️ 快捷键说明

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