/drivers/video/rdc.asm |
---|
26,6 → 26,11 |
COMPATIBLE_API = 0x0100 |
API_VERSION = (COMPATIBLE_API shl 16) + CURRENT_API |
struct RWSEM |
wait_list LHEAD |
count dd ? |
ends |
; Some structures |
struct display_t |
x dd ? |
32,11 → 37,16 |
y dd ? |
width dd ? |
height dd ? |
bpp dd ? |
bits_per_pixel dd ? |
vrefresh dd ? |
pitch dd ? |
lfb dd ? |
lfb_pitch dd ? |
win_map_lock RWSEM |
win_map dd ? |
win_map_pitch dd ? |
win_map_size dd ? |
modes dd ? |
ddev dd ? |
connector dd ? |
56,6 → 66,8 |
mask_seqno dd ? |
check_mouse dd ? |
check_m_pixel dd ? |
bytes_per_pixel dd ? |
ends |
struct APPOBJ ; common object header |
/kernel/trunk/const.inc |
---|
425,39 → 425,7 |
parent dd ? ;DLLDESCR |
ends |
struct display_t |
x dd ? |
y dd ? |
width dd ? |
height dd ? |
bits_per_pixel dd ? |
vrefresh dd ? |
pitch dd ? |
lfb dd ? |
modes dd ? |
ddev dd ? |
connector dd ? |
crtc dd ? |
cr_list.next dd ? |
cr_list.prev dd ? |
cursor dd ? |
init_cursor dd ? |
select_cursor dd ? |
show_cursor dd ? |
move_cursor dd ? |
restore_cursor dd ? |
disable_mouse dd ? |
mask_seqno dd ? |
check_mouse dd ? |
check_m_pixel dd ? |
bytes_per_pixel dd ? |
ends |
struct BOOT_DATA |
bpp dd ? |
scanline dd ? |
506,6 → 474,45 |
count dd ? |
ends |
struct display_t |
x dd ? |
y dd ? |
width dd ? |
height dd ? |
bits_per_pixel dd ? |
vrefresh dd ? |
lfb dd ? |
lfb_pitch dd ? |
win_map_lock RWSEM |
win_map dd ? |
win_map_pitch dd ? |
win_map_size dd ? |
modes dd ? |
ddev dd ? |
connector dd ? |
crtc dd ? |
cr_list.next dd ? |
cr_list.prev dd ? |
cursor dd ? |
init_cursor dd ? |
select_cursor dd ? |
show_cursor dd ? |
move_cursor dd ? |
restore_cursor dd ? |
disable_mouse dd ? |
mask_seqno dd ? |
check_mouse dd ? |
check_m_pixel dd ? |
bytes_per_pixel dd ? |
ends |
struct PCIDEV |
bk dd ? |
fd dd ? |
/kernel/trunk/core/mtrr.inc |
---|
842,7 → 842,7 |
; It must be write-combined. |
test word [SCR_MODE], 0x4000 |
jz .exit |
mov eax, [_display.pitch] |
mov eax, [_display.lfb_pitch] |
mul [_display.height] |
dec eax |
; LFB is mapped to virtual address LFB_BASE, |
/kernel/trunk/data32.inc |
---|
375,8 → 375,6 |
_display display_t |
_WinMapAddress rd 1 |
_WinMapSize rd 1 |
LFBAddress dd ? |
423,8 → 421,6 |
cur.lock rd 1 ;1 - lock update, 2- hide |
cur.left rd 1 ;cursor clip box |
cur.top rd 1 |
;cur.right rd 1 |
;cur.bottom rd 1 |
cur.w rd 1 |
cur.h rd 1 |
/kernel/trunk/gui/mouse.inc |
---|
526,7 → 526,7 |
mov esi, [mouse.state.pos.y] |
mov esi, [d_width_calc_area + esi*4] |
add esi, [_WinMapAddress] |
add esi, [_display.win_map] |
add esi, [mouse.state.pos.x] |
movzx esi, byte[esi] |
mov edi, esi |
/kernel/trunk/gui/window.inc |
---|
1893,7 → 1893,7 |
mov edi, [d_width_calc_area + ebx*4] |
add edi, eax |
add edi, [_WinMapAddress] |
add edi, [_display.win_map] |
pop eax |
mov ah, al |
push ax |
1935,7 → 1935,7 |
mov eax, [d_width_calc_area + ebx*4] |
add eax, [esp] |
add eax, [_WinMapAddress] |
add eax, [_display.win_map] |
mov ebp, eax |
mov edi, [edi + APPDATA.wnd_shape] |
/kernel/trunk/hid/mousedrv.inc |
---|
115,7 → 115,7 |
; mul ecx |
mov eax, [d_width_calc_area + eax*4] |
add eax, [_WinMapAddress] |
add eax, [_display.win_map] |
movzx edx, byte [ebx+eax] |
shl edx, 8 |
mov esi, [edx+SLOT_BASE+APPDATA.cursor] |
/kernel/trunk/kernel.asm |
---|
461,10 → 461,10 |
je @f |
movzx eax, word[BOOT_VARS+BOOT_PITCH] ; for other modes |
@@: |
mov [_display.pitch], eax |
mov [_display.lfb_pitch], eax |
mov eax, [_display.width] |
mul [_display.height] |
mov [_WinMapSize], eax |
mov [_display.win_map_size], eax |
call calculate_fast_getting_offset_for_WinMapAddress |
; for Qemu or non standart video cards |
659,8 → 659,8 |
mov [graph_data_l+4], al |
mov [graph_data_l+7], ah |
stdcall kernel_alloc, [_WinMapSize] |
mov [_WinMapAddress], eax |
stdcall kernel_alloc, [_display.win_map_size] |
mov [_display.win_map], eax |
xor eax, eax |
inc eax |
2112,7 → 2112,7 |
movzx ebx, word [MOUSE_X] |
mov eax, [d_width_calc_area + eax*4] |
add eax, [_WinMapAddress] |
add eax, [_display.win_map] |
movzx edx, byte [ebx+eax] |
shl edx, 8 |
mov esi, [edx+SLOT_BASE+APPDATA.cursor] |
2539,7 → 2539,7 |
pushfd |
cli |
mov eax, ecx |
mov ecx, [_display.pitch] |
mov ecx, [_display.lfb_pitch] |
mov [_display.width], eax |
dec eax |
mov [_display.height], edx |
3823,7 → 3823,7 |
.start_x: |
add eax, ecx |
mov ebp, [d_width_calc_area + ebx*4] |
add ebp, [_WinMapAddress] |
add ebp, [_display.win_map] |
movzx ebp, byte[eax+ebp] ; get value for current point |
cmp ebp, edi |
jne @f |
3868,9 → 3868,9 |
;----------------------------------------------------------------------------- |
align 4 |
calculatebackground: ; background |
mov edi, [_WinMapAddress] ; set os to use all pixels |
mov edi, [_display.win_map] ; set os to use all pixels |
mov eax, 0x01010101 |
mov ecx, [_WinMapSize] |
mov ecx, [_display.win_map_size] |
shr ecx, 2 |
rep stosd |
5026,7 → 5026,7 |
mov [esp+32], eax |
ret |
.3: ; bytes per scanline |
mov eax, [_display.pitch] |
mov eax, [_display.lfb_pitch] |
mov [esp+32], eax |
ret |
5193,7 → 5193,7 |
align 4 |
@@: |
mov eax, [d_width_calc_area + ecx*4] |
add eax, [_WinMapAddress] |
add eax, [_display.win_map] |
movzx eax, byte[eax+ebx] ; get value for current point |
;-------------------------------------- |
align 4 |
5332,7 → 5332,7 |
pushad |
mov edx, [d_width_calc_area + ebx*4] |
add edx, [_WinMapAddress] |
add edx, [_display.win_map] |
movzx edx, byte [eax+edx] |
cmp dl, byte 1 |
jne @f |
5433,7 → 5433,7 |
cld |
@@: |
stosd |
add eax, [_display.pitch] |
add eax, [_display.lfb_pitch] |
dec ecx |
jnz @r |
ret |
5448,7 → 5448,7 |
pushfd |
cli |
mov [_display.pitch], ecx |
mov [_display.lfb_pitch], ecx |
mov [screen_workarea.right], eax |
mov [screen_workarea.bottom], edx |
5462,14 → 5462,14 |
cmp [do_not_touch_winmap], 1 |
je @f |
stdcall kernel_free, [_WinMapAddress] |
stdcall kernel_free, [_display.win_map] |
mov eax, [_display.width] |
mul [_display.height] |
mov [_WinMapSize], eax |
mov [_display.win_map_size], eax |
stdcall kernel_alloc, eax |
mov [_WinMapAddress], eax |
mov [_display.win_map], eax |
test eax, eax |
jz .epic_fail |
; store for f.18.24 |
/kernel/trunk/video/blitter.inc |
---|
282,7 → 282,7 |
mov ebp, [d_width_calc_area+ebp*4] |
add ebp, ebx |
add ebp, [_WinMapAddress] |
add ebp, [_display.win_map] |
mov eax, [esp+BLITTER.src_y] |
imul eax, [esp+BLITTER.stride] |
341,7 → 341,7 |
jnz .inner32 |
add esi, [esp+BLITTER.stride] |
add edi, [_display.pitch] |
add edi, [_display.lfb_pitch] |
add ebp, [_display.width] |
mov edx, [esp+BLITTER.w] |
375,7 → 375,7 |
jnz .hw.inner32 |
add esi, [esp+BLITTER.stride] |
add edi, [_display.pitch] |
add edi, [_display.lfb_pitch] |
add ebp, [_display.width] |
mov edx, [esp+BLITTER.w] |
452,7 → 452,7 |
add esi, [esp+BLITTER.stride] |
mov edi, [esp+.extra_var1] |
add edi, [_display.pitch] |
add edi, [_display.lfb_pitch] |
add ebp, [_display.width] |
mov edx, [esp+BLITTER.w] |
514,7 → 514,7 |
add esi, [esp+BLITTER.stride] |
mov edi, [esp+.extra_var1] |
add edi, [_display.pitch] |
add edi, [_display.lfb_pitch] |
add ebp, [_display.width] |
mov edx, [esp+BLITTER.w] |
/kernel/trunk/video/cursors.inc |
---|
528,7 → 528,7 |
align 4 |
@@: |
mov edi, ebx |
add ebx, [_display.pitch] |
add ebx, [_display.lfb_pitch] |
mov ecx, [esp] |
rep movsb |
563,7 → 563,7 |
align 4 |
@@: |
mov edi, ebx |
add ebx, [_display.pitch] |
add ebx, [_display.lfb_pitch] |
mov ecx, [cur.w] |
rep movsd |
597,7 → 597,7 |
align 4 |
@@: |
mov edi, ebx |
add ebx, [_display.pitch] |
add ebx, [_display.lfb_pitch] |
mov ecx, [cur.w] |
rep movsw |
684,7 → 684,7 |
align 4 |
@@: |
mov esi, edx |
add edx, [_display.pitch] |
add edx, [_display.lfb_pitch] |
mov ecx, [cur.w] |
lea ecx, [ecx+ecx*2] |
rep movsb |
707,7 → 707,7 |
mov esi, edx |
mov edi, ebx |
add edx, 32*4 |
add ebx, [_display.pitch] |
add ebx, [_display.lfb_pitch] |
;-------------------------------------- |
align 4 |
.pix: |
797,7 → 797,7 |
align 4 |
@@: |
mov esi, edx |
add edx, [_display.pitch] |
add edx, [_display.lfb_pitch] |
mov ecx, [cur.w] |
rep movsd |
dec eax |
819,7 → 819,7 |
mov esi, edx |
mov edi, ebx |
add edx, 32*4 |
add ebx, [_display.pitch] |
add ebx, [_display.lfb_pitch] |
;-------------------------------------- |
align 4 |
.pix: |
907,7 → 907,7 |
align 4 |
@@: |
mov esi, edx |
add edx, [_display.pitch] |
add edx, [_display.lfb_pitch] |
mov ecx, [cur.w] |
rep movsw |
930,7 → 930,7 |
mov esi, edx |
mov edi, ebx |
add edx, 32*4 |
add ebx, [_display.pitch] |
add ebx, [_display.lfb_pitch] |
;-------------------------------------- |
align 4 |
.pix: |
/kernel/trunk/video/vesa20.inc |
---|
240,7 → 240,7 |
sub eax, [putimg.real_sx] |
mov [putimg.winmap_newline], eax |
; screen new line increment |
mov eax, [_display.pitch] |
mov eax, [_display.lfb_pitch] |
mov ebx, [_display.bytes_per_pixel] |
imul ecx, ebx |
sub eax, ecx |
261,7 → 261,7 |
mov eax, [d_width_calc_area + eax*4] |
add eax, [putimg.abs_cx] |
add eax, [_WinMapAddress] |
add eax, [_display.win_map] |
xchg eax, ebp |
mov ecx, [putimg.real_sx] |
884,7 → 884,7 |
; not forced |
mov edx, [d_width_calc_area + ebx*4] |
add edx, [_WinMapAddress] |
add edx, [_display.win_map] |
movzx edx, byte [eax+edx] |
cmp edx, [CURRENT_TASK] |
jne .exit |
1448,7 → 1448,7 |
mov ebx, [_display.bytes_per_pixel] |
imul eax, ebx |
neg eax |
add eax, [_display.pitch] |
add eax, [_display.lfb_pitch] |
mov [drbar.line_inc_scr], eax |
; pointer to screen |
mov edx, [drbar.abs_cy] |
1464,7 → 1464,7 |
mov eax, [d_width_calc_area + eax*4] |
add eax, [drbar.abs_cx] |
add eax, [_WinMapAddress] |
add eax, [_display.win_map] |
xchg eax, ebp |
mov ebx, [drbar.real_sx] |
2034,7 → 2034,7 |
; ebp:=Y*BytesPerScanLine+X*BytesPerPixel+AddrLFB |
call calculate_edi |
xchg edi, ebp |
add ebp, [_WinMapAddress] |
add ebp, [_display.win_map] |
; Now eax=x, ebx=y, edi->output, ebp=offset in WinMapAddress |
; 2) Calculate offset in background memory block |
push eax |
2256,7 → 2256,7 |
; qword [esp+36] = 2^32*(BgrDataWidth-1)/(ScreenWidth-1) |
sdp3a: |
mov eax, [_WinMapAddress] |
mov eax, [_display.win_map] |
cmp [ebp+eax], byte 1 |
jnz snbgp |
mov eax, [bgr_cur_line+esi] |
2332,7 → 2332,7 |
sub edi, eax |
@@: |
add edi, [_display.pitch] |
add edi, [_display.lfb_pitch] |
; restore ecx,edx; advance esi to next background line |
mov eax, [esp+28] |
mov ebx, [esp+32] |