diff --git a/irqguard.c b/irqguard.c index 99fd9a11..1b6e12ef 100644 --- a/irqguard.c +++ b/irqguard.c @@ -49,7 +49,7 @@ BOOL IRQGUARD_Install(uint8_t irq) int vec = PIC_IRQ2VEC(irq); CLIS(); //install handler - //need install to DPMI because PM games may install DPMI handler + //need install to DPMI because PM games may install RM handler (rm mode sound card drivers) to DPMI //if rawIVT is used, it will prevent DPMI and PM games to process it DPMI_InstallRealModeISR_Direct(vec, (uint16_t)(IRQGUARD_DOSMEM&0xFFFF), datasize, &IRQGUARD_Handle, FALSE); //far ptr diff --git a/main.c b/main.c index 25420ebe..c8233553 100644 --- a/main.c +++ b/main.c @@ -31,9 +31,9 @@ PROGNAME = "SBEMU"; #define MAIN_TRAP_PMPIC_ONDEMAND 0 //now we need a Virtual PIC to hide some IRQ for protected mode games (doom especially) #define MAIN_TRAP_RMPIC_ONDEMAND 1 //don't hide IRQ for rm, as some driver(i.e.usbuhci) will use it -#define MAIN_INSTALL_RM_ISR 1 //not needed. but to workaround some rm games' problem. need RAW_HOOk in dpmi_dj2.c +#define MAIN_INSTALL_RM_ISR 0 //not needed. but to workaround some rm games' problem. need RAW_HOOk in dpmi_dj2.c - disble for more tests. #define MAIN_DOUBLE_OPL_VOLUME 1 //hack: double the amplitude of OPL PCM. should be 1 or 0 -#define MAIN_ISR_CHAINED 1 //auto calls next handler AFTER current handler exits +#define MAIN_ISR_CHAINED 0 //auto calls next handler AFTER current handler exits - cause more mode switches, disable for more tests. #define MAIN_TSR_INT 0x2D //AMIS multiplex. TODO: 0x2F? #define MAIN_TSR_INTSTART_ID 0x01 //start id @@ -807,23 +807,6 @@ int main(int argc, char* argv[]) printf("Please try use /i5 or /i7 switch, or disable some onboard devices in the BIOS settings to release IRQs.\n"); return 1; } - #if 0 - if(aui.card_irq <= 0x07) //SBPCI/CMI use irq 5/7 to gain DOS compatility? - { - printf("WARNING: Low IRQ %d used for sound card, higher IRQ number(8~15) is recommended.\n", aui.card_irq); - //TODO: do we need to do this? - #if 0 - printf("Trying to enable Level triggered mode..."); - if(aui.card_irq > 2) //don't use level triggering for legacy ISA IRQ (timer/kbd etc) - { - uint16_t elcr = ((uint16_t)inp(0x4D1)<<8) | (inp(0x4D0)); //edge level control reg - elcr |= (1<