📄 osd1_initial.lst
字号:
228 1 }
229 void OSD1LoadColor()
230 {
231 1
232 1 //~ Load Main Color Look Up Table.~//
233 1 #ifdef ICON4BP
OSD1CfgWr(OSD_COLOR_LUT_ADR_PORT,0x00);
IC_WritByte(TWIC_P0,OSD1_CFG_INDEX,0x09);
#ifdef T128
for(m_wBuff[0] =0;m_wBuff[0]<COLORTBLNUM;m_wBuff[0]++)
{
IC_WritByte(TWIC_P0,OSD1_CFG_DATA,Icon4BPColorTable[m_wBuff[0]]);
C51 COMPILER V8.08 OSD1_INITIAL 11/23/2007 00:57:18 PAGE 5
}
#else
ICWr_Burst_A(OSD1_CFG_DATA);
for(m_wBuff[0] =0;m_wBuff[0]<COLORTBLNUM;m_wBuff[0]++)
{
ICWr_Burst_D(Icon4BPColorTable[m_wBuff[0]]);
}
ICWr_Burst_P();
#endif //T128
OSD1CfgWr(OSD_COLOR_LUT_ADR_PORT,0x80);
IC_WritByte(TWIC_P0,OSD1_CFG_INDEX,0x09);
for(m_wBuff[0]=0;m_wBuff[0]<18;m_wBuff[0]++)
{
IC_WritByte(TWIC_P0,OSD1_CFG_DATA,0);
IC_WritByte(TWIC_P0,OSD1_CFG_DATA,0);
IC_WritByte(TWIC_P0,OSD1_CFG_DATA,0);
}
#endif //ICON4BP
258 1 #ifdef ICON2BP
//~Load Char2BP Color Remap LUT.~//
OSD1CfgWr(OSD_COLOR_LUT_ADR_PORT,0x80);
IC_WritByte(TWIC_P0,OSD1_CFG_INDEX,0x09);
for(m_wBuff[0]=0;m_wBuff[0]<16;m_wBuff[0]++)
{
IC_WritByte(TWIC_P0,OSD1_CFG_DATA,IndexColorTable[m_wBuff[0]*3+2]);
IC_WritByte(TWIC_P0,OSD1_CFG_DATA,IndexColorTable[m_wBuff[0]*3+1]);
IC_WritByte(TWIC_P0,OSD1_CFG_DATA,IndexColorTable[m_wBuff[0]*3]);
}
#endif //ICON2BP
269 1 #ifdef ICON1BP
270 1 OSD1CfgWr(OSD_COLOR_LUT_ADR_PORT,0x00);
271 1 IC_WritByte(TWIC_P0,OSD1_CFG_INDEX,0x09);
272 1 #ifdef T128
for(m_wBuff[0] =0;m_wBuff[0]<COLORTBLNUM;m_wBuff[0]++)
{
IC_WritByte(TWIC_P0,OSD1_CFG_DATA,Icon1BPColorTable[m_wBuff[0]]);
}
#else
278 1 ICWr_Burst_A(OSD1_CFG_DATA);
279 1 for(m_wBuff[0] =0;m_wBuff[0]<3212;m_wBuff[0]++)
280 1 {
281 2 ICWr_Burst_D(Icon1BPColorTable[m_wBuff[0]]);
282 2 }
283 1 ICWr_Burst_P();
284 1 #endif //T128
285 1 OSD1CfgWr(OSD_COLOR_LUT_ADR_PORT,0x80);
286 1 IC_WritByte(TWIC_P0,OSD1_CFG_INDEX,0x09);
287 1 for(m_wBuff[0]=0;m_wBuff[0]<18;m_wBuff[0]++)
288 1 {
289 2 IC_WritByte(TWIC_P0,OSD1_CFG_DATA,0);
290 2 IC_WritByte(TWIC_P0,OSD1_CFG_DATA,0);
291 2 IC_WritByte(TWIC_P0,OSD1_CFG_DATA,0);
292 2 }
293 1 #endif //ICON1BP
294 1
295 1 }
296
297 #ifdef ICON1BP
298
299 void OSD1Load1BPFont(void)
300 {
301 1 unsigned int i,j,k,l;
C51 COMPILER V8.08 OSD1_INITIAL 11/23/2007 00:57:18 PAGE 6
302 1 OSD1SetRamAddr(Font1BPDataStrAdr);
303 1 ICWr_Burst_A(OSD1_RAM_DL);
304 1 if(FontWidth==OSD1FONTWIDTH12)
305 1 {
306 2 for(j=0;j<Font1BPNum;j++)
307 2 {
308 3 for(i=0; i<(FontHeight); i++)
309 3 {
310 4 k = i<<1;
311 4 l = (i+1)<<1;
312 4 m_wBuff[1] = (uWORD)(All1BPFonts[j][k])|((uWORD)(All1BPFonts[j][k+1])<<8);
313 4 m_wBuff[2] = (uWORD)(All1BPFonts[j][l])|((uWORD)(All1BPFonts[j][l+1])<<8);
314 4 switch(i&0x03)
315 4 {
316 5 case 0:
317 5 m_wBuff[0]= m_wBuff[1] |(m_wBuff[2]>>12);
318 5 ICWr_Burst_D(m_wBuff[0]&0x00FF);
319 5 ICWr_Burst_D(m_wBuff[0]>>8);
320 5 break;
321 5 case 1:
322 5 m_wBuff[0]= (m_wBuff[1] <<4)|(m_wBuff[2] >>8);
323 5 ICWr_Burst_D(m_wBuff[0]&0x00FF);
324 5 ICWr_Burst_D(m_wBuff[0]>>8);
325 5 break;
326 5 case 2:
327 5 m_wBuff[0]= (m_wBuff[1] <<8)|(m_wBuff[2]>>4);
328 5 ICWr_Burst_D(m_wBuff[0]&0x00FF);
329 5 ICWr_Burst_D(m_wBuff[0]>>8);
330 5 break;
331 5 case 3:
332 5 //Do nothing
333 5 break;
334 5 }
335 4 }
336 3 }
337 2 }
338 1 ICWr_Burst_P();
339 1 }
340 #endif //ICON1BP
341
342 #ifdef ICON2BP
void OSD1Load2BPFont(void)
{
OSD1SetRamAddr(Font2BPDataStrAdr);
if(FontWidth==OSD1FONTWIDTH12)
{
for(m_wBuff[1]=0;m_wBuff[1]<Font2BPNum;m_wBuff[1]++)
{
for(m_wBuff[0]=0; m_wBuff[0]<(FontHeight); m_wBuff[0]+=2)
{
m_wBuff[2] = (m_wBuff[1]* FontHeight+m_wBuff[0])*3;
IC_WritByte(TWIC_P0,OSD1_RAM_DL,FontsStart[m_wBuff[2]+1]);
IC_WritByte(TWIC_P0,OSD1_RAM_DL,FontsStart[m_wBuff[2]]);
IC_WritByte(TWIC_P0,OSD1_RAM_DL,FontsStart[m_wBuff[2]+3]);
IC_WritByte(TWIC_P0,OSD1_RAM_DL,FontsStart[m_wBuff[2]+2]);
IC_WritByte(TWIC_P0,OSD1_RAM_DL,FontsStart[m_wBuff[2]+5]);
IC_WritByte(TWIC_P0,OSD1_RAM_DL,FontsStart[m_wBuff[2]+4]);
}
}
}
}
#endif //ICON2BP
C51 COMPILER V8.08 OSD1_INITIAL 11/23/2007 00:57:18 PAGE 7
364
365 #ifdef ICON4BP
void OSD1Load4BPFont(void)
{
OSD1SetRamAddr(Font4BPDataStrAdr);
if(FontWidth==OSD1FONTWIDTH12)
{
#ifdef T128
for(m_wBuff[0]=0;m_wBuff[0]<Font4BPNum;m_wBuff[0]++)
{
for(m_wBuff[1]=0; m_wBuff[1]<(FontHeight); m_wBuff[1]++)
{
m_wBuff[2] = (m_wBuff[0]* FontHeight+m_wBuff[1])*6;
IC_WritByte(TWIC_P0,OSD1_RAM_DL,FontsStart[m_wBuff[2] +1]);
IC_WritByte(TWIC_P0,OSD1_RAM_DL,FontsStart[m_wBuff[2]]);
IC_WritByte(TWIC_P0,OSD1_RAM_DL,FontsStart[m_wBuff[2] +3]);
IC_WritByte(TWIC_P0,OSD1_RAM_DL,FontsStart[m_wBuff[2] +2]);
IC_WritByte(TWIC_P0,OSD1_RAM_DL,FontsStart[m_wBuff[2] +5]);
IC_WritByte(TWIC_P0,OSD1_RAM_DL,FontsStart[m_wBuff[2] +4]);
}
}
#else
ICWr_Burst_A(OSD1_RAM_DL);
for(m_wBuff[0]=0;m_wBuff[0]<Font4BPNum;m_wBuff[0]++)
{
for(m_wBuff[1]=0; m_wBuff[1]<(FontHeight); m_wBuff[1]++)
{
m_wBuff[2] = (m_wBuff[0]* FontHeight+m_wBuff[1])*6;
ICWr_Burst_D(FontsStart[m_wBuff[2] +1]);
ICWr_Burst_D(FontsStart[m_wBuff[2]]);
ICWr_Burst_D(FontsStart[m_wBuff[2] +3]);
ICWr_Burst_D(FontsStart[m_wBuff[2] +2]);
ICWr_Burst_D(FontsStart[m_wBuff[2] +5]);
ICWr_Burst_D(FontsStart[m_wBuff[2] +4]);
}
}
ICWr_Burst_P();
#endif
}
else if(FontWidth==OSD1FONTWIDTH16)
{
#ifdef T128
for(m_wBuff[0]=0;m_wBuff[0]<Font4BPNum;m_wBuff[0]++)
{
for(m_wBuff[1]=0; m_wBuff[1]<(FontHeight); m_wBuff[1]++)
{
m_wBuff[2] = (m_wBuff[0]* FontHeight+m_wBuff[1])*8;
IC_WritByte(TWIC_P0,OSD1_RAM_DL,FontsStart[m_wBuff[2] +1]);
IC_WritByte(TWIC_P0,OSD1_RAM_DL,FontsStart[m_wBuff[2]]);
IC_WritByte(TWIC_P0,OSD1_RAM_DL,FontsStart[m_wBuff[2] +3]);
IC_WritByte(TWIC_P0,OSD1_RAM_DL,FontsStart[m_wBuff[2] +2]);
IC_WritByte(TWIC_P0,OSD1_RAM_DL,FontsStart[m_wBuff[2] +5]);
IC_WritByte(TWIC_P0,OSD1_RAM_DL,FontsStart[m_wBuff[2] +4]);
IC_WritByte(TWIC_P0,OSD1_RAM_DL,FontsStart[m_wBuff[2] +7]);
IC_WritByte(TWIC_P0,OSD1_RAM_DL,FontsStart[m_wBuff[2] +6]);
}
}
#else
ICWr_Burst_A(OSD1_RAM_DL);
C51 COMPILER V8.08 OSD1_INITIAL 11/23/2007 00:57:18 PAGE 8
for(m_wBuff[0]=0;m_wBuff[0]<Font4BPNum;m_wBuff[0]++)
{
for(m_wBuff[1]=0; m_wBuff[1]<(FontHeight); m_wBuff[1]++)
{
m_wBuff[2] = (m_wBuff[0]* FontHeight+m_wBuff[1])*8;
ICWr_Burst_D(FontsStart[m_wBuff[2] +1]);
ICWr_Burst_D(FontsStart[m_wBuff[2]]);
ICWr_Burst_D(FontsStart[m_wBuff[2] +3]);
ICWr_Burst_D(FontsStart[m_wBuff[2] +2]);
ICWr_Burst_D(FontsStart[m_wBuff[2] +5]);
ICWr_Burst_D(FontsStart[m_wBuff[2] +4]);
ICWr_Burst_D(FontsStart[m_wBuff[2] +7]);
ICWr_Burst_D(FontsStart[m_wBuff[2] +6]);
}
}
ICWr_Burst_P();
#endif
}
}
#endif //ICON4BP
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 994 ----
CONSTANT SIZE = 32 ----
XDATA SIZE = ---- 10
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
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 + -