]> Joshua Wise's Git repositories - netwatch.git/commitdiff
Make keyboard actually reliable again. Update what's actually on the screen, not...
authorJoshua Wise <joshua@rebirth.joshuawise.com>
Mon, 6 Oct 2008 09:36:23 +0000 (05:36 -0400)
committerJoshua Wise <joshua@rebirth.joshuawise.com>
Mon, 6 Oct 2008 09:36:23 +0000 (05:36 -0400)
aseg/counter.c
net/net.c

index d6208d6545f753bfe6079f5ae031c1b150cdc25b..055ceec1609f8da0a4f917273bb34f2185d0a217 100644 (file)
@@ -22,10 +22,8 @@ static void cause_kbd_irq()
        while (inb(0x64) & 0x1)
                inb(0x60);
        outb(0x60, 0xee);       /* Cause an IRQ. */
        while (inb(0x64) & 0x1)
                inb(0x60);
        outb(0x60, 0xee);       /* Cause an IRQ. */
-       while (!(inb(0x64) & 0x1))
+       while (inb(0x60) != 0xEE)
                ;
                ;
-       while (inb(0x64) & 0x1)
-               inb(0x60);
 }
 
 void pci_dump() {
 }
 
 void pci_dump() {
@@ -62,7 +60,8 @@ void pci_dump() {
                        {
                                b = kbd_get_injected_scancode();
                                lastctr = counter;
                        {
                                b = kbd_get_injected_scancode();
                                lastctr = counter;
-                               inb(0x60);
+                               while (inb(0x64) & 0x1)
+                                       inb(0x60);
                        } else
                                b = inb(0x60);
                        if ((curdev == 0) && (b == 0x01)) {     /* Escape */
                        } else
                                b = inb(0x60);
                        if ((curdev == 0) && (b == 0x01)) {     /* Escape */
index e1c74446162042bd5aa788f6782e43b4ba6ac045..46ea9cd75bb9d1ab345eccaebbede9bd20028064 100644 (file)
--- a/net/net.c
+++ b/net/net.c
@@ -83,6 +83,13 @@ void eth_poll()
        
 //     if ((c++) % 2)
 //             return;
        
 //     if ((c++) % 2)
 //             return;
+
+       if (((base + 80*25*2)%0x8000) < base)
+       {
+               if ((pos > ((base + 80*25*2)%0x8000)) && (pos < base))
+                       pos = base;
+       } else if ((pos > base + 80*25*2) || (pos < base))
+               pos = base;
        
        test[0] = pos >> 8;
        test[1] = pos & 0xFF;
        
        test[0] = pos >> 8;
        test[1] = pos & 0xFF;
This page took 0.026503 seconds and 4 git commands to generate.