1) The function 18/19 - to get/set mouse features

2) The application SETUP is changed for operation from functions 18/19, also instead of functions 6 and 33 the function 70 is used. 

git-svn-id: svn://kolibrios.org@120 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Marat Zakiyanov (Mario79) 2006-08-13 13:02:57 +00:00
parent df2e1aa3a9
commit 28e25be617
8 changed files with 598 additions and 380 deletions

File diff suppressed because it is too large Load Diff

View File

@ -925,6 +925,54 @@ Remarks:
* See also subfunction 2 - terminate
process/thread by given slot.
======================================================================
====================== Function 18, subfunction 19 =====================
======================= Get/set mouse features. ======================
======================================================================
Parameters:
* eax = 18 - function number
* ebx = 19 - subfunction number
* ecx = subsubfunction number
ecx = 0 - get mouse speed
Returned value:
* eax = current mouse speed
ecx = 1 - set mouse speed
edx = selected value of speed
Returned value:
* function does not return value
ecx = 2 - get mouse delay
Returned value:
* eax = current mouse delay
ecx = 3 - set mouse delay
edx = selected value of delay
Returned value:
* function does not return value
ecx = 4 - set mouse pointer position
edx = [coordinate on axis x]*65536 + [coordinate on axis y]
Returned value:
* function does not return value
Remarks:
* Recommended speed of the mouse (in subfunction 1) from 1 up to 9.
The installed value is not inspected by the code of a kernel, on this use
cautiously, at incorrect value the cursor can "freeze".
Speed of mouse can be regulated through the application SETUP.
* Recommended delay of the mouse (in subfunction 3) = 10. Lower value
is not handled COM by mice. At the very large values the movement of
the mouse on 1 pixel is impossible and the cursor will jump
on the value of the installed speed (subfunction 1).
The installed value is not inspected by the code of a kernel.
* In subfunction 4 the installed value is not inspected by
the code of a kernel. Before usage it is necessary to find out current
screen resolution and at installation of a position to watch,
that the value of a position should do not fall outside
the limits the screen.
======================================================================
============ Function 19 - start application from ramdisk. ===========
======================================================================
@ -2086,11 +2134,11 @@ Remarks:
* Structure of the color table is described in the standard
include file 'macros.inc' as 'system_colors'; for example,
it is possible to write:
sc system_colors ; variable declaration
... ; somewhere one must call
; this function with ecx=sc
mov ecx, [sc.work_button_text] ; read text color on
; buttin in working area
sc system_colors ; variable declaration
... ; somewhere one must call
; this function with ecx=sc
mov ecx, [sc.work_button_text] ; read text color on
; buttin in working area
* A program itself desides to use or not to use color table.
For usage program must simply at calls to drawing functions select
color taken from the table.
@ -3240,11 +3288,11 @@ Remarks:
The data of the graphics screen (the memory area which displays
screen contents) are accessible to a program directly, without
any system calls, through the selector gs:
mov eax, [gs:0]
mov eax, [gs:0]
places in eax the first dword of the buffer, which contains
information on color of the left upper point (and, possibly, colors
of several following).
mov [gs:0], eax
mov [gs:0], eax
by work in VESA modes with LFB sets color of the left upper point
(and, possibly, colors of several following).
To interpret the data of graphics screen program needs to know
@ -3806,7 +3854,7 @@ Remarks:
and at arrival of new message the system will wait.
For synchronization frame all work with the buffer by operations
lock/unlock
neg [bufsize]
neg [bufsize]
* Data in the buffer are considered as array of items with variable
length - messages. Format of a message is explained in
general description.
@ -4372,3 +4420,4 @@ Application start functions can return also following errors:
* 30 = 0x1E = not enough memory
* 31 = 0x1F = file is not executable
* 32 = 0x20 = too many processes

View File

