From c00d9383f2373190065a5fcc21a8357df9df3c86 Mon Sep 17 00:00:00 2001 From: Allofich <19624336+Allofich@users.noreply.github.com> Date: Sat, 30 Oct 2021 21:16:50 +0900 Subject: [PATCH] Remove unused PCjr keyboard code --- include/callback.h | 2 +- src/cpu/callback.cpp | 25 ------------------------- src/ints/bios_keyboard.cpp | 22 ---------------------- 3 files changed, 1 insertion(+), 48 deletions(-) diff --git a/include/callback.h b/include/callback.h index ec20bcd88..92c3e0a65 100644 --- a/include/callback.h +++ b/include/callback.h @@ -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}; diff --git a/src/cpu/callback.cpp b/src/cpu/callback.cpp index 01c5ef849..90c6cf80e 100644 --- a/src/cpu/callback.cpp +++ b/src/cpu/callback.cpp @@ -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; diff --git a/src/ints/bios_keyboard.cpp b/src/ints/bios_keyboard.cpp index 2a587ec08..f22d0944b 100644 --- a/src/ints/bios_keyboard.cpp +++ b/src/ints/bios_keyboard.cpp @@ -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 - } }