Setup: deleted keyboard layout option, added font height option.

git-svn-id: svn://kolibrios.org@5874 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
pathoswithin 2015-11-02 14:48:38 +00:00
parent 3ead4c900f
commit f99b56f461
2 changed files with 48 additions and 297 deletions

View File

@ -1,194 +0,0 @@
alt_general:
en_keymap:
db '6',27
db '1234567890-=',8,9
db 'qwertyuiop[]',13
db '~asdfghjkl;',39,96,0,'\zxcvbnm,./',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB<D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQR'
en_keymap_shift:
db '6',27
db '!@#$%^&*()_+',8,9
db 'QWERTYUIOP{}',13
db '~ASDFGHJKL:"~',0,'|ZXCVBNM<>?',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB>D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQR'
fr_keymap:
db '6',27
db '&Ž"',39,'(-<2D>_“<5F>)=',8,9
db 'azertyuiop',136,'$',13
db '~qsdfghjklm',0,0,'*wxcvbn,;:!',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB<D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQR'
fr_keymap_shift:
db '6',27
db '1234567890+',8,9
db 'AZERTYUIOP•”',13
db '~QSDFGHJKLM%',0,'WXCVBN?./',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB>D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQR'
fr_keymap_alt_gr:
db '6',27
db 28,'~#{[|˜\^@]}',8,9
db 'azertyuiop^$',13
db '~qsdfghjklm',0,0,'*wxcvbn,;:!',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB<D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQR'
fi_keymap:
db '6',27
db '1234567890+[',8,9
db 'qwertyuiop',192,'~',13
db '~asdfghjkl',194,193,'1',0,39,'zxcvbnm,.-',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB<D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQR'
fi_keymap_shift:
db '6',27
db '!"#<23>%&/()=?]',8,9
db 'QWERTYUIOP',200,'~',13
db '~ASDFGHJKL',202,201,'1',0,'*ZXCVBNM;:_',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB>D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQR'
ge_keymap:
db '6',27
db '1234567890?[',8,9
db 'qwertzuiop',203,'~',13
db '~asdfghjkl',194,193,'1',0,39,'yxcvbnm,.-',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB<D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQR'
ge_keymap_shift:
db '6',27
db '!"#$%&/()=',197,']',8,9
db 'QWERTZUIOP',195,'~',13
db '~ASDFGHJKL',202,201,'1',0,'*YXCVBNM;:_',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB>D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQR'
ru_keymap:
db '6',27
db '1234567890-=',8,9
db '©æ㪥­£èé§åê',13
db 0,"ä뢠¯à®«¤¦í"
db 0xf1, '-/'
db "ïçᬨâì¡î",'.-','45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB<D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQR'
ru_keymap_shift:
db '6',27
db '!"N;%:?*()_+',8,0
db "“Š…<EFBFBD>ƒ˜™‡•š",13
db 0,"<EFBFBD><EFBFBD>Ž„†<EFBFBD>"
db 0xf0, '-\'
db "Ÿ—Œˆœ<EFBFBD>ž",',-','45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB>D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQR'
et_keymap:
db '6',27
db '1234567890+´',8,9
db 'qwertyuiopüõ',13
db '~asdfghjklöä','1',0,39,'zxcvbnm,.-',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB<D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQR'
et_keymap_shift:
db '6',27
db '!"#¤%&/()=?`',8,9
db 'QWERTYUIOPÜÕ',13
db '~ASDFGHJKLÖÄ','1',0,'*ZXCVBNM;:_',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB>D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQR'
be_keymap:
db '6',27
db '&é"',39,'(§è!çà)-',8,9
db 'azertyuiop',136,'$',13
db '~qsdfghjklmù²',0,'µwxcvbn,;:=',0,'45 '
db '@2345-7+90123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB<D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQR'
be_keymap_shift:
db '6',27
db '1234567890°_',8,9
db 'AZERTYUIOP¨*',13
db '~QSDFGHJKLM%³',0,'£WXCVBN?./+',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB>D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQR'
be_keymap_alt_gr:
db '6',27
db '|@#',0,0,'^',0,0,'{}',0,0,8,9
db 'az€rtyuiop[]',13
db '~qsdfghjklm´',0,0,'`wxcvbn',0,0,0,'~',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB\D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQR'
it_keymap:
db '6',27
db '1234567890',39,0,8,9
db 'qwertyuiop',0,'+',13
db '~asdfghjkl',0,0,0,0,'<zxcvbnm,.-',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB<D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQR'
it_keymap_shift:
db '6',27
db '!"',0,'$%&/()=?^',8,9
db 'QWERTYUIOP',0,'*',13
db '~ASDFGHJKL',0,0,0,0,'>ZXCVBNM;:_',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB>D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQR'
it_keymap_alt_gr:
db '6',27
db 172,185,178,179,188,189,172,'{[]}',96,'~',8,9
db 'qwertyuiop[]',13
db '~asdfghjkl@#',0,'<zxcvbnm;:_',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB<D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQR'

