[Solved] IRQ Firing Bug
Re: IRQ Firing Bug
Both read and write flags are set when the buffer is full, so waiting on the read buffer should be "wait until buffer is full". But the write buffer should be "wait until it is not full".
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
Re: IRQ Firing Bug
Shouldnt it look rather like this?
I took the infos from the wiki:
I took the infos from the wiki:
Code: Select all
inline void ps2_wait(unsigned char type)
{
unsigned int _time_out = 10;
if(type)
{
while(_time_out--) //Wait for write
{
if((inb(0x64) & 2) == 0)
break;
Sleep(1);
}
}
else
{
while(_time_out--) //Wait for read
{
if((inb(0x64) & 1) == 1)
break;
Sleep(1);
}
}
}
Re: IRQ Firing Bug
Yes.
From the ["8042" PS/2 Controller] wiki page:
Status Register
The Status Register contains various flags that indicate the state of the PS/2 controller. The meanings for each bit are:
Bit Meaning
0 Output buffer status (0 = empty, 1 = full)
(must be set before attempting to read data from IO port 0x60)
1 Input buffer status (0 = empty, 1 = full)
(must be clear before attempting to write data to IO port 0x60 or IO port 0x64)
From the ["8042" PS/2 Controller] wiki page:
Status Register
The Status Register contains various flags that indicate the state of the PS/2 controller. The meanings for each bit are:
Bit Meaning
0 Output buffer status (0 = empty, 1 = full)
(must be set before attempting to read data from IO port 0x60)
1 Input buffer status (0 = empty, 1 = full)
(must be clear before attempting to write data to IO port 0x60 or IO port 0x64)
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott