@@ -31,7 +31,7 @@ PROGNAME = "SBEMU";
31
31
#define MAIN_TRAP_PIC_ONDEMAND 1
32
32
#define MAIN_INSTALL_RM_ISR 1 //not needed. but to workaround some rm games' problem. need RAW_HOOk in dpmi_dj2.c
33
33
#define MAIN_DOUBLE_OPL_VOLUME 1 //hack: double the amplitude of OPL PCM. should be 1 or 0
34
- #define MAIN_ISR_CHAINED 1 //auto calls next handler AFTER current handler exits
34
+ #define MAIN_ISR_CHAINED 0 //auto calls next handler AFTER current handler exits
35
35
36
36
#define MAIN_TSR_INT 0x2D //AMIS multiplex. TODO: 0x2F?
37
37
#define MAIN_TSR_INTSTART_ID 0x01 //start id
@@ -1012,18 +1012,21 @@ static void MAIN_InterruptPM()
1012
1012
//then because we're still in MAIN_InterruptPM, so MAIN_InterruptPM is never enterred agian (guarded by go32 or MAIN_ININT_PM),
1013
1013
//so the newly coming irq will never be processed and the IRQ will flood the system
1014
1014
//an alternative chained methods will EXIT MAIN_InterruptPM FIRST and calls next handler, which will avoid this case, see @MAIN_ISR_CHAINED
1015
+ //but we need a hack if the default handler in IVT doesn't send EOI or masks the irq (TODO)
1015
1016
1016
1017
//MAIN_IntContext.EFLAGS |= (MAIN_InINT&MAIN_ININT_RM) ? (MAIN_IntContext.EFLAGS&CPU_VMFLAG) : 0;
1017
1018
HDPMIPT_GetInterrupContext (& MAIN_IntContext );
1018
1019
if (/*!(MAIN_InINT&MAIN_ININT_RM) && */ aui .card_handler -> irq_routine && aui .card_handler -> irq_routine (& aui )) //check if the irq belong the sound card
1019
1020
{
1020
1021
MAIN_Interrupt ();
1022
+ #if !MAIN_ISR_CHAINED
1021
1023
PIC_SendEOIWithIRQ (aui .card_irq );
1024
+ #endif
1022
1025
}
1023
1026
#if !MAIN_ISR_CHAINED
1024
1027
else
1025
1028
{
1026
- if ((MAIN_InINT & MAIN_ININT_RM ) || (MAIN_IntContext .EFLAGS & CPU_VMFLAG ))
1029
+ if (/* (MAIN_InINT&MAIN_ININT_RM) || */ (MAIN_IntContext .EFLAGS & CPU_VMFLAG ))
1027
1030
DPMI_CallOldISR (& MAIN_IntHandlePM );
1028
1031
else
1029
1032
DPMI_CallOldISRWithContext (& MAIN_IntHandlePM , & MAIN_IntContext .regs );
@@ -1049,7 +1052,9 @@ static void MAIN_InterruptRM()
1049
1052
MAIN_IntContext .regs = MAIN_RMIntREG ;
1050
1053
MAIN_IntContext .EFLAGS = MAIN_RMIntREG .w .flags | CPU_VMFLAG ;
1051
1054
MAIN_Interrupt ();
1055
+ #if !MAIN_ISR_CHAINED
1052
1056
PIC_SendEOIWithIRQ (aui .card_irq );
1057
+ #endif
1053
1058
}
1054
1059
#if !MAIN_ISR_CHAINED
1055
1060
else
0 commit comments