View File

@ -25,30 +25,15 @@ BootSettings:
invoke ini.get_str, sz_ini, sz_system, sz_language, param, 2, 0
mov ax, [param]
or ax, 0x2020 ; convert to lowercase
mov ecx,8
mov ecx,10
mov edi,langMarks
repnz scasw
jnz @f
neg ecx
add ecx,8
add ecx,10
mcall 21,5
@@:
; Set keyboard layout
mov word[param],0
invoke ini.get_str, sz_ini, sz_system, sz_keyboard, param, 2, 0
mov ax, [param]
or ax, 0x2020
mov ecx,8
mov edi,langMarks
repnz scasw
jnz @f
neg ecx
add ecx,7
mov [keyboard],ecx
call _keyboard
@@:
; Set font smoothing
mov dword[param],0
invoke ini.get_str, sz_ini, sz_system, sz_fontSmooth, param, 4, 0
@ -81,6 +66,11 @@ BootSettings:
call _speaker_mute
.skipSpeaker:
; Set font size
invoke ini.get_int, sz_ini, sz_system, sz_fontSize, 9
mov ecx,eax
mcall 48,12
; Set mouse speed
invoke ini.get_int, sz_ini, sz_mouse, sz_speed, 1
mov edx,eax
@ -131,11 +121,8 @@ START:
cmp [param],dword 'BOOT'
jz BootSettings
pop eax
; get current settings
mcall 26,2,9
dec eax
mov [keyboard],eax
; get current settings
mcall 26,5
dec eax
mov [syslang],eax
@ -152,6 +139,9 @@ START:
mcall 48,9
mov [fontSmoothing],eax
mcall 48,11
mov [fontSize],eax
call loadtxt
draw_infotext:
@ -161,12 +151,6 @@ draw_infotext:
add edi,28
movsd
movsd
mov eax,[keyboard]
add edi,LLL-8
lea esi,[eax*8+langs]
movsd
movsd
add edi,LLL-8
mov eax,[lba_read]
@ -192,6 +176,12 @@ draw_infotext:
mov [edi+LLL*3],ebx
mov [edi+LLL*3+4],ecx
mov eax,[fontSize]
mov bl, 10
div bl
add ax, '00'
mov [edi+LLL*4],ax
draw_window:
mcall 12,1
mov ecx,50*65536+32*(4+stringsAmount)
@ -272,26 +262,15 @@ close:
language1:
dec [syslang]
jns @f
mov [syslang],7
mov [syslang],9
jmp @f
language2:
inc [syslang]
cmp [syslang],8
jnz @f
cmp [syslang],10
jc @f
mov [syslang],0
@@:
jmp loadtxt
layout1:
dec [keyboard]
jns @f
mov [keyboard],7
ret
layout2:
inc [keyboard]
cmp [keyboard],8
jnz @f
mov [keyboard],0
ret
LBA1:
btr [lba_read],0
ret
@ -319,16 +298,22 @@ font2:
cmp [fontSmoothing],2
jz @f
inc [fontSmoothing]
ret
fontSize1:
cmp [fontSize],10
jc @f
dec [fontSize]
@@:
ret
fontSize2:
inc [fontSize]
ret
apply_all:
call fontApply
call _syslang
call _lba_read
call _pci_acc
call _speaker_mute
call _keyboard
ret
call fontApply
call fontSizeApply
_syslang:
mov ecx,[syslang]
inc ecx
@ -343,26 +328,16 @@ _pci_acc:
fontApply:
mcall 48,10,[fontSmoothing]
ret
fontSizeApply:
mcall 48,12,[fontSize]
ret
_speaker_mute:
mcall 18,8,1
cmp [speaker_mute],eax
je @b
jz @f
inc ecx
mcall 18
_keyboard:
mov ebp,[keyboard]
mov edx,[ebp*4+keymapTab]
mcall 21,2,1
inc ecx
mov edx,[ebp*4+shiftKeymapTab]
mcall 21
inc ecx
mov edx,[ebp*4+altKeymapTab]
mcall 21
mov edx,ebp
inc edx
mov cl, 9
mcall 21
@@:
ret
;---------------------------------------------------------------
loadtxt:
@ -410,11 +385,8 @@ saveAll:
mov [param],eax
invoke ini.set_str, sz_ini, sz_system, sz_language, param, 2
; keyboard layout
mov eax,[keyboard]
mov ax, [eax*2+langMarks]
mov [param],eax
invoke ini.set_str, sz_ini, sz_system, sz_keyboard, param, 2
; font size
invoke ini.set_int, sz_ini, sz_system, sz_fontSize, [fontSize]
; font smoothing
mov dword[param],'off'
@ -460,9 +432,6 @@ buttonTab: ; button handler pointers: -,+,apply
dd language1
dd language2
dd _syslang
dd layout1
dd layout2
dd _keyboard
dd LBA1
dd LBA2
dd _lba_read
@ -475,40 +444,16 @@ buttonTab: ; button handler pointers: -,+,apply
dd font1
dd font2
dd fontApply
keymapTab:
dd en_keymap
dd fi_keymap
dd ge_keymap
dd ru_keymap
dd fr_keymap
dd et_keymap
dd be_keymap
dd it_keymap
shiftKeymapTab:
dd en_keymap_shift
dd fi_keymap_shift
dd ge_keymap_shift
dd ru_keymap_shift
dd fr_keymap_shift
dd et_keymap_shift
dd be_keymap_shift
dd it_keymap_shift
altKeymapTab:
dd alt_general
dd alt_general
dd alt_general
dd alt_general
dd fr_keymap_alt_gr
dd alt_general
dd be_keymap_alt_gr
dd it_keymap_alt_gr
dd fontSize1
dd fontSize2
dd fontSizeApply
syslang dd 0
keyboard dd 0
lba_read dd 0
pci_acc dd 0
speaker_mute dd 0
fontSmoothing dd 0
fontSize dd 0
@IMPORT:
library libini, 'libini.obj'
@ -523,7 +468,7 @@ sz_ini db "/sys/settings/system.ini",0
sz_system db "system",0
sz_language db "language",0
sz_keyboard db "keyboard",0
sz_fontSize db "font height",0
sz_fontSmooth db "font smoothing",0
sz_speaker db "speaker mute",0
@ -541,44 +486,44 @@ stringsAmount = 6
align 4
text dd 0
langs:
db 'ENGLISH FINNISH GERMAN RUSSIAN FRENCH ESTONIANBELGIAN ITALIAN '
db 'ENGLISH FINNISH GERMAN RUSSIAN FRENCH '
db 'ESTONIANUKRAINE ITALIAN BELGIAN SPANISH '
langMarks:
db 'enfiderufretesit'
db 'enfiderufretukitbesp'
textrus:
db 'Ÿ§ëª á¨á⥬ë : < > <20>ਬ¥­¨âì'
db '<27> áª« ¤ª  ª« ¢¨ âãàë : < > <20>ਬ¥­¨âì'
db '‚ª«îç¨âì LBA : - + <20>ਬ¥­¨âì'
db '„®áâ㯠ª 設¥ PCI : - + <20>ਬ¥­¨âì'
db '‚몫îç¨âì SPEAKER : - + <20>ਬ¥­¨âì'
db '‘£« ¦¨¢ ­¨¥ èà¨ä⮢ : - + <20>ਬ¥­¨âì'
db '‚ëá®â  èà¨ä⮢ : - + <20>ਬ¥­¨âì'
db '<>ˆŒ€<C592>ˆ…: <20>ਬ¥­¨âì ¢á¥'
db '<27>… ‡€<E280A1>“„œŽ•<C5BD><EFBFBD>ˆœ <20><E28098>Ž‰Šˆ ‘®åà ­¨âì ¢á¥'
texteng:
db 'System language : < > Apply '
db 'Keyboard layout : < > Apply '
db 'Allow LBA access : - + Apply '
db 'Allow PCI access : - + Apply '
db 'Disable SPEAKER : - + Apply '
db 'Font smoothing : - + Apply '
db 'Font height : - + Apply '
db 'NOTE: Apply all '
db 'SAVE YOUR SETTINGS BEFORE QUITING KOLIBRI Save all '
textet:
db 'Süsteemi keel : < > Kinnita '
db 'Klaviatuuri paigutus : < > Kinnita '
db 'LBA lugemine lubatud : - + Kinnita '
db 'PCI juurdepääs programm. : - + Kinnita '
db 'Disable SPEAKER : - + Kinnita '
db 'Font smoothing : - + Kinnita '
db 'Font height : - + Kinnita '
db 'MÄRKUS: Kinnita kõik '
db 'SALVESTA SEADED ENNE KOLIBRIST VÄLJUMIST Salvesta kõik'
include 'keymaps.inc'
IM_END:
param:
rb 1024