Skip to content

Commit

Permalink
correction bug clavier ps2 sous virtualbox
Browse files Browse the repository at this point in the history
  • Loading branch information
N-LG authored May 25, 2024
1 parent 2168ac0 commit 3624ca3
Show file tree
Hide file tree
Showing 2 changed files with 115 additions and 9 deletions.
12 changes: 6 additions & 6 deletions ASM/NOYAU/ETAGE3.ASM
Original file line number Diff line number Diff line change
Expand Up @@ -800,15 +800,15 @@ finpalgraf:


;définition française au démarrage
include "DN_MSG_FR.ASM" ;messages systeme en français
include "DN_CLAV_FR.ASM" ;clavier Français azerty
langue_demarrage equ "fra "
;include "DN_MSG_FR.ASM" ;messages systeme en français
;include "DN_CLAV_FR.ASM" ;clavier Français azerty
;langue_demarrage equ "fra "


;définition anglaise au démarrage
;include "DN_MSG_EN.ASM" ;messages systeme en anglais
;include "DN_CLAV_USI.ASM" ;clavier US International
;langue_demarrage equ "eng "
include "DN_MSG_EN.ASM" ;messages systeme en anglais
include "DN_CLAV_USI.ASM" ;clavier US International
langue_demarrage equ "eng "

tabacc:
include "DN_ACC.ASM"
Expand Down
112 changes: 109 additions & 3 deletions ASM/NOYAU/SF_PERI.ASM
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ mov ax,0204h ;met a 1 reset
out dx,ax

mov eax,[cptsf]
add eax,22 ;attent 55ms avant d'arretet le reset
add eax,22 ;attent 50ms avant d'arretet le reset
mov [usb_tempo],eax
mov byte[usb_action],2
jmp fin_test_cnx_usb
Expand Down Expand Up @@ -114,16 +114,66 @@ test ax,04h
jz bc2_uhci_finreset1_adresse

mov eax,[cptsf]
add eax,40 ;attent 100ms avant de chercher a lire le descripteur
add eax,40 ;attend 100ms avant de chercher a lire le descripteur
mov [usb_tempo],eax
mov byte[usb_action],3
jmp fin_test_cnx_usb


;????????????????????????????????????????????????????????????
mov ecx,[cptsf]
add ecx,1200 ;3 secondes
xor eax,eax
out dx,ax

@@:
cmp [cptsf],ecx
ja global_erreur_connexionUSB
in ax,dx
test ax,02h ;csc (connect status change)
jz @b
mov ax,06h ;enable + clear csc
out dx,ax
@@:
cmp [cptsf],ecx
ja global_erreur_connexionUSB
in ax,dx
test ax,04h;attend enable change
jz @b

;mov ax,0
;out dx,ax
;mov ecx,[cptsf]
;inc ecx
;@@:
;nop
;cmp [cptsf],ecx
;jbe @b
;mov ax,06h ;enable+csc
;out dx,ax
;mov ecx,[cptsf]
;inc ecx
;@@:
;nop
;cmp [cptsf],ecx
;jbe @b
;mov ax,0Ch ;enable+EC
;out dx,ax



;????????????????????????????????????????????????????????????


;****************************************************************
uhci_lit_descripteur:
pushad
in ax,dx
call affh1j
mov al,13
call affcj
popad


;remplit les parametre de base du périphérique 0
mov al,[usb_ctrl_test]
Expand Down Expand Up @@ -206,6 +256,58 @@ jmp fin_test_cnx_usb





;????????????????????????????????????????????????????????????

mov ecx,[cptsf]
add ecx,1200 ;3 secondes
xor eax,eax
out dx,ax

@@:
cmp [cptsf],ecx
ja global_erreur_connexionUSB
in ax,dx
test ax,02h
jz @b
mov ax,06h
out dx,ax
@@:
cmp [cptsf],ecx
ja global_erreur_connexionUSB
in ax,dx
test ax,04h
jz @b


;mov ecx,[cptsf]
;inc ecx
;@@:
;nop
;cmp [cptsf],ecx
;jbe @b
;mov ax,06h ;enable+csc
;out dx,ax
;mov ecx,[cptsf]
;inc ecx
;@@:
;nop
;cmp [cptsf],ecx
;jbe @b
;mov ax,0Ch ;enable+EC
;out dx,ax


mov eax,[cptsf]
add eax,40 ;attent 100ms avant de chercher a affecter l'adresse
mov [usb_tempo],eax
mov byte[usb_action],5
jmp fin_test_cnx_usb




;***************************************
uhci_supp_periph_usb:
mov ax,0Ah ;reset les bit de changement d'état
Expand Down Expand Up @@ -997,6 +1099,10 @@ jmp suite_active_config_usb
global_erreur_connexionUSB:
mov cl,102
call affmsgsyst
mov al,[usb_action]
call affh0j
mov al,13
call affcj
mov dword[usb_tempo],0
mov byte[usb_action],0
jmp suite_test_cnx_usb
Expand Down Expand Up @@ -1160,9 +1266,9 @@ cmp al,ah
je pas_modif_led_clavier

;ps2
or byte[attcl],40h
mov al,0EDh ;commande led
out 60h,al
or byte[attcl],40h



Expand Down

0 comments on commit 3624ca3

Please sign in to comment.