From fecfdf0fd44c48aed1dcf44a0f16bd636b48e224 Mon Sep 17 00:00:00 2001 From: Scott Stone Date: Mon, 27 Feb 2012 19:43:33 +0000 Subject: [PATCH] megatech.c: Implemented outputs for the time limit alarm sound and screen flash. [bdam] undrfire.c: Implement outputs for undrfire and cbombers. Lamps, gun recoil, and wheel vibration are implemented. [bdam] --- src/mame/drivers/megatech.c | 7 +++++++ src/mame/drivers/undrfire.c | 17 ++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/mame/drivers/megatech.c b/src/mame/drivers/megatech.c index acaaf3c5275..e42573e06cd 100644 --- a/src/mame/drivers/megatech.c +++ b/src/mame/drivers/megatech.c @@ -314,10 +314,17 @@ static READ8_HANDLER( bios_ctrl_r ) static WRITE8_HANDLER( bios_ctrl_w ) { mtech_state *state = space->machine().driver_data(); + if (offset == 1) { + output_set_value("Alarm_sound", data>>7 & 0x01); state->m_bios_ctrl_inputs = data & 0x04; // Genesis/SMS input ports disable bit } + else if (offset == 2) + { + output_set_value("Flash_screen", data>>1 & 0x01); + } + state->m_bios_ctrl[offset] = data; } diff --git a/src/mame/drivers/undrfire.c b/src/mame/drivers/undrfire.c index 29b6ef07ecc..38b3bb247ed 100644 --- a/src/mame/drivers/undrfire.c +++ b/src/mame/drivers/undrfire.c @@ -434,6 +434,14 @@ static WRITE32_HANDLER( motor_control_w ) ........ .x...... P1 gun vibration ........ x....... P2 gun vibration */ + + if (ACCESSING_BITS_8_15) + { + output_set_value("P1_lamp_start", (data >> 12) & 1 ); //p1 start + output_set_value("P2_lamp_start", (data >> 13) & 1 ); //p2 start + output_set_value("P1_gun_recoil", (data >> 14) & 1 ); //p1 recoil + output_set_value("P2_gun_recoil", (data >> 15) & 1 ); //p2 recoil + } } static WRITE32_HANDLER( cbombers_cpua_ctrl_w ) @@ -442,7 +450,14 @@ static WRITE32_HANDLER( cbombers_cpua_ctrl_w ) ........ ..xxxxxx Lamp 1-6 enables ........ .x...... Vibration */ - + output_set_value("Lamp_1", data & 1 ); + output_set_value("Lamp_2", (data >> 1) & 1 ); + output_set_value("Lamp_3", (data >> 2) & 1 ); + output_set_value("Lamp_4", (data >> 3) & 1 ); + output_set_value("Lamp_5", (data >> 4) & 1 ); + output_set_value("Lamp_6", (data >> 5) & 1 ); + output_set_value("Wheel_vibration", (data >> 6) & 1 ); + cputag_set_input_line(space->machine(), "sub", INPUT_LINE_RESET, (data & 0x1000) ? CLEAR_LINE : ASSERT_LINE); }