📄 video.lst
字号:
25 =2 #define Red 0x04
26 =2 #define Magenta 0x05
27 =2 #define Yellow 0x06
28 =2 #define White 0x07
29 =2 //----------------------
30 =2 //define language item
31 =2 enum LanguageItem{
32 =2 English,
33 =2 Chinese,
34 =2 MaxLanguageItem
35 =2 };
36 =2 //define page item width
37 =2 enum MainPageItem{
38 =2 SaturatiOne, // Color
39 =2 BrightOne, // Bright
40 =2 HueOne, // TINT
41 =2 DimmerOne,//Dimmer
42 =2 FormatOne,//Format
43 =2 RecallItem,
44 =2 //ContrastOne, // ch15
45 =2 //HPositionOne,
46 =2 //VPositionOne,
47 =2 //OSDSetupItem,
48 =2 //RotateOne,
49 =2 //BrightItem,
50 =2 //ColorItem,
51 =2 //MiscItem,
52 =2 MaxMainPageItem
53 =2 };
54 =2
55 =2 enum BrightPageItem{
56 =2 BrightnessItem, // ch8
57 =2 ContrastItrm, // ch15
58 =2 MaxBrightPageItem
59 =2 };
60 =2
61 =2 enum ColorPageItem{
62 =2 SaturationItem, // ch5
63 =2 HueItem, // ch6
64 =2 MaxColorPageItem
65 =2 };
66 =2
67 =2 enum OSDPageItem{
68 =2 HPositionItem,
69 =2 VPositionItem,
70 =2 //LanguageItem,
71 =2 MaxOSDPageItem
72 =2 };
73 =2
74 =2 enum MiscPageItem{
C51 COMPILER V6.10 VIDEO 12/02/2004 10:58:52 PAGE 12
75 =2 //VsignalPosition,
76 =2 //HsignalPosition,
77 =2 //PWM,
78 =2 CommonPulse,
79 =2 YGain,
80 =2 BlackLevel,
81 =2 YaperGain,
82 =2 RsubBri,
83 =2 BsubBri,
84 =2 WhitePeakLevel,
85 =2 Gamma1,
86 =2 Gamma2,
87 =2 MaxMiscPageItem
88 =2 };
89 =2
90 =2 enum {
91 =2 NOTHING,
92 =2 BRIGHT_BRIGHTNESS,
93 =2 BRIGHT_CONTRAST,
94 =2 COLOR_HUE,
95 =2 COLOR_SATURATION,
96 =2 RunDimmer,
97 =2 RunFormat, //OSD_VPOS_U,
98 =2 RunRecall,//OSD_LANGUAGE_U,
99 =2 VIDEO_BRIGHTNESS,
100 =2 VIDEO_CONTRAST,
101 =2 VIDEO_HUE,
102 =2 VIDEO_SATURATION,
103 =2 VIDEO_Rotate
104 =2 };
105 =2 //----------------------
106 =2 // osd page define
107 =2 #define MainPageWinNo 3
108 =2 #define MainPageColor Black
109 =2 #define MainPageBarColor Cyan
110 =2 #define MainPageItemLength 15
111 =2 #define MainPageCharColor Green //White
112 =2 #define MainPageProcessColor Red
113 =2 #define MainPageExitColor Cyan
114 =2 //#define MainPageItemWidth MaxMainPageItem
115 =2 #define MainPageBarLength MainPageItemLength
116 =2 #define MainPageYStart 1 //row start
117 =2 #define MainPageYEnd 10 //row end
118 =2 #define MainPageXStart 0 //column start
119 =2 #define MainPageXEnd 15//cloumn end
120 =2
121 =2 #define BackGroundWinNo 4
122 =2 #define BackGroundColor Magenta
123 =2 #define BackGroundYStart 0
124 =2 #define BackGroundYEnd 11
125 =2 #define BackGroundXStart 0
126 =2 #define BackGroundXEnd 16
127 =2 /*
128 =2 #define SecondPageWinNo 2
129 =2 #define SecondPageColor Green
130 =2 #define SecondPageBarColor Cyan
131 =2 #define SecondPageItemLength MainPageItemLength
132 =2 #define SecondPageItemWidth ?
133 =2 #define SecondPageBarLength SecondPageItemLength
134 =2 #define SecondPageYStart (MainPageYStart+1)
135 =2 #define SecondPageYEnd (MainPageYEnd+1) //row end
136 =2 #define SecondPageXStart (MainPageXStart+1) //column start
C51 COMPILER V6.10 VIDEO 12/02/2004 10:58:52 PAGE 13
137 =2 #define SecondPageXEnd (MainPageXEnd+1) //cloumn end
138 =2
139 =2 #define ThirdPageWinNo 2
140 =2 #define ThirdPageColor Cyan
141 =2 #define ThirdPageBarColor Yellow
142 =2 #define ThirdPageItemLength MainPageItemLength
143 =2 #define ThirdPageItemWidth ?
144 =2 #define ThirdPageBarLength ThirdPageItemLength
145 =2 #define ThirdPageYStart (SecondPageYStart+1)
146 =2 #define ThirdPageYEnd (SecondPageYEnd+1) //row end
147 =2 #define ThirdPageXStart (SecondPageXStart+1) //column start
148 =2 #define ThirdPageXEnd (SecondPageXEnd+1) //cloumn end
149 =2 */
150 =2 //--------------------------
151 =2 #define EnableOSD() (byM230_OSDCON = OSDConVal|OSDEN)
152 =2 #define EnableOSDWinClr() (byM230_OSDCON = OSDConVal|WENclr)
153 =2 #define EnableOSDRAMClr() (byM230_OSDCON = OSDConVal|RAMclr)
154 =2 #define EnableOSDFBKGC() (byM230_OSDCON = OSDConVal|FBKGC)
155 =2 #define DisableOSD() (byM230_OSDCON = OSDConVal&(~OSDEN))
156 =2 #define DisableOSDWinClr() (byM230_OSDCON = OSDConVal&(~WENclr))
157 =2 #define DisableOSDRAMClr() (byM230_OSDCON = OSDConVal&(~RAMclr))
158 =2 #define DisableOSDFBKGC() (byM230_OSDCON = OSDConVal&(~FBKGC))
159 =2
160 =2 #define OSD_OFFTIME 10000
161 =2
162 =2 #define sOSDAddrSt 0x90
163 =2 #define sBrightAddrSt 0x93
164 =2 #define sColorAddrSt 0x95
165 =2
166 =2
167 =2 //-----------------------------------------------
168 =2 struct sPROGRESS{
169 =2 WORD value;
170 =2 WORD min;
171 =2 WORD max;
172 =2 };
173 =2 //-----------------------------------------------
174 =2 struct sMENUSTACK{
175 =2 void (*MenuProcess)(void);
176 =2 BYTE ItemIndex;
177 =2 };
178 =2 //--------------------------------------------
179 =2 struct OSDData{
180 =2 BYTE H_Pos;
181 =2 BYTE V_Pos;
182 =2 BYTE LANGUAGE;
183 =2 };
184 =2 //------------------------------------------------
185 =2
186 =2 extern BIT bFactoryflag;
187 =2 extern BIT bDEMOFlag;
188 =2 extern BIT bMenuFlag;
189 =2 extern WORD OsdTimer;
190 =2 extern BYTE ItemIndex;
191 =2 extern BYTE OSDStackPoint;
192 =2 extern struct sPROGRESS ItemValue;
193 =2 extern struct sMENUSTACK OSDStack[3];
194 =2 extern struct OSDData sOSD;
195 =2 extern void (*MenuProcess)(void);
196 =2 extern BYTE CursorX,CursorY;
197 =2 extern BYTE OSDConVal;
198 =2
C51 COMPILER V6.10 VIDEO 12/02/2004 10:58:52 PAGE 14
199 =2 extern void Disp_Nothing(void);
200 =2 extern void OSDProc(void);
201 =2
202 =2 extern void InitialOSD(void);
203 =2 extern void InitialFlag(void);
204 =2
205 =2 extern void OpenWindow(BYTE win_no, BYTE start_x, BYTE start_y, BYTE end_x, BYTE end_y, BYTE color);
206 =2 extern void CloseWindow(BYTE win_no);
207 =2
208 =2 //extern void Disp_Video_Entry(void);
209 =2 extern void Disp_Demo(void);
210 =2 extern void Disp_VideoMenu(void);
211 =2 extern void Disp_PowerMenu(void);
212 =2
213 =2 extern void gotoxy(BYTE x,BYTE y);
214 =2 extern void SetDouble(void);
215 =2 extern void PrintString(BYTE *chardata,BYTE number,BYTE color);
216 =2 extern void PrintByteString(BYTE * databuf, BYTE number, BYTE color);
217 =2 extern void ClearMenu(void);
218 =2
219 =2 extern void PrintChar(WORD chardata,BYTE color);
220 =2 extern void PrintValue(WORD value, BYTE color);
221 =2 extern void Disp_VideoBright(void);
222 =2 extern void Disp_VideoBrightness(void);
223 =2 extern void Disp_Saturation(void);
224 =2 extern void Disp_Hue(void);
225 =2 extern void Disp_OSDHPosition(void);
226 =2 extern void Disp_OSDVPosition(void);
227 =2 extern void Execute_Rotate(void);
228 =2 extern void Execute_Recall(void);
229 =2 extern void Execute_Dimmer(void);
230 =2 extern void Execute_Format(void);
231 =2
232 =2
233 =2
234 =2
235 =2 extern void Disp_VideoContrast(void);
236 =2 extern void Disp_VideoColor(void);
237 =2 extern void Disp_OSDSetup(void);
238 =2 extern void Disp_VideoMisc(void);
239 =2 extern void Disp_Entry(void);
240 =2 extern void Execute_Power(void);
241 =2 extern void Execute_Source(void);
242 =2
243 =2
244 =2 extern void Disp_VideoRecall(void);
245 =2 extern void SetProgressData(BYTE progress_no);
246 =2 extern void SaveProgressData(BYTE progress_no);
247 =2 extern void Set_OSD_HPosition(void);
248 =2 extern void Set_OSD_VPosition(void);
249 =2
250 =2
251 =2
252 =2
253 =2
254 =2
255 =2
256 =2
257 =2
11 =1 //#include "menu.h"
12 =1 //#include "ram.h"
13 =1 //#include "variable.h"
C51 COMPILER V6.10 VIDEO 12/02/2004 10:58:52 PAGE 15
2
3 struct VideoData sVideo;
4 struct BrightData sBright;
5 struct ColorData sColor;
6
7 #ifdef IIC_SW_2526
//void Video_Write(BYTE addr,BYTE *databuf,WORD number)
//{
// IICSW_Write(DecoderAddr,addr,databuf,number);
//}
#endif
13
14 #if 0
void InitialVideo(void)
{
// modify
/*
Video_Write(0x00,&sVideo.VPOS,16);
Video_Write(0x88,&sBright.Brightness,1);
Video_Write(0x8f,&sBright.Contrast,1);
Video_Write(0x85,&sColor.Saturation,1);
Video_Write(0x86,&sColor.Hue,1);
*/
//
sOSD.H_Pos=15;
sOSD.V_Pos=5;
sOSD.LANGUAGE=0;
PWM_BRIT=sBright.Brightness=195;
PWM_CONT=sBright.Contrast=185;
PWM_COLR=sColor.Saturation=190;
PWM_TINT=sColor.Hue=190;
}
#endif
39
40 void InitialSystem(void)
41 {
42 1 #ifdef _JRCPIN_
43 1 sOSD.H_Pos=20;
44 1 sOSD.V_Pos=5;
45 1 #else //for Necvox
sOSD.H_Pos=8;
sOSD.V_Pos=8;
#endif
49 1 sOSD.LANGUAGE=0;
50 1
51 1
52 1 // PWM_BRIT=sBright.Brightness=0xC1;//195;
53 1 // PWM_CONT=sBright.Contrast=0xCB;//185;
54 1 // PWM_COLR=sColor.Saturation=0xBD;//190;
55 1 // PWM_TINT=sColor.Hue=0xD4;//190;
56 1
57 1 EEPROM_Read(0x20,&sBright.Brightness,2);// user area
58 1 DELAY10ms(5);
59 1 EEPROM_Read(0x22,&sColor.Saturation,2); // user area
60 1 DELAY10ms(5);
61 1 // EEPROM_Read(0x30,&sOSD.H_Pos,3);
62 1 // sOSD.LANGUAGE=0;
63 1
C51 COMPILER V6.10 VIDEO 12/02/2004 10:58:52 PAGE 16
64 1 PWM_BRIT=sVideo.Brightness=sBright.Brightness;
65 1 PWM_CONT=sVideo.Contrast = sBright.Contrast;
66 1 PWM_COLR=sVideo.Saturation = sColor.Saturation ;
67 1 PWM_TINT=sVideo.Hue=sColor.Hue;
68 1
69 1 byM230_HORD=sOSD.H_Pos;
70 1 byM230_VERTD=sOSD.V_Pos;
71 1
72 1 }
73
74
75 void Set_VideoBrightness(void)
76 {
77 1 if(bFactoryflag)
78 1 {
79 2 sVideo.Brightness = sBright.Brightness = ItemValue.value;
80 2 PWM_BRIT=sVideo.Brightness;
81 2 }
82 1 else
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -