mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-10-14 02:17:36 +08:00
Remove unused PCjr keyboard code
This commit is contained in:
@@ -26,7 +26,7 @@ typedef Bitu (*CallBack_Handler)(void);
|
||||
extern CallBack_Handler CallBack_Handlers[];
|
||||
|
||||
enum { CB_RETN,CB_RETF,CB_RETF8,CB_IRET,CB_IRETD,CB_IRET_STI,CB_IRET_EOI_PIC1,
|
||||
CB_IRQ0,CB_IRQ1,CB_IRQ1_BREAK,CB_IRQ9,CB_IRQ12,CB_IRQ12_RET,CB_IRQ6_PCJR,CB_MOUSE,
|
||||
CB_IRQ0,CB_IRQ1,CB_IRQ1_BREAK,CB_IRQ9,CB_IRQ12,CB_IRQ12_RET,CB_MOUSE,
|
||||
/*CB_INT28,*/CB_INT29,CB_INT16,CB_HOOKABLE,CB_TDE_IRET,CB_IPXESR,CB_IPXESR_RET,
|
||||
CB_INT21,CB_INT13,CB_VESA_WAIT,CB_VESA_PM,CB_IRET_EOI_PIC2,CB_CPM,
|
||||
CB_RETF_STI,CB_RETF_CLI};
|
||||
|
@@ -545,31 +545,6 @@ Bitu CALLBACK_SetupExtra(Bitu callback, Bitu type, PhysPt physAddress, bool use_
|
||||
phys_writeb(physAddress++,(uint8_t)0x1f); // pop ds
|
||||
phys_writeb(physAddress++,(uint8_t)0xcf); //An IRET Instruction
|
||||
return (use_cb?0x10:0x0c);
|
||||
case CB_IRQ6_PCJR: // pcjr keyboard interrupt
|
||||
phys_writeb(physAddress+0x00,(uint8_t)0x50); // push ax
|
||||
phys_writew(physAddress+0x01,(uint16_t)0x60e4); // in al, 0x60
|
||||
phys_writew(physAddress+0x03,(uint16_t)0xe03c); // cmp al, 0xe0
|
||||
if (use_cb) {
|
||||
phys_writew(physAddress+0x05,(uint16_t)0x0b74); // je skip
|
||||
phys_writeb(physAddress+0x07,(uint8_t)0xFE); //GRP 4
|
||||
phys_writeb(physAddress+0x08,(uint8_t)0x38); //Extra Callback instruction
|
||||
phys_writew(physAddress+0x09,(uint16_t)callback); //The immediate word
|
||||
physAddress+=4;
|
||||
} else {
|
||||
phys_writew(physAddress+0x05,(uint16_t)0x0774); // je skip
|
||||
}
|
||||
phys_writeb(physAddress+0x07,(uint8_t)0x1e); // push ds
|
||||
phys_writew(physAddress+0x08,(uint16_t)0x406a); // push 0x0040
|
||||
phys_writeb(physAddress+0x0a,(uint8_t)0x1f); // pop ds
|
||||
phys_writew(physAddress+0x0b,(uint16_t)0x09cd); // int 9
|
||||
phys_writeb(physAddress+0x0d,(uint8_t)0x1f); // pop ds
|
||||
// jump here to (skip):
|
||||
phys_writeb(physAddress+0x0e,(uint8_t)0xfa); // cli
|
||||
phys_writew(physAddress+0x0f,(uint16_t)0x20b0); // mov al, 0x20
|
||||
phys_writew(physAddress+0x11,(uint16_t)0x20e6); // out 0x20, al
|
||||
phys_writeb(physAddress+0x13,(uint8_t)0x58); // pop ax
|
||||
phys_writeb(physAddress+0x14,(uint8_t)0xcf); //An IRET Instruction
|
||||
return (use_cb?0x19:0x15);
|
||||
case CB_MOUSE:
|
||||
phys_writew(physAddress+0x00,(uint16_t)0x07eb); // jmp i33hd
|
||||
physAddress+=9;
|
||||
|
@@ -1520,26 +1520,4 @@ void BIOS_SetupKeyboard(void) {
|
||||
// out 0x20, al
|
||||
// pop ax
|
||||
// iret
|
||||
|
||||
if (machine==MCH_PCJR) {
|
||||
call_irq6=CALLBACK_Allocate();
|
||||
CALLBACK_Setup(call_irq6,NULL,CB_IRQ6_PCJR,"PCJr kb irq");
|
||||
RealSetVec(0x0e,CALLBACK_RealPointer(call_irq6));
|
||||
// pseudocode for CB_IRQ6_PCJR:
|
||||
// push ax
|
||||
// in al, 0x60
|
||||
// cmp al, 0xe0
|
||||
// je skip
|
||||
// push ds
|
||||
// push 0x40
|
||||
// pop ds
|
||||
// int 0x09
|
||||
// pop ds
|
||||
// label skip:
|
||||
// cli
|
||||
// mov al, 0x20
|
||||
// out 0x20, al
|
||||
// pop ax
|
||||
// iret
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user