diff --git a/src/mame/drivers/tubep.c b/src/mame/drivers/tubep.c index 08a44d329b6..bfff3e237a3 100644 --- a/src/mame/drivers/tubep.c +++ b/src/mame/drivers/tubep.c @@ -270,6 +270,7 @@ ADDRESS_MAP_END static TIMER_CALLBACK( tubep_scanline_callback ) { int scanline = param; + static const char *const cputags[] = { "mcu", "nsc" }; curr_scanline = scanline;//for debugging @@ -297,14 +298,14 @@ static TIMER_CALLBACK( tubep_scanline_callback ) { logerror("/nmi CPU#3\n"); tubep_vblank_end(); /* switch buffered sprite RAM page */ - cputag_set_input_line(machine, "nsc", INPUT_LINE_NMI, ASSERT_LINE); + cputag_set_input_line(machine, cputags[(cputag_get_cpu(machine, "nsc") != NULL) ? 1 : 0], INPUT_LINE_NMI, ASSERT_LINE); } /* CPU #3 MS2010-A NMI */ /* deactivates at the start of VBLANK signal which happens at the beginning of scanline number 240*/ if (scanline == 240) { logerror("CPU#3 nmi clear\n"); - cputag_set_input_line(machine, "nsc", INPUT_LINE_NMI, CLEAR_LINE); + cputag_set_input_line(machine, cputags[(cputag_get_cpu(machine, "nsc") != NULL) ? 1 : 0], INPUT_LINE_NMI, CLEAR_LINE); } diff --git a/src/mame/video/tubep.c b/src/mame/video/tubep.c index 1db89b0293e..02803410cfb 100644 --- a/src/mame/video/tubep.c +++ b/src/mame/video/tubep.c @@ -454,7 +454,9 @@ WRITE8_HANDLER( tubep_background_c000_w ) static TIMER_CALLBACK( sprite_timer_callback ) { - cputag_set_input_line(machine, "nsc", 0, ASSERT_LINE); + static const char *const cputags[] = { "mcu", "nsc" }; + + cputag_set_input_line(machine, cputags[(cputag_get_cpu(machine, "nsc") != NULL) ? 1 : 0], 0, ASSERT_LINE); } @@ -529,6 +531,8 @@ static void draw_sprite(running_machine *machine) WRITE8_HANDLER( tubep_sprite_control_w ) { + static const char *const cputags[] = { "mcu", "nsc" }; + if (offset < 10) { /*graph_ctrl[offset] = data;*/ @@ -583,7 +587,7 @@ WRITE8_HANDLER( tubep_sprite_control_w ) /SINT line will be reasserted in XSize * YSize cycles (RH0 signal cycles) */ /* 1.clear the /SINT interrupt line */ - cputag_set_input_line(space->machine, "nsc", 0, CLEAR_LINE); + cputag_set_input_line(space->machine, cputags[(cputag_get_cpu(space->machine, "nsc") != NULL) ? 1 : 0], 0, CLEAR_LINE); /* 2.assert /SINT again after this time */ timer_set( space->machine, attotime_mul(ATTOTIME_IN_HZ(19968000/8), (XSize+1)*(YSize+1)), NULL, 0, sprite_timer_callback);