Keyboard Controller not working in Virtual PC?
Posted: Sat Mar 06, 2010 4:12 am
Hi,
I've been trying to send some keyboard commands to the controller using virtual pc, but it doesn't seem to issue the commands i send.
I have a few functions that can be considered relevant:
and:
The command to set the leds on the keyboard does work. (0xED)
- It sends two times FA (ack) to the screen
- It puts the leds on
The command to set the scancode set doesn't work! (0xF0)
- It sends two times FA (ack) to the screen
- It doesn't change anything
- When second command 0x00 is issued, there is no return code (it should return the scancodeset at the time)
Is this just me doing something stupid, or is the virtual PC controller not emulating a real controller properly??
I've been trying to send some keyboard commands to the controller using virtual pc, but it doesn't seem to issue the commands i send.
I have a few functions that can be considered relevant:
Code: Select all
interrupt09:
cli
push ax
push di
push ds
mov ax, 0x0700
mov ds, ax
in al, 0x60
mov di, [ds:0x0002]
shl di, 0x0002
add di, 0x0E60
call printhexbyte
inc word [ds:0x0002]
mov al, 0x20
out 0x20, al
pop ds
pop di
pop ax
sti
iret
Code: Select all
kbd_update_leds:
.wait1:
in al, 0x64
and al, 0b00000010
jnz .wait1
mov al, 0xED
out 0x60, al
.wait2:
in al, 0x64
and al, 0b00000010
jnz .wait2
mov al, 0x07
out 0x60, al
ret
- It sends two times FA (ack) to the screen
- It puts the leds on
The command to set the scancode set doesn't work! (0xF0)
- It sends two times FA (ack) to the screen
- It doesn't change anything
- When second command 0x00 is issued, there is no return code (it should return the scancodeset at the time)
Is this just me doing something stupid, or is the virtual PC controller not emulating a real controller properly??