cmi: move global int_levels array to local function where it's accessed

This commit is contained in:
hap 2022-09-04 18:40:43 +02:00
parent 5beaab0f3b
commit c5da18f24b

View File

@ -161,11 +161,6 @@
#define IRQ_SMIDINT_LEVEL (3 ^ 7) #define IRQ_SMIDINT_LEVEL (3 ^ 7)
#define IRQ_AIC_LEVEL (4 ^ 7) #define IRQ_AIC_LEVEL (4 ^ 7)
static const int ch_int_levels[8] =
{
12 ^ 7, 8 ^ 7, 13 ^ 7, 9 ^ 7, 14 ^ 7, 10 ^ 7, 15 ^ 7, 11 ^ 7
};
#define IRQ_PERRINT_LEVEL (0 ^ 7) #define IRQ_PERRINT_LEVEL (0 ^ 7)
#define IRQ_RTCINT_LEVEL (0 ^ 7) #define IRQ_RTCINT_LEVEL (0 ^ 7)
#define IRQ_RINT_LEVEL (1 ^ 7) #define IRQ_RINT_LEVEL (1 ^ 7)
@ -1639,7 +1634,8 @@ WRITE_LINE_MEMBER(cmi_state::channel_irq)
{ {
LOGMASKED(LOG_CHANNELS, "Channel IRQ: %d\n", state); LOGMASKED(LOG_CHANNELS, "Channel IRQ: %d\n", state);
} }
set_interrupt(CPU_1, ch_int_levels[Channel], state); static const int ch_int_levels[8] = { 12, 8, 13, 9, 14, 10, 15, 11 };
set_interrupt(CPU_1, ch_int_levels[Channel] ^ 7, state);
} }
void cmi_state::i8214_cpu1_w(u8 data) void cmi_state::i8214_cpu1_w(u8 data)