@ -4,7 +4,7 @@ MouseByteNumber DB 0
FirstByte DB 0
SecondByte DB 0
ThirdByte DB 0
timer_ticks_com dd 0
;***************************************
;* ÍÎÂÛÉ ÎÁÐÀÁÎÒ×ÈÊ ÏÐÅÐÛÂÀÍÈß ÎÒ ÌÛØÈ *
;***************************************
@ -68,7 +68,7 @@ check_mouse_data_com1:
shl AL,6
or AL,[SecondByte]
cbw
shl ax,1
call mouse_acceleration_com1
add AX,[0xFB0A] ;[XCoordinate]
; Êóðñîð íå äîëæåí âûõîäèòü çà ëåâóþ èëè
; ïðàâóþ ãðàíèöó ýêðàíà
@ -90,7 +90,7 @@ check_mouse_data_com1:
shl AL,4
or AL,[ThirdByte]
cbw
shl ax,1
call mouse_acceleration_com1
add AX,[0xFB0C] ;[YCoordinate]
; Êóðñîð íå äîëæåí âûõîäèòü çà âåðõíþþ èëè
; íèæíþþ ãðàíèöó ýêðàíà
@ -106,6 +106,8 @@ check_mouse_data_com1:
xor AX,AX
@@Y2:
mov [0xFB0C],AX ;[YCoordinate]
mov eax,[timer_ticks]
mov [timer_ticks_com],eax
jmp @@EndMouseInterrupt
@@Error:
@ -116,3 +118,13 @@ check_mouse_data_com1:
call ready_for_next_irq
ret
mouse_acceleration_com1:
push eax
mov eax,[timer_ticks]
sub eax,[timer_ticks_com]
cmp eax,[mouse_delay]
pop eax
ja @f
shl ax,1
@@:
ret

View File

@ -4,7 +4,7 @@ MouseByteNumber_1 DB 0
FirstByte_1 DB 0
SecondByte_1 DB 0
ThirdByte_1 DB 0
timer_ticks_com_1 dd 0
;***************************************
;* ÍÎÂÛÉ ÎÁÐÀÁÎÒ×ÈÊ ÏÐÅÐÛÂÀÍÈß ÎÒ ÌÛØÈ *
;***************************************
@ -68,7 +68,7 @@ check_mouse_data_com2:
shl AL,6
or AL,[SecondByte_1]
cbw
shl ax,1
call mouse_acceleration_com2
add AX,[0xFB0A] ;[XCoordinate]
; Êóðñîð íå äîëæåí âûõîäèòü çà ëåâóþ èëè
; ïðàâóþ ãðàíèöó ýêðàíà
@ -90,7 +90,7 @@ check_mouse_data_com2:
shl AL,4
or AL,[ThirdByte_1]
cbw
shl ax,1
call mouse_acceleration_com2
add AX,[0xFB0C] ;[YCoordinate]
; Êóðñîð íå äîëæåí âûõîäèòü çà âåðõíþþ èëè
; íèæíþþ ãðàíèöó ýêðàíà
@ -106,6 +106,8 @@ check_mouse_data_com2:
xor AX,AX
@@Y2_1:
mov [0xFB0C],AX ;[YCoordinate]
mov eax,[timer_ticks]
mov [timer_ticks_com_1],eax
jmp @@EndMouseInterrupt_1
@@Error_1:
@ -116,3 +118,13 @@ check_mouse_data_com2:
call ready_for_next_irq
ret
mouse_acceleration_com2:
push eax
mov eax,[timer_ticks]
sub eax,[timer_ticks_com_1]
cmp eax,[mouse_delay]
pop eax
ja @f
shl ax,1
@@:
ret

View File

@ -4,6 +4,7 @@ MouseByteNumber_2 DB 0
FirstByte_2 DB 0
SecondByte_2 DB 0
ThirdByte_2 DB 0
timer_ticks_ps2 dd 0
;**************************************
;* ОБРАБОТЧИК ПРЕРЫВАНИЯ ОТ МЫШИ PS/2 *
@ -53,7 +54,7 @@ check_mouse_data_ps2:
; Занести в AL младший байт
@@M0:
mov AL,[SecondByte_2]
shl ax,1
call mouse_acceleration_ps2
; Вычислить новое значение координаты
; курсора по X
add AX,[0xFB0A] ;[XCoordinate]
@ -79,7 +80,7 @@ check_mouse_data_ps2:
; Занести в AL младший байт
@@M3:
mov AL,[ThirdByte_2]
shl ax,1
call mouse_acceleration_ps2
; Вычислить новое значение координаты курсора
; по Y (Y-координата мыши PS/2 направлена
; противоположно экранной)
@ -98,6 +99,8 @@ check_mouse_data_ps2:
mov [0xFB0C],AX ;[YCoordinate]
; Показать курсор в новой позиции
mov eax,[timer_ticks]
mov [timer_ticks_ps2],eax
jmp @@EndMouseInterrupt_2
; Обнаружен сбой в порядке передачи информации от мыши
@ -107,7 +110,17 @@ check_mouse_data_ps2:
@@EndMouseInterrupt_2:
call ready_for_next_irq_1
ret
mouse_acceleration_ps2:
push eax
mov eax,[timer_ticks]
sub eax,[timer_ticks_ps2]
cmp eax,[mouse_delay]
pop eax
ja @f
imul ax,[mouse_speed_factor]
@@:
ret
;***********************************************
;* ОЖИДАНИЕ ОЧИСТКИ ВХОДНОГО БУФЕРА I8042 *
;* При выходе из процедуры: *

