2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
; Display Test for KolibriOS
|
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
; version: 0.41
|
|
|
|
|
; last update: 17/03/2012
|
|
|
|
|
; written by: Marat Zakiyanov aka Mario79, aka Mario
|
|
|
|
|
; changes: some optimisations and code refactoring
|
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
; compiler: FASM 1.50
|
|
|
|
|
; name: Display Test
|
|
|
|
|
; version: 0.4
|
|
|
|
|
; original author: barsuk
|
2008-11-03 01:37:20 +01:00
|
|
|
|
|
|
|
|
|
; <--- include all MeOS stuff --->
|
|
|
|
|
include "lang.inc"
|
2011-01-18 12:56:31 +01:00
|
|
|
|
include "../../../macros.inc"
|
2008-11-03 01:37:20 +01:00
|
|
|
|
|
|
|
|
|
; <--- start of MenuetOS application --->
|
|
|
|
|
MEOS_APP_START
|
|
|
|
|
|
2010-12-27 13:29:39 +01:00
|
|
|
|
;include "..\..\..\debug.inc"
|
2008-11-03 01:37:20 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; <--- start of code --->
|
|
|
|
|
CODE
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall 37,4,cursor,2
|
2008-11-03 01:37:20 +01:00
|
|
|
|
or eax, eax
|
|
|
|
|
jz exit
|
|
|
|
|
mov [cursorID], eax
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
redraw:
|
2008-11-03 01:37:20 +01:00
|
|
|
|
call draw_window ; at first create and draw the window
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
wait_event: ; main cycle
|
2008-11-03 01:37:20 +01:00
|
|
|
|
xor ebx, ebx
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall 10
|
2008-11-03 01:37:20 +01:00
|
|
|
|
|
|
|
|
|
cmp eax, 1 ; if event == 1
|
|
|
|
|
je redraw ; jump to redraw handler
|
|
|
|
|
cmp eax, 2 ; else if event == 2
|
|
|
|
|
je key ; jump to key handler
|
|
|
|
|
cmp eax, 3 ; else if event == 3
|
|
|
|
|
je button ; jump to button handler
|
|
|
|
|
|
|
|
|
|
jmp wait_event ; else return to the start of main cycle
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
key: ; key event handler
|
|
|
|
|
mcall 2 ; get key code
|
2008-11-03 01:37:20 +01:00
|
|
|
|
|
|
|
|
|
cmp ah, 27
|
|
|
|
|
jz exit
|
|
|
|
|
|
|
|
|
|
cmp ah, 0x20
|
|
|
|
|
jz next_test
|
|
|
|
|
|
|
|
|
|
cmp ah, 179 ; ->
|
|
|
|
|
jz next_test
|
|
|
|
|
|
|
|
|
|
cmp ah, 176 ; <-
|
|
|
|
|
jz prev_test
|
|
|
|
|
|
|
|
|
|
cmp ah, 'i'
|
|
|
|
|
jz toggle_info
|
|
|
|
|
|
|
|
|
|
cmp ah, 'I' ; <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20> 祫<> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ))
|
|
|
|
|
jz toggle_info
|
|
|
|
|
|
|
|
|
|
cmp ah, 'c'
|
|
|
|
|
jz toggle_cursor
|
|
|
|
|
|
|
|
|
|
cmp ah, 'C'
|
|
|
|
|
jz toggle_cursor
|
|
|
|
|
|
|
|
|
|
cmp ah, 'd'
|
|
|
|
|
jz redraw
|
|
|
|
|
|
|
|
|
|
cmp ah, 'D'
|
|
|
|
|
jz redraw
|
|
|
|
|
|
|
|
|
|
jmp wait_event
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
next_test:
|
|
|
|
|
cmp dword [test_done], 1
|
|
|
|
|
jz wait_event
|
|
|
|
|
|
|
|
|
|
inc dword [test_num]
|
|
|
|
|
call draw_window
|
|
|
|
|
jmp wait_event
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
prev_test:
|
|
|
|
|
cmp dword [test_num], ebx
|
|
|
|
|
jz wait_event
|
|
|
|
|
|
|
|
|
|
dec dword [test_num]
|
|
|
|
|
mov dword [test_done], ebx
|
|
|
|
|
call draw_window
|
|
|
|
|
jmp wait_event
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
toggle_info:
|
|
|
|
|
xor dword [show_info], 1
|
|
|
|
|
call draw_window
|
|
|
|
|
jmp wait_event
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
toggle_cursor:
|
|
|
|
|
mov eax, cursorVisible
|
|
|
|
|
cmp dword [eax], 0
|
|
|
|
|
jz .no_cursor
|
|
|
|
|
|
|
|
|
|
mov dword [eax], 0
|
|
|
|
|
mov ecx, [cursorID]
|
|
|
|
|
jmp .set
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;--------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
.no_cursor:
|
|
|
|
|
mov dword [eax], 1
|
|
|
|
|
xor ecx, ecx
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;--------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
.set:
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall 37,5
|
|
|
|
|
mcall 18,15 ; <20>⮡<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2008-11-03 01:37:20 +01:00
|
|
|
|
jmp wait_event
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
button: ; button event handler
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall 17 ; get button identifier
|
2008-11-03 01:37:20 +01:00
|
|
|
|
cmp ah, 1
|
|
|
|
|
jne wait_event ; return if button id != 1
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;--------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
exit:
|
|
|
|
|
or eax, -1 ; exit application
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
draw_window:
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall 12,1
|
2008-11-03 01:37:20 +01:00
|
|
|
|
|
|
|
|
|
; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;mov eax, 37
|
|
|
|
|
;mov ebx, 5
|
|
|
|
|
;mov ecx, cursorID
|
|
|
|
|
;int 0x40
|
|
|
|
|
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall 14 ; screen size
|
|
|
|
|
|
2008-11-03 01:37:20 +01:00
|
|
|
|
mov ebx, eax
|
|
|
|
|
shr ebx, 16
|
|
|
|
|
mov ecx, eax
|
|
|
|
|
and ecx, 0xffff
|
|
|
|
|
mov [screenx], ebx
|
|
|
|
|
mov [screeny], ecx
|
|
|
|
|
|
|
|
|
|
inc ebx
|
|
|
|
|
inc ecx
|
2012-03-16 23:51:51 +01:00
|
|
|
|
xor eax, eax ; create and draw the window
|
2008-11-03 01:37:20 +01:00
|
|
|
|
mov edx, 0x01000000
|
|
|
|
|
mov esi, edx
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
2008-11-03 01:37:20 +01:00
|
|
|
|
; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>࠭<EFBFBD><E0A0AD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
xor edx, edx
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall 13 ; <20><>㡮 ⠪
|
|
|
|
|
|
2008-11-03 01:37:20 +01:00
|
|
|
|
dec ebx
|
|
|
|
|
dec ecx
|
|
|
|
|
|
|
|
|
|
mov eax, [test_num]
|
|
|
|
|
mov eax, [test_proc + eax*4]
|
|
|
|
|
or eax, eax
|
|
|
|
|
jz end_of_test
|
|
|
|
|
call eax
|
|
|
|
|
jmp exit_draw
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;--------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
end_of_test:
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall 4,<8,8>,0xffffff,test_finish,test_finish.size
|
2008-11-03 01:37:20 +01:00
|
|
|
|
mov dword [test_done], 1
|
|
|
|
|
jmp no_info
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;--------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
exit_draw:
|
|
|
|
|
cmp dword [show_info], 1
|
|
|
|
|
jnz no_info
|
|
|
|
|
; ᭮<><E1ADAE> ࠧ<><E0A0A7><EFBFBD><EFBFBD> <20><>࠭<EFBFBD>
|
|
|
|
|
mov ebx, [screenx]
|
|
|
|
|
mov ecx, [screeny]
|
|
|
|
|
; ᣥ<><E1A3A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> ࠧ<><E0A0A7>襭<EFBFBD><E8A5AD><EFBFBD> <20><>࠭<EFBFBD>. <20><> <20>㦭<EFBFBD>, <20><>⮬<EFBFBD> <20><><EFBFBD> <20><><EFBFBD>
|
|
|
|
|
; <20><>אַ㣮<EFACAE>쭨<EFBFBD> 200<30>40 <20> <20><>䮩
|
|
|
|
|
mov edx, 200
|
|
|
|
|
sub ebx, edx
|
|
|
|
|
shl ebx, 15
|
|
|
|
|
mov bx, dx
|
|
|
|
|
mov edx, 40
|
|
|
|
|
sub ecx, edx
|
|
|
|
|
shl ecx, 15
|
|
|
|
|
mov cx, dx
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall 13,,,0xffffff
|
|
|
|
|
|
2008-11-03 01:37:20 +01:00
|
|
|
|
xor edx, edx
|
|
|
|
|
add ebx, 0x0000fffe ; <20>祭<EFBFBD> 㤮<><E3A4AE><EFBFBD> :))))
|
|
|
|
|
add ecx, 0x0000fffe
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
2008-11-03 01:37:20 +01:00
|
|
|
|
; ⥪<><E2A5AA>
|
|
|
|
|
shr ecx, 16
|
|
|
|
|
mov bx, cx
|
|
|
|
|
add ebx, 0x00010001
|
|
|
|
|
mov ecx, 0x80ffffff
|
|
|
|
|
mov edx, [test_num]
|
|
|
|
|
mov edx, [test_info + edx*4]
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall 4
|
|
|
|
|
|
2008-11-03 01:37:20 +01:00
|
|
|
|
add ebx, 8
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall ,,,press_space
|
|
|
|
|
|
2008-11-03 01:37:20 +01:00
|
|
|
|
add ebx, 8
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall ,,,press_i
|
2008-11-03 01:37:20 +01:00
|
|
|
|
|
2012-03-16 23:51:51 +01:00
|
|
|
|
add ebx, 8
|
|
|
|
|
mcall ,,,press_c
|
|
|
|
|
;--------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
no_info:
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall 12,2
|
|
|
|
|
ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
; <---- procedures for various tests of display ----->
|
|
|
|
|
; in: ebx = screen_width, ecx = screen_height
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
lsz i_image_size, ru, "Image Size and Placement"
|
|
|
|
|
db 0
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
t_image_size:
|
|
|
|
|
mov esi, ebx
|
|
|
|
|
mov edi, ecx
|
|
|
|
|
; 6 <20><>१<EFBFBD><E0A5A7><EFBFBD>
|
|
|
|
|
xor ecx, ecx
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall 38,,,0xffffff
|
|
|
|
|
|
2008-11-03 01:37:20 +01:00
|
|
|
|
mov ecx, edi
|
|
|
|
|
shl ecx, 16
|
|
|
|
|
xor ebx, ebx
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
|
|
|
|
|
2008-11-03 01:37:20 +01:00
|
|
|
|
mov ebx, esi
|
|
|
|
|
shl ebx, 16
|
|
|
|
|
add ecx, edi
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
|
|
|
|
|
2008-11-03 01:37:20 +01:00
|
|
|
|
sub ecx, edi
|
|
|
|
|
add ebx, esi
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
2008-11-03 01:37:20 +01:00
|
|
|
|
; ࠬ<><E0A0AC> <20><>⮢<EFBFBD>
|
|
|
|
|
mov ebx, esi
|
|
|
|
|
shl ebx, 16
|
|
|
|
|
mov ecx, edi
|
|
|
|
|
shl ecx, 15
|
|
|
|
|
mov cx, di
|
|
|
|
|
shr cx, 1
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
|
|
|
|
|
2008-11-03 01:37:20 +01:00
|
|
|
|
shr ebx, 1
|
|
|
|
|
mov bx, si
|
|
|
|
|
shr bx, 1
|
|
|
|
|
mov ecx, edi
|
|
|
|
|
shl ecx, 16
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
2008-11-03 01:37:20 +01:00
|
|
|
|
ret
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
lsz i_grid, ru, "Grid"
|
|
|
|
|
db 0
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
t_grid:
|
|
|
|
|
; <20><>⪠ ࠧ<><E0A0A7> <20> 64 <20><><EFBFBD>ᥫ<EFBFBD>
|
|
|
|
|
mov eax, 38
|
|
|
|
|
inc ebx
|
|
|
|
|
inc ecx
|
|
|
|
|
mov esi, ebx
|
|
|
|
|
mov edi, ecx
|
|
|
|
|
mov edx, 0xffffff
|
|
|
|
|
mov ebp, 0x00400040
|
|
|
|
|
; <20><>ਧ<EFBFBD><E0A8A7>⠫<EFBFBD><E2A0AB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
shl ebx, 16
|
|
|
|
|
xor ecx, ecx
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;--------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
grid_next_y:
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
|
|
|
|
|
2008-11-03 01:37:20 +01:00
|
|
|
|
add ecx, ebp
|
|
|
|
|
cmp cx, di
|
|
|
|
|
jnae grid_next_y
|
|
|
|
|
sub ecx, 0x00010001
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
2008-11-03 01:37:20 +01:00
|
|
|
|
; <20><><EFBFBD>⨪<EFBFBD><E2A8AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov ecx, edi
|
|
|
|
|
shl ecx, 16
|
|
|
|
|
xor ebx, ebx
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;--------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
grid_next_x:
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
2008-11-03 01:37:20 +01:00
|
|
|
|
add ebx, ebp
|
|
|
|
|
cmp bx, si
|
|
|
|
|
jnae grid_next_x
|
|
|
|
|
sub ebx, 0x00010001
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
2008-11-03 01:37:20 +01:00
|
|
|
|
ret
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
lsz i_horstr, ru, "Horizontal Straightness"
|
|
|
|
|
db 0
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
t_horstr:
|
|
|
|
|
mov eax, 38
|
|
|
|
|
mov edi, ecx
|
|
|
|
|
mov edx, 0xffffff
|
|
|
|
|
mov esi, ecx
|
|
|
|
|
inc esi
|
|
|
|
|
shr esi, 3
|
|
|
|
|
mov ebp, esi
|
|
|
|
|
shl ebp, 16
|
|
|
|
|
mov bp, si
|
|
|
|
|
; <20><>ਧ<EFBFBD><E0A8A7>⠫<EFBFBD><E2A0AB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
shl ebx, 16
|
|
|
|
|
mov ecx, ebp
|
|
|
|
|
shr ecx, 1
|
|
|
|
|
mov cx, bp
|
|
|
|
|
shr cx, 1
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;--------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
hor_next_y:
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
2008-11-03 01:37:20 +01:00
|
|
|
|
add ecx, ebp
|
|
|
|
|
cmp cx, di
|
|
|
|
|
jnae hor_next_y
|
|
|
|
|
ret
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
lsz i_vertstr, ru, "Vertical Straightness",0
|
|
|
|
|
db 0
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
t_vertstr:
|
|
|
|
|
mov eax, 38
|
|
|
|
|
mov edx, 0xffffff
|
|
|
|
|
mov esi, ebx
|
|
|
|
|
shl ecx, 16
|
|
|
|
|
mov edi, esi
|
|
|
|
|
shr edi, 3
|
|
|
|
|
mov ebp, edi
|
|
|
|
|
shl ebp, 16
|
|
|
|
|
mov bp, di
|
|
|
|
|
mov ebx, ebp
|
|
|
|
|
shr ebx, 1
|
|
|
|
|
mov bx, bp
|
|
|
|
|
shr bx, 1
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;--------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
vert_next_x:
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
2008-11-03 01:37:20 +01:00
|
|
|
|
add ebx, ebp
|
|
|
|
|
cmp bx, si
|
|
|
|
|
jnae vert_next_x
|
|
|
|
|
ret
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
lsz i_distort, ru, "Distortion",0
|
|
|
|
|
db 0
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
t_distort:
|
|
|
|
|
mov edx, 0xffffff
|
|
|
|
|
mov esi, ebx
|
|
|
|
|
mov edi, ecx
|
|
|
|
|
mov ebp, 3
|
|
|
|
|
xor ebx, ebx
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;--------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
dist_next:
|
|
|
|
|
push ebp
|
|
|
|
|
mov ebp, ebx
|
|
|
|
|
shl ebx, 16
|
|
|
|
|
or ebx, ebp
|
|
|
|
|
|
|
|
|
|
mov ecx, edi
|
|
|
|
|
shl ecx, 16
|
|
|
|
|
or ecx, ebp
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall 38
|
2008-11-03 01:37:20 +01:00
|
|
|
|
|
|
|
|
|
mov ebx, esi
|
|
|
|
|
shl ebx, 16
|
|
|
|
|
mov bx, si
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
2008-11-03 01:37:20 +01:00
|
|
|
|
|
|
|
|
|
mov bx, bp
|
|
|
|
|
mov ecx, ebp
|
|
|
|
|
shl ecx, 16
|
|
|
|
|
or ecx, ebp
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
2008-11-03 01:37:20 +01:00
|
|
|
|
|
|
|
|
|
mov ecx, edi
|
|
|
|
|
shl ecx, 16
|
|
|
|
|
mov cx, di
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
2008-11-03 01:37:20 +01:00
|
|
|
|
|
|
|
|
|
mov eax, 30
|
|
|
|
|
sub esi, eax
|
|
|
|
|
sub edi, eax
|
|
|
|
|
mov ebx, ebp
|
|
|
|
|
add ebx, eax
|
|
|
|
|
pop ebp
|
|
|
|
|
dec ebp
|
|
|
|
|
jnz dist_next
|
|
|
|
|
ret
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
lsz i_horres, ru, "Horizontal Resolution",0
|
|
|
|
|
db 0
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
t_horres:
|
|
|
|
|
mov eax, 38
|
|
|
|
|
mov edx, 0xffffff
|
|
|
|
|
mov edi, ecx
|
|
|
|
|
shl ecx, 16
|
|
|
|
|
mov esi, ebx
|
|
|
|
|
xor ebx, ebx
|
|
|
|
|
mov edi, 0x003A003A
|
|
|
|
|
mov ebp, 0x00030003
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;--------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
horres_next:
|
|
|
|
|
add ebx, edi
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
|
|
|
|
|
2008-11-03 01:37:20 +01:00
|
|
|
|
add ebx, ebp
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
|
|
|
|
|
2008-11-03 01:37:20 +01:00
|
|
|
|
add ebx, ebp
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
|
|
|
|
|
2008-11-03 01:37:20 +01:00
|
|
|
|
add ebx, ebp
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
|
|
|
|
|
2008-11-03 01:37:20 +01:00
|
|
|
|
add ebx, ebp
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
|
|
|
|
|
2008-11-03 01:37:20 +01:00
|
|
|
|
cmp bx, si
|
|
|
|
|
jna horres_next
|
|
|
|
|
ret
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
lsz i_vertres, ru, "Vertical Resolution",0
|
|
|
|
|
db 0
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
t_vertres:
|
|
|
|
|
mov eax, 38
|
|
|
|
|
mov edx, 0xffffff
|
|
|
|
|
; mov esi, ebx
|
|
|
|
|
shl ebx, 16
|
|
|
|
|
mov edi, ecx
|
|
|
|
|
xor ecx, ecx
|
|
|
|
|
mov ebp, 0x00030003
|
|
|
|
|
mov esi, 0x002A002A
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;--------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
vertres_next:
|
|
|
|
|
add ecx, esi
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
|
|
|
|
|
2008-11-03 01:37:20 +01:00
|
|
|
|
add ecx, ebp
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
|
|
|
|
|
2008-11-03 01:37:20 +01:00
|
|
|
|
add ecx, ebp
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
|
|
|
|
|
2008-11-03 01:37:20 +01:00
|
|
|
|
add ecx, ebp
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
|
|
|
|
|
2008-11-03 01:37:20 +01:00
|
|
|
|
add ecx, ebp
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
|
|
|
|
|
2008-11-03 01:37:20 +01:00
|
|
|
|
add ecx, 0x00540054
|
|
|
|
|
cmp cx, di
|
|
|
|
|
jna vertres_next
|
|
|
|
|
ret
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
lsz i_moire, ru, "Moire Patterns",0
|
|
|
|
|
db 0
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
t_moire:
|
|
|
|
|
mov eax, 38
|
|
|
|
|
mov edx, 0xffffff
|
|
|
|
|
mov edi, ecx
|
|
|
|
|
shl ecx, 16
|
|
|
|
|
mov esi, ebx
|
|
|
|
|
xor ebx, ebx
|
|
|
|
|
mov ebp, 0x00030003
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;--------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
moire_next:
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
2008-11-03 01:37:20 +01:00
|
|
|
|
add ebx, ebp
|
|
|
|
|
cmp bx, si
|
|
|
|
|
jna moire_next
|
|
|
|
|
ret
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
lsz i_revsharp, ru, "Reverse Video Sharpness",0
|
|
|
|
|
db 0
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
t_revsharp:
|
|
|
|
|
mov esi, ebx
|
|
|
|
|
mov edi, ecx
|
|
|
|
|
shr ecx, 1
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall 13,,,0xffffff
|
2008-11-03 01:37:20 +01:00
|
|
|
|
; <20> ⥯<><E2A5AF><EFBFBD> - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov eax, 38
|
|
|
|
|
mov ecx, edi
|
|
|
|
|
mov edx, 0x01000000
|
|
|
|
|
xor ebx, ebx
|
|
|
|
|
mov ebp, 0x00010001
|
|
|
|
|
mov edi, 0x003F003F
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;--------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
revsharp_next:
|
|
|
|
|
add ebx, edi
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
|
|
|
|
|
2008-11-03 01:37:20 +01:00
|
|
|
|
add ebx, ebp
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
|
|
|
|
|
2008-11-03 01:37:20 +01:00
|
|
|
|
add ebx, ebp
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
|
|
|
|
|
2008-11-03 01:37:20 +01:00
|
|
|
|
add ebx, edi
|
|
|
|
|
sub ebx, ebp
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
|
|
|
|
|
2008-11-03 01:37:20 +01:00
|
|
|
|
cmp bx, si
|
|
|
|
|
jna revsharp_next
|
|
|
|
|
ret
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
lsz i_flicker, ru, "Flicker Severity",0
|
|
|
|
|
db 0
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
t_flicker:
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall 13,,,0xffffff
|
2008-11-03 01:37:20 +01:00
|
|
|
|
ret
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
lsz i_glare, ru, "Glare Severity",0
|
|
|
|
|
db 0
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
t_glare: ; <20><>⨬<EFBFBD><E2A8AC><EFBFBD><EFBFBD><E0AEA2><EFBFBD> <20><>祣<EFBFBD>
|
|
|
|
|
ret
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
lsz i_interlace, ru, "Interlacing Detection",0
|
|
|
|
|
db 0
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
t_interlace:
|
|
|
|
|
mov edi, ecx
|
|
|
|
|
mov eax, 38
|
|
|
|
|
mov edx, 0xffffff
|
|
|
|
|
xor ecx, ecx
|
|
|
|
|
mov ebp, 0x00020002
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;--------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
interlace_next:
|
|
|
|
|
add ecx, ebp
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
2008-11-03 01:37:20 +01:00
|
|
|
|
cmp cx, di
|
|
|
|
|
jna interlace_next
|
|
|
|
|
ret
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
lsz i_scrreg, ru, "Screen Regulation",0
|
|
|
|
|
db 0
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
t_scrreg:
|
|
|
|
|
add ebx, 0x0018FFCD ; +25 <20> <20><>砫<EFBFBD> <20> -50 <20><> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
shr ecx, 1
|
|
|
|
|
add ecx, 0x0013FFEC ; +19 <20> <20><>砫<EFBFBD> <20> -19 <20><> <20><><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall 13,,,0xffffff
|
2008-11-03 01:37:20 +01:00
|
|
|
|
ret
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
lsz i_pricol, ru, "Primary Color Purity"
|
|
|
|
|
db 0
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
t_pricol:
|
|
|
|
|
mov esi, ebx
|
|
|
|
|
mov edi, ecx
|
|
|
|
|
|
|
|
|
|
shr ebx, 4 ; /16
|
|
|
|
|
mov ebp, ebx
|
|
|
|
|
shl ebx, 16
|
|
|
|
|
mov bx, bp
|
|
|
|
|
shl ebp, 16
|
|
|
|
|
lea ebp, [ebp + ebp * 4] ; ebp *= 5
|
|
|
|
|
|
|
|
|
|
mov ecx, 0x00280000
|
|
|
|
|
mov cx, di
|
|
|
|
|
sub cx, 80
|
|
|
|
|
;shr cx, 1
|
|
|
|
|
|
|
|
|
|
shl bx, 2
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall 13,,,0xff0000
|
2008-11-03 01:37:20 +01:00
|
|
|
|
|
|
|
|
|
add ebx, ebp
|
|
|
|
|
shr edx, 8
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
2008-11-03 01:37:20 +01:00
|
|
|
|
|
|
|
|
|
add ebx, ebp
|
|
|
|
|
shr edx, 8
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
2008-11-03 01:37:20 +01:00
|
|
|
|
ret
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
lsz i_colint, ru, "Color Intensity Gradient"
|
|
|
|
|
db 0
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
t_colint:
|
|
|
|
|
|
|
|
|
|
mov esi, ebx
|
|
|
|
|
mov edi, ecx
|
|
|
|
|
|
|
|
|
|
; mov eax, ecx
|
|
|
|
|
; shr ecx, 2 ; end y coord
|
|
|
|
|
; and ecx, 0xffffff80 ; <20><><EFBFBD> not 7F
|
|
|
|
|
; shr eax, 7 ; / 128
|
|
|
|
|
; mov ebp, eax
|
|
|
|
|
; mov edx, eax
|
|
|
|
|
; lea eax, [eax + eax * 2] ; eax *= 5
|
|
|
|
|
; shl ebp, 4
|
|
|
|
|
; add eax, ebp
|
|
|
|
|
|
|
|
|
|
; shl eax, 16
|
|
|
|
|
; add ecx, eax
|
|
|
|
|
; mov edx, ebp
|
|
|
|
|
; shl ebp, 16
|
|
|
|
|
; mov bp, dx ; <20><> <20><><EFBFBD>쭮<EFBFBD>
|
|
|
|
|
|
|
|
|
|
; <20> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> ⠬ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20> <20><>訫 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᭮<><E1ADAE> <20>_<EFBFBD>
|
|
|
|
|
|
|
|
|
|
; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> ᣥ<><E1A3A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ecx (<28><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> ᤢ<><E1A4A2>) <20> ebp (蠣 <20><> <20>)
|
|
|
|
|
|
|
|
|
|
mov eax, edi
|
|
|
|
|
lea eax, [eax + 2 * eax]
|
|
|
|
|
shr eax, 5 ; eax = 3/32 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov ebp, eax
|
|
|
|
|
shl ebp, 16
|
|
|
|
|
mov bp, ax ; ebp = ax <20> <20><><EFBFBD><EFBFBD><EFBFBD> <><E1ABAE><EFBFBD>
|
|
|
|
|
|
|
|
|
|
mov ebx, eax ; <20><><EFBFBD>࠭<EFBFBD><E0A0AD> <20><><EFBFBD> <20><><EFBFBD>祭<EFBFBD><E7A5AD>
|
|
|
|
|
|
|
|
|
|
mov eax, edi
|
|
|
|
|
inc eax
|
|
|
|
|
shr eax, 4 ; 3/16 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <20><>砫쭮<E7A0AB> <20><><EFBFBD>祭<EFBFBD><E7A5AD>
|
|
|
|
|
; <20>ᥣ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 3/4 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20>⮣<EFBFBD> <20><> 3/32 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD> <><E0AEA2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>)
|
|
|
|
|
lea eax, [eax + eax * 2]
|
|
|
|
|
mov ecx, eax
|
|
|
|
|
shl ecx, 16
|
|
|
|
|
shr ebx, 2
|
|
|
|
|
lea ebx, [ebx + ebx * 2] ; ebx = 3/4 ebx, <20>.<2E>. 3/4 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
add eax, ebx
|
|
|
|
|
mov cx, ax
|
|
|
|
|
|
|
|
|
|
xor edx, edx
|
|
|
|
|
mov eax, 0xffff
|
|
|
|
|
div esi
|
|
|
|
|
mov edi, eax ; edi = 64K/width
|
|
|
|
|
|
|
|
|
|
mov dword [color_index], 0
|
|
|
|
|
jmp colint_next
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
color_table dd 0x00ff0000, 0x0000ff00, 0x00ffff00, \
|
|
|
|
|
0x000000ff, 0x00ff00ff, 0x0000ffff, 0x00ffffff
|
|
|
|
|
color_index dd 0
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
colint_next:
|
|
|
|
|
xor edx, edx
|
|
|
|
|
xor ebx, ebx
|
|
|
|
|
mov eax, 38
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;--------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
colint_next_line:
|
|
|
|
|
push edx
|
|
|
|
|
push eax
|
|
|
|
|
movzx eax, dh
|
|
|
|
|
shl eax, 16
|
|
|
|
|
mov dl, dh
|
|
|
|
|
or edx, eax
|
|
|
|
|
mov eax, [color_index]
|
|
|
|
|
mov eax, [color_table + eax * 4]
|
|
|
|
|
and edx, eax
|
|
|
|
|
pop eax
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
2008-11-03 01:37:20 +01:00
|
|
|
|
pop edx
|
|
|
|
|
add ebx, 0x00010001
|
|
|
|
|
add edx, edi
|
|
|
|
|
cmp bx, si
|
|
|
|
|
jna colint_next_line
|
|
|
|
|
|
|
|
|
|
add ecx, ebp
|
|
|
|
|
inc dword [color_index]
|
|
|
|
|
cmp dword [color_index], 7
|
|
|
|
|
jb colint_next
|
|
|
|
|
ret
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
lsz i_colalign, ru, "Color Alignment Grid"
|
|
|
|
|
db 0
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
t_colalign:
|
|
|
|
|
; <20><><EFBFBD>᭠<EFBFBD> <20><>⪠
|
|
|
|
|
inc ebx ; ⠪ <20>㦭<EFBFBD>
|
|
|
|
|
inc ecx
|
|
|
|
|
mov esi, ebx
|
|
|
|
|
mov edi, ecx
|
|
|
|
|
mov edx, 0xff0000
|
|
|
|
|
; <20><>ਧ<EFBFBD><E0A8A7>⠫<EFBFBD><E2A0AB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
shl ebx, 16
|
|
|
|
|
xor ecx, ecx
|
|
|
|
|
push edi
|
|
|
|
|
shr edi, 3
|
|
|
|
|
mov ebp, edi
|
|
|
|
|
shl ebp, 16
|
|
|
|
|
mov bp, di
|
|
|
|
|
pop edi
|
|
|
|
|
mov [yshift], ebp
|
|
|
|
|
mov eax, 38
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;--------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
cgrid_next_y:
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
2008-11-03 01:37:20 +01:00
|
|
|
|
add ecx, ebp
|
|
|
|
|
cmp cx, di
|
|
|
|
|
jnae cgrid_next_y
|
|
|
|
|
; <20><><EFBFBD><E1ABA5><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>:
|
|
|
|
|
sub ecx, 0x00010001
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
2008-11-03 01:37:20 +01:00
|
|
|
|
|
|
|
|
|
; <20><><EFBFBD>⨪<EFBFBD><E2A8AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov ecx, edi
|
|
|
|
|
shl ecx, 16
|
|
|
|
|
xor ebx, ebx
|
|
|
|
|
push esi
|
|
|
|
|
shr esi, 3
|
|
|
|
|
mov ebp, esi
|
|
|
|
|
shl ebp, 16
|
|
|
|
|
mov bp, si
|
|
|
|
|
mov [xshift], ebp
|
|
|
|
|
pop esi
|
|
|
|
|
mov eax, 38
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;--------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
cgrid_next_x:
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
2008-11-03 01:37:20 +01:00
|
|
|
|
add ebx, ebp
|
|
|
|
|
cmp bx, si
|
|
|
|
|
jnae cgrid_next_x
|
|
|
|
|
; <20><><EFBFBD><E1ABA5><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
sub ebx, 0x00010001
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
2008-11-03 01:37:20 +01:00
|
|
|
|
jmp cgrid_green
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
xshift dd 0
|
|
|
|
|
yshift dd 0
|
|
|
|
|
shift dd 0
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
cgrid_green:
|
|
|
|
|
; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>: <20><>ਧ<EFBFBD><E0A8A7>⠫<EFBFBD><E2A0AB><EFBFBD><EFBFBD>
|
|
|
|
|
mov edx, esi
|
|
|
|
|
shr edx, 5
|
|
|
|
|
lea eax, [edx + edx * 2]
|
|
|
|
|
shl edx, 16
|
|
|
|
|
or edx, eax
|
|
|
|
|
mov [shift], edx
|
|
|
|
|
mov eax, 38
|
|
|
|
|
mov edx, 0x00ff00
|
|
|
|
|
xor ecx, ecx
|
|
|
|
|
mov ebp, [xshift]
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;--------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
ggrid_next_yy:
|
|
|
|
|
mov ebx, [shift]
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;--------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
ggrid_next_yx:
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
2008-11-03 01:37:20 +01:00
|
|
|
|
add ebx, ebp
|
|
|
|
|
cmp bx, si
|
|
|
|
|
jnae ggrid_next_yx
|
|
|
|
|
sub ebx, 0x00010001
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
2008-11-03 01:37:20 +01:00
|
|
|
|
|
|
|
|
|
add ecx, [yshift]
|
|
|
|
|
cmp cx, di
|
|
|
|
|
jnae ggrid_next_yy
|
|
|
|
|
; last row of lines
|
|
|
|
|
mov ebx, [shift]
|
|
|
|
|
dec ecx
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;--------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
ggrid_last_yx:
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
2008-11-03 01:37:20 +01:00
|
|
|
|
add ebx, ebp
|
|
|
|
|
cmp bx, si
|
|
|
|
|
jnae ggrid_last_yx
|
|
|
|
|
|
|
|
|
|
; <20> <20><><EFBFBD>⨪<EFBFBD><E2A8AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov edx, edi
|
|
|
|
|
shr edx, 5
|
|
|
|
|
lea eax, [edx + edx * 2]
|
|
|
|
|
shl edx, 16
|
|
|
|
|
or edx, eax
|
|
|
|
|
mov [shift], edx
|
|
|
|
|
|
|
|
|
|
mov eax, 38
|
|
|
|
|
mov edx, 0x00ff00
|
|
|
|
|
mov ecx, [shift]
|
|
|
|
|
mov ebp, [xshift]
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;--------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
ggrid_next_xy:
|
|
|
|
|
xor ebx, ebx
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;--------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
ggrid_next_xx:
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
|
|
|
|
|
2008-11-03 01:37:20 +01:00
|
|
|
|
add ebx, ebp
|
|
|
|
|
cmp bx, si
|
|
|
|
|
jnae ggrid_next_xx
|
|
|
|
|
sub ebx, 0x00010001
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
2008-11-03 01:37:20 +01:00
|
|
|
|
|
|
|
|
|
add ecx, [yshift]
|
|
|
|
|
cmp cx, di
|
|
|
|
|
jnae ggrid_next_xy
|
|
|
|
|
xor ebx, ebx
|
|
|
|
|
dec ecx
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;--------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
ggrid_last_xy:
|
|
|
|
|
;int 0x40
|
|
|
|
|
;add ebx, ebp
|
|
|
|
|
;cmp bx, si
|
|
|
|
|
;jnae ggrid_last_xy
|
|
|
|
|
ret
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
lsz i_colsyn, ru, "Color Synchronization"
|
|
|
|
|
db 0
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
t_colsyn:
|
|
|
|
|
inc ebx
|
|
|
|
|
inc ecx
|
|
|
|
|
mov esi, ebx
|
|
|
|
|
mov edi, ecx
|
|
|
|
|
|
|
|
|
|
shr ebx, 5
|
|
|
|
|
mov eax, ebx
|
|
|
|
|
lea ebx, [ebx + ebx * 4]
|
|
|
|
|
shl ebx, 1 ; 10/32
|
|
|
|
|
mov ebp, ebx
|
|
|
|
|
shl eax, 16
|
|
|
|
|
or ebx, eax
|
|
|
|
|
shl ebp, 16
|
|
|
|
|
|
|
|
|
|
mov edi, 0x0000ffff
|
|
|
|
|
add ecx, 0x003FFF7F
|
|
|
|
|
mov edx, edi
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall 13
|
2008-11-03 01:37:20 +01:00
|
|
|
|
|
|
|
|
|
mov edx, 0x00ff0000
|
|
|
|
|
add ebx, ebp
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
2008-11-03 01:37:20 +01:00
|
|
|
|
|
|
|
|
|
mov edx, edi
|
|
|
|
|
add ebx, ebp
|
2012-03-16 23:51:51 +01:00
|
|
|
|
mcall
|
2008-11-03 01:37:20 +01:00
|
|
|
|
ret
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
; <--- initialised data --->
|
|
|
|
|
DATA
|
|
|
|
|
screenx dd 0
|
|
|
|
|
screeny dd 0
|
|
|
|
|
|
|
|
|
|
test_num dd 0
|
|
|
|
|
test_done dd 0
|
|
|
|
|
show_info dd 1
|
|
|
|
|
test_proc dd t_image_size, t_grid, t_horstr, t_vertstr,\
|
|
|
|
|
t_distort, t_horres, t_vertres, t_moire, t_revsharp, \
|
|
|
|
|
t_flicker, t_glare, t_interlace, t_scrreg, t_pricol, \
|
|
|
|
|
t_colint, t_colalign, t_colsyn, 0
|
|
|
|
|
test_info dd i_image_size, i_grid, i_horstr, i_vertstr, \
|
|
|
|
|
i_distort, i_horres, i_vertres, i_moire, i_revsharp, \
|
|
|
|
|
i_flicker, i_glare, i_interlace, i_scrreg, i_pricol, \
|
|
|
|
|
i_colint, i_colalign, i_colsyn, 0
|
|
|
|
|
|
|
|
|
|
lsz press_space, ru, "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E0AEA1> <20><><EFBFBD> <20>த<EFBFBD><E0AEA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,"
|
|
|
|
|
db 0
|
|
|
|
|
lsz press_i, ru, "I <20><><EFBFBD> <20><>४<EFBFBD><E0A5AA>祭<EFBFBD><E7A5AD> ᢥ<><E1A2A5><EFBFBD><EFBFBD><EFBFBD>,"
|
|
|
|
|
db 0
|
|
|
|
|
lsz press_c, ru, "<22> C <20><><EFBFBD> <20><>४<EFBFBD><E0A5AA>祭<EFBFBD><E7A5AD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|
|
|
|
db 0
|
|
|
|
|
lsz header, ru, "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|
|
|
|
lsz test_finish, ru, "<22><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ESC."
|
|
|
|
|
|
|
|
|
|
cursor dd 32*32 dup(0x00000000) ; <20><><EFBFBD> ࠢ<><E0A0A2> ᮦ<><E1AEA6><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
cursorVisible dd 1
|
|
|
|
|
cursorID dd 0
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
; <--- uninitialised data --->
|
|
|
|
|
UDATA
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2008-11-03 01:37:20 +01:00
|
|
|
|
MEOS_APP_END
|
2011-01-18 12:56:31 +01:00
|
|
|
|
; <--- end of MenuetOS application --->
|
2012-03-16 23:51:51 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|