driver={}
function driver:addString(drive)



end


bios_yy=10
function bios_print(txt)
bios_yy=bios_yy+10
screen:print(10,bios_yy,txt,red)
screen.flip()
screen.waitVblankStart()
end

function bios_clear()
screen:clear()
bios_yy=10
screen.flip()
screen.waitVblankStart()
end


function driver:created_Mouse(drive)
bios_clear()
bios_print("Installation d'un peripherique IrDa : Souris")
bios_print("please wait ........")
System.irdaInit()
--///***Clique droit
bios_print("")
bios_print("Appuyer sur PSP Start puis ")
bios_print("Appuyer sur : Clique droit")
while true do
if Controls.read():start() then
while true do
     local readir=System.irdaRead()
	 if readir~=nil or readir~="" then
     cliquedroit=readir
	 break
     end
end
break
end
end
System.sleep(1200)
bios_clear()
--///***Clique Gauche
bios_print("")
bios_print("Appuyer sur PSP Start puis ")
bios_print("Appuyer sur : Clique gauche")
while true do
if Controls.read():start() then
while true do
     local readir=System.irdaRead()
	 if readir~=nil or readir~="" then
     cliquegauche=readir
	 break
     end
end
break
end
end
System.sleep(1200)
bios_clear()
--///***Dep haut
bios_print("")
bios_print("Appuyer sur PSP Start puis ")
bios_print("Appuyer sur : Translation Haut")
while true do
if Controls.read():start() then
while true do
     local readir=System.irdaRead()
	 if readir~=nil or readir~="" then
     tranhaut=readir
	 break
     end
end
break
end
end
System.sleep(1200)
bios_clear()
--///***Dep bas
bios_print("")
bios_print("Appuyer sur PSP Start puis ")
bios_print("Appuyer sur : Translation bas")
while true do
if Controls.read():start() then
while true do
     local readir=System.irdaRead()
	 if readir~=nil or readir~="" then
     tranbas=readir
	 break
     end
end
break
end
end
System.sleep(1200)
bios_clear()
--///***Dep droit
bios_print("")
bios_print("Appuyer sur PSP Start puis ")
bios_print("Appuyer sur : Translation droite")
while true do
if Controls.read():start() then
while true do
     local readir=System.irdaRead()
	 if readir~=nil or readir~="" then
     trandroit=readir
	 break
     end
end
break
end
end
System.sleep(1200)
bios_clear()
--///***Dep gauche
bios_print("")
bios_print("Appuyer sur PSP Start puis ")
bios_print("Appuyer sur : Translation gauche")
while true do
if Controls.read():start() then
while true do
     local readir=System.irdaRead()
	 if readir~=nil or readir~="" then
     trangauche=readir
	 break
     end
end
break
end
end
System.sleep(1200)
bios_clear()
bios_print("")
bios_print("")
bios_print("Installation du driver dans : "..kernel_dossier.."/WINDOWS/DRIVERS/"..drive)
bios_print("")
file=io.open(kernel_dossier.."/WINDOWS/DRIVERS/"..drive,"a")
bios_print("*Clique droit : "..cliquedroit)
file:write(" if irreceiv == "..[["]]..cliquedroit..[["]].." then kernel_clique_droit=true end ")
bios_print("*Clique gauche : "..cliquegauche)
file:write(" if irreceiv == "..[["]]..cliquegauche..[["]].." then kernel_clique_gauche=true end ")
bios_print("Deplacement Droite : "..trandroit)
file:write(" if irreceiv == "..[["]]..trandroit..[["]].." then mousex=mousex+mousev end ")
bios_print("Deplacement Gauche : "..trangauche)
file:write(" if irreceiv == "..[["]]..trangauche..[["]].." then mousex=mousex-mousev end ")
bios_print("Deplacement Haut : "..tranhaut)
file:write(" if irreceiv == "..[["]]..tranhaut..[["]].." then mousey=mousey-mousev end ")
bios_print("Deplacement Bas : "..tranbas)
file:write(" if irreceiv == "..[["]]..tranbas..[["]].." then mousey=mousey+mousev end ")

file:close()
end 

abc ={"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "'space'","escape"} 
abc2={}


function driver:created_KeyBoard(drive)
bios_clear()
bios_print("Installation d'un peripherique IrDa : Souris")
bios_print("please wait ........")
System.irdaInit()
--///***Clique droit
bios_print("")
bios_print("Appuyer sur toutes les lettres :a,b,c.... puis sur SPACE ")
bios_print("Et ensuite sur ESCAPE(<=)")
bios_print("Pour commencer appuyez sur 'a' et sur START")
while true do
if Controls.read():start() then
for i=1,28 do
while true do
readir=System.irdaRead()
if readir~=oldreadir and readir~=nil then
abc2[i]=readir
break
end
oldreadir=readir
end
end
end

end


end
