Keyboard driver.

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
kmtdk
Member
Member
Posts: 263
Joined: Sat May 17, 2008 4:05 am
Location: Cyperspace, Denmark
Contact:

Keyboard driver.

Post by kmtdk »

HI again
I have one question about keyboard programming.
First i have one big problem with bochs.
I send a command to port 0x64- But :
00002380975e[DEV ] write to port 0x0064 with len 2 ignored
00002380977e[DEV ] write to port 0x0064 with len 2 ignored

What does that mean ?


KMT DK
well, what to say, to much to do in too little space.
when it goes up hill, increase work, when it goes straight, test yourself but when going down, slow down.
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: Keyboard driver.

Post by jal »

kmtdk wrote:00002380975e[DEV ] write to port 0x0064 with len 2 ignored
00002380977e[DEV ] write to port 0x0064 with len 2 ignored

What does that mean ?
Appearently you are writing a word (16 bits, 2 bytes) instead of a byte to the port. Real hardware accepts this, more or less, but Bochs doesn't. Try outb instead of outw.


JAL
User avatar
kmtdk
Member
Member
Posts: 263
Joined: Sat May 17, 2008 4:05 am
Location: Cyperspace, Denmark
Contact:

Re: Keyboard driver.

Post by kmtdk »

well
fist i program in pure asm :lol:
but i have tryed to change from 16 bit to 8 bit , but it is still the same :(
well, what to say, to much to do in too little space.
when it goes up hill, increase work, when it goes straight, test yourself but when going down, slow down.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: Keyboard driver.

Post by AJ »

Hi,

Can we see some exact code, please? You really do seem to be outputtnig a word as jal suggested. This means that you need to change:

Code: Select all

out dx, ax
(or equivalent) to:

Code: Select all

out dx, al
Cheers,
Adam
User avatar
kmtdk
Member
Member
Posts: 263
Joined: Sat May 17, 2008 4:05 am
Location: Cyperspace, Denmark
Contact:

Re: Keyboard driver.

Post by kmtdk »

i have found the error
But now another problem incoundes:
00002380981e[KBD ] unsupported io write to keyboard port 64, value = ed
00002380983e[KBD ] unsupported io write to keyboard port 64, value = 7
those is just to turn all leds on ?

KMT Dk
well, what to say, to much to do in too little space.
when it goes up hill, increase work, when it goes straight, test yourself but when going down, slow down.
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: Keyboard driver.

Post by jal »

kmtdk wrote:i have found the error
Could you share it with us? This might help others that experience a similar problem and find this thread by searching.
But now another problem incoundes:
00002380981e[KBD ] unsupported io write to keyboard port 64, value = ed
00002380983e[KBD ] unsupported io write to keyboard port 64, value = 7
those is just to turn all leds on ?
Those should go to port 0x60, not 0x64, afaik. Dunno whether port 0x64 should also work.


JAL
User avatar
kmtdk
Member
Member
Posts: 263
Joined: Sat May 17, 2008 4:05 am
Location: Cyperspace, Denmark
Contact:

Re: Keyboard driver.

Post by kmtdk »

yeah:
it was suposed to be send to port 0x60.
Looked at another thread.

KMT Dk
well, what to say, to much to do in too little space.
when it goes up hill, increase work, when it goes straight, test yourself but when going down, slow down.
Post Reply