View File

@ -16,6 +16,9 @@ uglobal
mousedata dd 0x0
endg
mouse_delay dd 10
mouse_speed_factor dw 3
include 'm_ps2.inc'
include 'm_com1.inc'
include 'm_com2.inc'

View File

@ -1972,7 +1972,9 @@ sys_system_table:
dd sysfn_centermouse ; 15 = center mouse cursor
dd sysfn_getfreemem ; 16 = get free memory size
dd sysfn_getallmem ; 17 = get total memory size
dd sysfn_terminate2 ; 18 = terminate thread using PID instead of slot
dd sysfn_terminate2 ; 18 = terminate thread using PID
; instead of slot
dd sysfn_mouse_acceleration; 19 = set/get mouse acceleration
sysfn_num = ($ - sys_system_table)/4
endg
@ -2170,6 +2172,39 @@ sysfn_centermouse: ; 18.15 = mouse centered
mov [esp+36],dword 0
ret
sysfn_mouse_acceleration: ; 18.19 = set/get mouse features
cmp ebx,0 ; get mouse speed factor
jnz .set_mouse_acceleration
xor eax,eax
mov ax,[mouse_speed_factor]
mov [esp+36],eax
ret
.set_mouse_acceleration:
cmp ebx,1 ; set mouse speed factor
jnz .get_mouse_delay
mov [mouse_speed_factor],cx
ret
.get_mouse_delay:
cmp ebx,2 ; get mouse delay
jnz .set_mouse_delay
mov eax,[mouse_delay]
mov [esp+36],eax
ret
.set_mouse_delay:
cmp ebx,3 ; set mouse delay
jnz .set_pointer_position
mov [mouse_delay],ecx
ret
.set_pointer_position:
cmp ebx,4 ; set mouse pointer position
jnz .end
mov [0xFB0C],cx ;y
ror ecx,16
mov [0xFB0A],cx ;x
rol ecx,16
.end:
ret
sysfn_getfreemem:
mov eax,[MEM_FreeSpace]
shl eax,2

View File

