Rev 4923 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4923 | Rev 5116 | ||
---|---|---|---|
Line 21... | Line 21... | ||
21 | 21 | ||
22 | 22 | ||
Line -... | Line 23... | ||
- | 23 | ; If you're planning to write your own video driver I suggest |
|
- | 24 | ; you replace the VESA12.INC file and see those instructions. |
|
- | 25 | ||
- | 26 | ;Screen_Max_X equ 0xfe00 |
|
- | 27 | ;Screen_Max_Y equ 0xfe04 |
|
- | 28 | ;BytesPerScanLine equ 0xfe08 |
|
- | 29 | ;LFBAddress equ 0xfe80 |
|
Line 23... | Line 30... | ||
23 | ; If you're planning to write your own video driver I suggest |
30 | ;ScreenBPP equ 0xfbf1 |
24 | ; you replace the VESA12.INC file and see those instructions. |
31 | |
25 | 32 | ||
26 | 33 | ||
Line 216... | Line 223... | ||
216 | ; lea eax, [eax + eax * 2] |
223 | ; lea eax, [eax + eax * 2] |
217 | call esi |
224 | call esi |
218 | add eax, [putimg.arg_0] |
225 | add eax, [putimg.arg_0] |
219 | mov [putimg.line_increment], eax |
226 | mov [putimg.line_increment], eax |
220 | ; winmap new line increment |
227 | ; winmap new line increment |
221 | mov eax, [_display.width] |
228 | mov eax, [Screen_Max_X] |
- | 229 | inc eax |
|
222 | sub eax, [putimg.real_sx] |
230 | sub eax, [putimg.real_sx] |
223 | mov [putimg.winmap_newline], eax |
231 | mov [putimg.winmap_newline], eax |
224 | ; screen new line increment |
232 | ; screen new line increment |
225 | mov eax, [_display.pitch] |
233 | mov eax, [_display.pitch] |
226 | mov ebx, [_display.bpp] |
234 | mov ebx, [_display.bpp] |
Line 239... | Line 247... | ||
239 | ; shr ebx, 3 |
247 | ; shr ebx, 3 |
240 | imul eax, ebx |
248 | imul eax, ebx |
241 | add edx, eax |
249 | add edx, eax |
242 | ; pointer to pixel map |
250 | ; pointer to pixel map |
243 | mov eax, [putimg.abs_cy] |
251 | mov eax, [putimg.abs_cy] |
- | 252 | ; imul eax, [Screen_Max_X] |
|
- | 253 | ; add eax, [putimg.abs_cy] |
|
244 | mov eax, [d_width_calc_area + eax*4] |
254 | mov eax, [d_width_calc_area + eax*4] |
Line 245... | Line 255... | ||
245 | 255 | ||
246 | add eax, [putimg.abs_cx] |
256 | add eax, [putimg.abs_cx] |
247 | add eax, [_WinMapAddress] |
257 | add eax, [_WinMapAddress] |
Line 683... | Line 693... | ||
683 | ; ecx = ?? RR GG BB ; 0x01000000 negation |
693 | ; ecx = ?? RR GG BB ; 0x01000000 negation |
684 | ; 0x02000000 used for draw_rectangle without top line |
694 | ; 0x02000000 used for draw_rectangle without top line |
685 | ; for example drawwindow_III and drawwindow_IV |
695 | ; for example drawwindow_III and drawwindow_IV |
686 | ; edi = 0x00000001 force |
696 | ; edi = 0x00000001 force |
Line -... | Line 697... | ||
- | 697 | ||
687 | 698 | ;;; mov [novesachecksum], dword 0 |
|
688 | pushad |
699 | pushad |
689 | cmp eax, [_display.width] |
700 | cmp [Screen_Max_X], eax |
690 | jae .exit |
701 | jb .exit |
691 | cmp ebx, [_display.height] |
702 | cmp [Screen_Max_Y], ebx |
692 | jae .exit |
703 | jb .exit |
693 | test edi, 1 ; force ? |
704 | test edi, 1 ; force ? |
Line 694... | Line 705... | ||
694 | jnz .forced |
705 | jnz .forced |
695 | 706 | ||
Line 876... | Line 887... | ||
876 | mov [LFB_BASE+edi], eax |
887 | mov [LFB_BASE+edi], eax |
877 | ret |
888 | ret |
878 | ;----------------------------------------------------------------------------- |
889 | ;----------------------------------------------------------------------------- |
879 | align 4 |
890 | align 4 |
880 | calculate_edi: |
891 | calculate_edi: |
- | 892 | ; mov edi, ebx |
|
- | 893 | ; imul edi, [Screen_Max_X] |
|
- | 894 | ; add edi, ebx |
|
881 | mov edi, [d_width_calc_area + ebx*4] |
895 | mov edi, [d_width_calc_area + ebx*4] |
882 | add edi, eax |
896 | add edi, eax |
883 | ret |
897 | ret |
884 | ;----------------------------------------------------------------------------- |
898 | ;----------------------------------------------------------------------------- |
885 | ; DRAWLINE |
899 | ; DRAWLINE |
Line 1207... | Line 1221... | ||
1207 | ;-------------------------------------- |
1221 | ;-------------------------------------- |
1208 | align 4 |
1222 | align 4 |
1209 | .end_y: |
1223 | .end_y: |
1210 | mov [drbar.real_sy], ebx |
1224 | mov [drbar.real_sy], ebx |
1211 | ; line_inc_map |
1225 | ; line_inc_map |
1212 | mov eax, [_display.width] |
1226 | mov eax, [Screen_Max_X] |
1213 | sub eax, [drbar.real_sx] |
1227 | sub eax, [drbar.real_sx] |
- | 1228 | inc eax |
|
1214 | mov [drbar.line_inc_map], eax |
1229 | mov [drbar.line_inc_map], eax |
1215 | ; line_inc_scr |
1230 | ; line_inc_scr |
1216 | mov eax, [drbar.real_sx] |
1231 | mov eax, [drbar.real_sx] |
1217 | mov ebx, [_display.bpp] |
1232 | mov ebx, [_display.bpp] |
1218 | shr ebx, 3 |
1233 | shr ebx, 3 |
Line 1922... | Line 1937... | ||
1922 | cmp ebx, [draw_data+32+RECT.bottom] |
1937 | cmp ebx, [draw_data+32+RECT.bottom] |
1923 | ja sdpdone |
1938 | ja sdpdone |
1924 | ; advance edi, ebp to next scan line |
1939 | ; advance edi, ebp to next scan line |
1925 | sub eax, [draw_data+32+RECT.left] |
1940 | sub eax, [draw_data+32+RECT.left] |
1926 | sub ebp, eax |
1941 | sub ebp, eax |
1927 | add ebp, [_display.width] |
1942 | add ebp, [Screen_Max_X] |
- | 1943 | add ebp, 1 |
|
1928 | sub edi, eax |
1944 | sub edi, eax |
1929 | sub edi, eax |
1945 | sub edi, eax |
1930 | sub edi, eax |
1946 | sub edi, eax |
1931 | cmp byte [_display.bpp], 24 |
1947 | cmp byte [_display.bpp], 24 |
1932 | jz @f |
1948 | jz @f |
Line 1953... | Line 1969... | ||
1953 | cmp ebx, -1 |
1969 | cmp ebx, -1 |
1954 | jnz bgr_resmooth0 |
1970 | jnz bgr_resmooth0 |
1955 | push edi |
1971 | push edi |
1956 | mov esi, bgr_next_line |
1972 | mov esi, bgr_next_line |
1957 | mov edi, bgr_cur_line |
1973 | mov edi, bgr_cur_line |
1958 | mov ecx, [_display.width] |
1974 | mov ecx, [Screen_Max_X] |
- | 1975 | inc ecx |
|
1959 | rep movsd |
1976 | rep movsd |
1960 | jmp bgr_resmooth1 |
1977 | jmp bgr_resmooth1 |
1961 | ;-------------------------------------- |
1978 | ;-------------------------------------- |
1962 | align 4 |
1979 | align 4 |
1963 | sdpdone: |
1980 | sdpdone: |