mirror of
https://gitlab.os-k.eu/os-k-team/os-k.git
synced 2023-08-25 14:03:10 +02:00
Merge branch 'cpu' into BetterTerm
Adds some enhancements
This commit is contained in:
commit
eab7a87e77
@ -193,8 +193,8 @@ static void EnablePIC(void)
|
|||||||
IoWriteByteOnPort(0xa0, 0x11);
|
IoWriteByteOnPort(0xa0, 0x11);
|
||||||
|
|
||||||
// Set ICW2 (IRQ base offsets)
|
// Set ICW2 (IRQ base offsets)
|
||||||
IoWriteByteOnPort(0x21, 0x20); //0x20 is the first free interrupt
|
IoWriteByteOnPort(0x21, 0x20); //0x20 is the first free interrupt for IRQ0
|
||||||
IoWriteByteOnPort(0xa1, 0x28);
|
IoWriteByteOnPort(0xa1, 0x28); // PIC2 is offseted to 0x28
|
||||||
|
|
||||||
// Set ICW3
|
// Set ICW3
|
||||||
IoWriteByteOnPort(0x21, 0x4);
|
IoWriteByteOnPort(0x21, 0x4);
|
||||||
@ -256,6 +256,7 @@ void IsrHandler(ISRFrame_t *regs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bprintf(BStdOut, "[ISR 0x%x] %s\n", regs->intNo, "Unknown ISR Exception");
|
bprintf(BStdOut, "[ISR 0x%x] %s\n", regs->intNo, "Unknown ISR Exception");
|
||||||
|
BStdOut->flusher(BStdOut);
|
||||||
IoSendEOItoPIC(regs->intNo);
|
IoSendEOItoPIC(regs->intNo);
|
||||||
/* KeStartPanic("[ISR 0x%x] Unknown ISR Exception Abort\n" */
|
/* KeStartPanic("[ISR 0x%x] Unknown ISR Exception Abort\n" */
|
||||||
/* " Error code : 0x%x\n" */
|
/* " Error code : 0x%x\n" */
|
||||||
@ -304,5 +305,6 @@ void IdtExceptionHandler(ISRFrame_t *regs)
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
bprintf(BStdOut, "[ISR 0x%x] %s\n", regs->intNo, exceptionMsg);
|
bprintf(BStdOut, "[ISR 0x%x] %s\n", regs->intNo, exceptionMsg);
|
||||||
|
BStdOut->flusher(BStdOut);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,8 @@ void KeybPrint(char code)
|
|||||||
{
|
{
|
||||||
if (code) {
|
if (code) {
|
||||||
bprintf(BStdOut, "%c", ScanCodes[(int)code]);
|
bprintf(BStdOut, "%c", ScanCodes[(int)code]);
|
||||||
BFlushBuf(BStdOut);
|
//bprintf(BStdOut, "%x ", code);
|
||||||
|
BStdOut->flusher(BStdOut);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,6 +49,9 @@ void ScanCodesInit(void)
|
|||||||
ScanCodes[0x09] = '8';
|
ScanCodes[0x09] = '8';
|
||||||
ScanCodes[0x0A] = '9';
|
ScanCodes[0x0A] = '9';
|
||||||
ScanCodes[0x0B] = '0';
|
ScanCodes[0x0B] = '0';
|
||||||
|
ScanCodes[0x0C] = ' ';
|
||||||
|
ScanCodes[0x0D] = '+';
|
||||||
|
ScanCodes[0x0E] = ' ';
|
||||||
|
|
||||||
ScanCodes[0x10] = 'a';
|
ScanCodes[0x10] = 'a';
|
||||||
ScanCodes[0x11] = 'z';
|
ScanCodes[0x11] = 'z';
|
||||||
@ -59,6 +63,8 @@ void ScanCodesInit(void)
|
|||||||
ScanCodes[0x17] = 'i';
|
ScanCodes[0x17] = 'i';
|
||||||
ScanCodes[0x18] = 'o';
|
ScanCodes[0x18] = 'o';
|
||||||
ScanCodes[0x19] = 'p';
|
ScanCodes[0x19] = 'p';
|
||||||
|
ScanCodes[0x1A] = '^';
|
||||||
|
ScanCodes[0x1B] = '$';
|
||||||
|
|
||||||
ScanCodes[0x1E] = 'q';
|
ScanCodes[0x1E] = 'q';
|
||||||
ScanCodes[0x1F] = 's';
|
ScanCodes[0x1F] = 's';
|
||||||
@ -69,6 +75,9 @@ void ScanCodesInit(void)
|
|||||||
ScanCodes[0x24] = 'j';
|
ScanCodes[0x24] = 'j';
|
||||||
ScanCodes[0x25] = 'k';
|
ScanCodes[0x25] = 'k';
|
||||||
ScanCodes[0x26] = 'l';
|
ScanCodes[0x26] = 'l';
|
||||||
|
ScanCodes[0x27] = 'm';
|
||||||
|
ScanCodes[0x28] = 'u';
|
||||||
|
ScanCodes[0x29] = '*';
|
||||||
|
|
||||||
ScanCodes[0x2C] = 'w';
|
ScanCodes[0x2C] = 'w';
|
||||||
ScanCodes[0x2D] = 'x';
|
ScanCodes[0x2D] = 'x';
|
||||||
@ -76,7 +85,10 @@ void ScanCodesInit(void)
|
|||||||
ScanCodes[0x2F] = 'v';
|
ScanCodes[0x2F] = 'v';
|
||||||
ScanCodes[0x30] = 'b';
|
ScanCodes[0x30] = 'b';
|
||||||
ScanCodes[0x31] = 'n';
|
ScanCodes[0x31] = 'n';
|
||||||
ScanCodes[0x32] = 'm';
|
ScanCodes[0x32] = ',';
|
||||||
|
ScanCodes[0x33] = ';';
|
||||||
|
ScanCodes[0x34] = ':';
|
||||||
|
ScanCodes[0x35] = '!';
|
||||||
|
|
||||||
ScanCodes[0x1C] = '\n';
|
ScanCodes[0x1C] = '\n';
|
||||||
ScanCodes[0x39] = ' ';
|
ScanCodes[0x39] = ' ';
|
||||||
|
Loading…
Reference in New Issue
Block a user