@ -11,15 +11,15 @@
;******************************************************************************
use32
org 0x0
org 0x0
db 'MENUET01' ; 8 byte identifier
dd 0x01 ; header version
dd 0x01 ; header version
dd START ; pointer to program start
dd I_END ; size of image
dd 0x4000 ; reguired amount of memory
dd 0x4000 ; stack pointer (esp)
dd I_PARAM,0 ; parameters, reserved
include 'lang.inc'
; include 'lang.inc'
include 'macros.inc'
;******************************************************************************
@ -29,21 +29,14 @@ BBB equ 25
;******************************************************************************
apply_all:
mov eax,6 ; load saved settings from SETUP.DAT
mov ebx,filename
xor ecx,ecx
or edx,-1
mov esi,keyboard
int 0x40
call _midibase ;1
call _sound_dma ;10
call _pci_acc ;12
call _sb16 ;4
call _wssp ;6
call _sb16 ;4
call _wssp ;6
call _syslang ;5
call _keyboard ;2
call _mouse
call get_disk_info
cmp [cd],0
jne no_cd
@ -53,7 +46,7 @@ apply_all:
jne no_hd
call _lba_read ;11
call _hdbase ;7
call _f32p ;8
call _f32p ;8
no_hd:
ret
;-------------------------------------------------------------------------------
@ -68,7 +61,7 @@ get_disk_info:
mov al,[table_area+1]
shr al,6
cmp al,0
je ide_1
je ide_1
cmp al,01b
jnz ide_0_cd
mov [hdbase],1
@ -81,74 +74,74 @@ get_disk_info:
mov [cdbase],1
mov [cd],0
cmp [hd],0
je all_device
je all_device
ide_1:
mov al,[table_area+1]
shl al,2
shr al,6
cmp al,0
je ide_2
je ide_2
cmp al,01b
jnz ide_1_cd
cmp [hd],0
je ide_11
je ide_11
mov [hdbase],2
mov [hd],0
ide_11:
cmp [cd],0
je all_device
je all_device
jmp ide_2
ide_1_cd:
cmp al,10b
jnz ide_2
cmp [cd],0
je ide_11_cd
je ide_11_cd
mov [cdbase],2
mov [cd],0
ide_11_cd:
cmp [hd],0
je all_device
je all_device
ide_2:
mov al,[table_area+1]
shl al,4
shr al,6
cmp al,0
je ide_3
je ide_3
cmp al,01b
jnz ide_2_cd
cmp [hd],0
je ide_21
je ide_21
mov [hdbase],3
mov [hd],0
ide_21:
cmp [cd],0
je all_device
je all_device
jmp ide_3
ide_2_cd:
cmp al,10b
jnz ide_3
cmp [cd],0
je ide_21_cd
je ide_21_cd
mov [cdbase],3
mov [cd],0
ide_21_cd:
cmp [hd],0
je all_device
je all_device
ide_3:
mov al,[table_area+1]
shl al,6
shr al,6
cmp al,0
je not_device
je not_device
cmp al,01b
jnz ide_3_cd
cmp [hd],0
je ide_31
je ide_31
mov [hdbase],4
mov [hd],0
ide_31:
@ -159,7 +152,7 @@ get_disk_info:
cmp al,10b
jnz not_device
cmp [cd],0
je all_device
je all_device
mov [cdbase],4
mov [cd],0
@ -171,6 +164,7 @@ hd db 0
cd db 0
;******************************************************************************
apply_all_and_exit:
mcall 70,read_fileinfo
call apply_all
jmp close
@ -185,7 +179,7 @@ set_language_and_exit:
; xor eax,eax
;@@: mov [keyboard],eax
cmp eax,1
je russian
je russian
xor eax,eax
set_lang_now:
mov [keyboard],eax
@ -201,7 +195,7 @@ set_syslanguage_and_exit:
; mov ecx,9
int 0x40
cmp eax,4
jne temp ;@f
jne temp ;@f
xor eax,eax
;@@: inc eax
temp: inc eax
@ -250,29 +244,24 @@ get_other:
mov [lba_read],eax
mcall 26,12
mov [pci_acc],eax
mcall 18,19,0
mov [mouse_speed],eax
ret
;******************************************************************************
START:
cmp [I_PARAM], 'SLAN'
je set_syslanguage_and_exit
je set_syslanguage_and_exit
cmp [I_PARAM], 'LANG'
je set_language_and_exit
; mov eax,6 ; load saved settings from SETUP.DAT
; mov ebx,filename
; xor ecx,ecx
; or edx,-1
; mov esi,keyboard
; int 0x40
je set_language_and_exit
cmp [I_PARAM], 'BOOT'
je apply_all_and_exit
je apply_all_and_exit
call loadtxt
call get_setup_values
call loadtxt
red:
call draw_window
@ -280,36 +269,36 @@ still:
cmp word [blinkpar],0
jne blinker
mov eax,29 ;get system date
mov eax,29 ;get system date
int 0x40
cmp eax,[date]
je gettime
je gettime
mov [date],eax
gettime:
mov eax,3 ;get system time
mov eax,3 ;get system time
int 0x40
cmp ax,[time]
je sysevent
je sysevent
mov [time],ax
call drawtime
sysevent:
mov eax,23
mov ebx,8 ; wait here for event with timeout
mov ebx,8 ; wait here for event with timeout
int 0x40
cmp eax,1
jz red
jz red
cmp eax,2
jz key
jz key
cmp eax,3
jz button
jz button
jmp still
blinker:
cmp byte [count],6
jb noblink
jb noblink
btc dword [blinkpar],16
mov byte [count],0
call drawtime
@ -319,19 +308,19 @@ still:
incdectime:
cmp byte [blinkpar],0
je still
je still
mov esi,time
mov bl,0x23 ;border
cmp byte [blinkpar],1
je hours
je hours
mov bl,0x59 ;minutes
inc esi
hours:
mov al,byte [esi]
cmp ah,112
je dectime
je dectime
cmp al,bl
je noinctime
je noinctime
inc al
daa
jmp incdectime1
@ -342,7 +331,7 @@ incdectime:
jmp still
dectime:
cmp al,0
je nodectime
je nodectime
dec al
das
jmp incdectime1
@ -352,12 +341,12 @@ incdectime:
incdecdate:
cmp byte [blinkpar+1],0
je still
je still
mov esi,date
mov bl,0 ;border of years
cmp byte [blinkpar+1],1
jne days
mov bl,0x12 ;months
mov bl,0x12 ;months
inc esi
days:
cmp byte [blinkpar+1],2
@ -367,9 +356,9 @@ incdecdate:
nodays:
mov al,byte [esi]
cmp ah,122
je decdate
je decdate
cmp al,bl
je noincdate
je noincdate
inc al ;add al,1
daa
jmp incdecdate1
@ -380,7 +369,7 @@ incdecdate:
jmp still
decdate:
cmp al,1
je nodecdate
je nodecdate
dec al
das
jmp incdecdate1
@ -404,13 +393,13 @@ incdecdate:
int 0x40
cmp ah,112
je incdectime
je incdectime
cmp ah,113
je incdectime
je incdectime
cmp ah,122
je incdecdate
je incdecdate
cmp ah,123
je incdecdate
je incdecdate
cmp ah,111
jne noseltime
mov al, [blinkpar]
@ -441,12 +430,7 @@ noseltime:
noseldate:
cmp ah,99
jne nosaveall
mov eax,33
mov ebx,filename
mov ecx,keyboard
mov edx,48
xor esi,esi
int 0x40
mcall 70,save_fileinfo
call settime
mov dword [blinkpar],0
call drawtime
@ -458,14 +442,14 @@ nosaveall:
jmp still
no_apply_all:
cmp ah,1 ; CLOSE APPLICATION
cmp ah,1 ; CLOSE APPLICATION
jne no_close
close:
or eax,-1
or eax,-1
int 0x40
no_close:
cmp ah,11 ; SET MIDI BASE
cmp ah,11 ; SET MIDI BASE
jnz nosetbase1
call _midibase
nosetbase1:
@ -481,11 +465,11 @@ close:
nomp:
cmp ah,4 ; SET KEYBOARD
cmp ah,4 ; SET KEYBOARD
jnz nokm
mov eax,[keyboard]
test eax,eax
je downuplbl
je downuplbl
dec eax
jmp nodownup
downuplbl:
@ -498,7 +482,7 @@ close:
jnz nokp
mov eax,[keyboard]
cmp eax,4
je updownlbl
je updownlbl
inc eax
jmp noupdown
updownlbl:
@ -509,7 +493,7 @@ close:
nokp:
cmp ah,22 ; SET CD BASE
cmp ah,22 ; SET CD BASE
jnz nocm
mov eax,[cdbase]
sub eax,2
@ -531,7 +515,7 @@ close:
call _cdbase
nocs:
cmp ah,62 ; SET HD BASE
cmp ah,62 ; SET HD BASE
jnz hnocm
mov eax,[hdbase]
sub eax,2
@ -553,7 +537,7 @@ close:
call _hdbase
hnocs:
cmp ah,82 ; SET SOUND DMA
cmp ah,82 ; SET SOUND DMA
jne no_sdma_d
mov eax,[sound_dma]
dec eax
@ -575,7 +559,7 @@ close:
jmp still
no_set_sound_dma:
cmp ah,92 ; SET LBA READ
cmp ah,92 ; SET LBA READ
jne no_lba_d
slbal:
btc [lba_read],0
@ -593,7 +577,7 @@ close:
no_set_lba_read:
cmp ah,102 ; SET PCI ACCESS
cmp ah,102 ; SET PCI ACCESS
jne no_pci_d
pcip:
btc [pci_acc],0
@ -612,13 +596,13 @@ close:
set_partition:
cmp ah,72 ; SET FAT32 PARTITION
cmp ah,72 ; SET FAT32 PARTITION
jnz .nominus
mov eax,[f32p]
sub eax,2
; and eax,15 ; 3 - four partitions, 7 - eight p., 15 - sixteen, etc.
cmp eax,15
jb @f
jb @f
mov eax,14
@@:
inc eax
@ -630,7 +614,7 @@ close:
mov eax,[f32p]
; and eax,15 ; 3 - four partitions, 7 - eight p., 15 - sixteen, etc.
cmp eax,15
jb @f
jb @f
mov eax,0
@@:
inc eax
@ -642,7 +626,7 @@ close:
call _f32p
.noapply:
cmp ah,32 ; SET SOUND BLASTER 16 BASE
cmp ah,32 ; SET SOUND BLASTER 16 BASE
jnz nosbm
sub [sb16],2
call draw_infotext
@ -657,7 +641,7 @@ close:
call _sb16
nosbs:
cmp ah,52 ; SET WINDOWS SOUND SYSTEM BASE
cmp ah,52 ; SET WINDOWS SOUND SYSTEM BASE
jnz nowssm
mov eax,[wss]
sub eax,2
@ -679,11 +663,11 @@ close:
call _wssp
nowsss:
cmp ah,42 ; SET SYSTEM LANGUAGE BASE
cmp ah,42 ; SET SYSTEM LANGUAGE BASE
jnz nosysm
mov eax,[syslang]
dec eax
jz still
jz still
mov [syslang],eax
call draw_infotext
nosysm:
@ -691,7 +675,7 @@ close:
jnz nosysp
mov eax,[syslang]
cmp eax,4
je nosysp
je nosysp
inc eax
mov [syslang],eax
call draw_infotext
@ -704,8 +688,34 @@ close:
call draw_window
call drawtime
nosyss:
cmp ah,3 ; SET KEYMAP
cmp ah,132 ; SET MOUSE SPEED
jnz .nominus
mov eax,[mouse_speed]
sub eax,2
cmp eax,9
jb @f
mov eax,8
@@:
inc eax
mov [mouse_speed],eax
call draw_infotext
.nominus:
cmp ah,133
jnz .noplus
mov eax,[mouse_speed]
cmp eax,9
jb @f
mov eax,0
@@:
inc eax
mov [mouse_speed],eax
call draw_infotext
.noplus:
cmp ah,131
jnz .noapply
call _mouse
.noapply:
cmp ah,3 ; SET KEYMAP
jne still
call _keyboard
jmp still
@ -779,7 +789,7 @@ close:
mov edx,4
int 0x40
nosetkeylru:
cmp [keyboard],4 ;french
cmp [keyboard],4 ;french
jnz nosetkeylfr
mov eax,21
mov ebx,2
@ -847,12 +857,12 @@ draw_window:
mov ebx,1
int 0x40
xor eax,eax ; DRAW WINDOW
xor eax,eax ; DRAW WINDOW
mov ebx,40*65536+355+BBB
mov ecx,40*65536+300
mov edx,0x82111199
mov esi,0x805588dd
mov edi,0x005588dd
mov ecx,40*65536+310
mov edx,0x83111199
; mov esi,0x805588dd
; mov edi,0x005588dd
int 0x40
mov eax,4
@ -860,24 +870,26 @@ draw_window:
mov ecx,0x10ffffff
mov edx,labelt
cmp [syslang],4
je ruslabel
je ruslabel
add edx,20
ruslabel:
mov esi,26
mov esi,19 ;26
int 0x40
mov eax,8 ; CLOSE BUTTON
mov ebx,(355+BBB-19)*65536+12
mov ecx,5*65536+12
mov edx,1
; mov eax,8 ; CLOSE BUTTON
; mov ebx,(355+BBB-19)*65536+12
; mov ecx,5*65536+12
; mov edx,1
; mov esi,0x005588dd
; int 0x40
mov eax,8 ; APPLY ALL
mov ebx,(350-79)*65536+100
mov ecx,266*65536+12
mov edx,100
mov esi,0x005588dd
int 0x40
; APPLY ALL
mov ebx,(350-79)*65536+100
mov ecx,251*65536+12
mov edx,100
int 0x40
add ecx,16*65536 ; SAVE ALL
add ecx,16*65536 ; SAVE ALL
dec edx
int 0x40
@ -935,6 +947,10 @@ draw_window:
mov ecx,43+24*8 ; 24
call draw_buttons
mov edx,131
mov ecx,43+26*8 ; 26
call draw_buttons
call draw_infotext
mov eax,12
@ -950,7 +966,7 @@ draw_infotext:
pusha
mov eax,[keyboard] ; KEYBOARD
mov eax,[keyboard] ; KEYBOARD
test eax,eax
jnz noen
mov [text00+LLL*10+28],dword 'ENGL'
@ -978,7 +994,7 @@ draw_infotext:
nofr:
mov eax,[syslang] ; SYSTEM LANGUAGE
mov eax,[syslang] ; SYSTEM LANGUAGE
dec eax
test eax,eax
jnz noen5
@ -1009,15 +1025,15 @@ draw_infotext:
mov eax,[midibase]
mov esi,text00+LLL*0+32
call hexconvert ; MIDI BASE
call hexconvert ; MIDI BASE
mov eax,[sb16] ; SB16 BASE
mov eax,[sb16] ; SB16 BASE
mov esi,text00+LLL*2+32
call hexconvert
mov eax,[wss] ; WSS BASE
mov eax,[wss] ; WSS BASE
cmp eax,1
jnz nowss1
mov [wssp],dword 0x530
@ -1039,7 +1055,7 @@ draw_infotext:
mov esi,text00+LLL*12+32
call hexconvert
mov eax,[cdbase] ; CD BASE
mov eax,[cdbase] ; CD BASE
cmp eax,1
jnz noe1
mov [text00+LLL*4+28],dword 'PRI.'
@ -1066,7 +1082,7 @@ draw_infotext:
nog2:
mov eax,[hdbase] ; HD BASE
mov eax,[hdbase] ; HD BASE
cmp eax,1
jnz hnoe1
mov [text00+LLL*6+28],dword 'PRI.'
@ -1093,25 +1109,29 @@ draw_infotext:
hnog2:
mov eax,[f32p] ; FAT32 PARTITION
mov eax,[f32p] ; FAT32 PARTITION
add al,48
mov [text00+LLL*14+28],al
mov eax,[sound_dma] ; SOUND DMA
mov eax,[sound_dma] ; SOUND DMA
add eax,48
mov [text00+LLL*16+28],al
mov eax,[lba_read]
call onoff ; LBA READ
call onoff ; LBA READ
mov [text00+LLL*18+28],ebx
mov eax,[pci_acc]
call onoff ; PCI ACCESS
call onoff ; PCI ACCESS
mov [text00+LLL*20+28],ebx
mov eax,[mouse_speed] ; MOUSE ACSELERATION
add al,48
mov [text00+LLL*26+28],al
mov eax,13
mov ebx,175*65536+85
mov ecx,40*65536+205
mov ecx,40*65536+225
mov edx,0x80111199-19
int 0x40
@ -1131,31 +1151,31 @@ draw_infotext:
ret
drawtime:
mov ax,[time] ;hours 22
mov ax,[time] ;hours 22
mov cl,1
call unpacktime
mov [text00+LLL*22+28],word bx
mov al,ah ;minutes
mov al,ah ;minutes
inc cl
call unpacktime
mov [text00+LLL*22+31],word bx
mov eax,[date]
mov ch,3
call unpackdate
mov [text00+LLL*24+34],word bx ;year 24
mov [text00+LLL*24+34],word bx ;year 24
mov al,ah
mov ch,1
call unpackdate
mov [text00+LLL*24+28],word bx ;month
mov [text00+LLL*24+28],word bx ;month
bswap eax
mov al,ah
inc ch
call unpackdate
mov [text00+LLL*24+31],word bx ;day
mov [text00+LLL*24+31],word bx ;day
mov eax,13
mov ebx,175*65536+85
mov ecx,40*65536+205
mov ecx,40*65536+225
mov edx,0x80111199-19
int 0x40
@ -1173,7 +1193,7 @@ draw_infotext:
ret
unpacktime:
cmp byte [blinkpar],cl ;translate packed number to ascii
cmp byte [blinkpar],cl ;translate packed number to ascii
jne unpack1
chkblink:
bt dword [blinkpar],16
@ -1182,7 +1202,7 @@ draw_infotext:
ret
unpackdate:
cmp byte [blinkpar+1],ch
je chkblink
je chkblink
unpack1:
xor bx,bx
mov bh,al
@ -1192,7 +1212,7 @@ draw_infotext:
add bx,0x3030
ret
hexconvert: ;converting dec to hex in ascii
hexconvert: ;converting dec to hex in ascii
xor ebx,ebx
mov bl,al
and bl,15
@ -1222,13 +1242,13 @@ onoff:
jne norus1
mov ebx,'„€ '
cmp eax,1
je exitsub
je exitsub
mov ebx,'<27> '
ret
norus1:
mov ebx,'ON '
cmp eax,1
je exitsub
je exitsub
mov ebx,'OFF '
exitsub:
ret
@ -1303,10 +1323,18 @@ _syslang:
int 0x40
ret
_mouse:
mov eax,18
mov ebx,19
mov ecx,1
mov edx,[mouse_speed]
int 0x40
ret
loadtxt:
cld
mov edi,text00
mov ecx,428
mov ecx,458 ;28
cmp [syslang],4
jne norus
mov esi,textrus
@ -1330,31 +1358,31 @@ settime:
mov dx,0x70
call startstopclk
dec dx
mov al,2 ;set minutes
mov al,2 ;set minutes
out dx,al
inc dx
mov al,byte [time+1]
out dx,al
dec dx
mov al,4 ;set hours
mov al,4 ;set hours
out dx,al
inc dx
mov al,byte [time]
out dx,al
dec dx
mov al,7 ;set day
mov al,7 ;set day
out dx,al
inc dx
mov al,byte [date+2]
out dx,al
dec dx
mov al,8 ;set month
mov al,8 ;set month
out dx,al
inc dx
mov al,byte [date+1]
out dx,al
dec dx
mov al,9 ;set year
mov al,9 ;set year
out dx,al
inc dx
mov al,byte [date]
@ -1367,18 +1395,16 @@ startstopclk:
mov al,0x0b
out dx,al
inc dx
in al,dx
in al,dx
btc ax,7
out dx,al
ret
; DATA AREA
count: db 0x0
count: db 0x0
blinkpar: dd 0x0
time: dw 0x0
date: dd 0x0
filename: db 'SETUP DAT',0
time: dw 0x0
date: dd 0x0
textrus:
@ -1408,8 +1434,10 @@ textrus:
db ' '
db '‘¨á⥬­ ï ¤ â  (¬,¤,£) : 00/00/00 - + ‚ë¡®à '
db ' '
db '‘ª®à®áâì ªãàá®à  ¬ëè¨ : 1 - + <20>ਬ¥­¨âì'
db ' '
db '<>ˆŒ€<C592>ˆ…: <20>ਬ¥­¨âì ¢á¥ '
db 'ˆ<CB86>Žœ‡“‰… „Ž<E28099> Š FAT-32 ŽŽ<E28099>Ž†<C5BD>Ž! '
db 'ˆ<CB86>Žœ‡“‰… „Ž<E28099> Š FAT ŽŽ<E28099>Ž†<C5BD>Žœž! '
db '<27>… ‡€<E280A1>“„œŽ•<C5BD><EFBFBD>ˆœ <20><E28098>Ž‰Šˆ ‘®åà ­¨âì ¢á¥ '
db 'x'
@ -1441,15 +1469,17 @@ texteng:
db ' '
db 'SYSTEM DATE (M,D,Y) : 00/00/00 - + SELECT '
db ' '
db 'Mouse pointer speed : 1 - + APPLY '
db ' '
db 'NOTE: APPLY ALL '
db 'TEST FAT32 FUNCTIONS WITH EXTREME CARE '
db 'TEST FAT FUNCTIONS WITH EXTREME CARE '
db 'SAVE YOUR SETTINGS BEFORE QUIT MENUET SAVE ALL '
db 'x'
labelt:
db '<27><E28098>Ž‰Š€ “<E28098>Ž‰ MENUET DEVICE SETUP '
db '<27><E28098>Ž‰Š€ “<E28098>Ž‰ DEVICE SETUP '
hex db '0123456789ABCDEF'
hex db '0123456789ABCDEF'
alt_general:
@ -1628,21 +1658,38 @@ ru_keymap_shift:
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
read_fileinfo:
dd 0
dd 0
dd 0
dd 52
dd keyboard
db 0
dd file_name
save_fileinfo:
dd 2
dd 0
dd 0
dd 52
dd keyboard
file_name: db '/rd/1/setup.dat',0
I_PARAM dd 0
keyboard dd 0x0
midibase dd 0x320
cdbase dd 0x2
sb16 dd 0x220
syslang dd 0x1
wss dd 0x1
wssp dd 0x0
hdbase dd 0x1
f32p dd 0x1
sound_dma dd 0x1
lba_read dd 0x1
pci_acc dd 0x1
keyboard dd 0x0
midibase dd 0x320
cdbase dd 0x2
sb16 dd 0x220
syslang dd 0x1
wss dd 0x1
wssp dd 0x0
hdbase dd 0x1
f32p dd 0x1
sound_dma dd 0x1
lba_read dd 0x1
pci_acc dd 0x1
mouse_speed dd 0x3
text00:
I_END: