italian version

git-svn-id: svn://kolibrios.org@3612 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
fedesco 2013-06-06 16:10:22 +00:00
parent 5f85d6b8f5
commit d4aab4d5c2
2 changed files with 487 additions and 442 deletions

View File

@ -7,6 +7,7 @@
; ;
include '..\..\..\macros.inc' include '..\..\..\macros.inc'
include 'lang.inc'
memsize = 1000h memsize = 1000h
org 0 org 0
@ -14,7 +15,7 @@ PARAMS = memsize - 1024
appname equ 'Kolibri Bus Disconnect' appname equ 'Kolibri Bus Disconnect'
version equ ' 1.1 ' version equ ' 1.1 '
use32 ; ¢ª«îç¨âì 32-¡¨â­ë© ०¨¬  áᥬ¡«¥à  use32 ; ¢ª«îç¨âì 32-¡¨â­ë© ०¨¬  áᥬ¡«¥à 
db 'MENUET01' ; 8 byte id db 'MENUET01' ; 8 byte id
@ -38,441 +39,448 @@ START:
no_params: no_params:
call find_north_bridg call find_north_bridg
drawwindow: drawwindow:
mov eax,48 mov eax,48
mov ebx,3 mov ebx,3
mov ecx,sc mov ecx,sc
mov edx,sizeof.system_colors mov edx,sizeof.system_colors
mcall mcall
mov eax, 12 mov eax, 12
mov ebx, 1 ; start redraw mov ebx, 1 ; start redraw
mcall mcall
mov eax, 0 ; window mov eax, 0 ; window
mov ebx, 100 shl 16 + 300 mov ebx, 100 shl 16 + 300
mov ecx, 100 shl 16 + 90 mov ecx, 100 shl 16 + 90
mov edx, [sc.work] mov edx, [sc.work]
or edx, 0x13000000 or edx, 0x13000000
mov edi, title mov edi, title
mcall mcall
mov eax, 4 mov eax, 4
mov ebx, 17 shl 16 + 30 mov ebx, 17 shl 16 + 30
mov ecx, [sc.work_text] mov ecx, [sc.work_text]
mov edx, msg_nb mov edx, msg_nb
mov esi, 14 mov esi, msg_nb.length
mcall mcall
mov ebx, 105 shl 16 + 30
mov edx, [nb_name]
movzx esi, byte[edx]
inc edx
mcall
mov ebx, 17 shl 16 + 40
mov edx, msg_stat
mov esi, 8
mcall
mov ebx, 102 shl 16 + 50
mov edx, msg_divs
mov esi, 32
mcall
mov ebx, 17 shl 16 + 62
mov edx, msg_hdd
mov esi, 10
mcall
mov ebx, 17 shl 16 + 72
mov edx, msg_sgd
mcall
call get_divs
mov eax, 47
mov ebx, 0x30000
mov ecx, [val_hdd]
mov edx, 8
shl edx, cl
mov ecx, edx
mov edx, 80 shl 16 + 62
mov esi, [sc.work_text]
mcall
mov ecx, [val_sgd]
mov edx, 8
shl edx, cl
mov ecx, edx
mov edx, 80 shl 16 + 72
mcall
mov ebx, 105 shl 16 + 30
call get_bd_stat mov edx, [nb_name]
mov ecx, [sc.work_text] movzx esi, byte[edx]
mov esi, 9 inc edx
mov ebx, 105 shl 16 + 40 mcall
mov edx, msg_nf
mov al, [bd_stat]
test al, al
jz @f
mov edx, msg_dis
dec al
jz @f
mov edx, msg_en
@@: mov eax, 4
mcall
; ‘®§¤ ñ¬ ª­®¯ªã mov ebx, 17 shl 16 + 40
mov ecx, 27 shl 16 + 20 mov edx, msg_stat
mov eax, 8 mov esi, msg_stat.length
mov ebx, 220 shl 16 + 70 mcall
mov esi, [sc.work_button]
mov edx, 2
mcall
; ˆ ¥éñ 14 ;)
mov edi, 7
mov ecx, 60 shl 16 + 10
mov eax, 8
mov ebx, 105 shl 16 + 25
mov edx, 3
@@: mcall
inc edx
add ebx, 27 shl 16
dec edi
jnz @b
add ecx, 12 shl 16 mov ebx, 102 shl 16 + 50
mov ebx, 105 shl 16 + 25 mov edx, msg_divs
mov edi, 7 mov esi, msg_divs.length
@@: mcall mcall
inc edx mov ebx, 17 shl 16 + 62
add ebx, 27 shl 16 mov edx, msg_hdd
dec edi mov esi, msg_hdd.length
jnz @b mcall
mov ebx, 17 shl 16 + 72
end_dr: mov eax, 12 mov edx, msg_sgd
mov ebx, 2 ; end redraw mov esi, msg_sgd.length
mcall mcall
call get_divs
mov eax, 47
mov ebx, 0x30000
mov ecx, [val_hdd]
mov edx, 8
shl edx, cl
mov ecx, edx
mov edx, 80 shl 16 + 62
mov esi, [sc.work_text]
mcall
mov ecx, [val_sgd]
mov edx, 8
shl edx, cl
mov ecx, edx
mov edx, 80 shl 16 + 72
mcall
call get_bd_stat
mov ecx, [sc.work_text]
mov esi, msg_nf.length
mov ebx, 105 shl 16 + 40
mov edx, msg_nf
mov al, [bd_stat]
test al, al
jz @f
mov edx, msg_dis
dec al
jz @f
mov edx, msg_en
mov esi, msg_en.length
@@: mov eax, 4
mcall
; ‘®§¤ ñ¬ ª­®¯ªã
mov ecx, 27 shl 16 + 20
mov eax, 8
mov ebx, 220 shl 16 + 70
mov esi, [sc.work_button]
mov edx, 2
mcall
; ˆ ¥éñ 14 ;)
mov edi, 7
mov ecx, 60 shl 16 + 10
mov eax, 8
mov ebx, 105 shl 16 + 25
mov edx, 3
@@: mcall
inc edx
add ebx, 27 shl 16
dec edi
jnz @b
add ecx, 12 shl 16
mov ebx, 105 shl 16 + 25
mov edi, 7
@@: mcall
inc edx
add ebx, 27 shl 16
dec edi
jnz @b
end_dr: mov eax, 12
mov ebx, 2 ; end redraw
mcall
; Wait for event ... ; Wait for event ...
mov eax, 10 mov eax, 10
mcall mcall
cmp al, 3 cmp al, 3
jne not_bt jne not_bt
mov eax, 17 ; get id mov eax, 17 ; get id
mcall mcall
cmp ah, 1 cmp ah, 1
jne no_exit jne no_exit
mov eax, -1 ; close this program mov eax, -1 ; close this program
mcall mcall
no_exit: no_exit:
cmp ah, 2 cmp ah, 2
jne no_ch_bt jne no_ch_bt
mov dl, [bd_stat] mov dl, [bd_stat]
test dl, dl test dl, dl
jz drawwindow jz drawwindow
xor eax, eax xor eax, eax
dec dl dec dl
jnz @f jnz @f
inc eax inc eax
@@: call set_bd_stat @@: call set_bd_stat
jmp drawwindow jmp drawwindow
no_ch_bt: no_ch_bt:
cmp ah, 9 cmp ah, 9
jg no_hdd_bt jg no_hdd_bt
sub ah, 3 sub ah, 3
movzx esi, ah movzx esi, ah
mov edi, [val_sgd] mov edi, [val_sgd]
call set_divs call set_divs
jmp drawwindow jmp drawwindow
no_hdd_bt: no_hdd_bt:
sub ah, 10 sub ah, 10
movzx edi, ah movzx edi, ah
mov esi, [val_hdd] mov esi, [val_hdd]
call set_divs call set_divs
jmp drawwindow jmp drawwindow
not_bt: cmp al, 2 not_bt: cmp al, 2
jne drawwindow jne drawwindow
mov eax, 2 ; ¯®ª  ª« ¢  ­¥ ¯®¤¤¥à¦¨¢ ¥âáï - ç¨â ¥¬ ¨ § ¡ë¢ ¥¬ mov eax, 2 ; ¯®ª  ª« ¢  ­¥ ¯®¤¤¥à¦¨¢ ¥âáï - ç¨â ¥¬ ¨ § ¡ë¢ ¥¬
mcall mcall
jmp drawwindow jmp drawwindow
;-------------------------------------------------------------------------- ;--------------------------------------------------------------------------
bus_num: db 2 ; <20>®¬¥à 設ë bus_num: db 2 ; <20>®¬¥à 設ë
devfn: db 255 devfn: db 255
bd_id: dd 0 ; ˆ¤¥­â¨ä¨ª â®à ãáâனá⢠ bd_id: dd 0 ; ˆ¤¥­â¨ä¨ª â®à ãáâனá⢠
bd_stat: db 0 ; 0 - ­¥ ­ ©¤¥­, 1 - ¢ëª«î祭, 2 - ¢ª«î祭 bd_stat: db 0 ; 0 - ­¥ ­ ©¤¥­, 1 - ¢ëª«î祭, 2 - ¢ª«î祭
nb_name dd nb_nf nb_name dd nb_nf
bd_msk dd msk_i440 bd_msk dd msk_i440
nb_nf db 9, 'Not found' if lang eq it
msk_i440 db 0 ;nb_nf db 9, 'Non trovato'
nb_i440 db 4, 'i440' nb_nf db 11, 'Non trovato'
msk_nforce db 0x6D, 0x80, 0xE7, 0x06, 0 ; ­®¬¥à ॣ¨áâà , ¬ áª , ­®¬¥à ॣ¨áâà , ¬ áª , ... , 0 else
nb_nforce db 6, 'nForce' nb_nf db 9, 'Not found'
msk_nforce2 db 0x6F, 0x10, 0 end if
nb_nforce2 db 8, 'nForce 2' msk_i440 db 0
msk_sis730 db 0x6B, 0x01, 0 nb_i440 db 4, 'i440'
nb_sis730 db 7, 'SiS 730' msk_nforce db 0x6D, 0x80, 0xE7, 0x06, 0 ; ­®¬¥à ॣ¨áâà , ¬ áª , ­®¬¥à ॣ¨áâà , ¬ áª , ... , 0
nb_sis733 db 7, 'SiS 733' nb_nforce db 6, 'nForce'
msk_sis735 db 0x6A, 0x03, 0 msk_nforce2 db 0x6F, 0x10, 0
nb_sis735 db 7, 'SiS 735' nb_nforce2 db 8, 'nForce 2'
nb_sis740 db 7, 'SiS 740' msk_sis730 db 0x6B, 0x01, 0
nb_sis741 db 7, 'SiS 741' nb_sis730 db 7, 'SiS 730'
nb_sis745 db 7, 'SiS 745' nb_sis733 db 7, 'SiS 733'
msk_sis746 db 0x6C, 0x01, 0 msk_sis735 db 0x6A, 0x03, 0
nb_sis746 db 7, 'SiS 746' nb_sis735 db 7, 'SiS 735'
nb_sis748 db 7, 'SiS 748' nb_sis740 db 7, 'SiS 740'
msk_amd751 db 0x62, 0x06, 0 nb_sis741 db 7, 'SiS 741'
nb_amd751 db 7, 'AMD 751' nb_sis745 db 7, 'SiS 745'
nb_amd751s db 8, 'AMD 751S' msk_sis746 db 0x6C, 0x01, 0
nb_amd761 db 7, 'AMD 761' nb_sis746 db 7, 'SiS 746'
msk_amd762 db 0x62, 0x02, 0x6A, 0x02, 0 nb_sis748 db 7, 'SiS 748'
nb_amd762 db 7, 'AMD 762' msk_amd751 db 0x62, 0x06, 0
msk_viakt133 db 0x52, 0x80, 0x70, 0x08, 0 nb_amd751 db 7, 'AMD 751'
nb_viakt133 db 30, 'VIA KT133(A)/KM133/KL133/KN133' nb_amd751s db 8, 'AMD 751S'
nb_viakx133 db 9, 'VIA KX133' nb_amd761 db 7, 'AMD 761'
nb_viakle133 db 10, 'VIA KLE133' msk_amd762 db 0x62, 0x02, 0x6A, 0x02, 0
msk_viakt266 db 0x92, 0x80, 0x95, 0x02, 0x70, 0x08, 0 nb_amd762 db 7, 'AMD 762'
nb_viakt266 db 18, 'VIA KT266(A)/KT333' msk_viakt133 db 0x52, 0x80, 0x70, 0x08, 0
nb_viakm266 db 21, 'VIA KM266/KL266/KM333' nb_viakt133 db 30, 'VIA KT133(A)/KM133/KL133/KN133'
nb_viakn266 db 9, 'VIA KN266' nb_viakx133 db 9, 'VIA KX133'
msk_viakt400 db 0xD2, 0x80, 0xD5, 0x02, 0x70, 0x08, 0 nb_viakle133 db 10, 'VIA KLE133'
nb_viakt400 db 18, 'VIA KT400(A)/KT600' msk_viakt266 db 0x92, 0x80, 0x95, 0x02, 0x70, 0x08, 0
nb_viakm400 db 9, 'VIA KM400' nb_viakt266 db 18, 'VIA KT266(A)/KT333'
msk_viakt880 db 0x82, 0x80, 0x85, 0x02, 0 nb_viakm266 db 21, 'VIA KM266/KL266/KM333'
nb_viakt880 db 9, 'VIA KT880' nb_viakn266 db 9, 'VIA KN266'
msk_viakt400 db 0xD2, 0x80, 0xD5, 0x02, 0x70, 0x08, 0
nb_viakt400 db 18, 'VIA KT400(A)/KT600'
nb_viakm400 db 9, 'VIA KM400'
msk_viakt880 db 0x82, 0x80, 0x85, 0x02, 0
nb_viakt880 db 9, 'VIA KT880'
bd_table: dd 0x70061022 ; AMD 751 ---- bd_table: dd 0x70061022 ; AMD 751 ----
dd nb_amd751 dd nb_amd751
dd msk_amd751 dd msk_amd751
dd 0x70041022 ; AMD 751S dd 0x70041022 ; AMD 751S
dd nb_amd751s dd nb_amd751s
dd msk_amd751 dd msk_amd751
dd 0x700E1022 ; AMD 761 dd 0x700E1022 ; AMD 761
dd nb_amd761 dd nb_amd761
dd msk_amd751 dd msk_amd751
dd 0x700C1022 ; AMD 762 dd 0x700C1022 ; AMD 762
dd nb_amd762 dd nb_amd762
dd msk_amd762 dd msk_amd762
dd 0x71908086 ; i440 --- dd 0x71908086 ; i440 ---
dd nb_i440 dd nb_i440
dd msk_i440 dd msk_i440
dd 0x01A410DE ; nForce ---- dd 0x01A410DE ; nForce ----
dd nb_nforce dd nb_nforce
dd msk_nforce dd msk_nforce
dd 0x01E010DE ; nForce 2 dd 0x01E010DE ; nForce 2
dd nb_nforce2 dd nb_nforce2
dd msk_nforce2 dd msk_nforce2
dd 0x07301039 ; SiS 730 ---- dd 0x07301039 ; SiS 730 ----
dd nb_sis730 dd nb_sis730
dd msk_sis730 dd msk_sis730
dd 0x07331039 ; SiS 733 dd 0x07331039 ; SiS 733
dd nb_sis733 dd nb_sis733
dd msk_sis730 dd msk_sis730
dd 0x07351039 ; SiS 735 dd 0x07351039 ; SiS 735
dd nb_sis735 dd nb_sis735
dd msk_sis735 dd msk_sis735
dd 0x07401039 ; SiS 740 dd 0x07401039 ; SiS 740
dd nb_sis740 dd nb_sis740
dd msk_sis735 dd msk_sis735
dd 0x07411039 ; SiS 741 dd 0x07411039 ; SiS 741
dd nb_sis741 dd nb_sis741
dd msk_sis735 dd msk_sis735
dd 0x07451039 ; SiS 745 dd 0x07451039 ; SiS 745
dd nb_sis745 dd nb_sis745
dd msk_sis735 dd msk_sis735
dd 0x07461039 ; SiS 746 dd 0x07461039 ; SiS 746
dd nb_sis746 dd nb_sis746
dd msk_sis746 dd msk_sis746
dd 0x07481039 ; SiS 748 dd 0x07481039 ; SiS 748
dd nb_sis748 dd nb_sis748
dd msk_sis746 dd msk_sis746
dd 0x03051106 ; VIA KT133(A)/KM133/KL133/KN133 ---- dd 0x03051106 ; VIA KT133(A)/KM133/KL133/KN133 ----
dd nb_viakt133 dd nb_viakt133
dd msk_viakt133 dd msk_viakt133
dd 0x03911106 ; VIA KX133 dd 0x03911106 ; VIA KX133
dd nb_viakx133 dd nb_viakx133
dd msk_viakt133 dd msk_viakt133
dd 0x06911106 ; VIA KLE133 dd 0x06911106 ; VIA KLE133
dd nb_viakle133 dd nb_viakle133
dd msk_viakt133 dd msk_viakt133
dd 0x30991106 ; VIA KT266(A)/KT333 dd 0x30991106 ; VIA KT266(A)/KT333
dd nb_viakt266 dd nb_viakt266
dd msk_viakt266 dd msk_viakt266
dd 0x31161106 ; VIA KM266/KL266/KM333 dd 0x31161106 ; VIA KM266/KL266/KM333
dd nb_viakm266 dd nb_viakm266
dd msk_viakt266 dd msk_viakt266
dd 0x31561106 ; VIA KN266 dd 0x31561106 ; VIA KN266
dd nb_viakn266 dd nb_viakn266
dd msk_viakt266 dd msk_viakt266
dd 0x31891106 ; VIA KT400(A)/KT600 dd 0x31891106 ; VIA KT400(A)/KT600
dd nb_viakt400 dd nb_viakt400
dd msk_viakt400 dd msk_viakt400
dd 0x32051106 ; VIA KM400 dd 0x32051106 ; VIA KM400
dd nb_viakm400 dd nb_viakm400
dd msk_viakt400 dd msk_viakt400
dd 0x22691106 ; VIA KT880 dd 0x22691106 ; VIA KT880
dd nb_viakt880 dd nb_viakt880
dd msk_viakt880 dd msk_viakt880
bd_table_end: bd_table_end:
find_north_bridg: find_north_bridg:
mov bl, 6 mov bl, 6
xor cl, cl xor cl, cl
nbus: mov bh, [bus_num] nbus: mov bh, [bus_num]
ndevfn: mov ch, [devfn] ndevfn: mov ch, [devfn]
mov eax, 62 mov eax, 62
mcall mcall
cmp eax, 0xffffffff cmp eax, 0xffffffff
je bd_next je bd_next
;--------- ;---------
mov esi, bd_table_end - bd_table - 12 mov esi, bd_table_end - bd_table - 12
@@: cmp eax, [bd_table + esi] @@: cmp eax, [bd_table + esi]
je bd_found je bd_found
test esi, esi test esi, esi
jz bd_next jz bd_next
sub esi, 12 sub esi, 12
jmp @b jmp @b
;--------- ;---------
bd_next:dec byte[devfn] bd_next:dec byte[devfn]
jns ndevfn jns ndevfn
mov byte[devfn], 0 mov byte[devfn], 0
dec byte[bus_num] dec byte[bus_num]
jns nbus jns nbus
ret ret
bd_found: bd_found:
add esi, bd_table + 4 add esi, bd_table + 4
mov edi, nb_name mov edi, nb_name
mov ecx, 2 mov ecx, 2
rep movsd rep movsd
mov [bd_id], eax mov [bd_id], eax
ret ret
;---------------------- ;----------------------
;bd_stat: db 0 ; 0 - ­¥ ­ ©¤¥­, 1 - ¢ëª«î祭, 2 - ¢ª«î祭 ;bd_stat: db 0 ; 0 - ­¥ ­ ©¤¥­, 1 - ¢ëª«î祭, 2 - ¢ª«î祭
get_bd_stat: get_bd_stat:
mov byte[bd_stat], 1 mov byte[bd_stat], 1
cld cld
mov esi, [bd_msk] mov esi, [bd_msk]
lodsw lodsw
test al, al test al, al
jnz @f jnz @f
mov byte[bd_stat], 0 mov byte[bd_stat], 0
ret ret
@@: push eax @@: push eax
mov bh, [bus_num] mov bh, [bus_num]
mov bl, 4 mov bl, 4
mov ch, [devfn] mov ch, [devfn]
mov cl, al mov cl, al
mov eax, 62 mov eax, 62
mcall mcall
pop edx pop edx
and al, dh and al, dh
jnz @f jnz @f
lodsw lodsw
test al, al test al, al
jnz @b jnz @b
ret ret
@@: mov byte[bd_stat], 2 @@: mov byte[bd_stat], 2
ret ret
;---------------------- ;----------------------
set_bd_stat: set_bd_stat:
cmp dword[bd_id], 0x01E010DE ; ᯥ樠«ì­® ¤«ï nForce2 400 cmp dword[bd_id], 0x01E010DE ; ᯥ樠«ì­® ¤«ï nForce2 400
je set_stat_nforce2 je set_stat_nforce2
mov edi, eax mov edi, eax
cld cld
mov esi, [bd_msk] mov esi, [bd_msk]
bd_ss_nxt: bd_ss_nxt:
lodsw lodsw
test al, al test al, al
jz bd_ss_end jz bd_ss_end
mov dl, ah ; ¬ áª  mov dl, ah ; ¬ áª 
mov bh, [bus_num] mov bh, [bus_num]
mov bl, 4 mov bl, 4
mov ch, [devfn] mov ch, [devfn]
mov cl, al mov cl, al
mov eax, 62 mov eax, 62
mcall mcall
mov bl, 8 mov bl, 8
test edi, edi test edi, edi
jz @f jz @f
or al, dl or al, dl
mov dl, al mov dl, al
mov eax, 62 mov eax, 62
mcall mcall
jmp bd_ss_nxt jmp bd_ss_nxt
@@: not dl @@: not dl
and al, dl and al, dl
mov dl, al mov dl, al
mov eax, 62 mov eax, 62
mcall mcall
jmp bd_ss_nxt jmp bd_ss_nxt
bd_ss_end: bd_ss_end:
ret ret
;------- nForce 2 ----------- ;------- nForce 2 -----------
set_stat_nforce2: set_stat_nforce2:
; IN : eax = 0 - disable, !0 - enable ; IN : eax = 0 - disable, !0 - enable
push eax push eax
mov bh, [bus_num] mov bh, [bus_num]
mov bl, 4 mov bl, 4
mov ch, [devfn] mov ch, [devfn]
mov cl, 0x6f mov cl, 0x6f
mov eax, 62 mov eax, 62
mcall mcall
and al, 0x1F and al, 0x1F
mov dl, al mov dl, al
mov bl, 8 mov bl, 8
mov eax, 62 mov eax, 62
mcall mcall
pop eax pop eax
test eax, eax test eax, eax
jz @f jz @f
or dl, 0x10 or dl, 0x10
mov eax, 62 mov eax, 62
mcall mcall
ret ret
@@: and dl, 0xef @@: and dl, 0xef
mov eax, 62 mov eax, 62
mcall mcall
ret ret
;-------------------------------------------------------------------------- ;--------------------------------------------------------------------------
; x8 x16 x32 x64 x128 x256 x512 ; x8 x16 x32 x64 x128 x256 x512
div_hdd: db 0x23, 0x27, 0x2B, 0x2F, 0x63, 0x67, 0x6B ; Halt Disconnect Divisor div_hdd: db 0x23, 0x27, 0x2B, 0x2F, 0x63, 0x67, 0x6B ; Halt Disconnect Divisor
div_sgd: db 0x12, 0x52, 0x92, 0xD2, 0x12, 0x52, 0x92 ; Stop Grand Divisor div_sgd: db 0x12, 0x52, 0x92, 0xD2, 0x12, 0x52, 0x92 ; Stop Grand Divisor
; low word of 0xC001001B MSR ; low word of 0xC001001B MSR
; HDD\SGD 8 16 32 64 128 256 512 ; HDD\SGD 8 16 32 64 128 256 512
; 8 0x1223 0x5223 0x9223 0xD223 | 0x1223 0x5223 0x9223 ; 8 0x1223 0x5223 0x9223 0xD223 | 0x1223 0x5223 0x9223
@ -488,46 +496,46 @@ div_sgd: db 0x12, 0x52, 0x92, 0xD2, 0x12, 0x52, 0x92 ; Stop Grand Divisor
set_divs: set_divs:
; IN : ESI - hdd (0 = x8, 1 = x16 ..) ; IN : ESI - hdd (0 = x8, 1 = x16 ..)
; EDI - sgd (0 = x8, 1 = x16 ..) ; EDI - sgd (0 = x8, 1 = x16 ..)
mov eax, 68 mov eax, 68
mov ebx, 3 mov ebx, 3
mov edx, 0xC001001b mov edx, 0xC001001b
mcall mcall
mov al, [div_hdd + esi] mov al, [div_hdd + esi]
mov ah, [div_sgd + edi] mov ah, [div_sgd + edi]
and eax, 0xFFFBFFFF and eax, 0xFFFBFFFF
cmp edi, 3 cmp edi, 3
jle @f jle @f
or eax, 0x40000 or eax, 0x40000
@@: mov edi, eax @@: mov edi, eax
mov esi, ebx mov esi, ebx
mov eax, 68 mov eax, 68
mov ebx, 4 mov ebx, 4
mcall mcall
ret ret
get_divs: get_divs:
; OUT : val_hdd - hdd (0 = x8, 1 = x16 ..) ; OUT : val_hdd - hdd (0 = x8, 1 = x16 ..)
; val_sgd - sgd ... ; val_sgd - sgd ...
mov eax, 68 mov eax, 68
mov ebx, 3 mov ebx, 3
mov edx, 0xC001001b mov edx, 0xC001001b
mcall mcall
mov ecx, 7 mov ecx, 7
@@: cmp [div_hdd + ecx - 1], al @@: cmp [div_hdd + ecx - 1], al
je @f je @f
loop @b loop @b
@@: dec ecx @@: dec ecx
mov [val_hdd], ecx mov [val_hdd], ecx
mov ecx, 4 mov ecx, 4
@@: cmp [div_sgd + ecx - 1], ah @@: cmp [div_sgd + ecx - 1], ah
je @f je @f
loop @b loop @b
@@: dec ecx @@: dec ecx
test eax, 0x40000 test eax, 0x40000
jz @f jz @f
add ecx, 4 add ecx, 4
@@: mov [val_sgd], ecx @@: mov [val_sgd], ecx
ret ret
;****************************************************************************** ;******************************************************************************
@ -549,19 +557,38 @@ boot_bd_enable:
;-------------------------------------------------------------------------- ;--------------------------------------------------------------------------
title db appname,version,0 title db appname,version,0
msg_divs db ' x8 x16 x32 x64 x128 x256 x512' msg_divs db ' x8 x16 x32 x64 x128 x256 x512'
msg_hdd db 'Hatl Disc.' .length = $ - msg_divs
msg_sgd db 'Stop Grand' msg_hdd db 'Hatl Disc.'
msg_nb db 'North bridge :';14 .length = $ - msg_hdd
msg_stat db 'Status :' ;8 msg_sgd db 'Stop Grand'
msg_en db 'Enabled ' ;9 .length = $ - msg_sgd
msg_dis db 'Disabled ' ;9 msg_nb db 'North bridge :'
msg_nf db 'Not found' ;9 .length = $ - msg_nb
msg_stat db 'Status :'
.length = $ - msg_stat
if lang eq it
msg_en db 'Abilitato '
.length = $ - msg_en
msg_dis db 'Disabilitato'
.length = $ - msg_dis
msg_nf db 'Non trovato '
.length = $ - msg_nf
else
msg_en db 'Enabled '
.length = $ - msg_en
msg_dis db 'Disabled '
.length = $ - msg_dis
msg_nf db 'Not found'
.length = $ - msg_nf
end if
I_END: I_END:
sc system_colors
val_hdd: dd ? sc system_colors
val_sgd: dd ? val_hdd dd ?
val_sgd dd ?

View File

@ -0,0 +1,18 @@
#!gmake
FASM=/opt/bin/fasm
KPACK=/opt/bin/kpack
LANG=lang.inc
FILE=kbd
SOURCE=${FILE}.ASM
OUT=${FILE}.bin
en:
echo "lang fix en" > ${LANG}
${FASM} ${SOURCE} ${OUT}
it:
echo "lang fix it" > ${LANG}
${FASM} ${SOURCE} ${OUT}
clean:
rm -f ${LANG} ${OUT}