diff --git a/src/mame/drivers/de_2.cpp b/src/mame/drivers/de_2.cpp index 4ba94dc7af6..52d508e9378 100644 --- a/src/mame/drivers/de_2.cpp +++ b/src/mame/drivers/de_2.cpp @@ -1,13 +1,50 @@ // license:BSD-3-Clause // copyright-holders:Miodrag Milanovic -/* - DataEast/Sega Version 1 and 2 +/******************************************************************************************************************** +PINBALL +Data East System 1 and 2 - Main CPU: 6808 @ 4MHz (internally divided by 4) - Audio CPU: 68B09E @ 2MHz - Audio: YM2151 @ 3.58MHz, MSM5205 @ 384kHz -*/ +Hardware: +- Main CPU: 6808 @ 4MHz (internally divided by 4) +- Audio CPU: 68B09E @ 2MHz +- Audio: YM2151 @ 3.58MHz, MSM5205 @ 384kHz +Data East CPU board is similar to Williams System 11, but without the generic audio board. +For now, we'll presume the timings are the same. +Here are the key codes to enable play: + +Game NUM Start game End ball +--------------------------------------------------------------------------------------------- +Laser War 5001 Hold BCD, hit 1 BCD +Secret Service 5002 Hold Up Left Right, hit 1 Up Left Right +Torpedo Alley 5003 Hold CDE, hit 1 CDE +Time Machine 5004 Hold CDE, hit 1 CD +Playboy 35th Anniversary 5005 Hold CDE, hit 1 CDE +Robocop 5006 Hold CDE, hit 1 CDE +Monday Night Football 5007 Hold CDE, hit 1 CDE +Phantom of the Opera 5008 Hold CDE, hit 1 CDE +King Kong -- Hold CDE, hit 1 CDE +**** not emulated (various systems) **** +Arnon Milchan +Flip Out! 1991 +Joel Silver, the pinball +Kabuki +Richie Rich +Slap Shot Hockey 0138 +Wild Horse Saloon +Trump's Secret Service + + +Status: +- All machines are playable + +ToDo: +- Save state +- Outputs +- Mechanical sounds +- robo_a34: can't coin up, buggy rom? + +*********************************************************************************************************************/ #include "emu.h" #include "machine/decopincpu.h" @@ -20,18 +57,11 @@ #include "sound/ymopm.h" #include "speaker.h" +#include "de1.lh" #include "de2.lh" #include "de2a3.lh" -// To start Secret Service, hold I, O and Left ALT while pressing Start. -// To start Laser War, hold S, D, and F while pressing Start. -// To start Back to the Future, hold D and F while pressing Start. -// To start The Simpsons, hold D, F and G while pressing Start (can be tempremental) - -// Data East CPU board is similar to Williams System 11, but without the generic audio board. -// For now, we'll presume the timings are the same. - class de_2_state : public genpin_class { public: @@ -41,7 +71,8 @@ public: , m_audiocpu(*this, "audiocpu") , m_msm5205(*this, "msm5205") , m_sample_bank(*this, "sample_bank") - , m_digits(*this, "digit%u", 0U) + , m_io_keyboard(*this, "X%d", 0U) + , m_digits(*this, "digit%d", 0U) , m_diag_digit(*this, "digit60") { } @@ -66,8 +97,6 @@ private: void switch_w(uint8_t data); void pia2c_pa_w(uint8_t data); void pia2c_pb_w(uint8_t data); - DECLARE_WRITE_LINE_MEMBER(pia28_ca2_w) { } // comma3&4 - DECLARE_WRITE_LINE_MEMBER(pia28_cb2_w) { } // comma1&2 uint8_t pia28_w7_r(); void dig0_w(uint8_t data); void dig1_w(uint8_t data); @@ -97,23 +126,24 @@ private: required_device m_audiocpu; required_device m_msm5205; required_memory_bank m_sample_bank; + required_ioport_array<8> m_io_keyboard; output_finder<32> m_digits; output_finder<> m_diag_digit; - uint8_t m_sample_data; - bool m_more_data; - bool m_nmi_enable; + uint8_t m_sample_data = 0U; + bool m_more_data = 0; + bool m_nmi_enable = 0; - uint32_t m_segment1; - uint32_t m_segment2; - uint8_t m_strobe; - uint8_t m_kbdrow; - uint8_t m_diag; - bool m_ca1; - uint8_t m_sound_data; + uint32_t m_segment1 = 0U; + uint32_t m_segment2 = 0U; + uint8_t m_strobe = 0U; + uint8_t m_row = 0U; + uint8_t m_diag = 0U; + bool m_ca1 = 0; + uint8_t m_sound_data = 0U; - uint8_t m_sample_bank_num; - uint8_t m_msm_prescaler; + uint8_t m_sample_bank_num = 0U; + uint8_t m_msm_prescaler = 0U; }; @@ -143,77 +173,78 @@ void de_2_state::de_2_audio_map(address_map &map) map(0x8000, 0xffff).rom(); } -static INPUT_PORTS_START( de_2 ) - PORT_START("INP0") - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) +static INPUT_PORTS_START( de2 ) + PORT_START("X0") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_9) PORT_NAME("Tilt") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_8) PORT_NAME("Ball Tilt") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN3 ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN1 ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_0) PORT_NAME("Slam Tilt") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_START("INP1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN3 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) + PORT_START("X1") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_A) PORT_NAME("INP09") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_B) PORT_NAME("INP10") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_C) PORT_NAME("INP11") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_D) PORT_NAME("INP12") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_E) PORT_NAME("INP13") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_F) PORT_NAME("INP14") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_G) PORT_NAME("INP15") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_H) PORT_NAME("INP16") - PORT_START("INP2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_A) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_S) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_D) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_F) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_G) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_H) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_J) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_K) + PORT_START("X2") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_I) PORT_NAME("INP17") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_J) PORT_NAME("INP18") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_K) PORT_NAME("INP19") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_L) PORT_NAME("INP20") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_M) PORT_NAME("INP21") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_N) PORT_NAME("INP22") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_O) PORT_NAME("INP23") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_P) PORT_NAME("INP24") - PORT_START("INP4") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_L) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Z) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_C) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_V) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_B) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_N) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_M) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_COMMA) + PORT_START("X3") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Q) PORT_NAME("INP25") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_R) PORT_NAME("INP26") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_S) PORT_NAME("INP27") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_T) PORT_NAME("INP28") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_U) PORT_NAME("INP29") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_V) PORT_NAME("INP30") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_W) PORT_NAME("INP31") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_X) PORT_NAME("INP32") - PORT_START("INP8") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_STOP) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_SLASH) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_COLON) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_QUOTE) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_X) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_MINUS) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_EQUALS) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_BACKSPACE) + PORT_START("X4") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Y) PORT_NAME("INP33") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Z) PORT_NAME("INP34") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_COMMA) PORT_NAME("INP35") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_STOP) PORT_NAME("INP36") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_SLASH) PORT_NAME("INP37") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_COLON) PORT_NAME("INP38") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_QUOTE) PORT_NAME("INP39") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_ENTER) PORT_NAME("INP40") - PORT_START("INP10") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_OPENBRACE) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_CLOSEBRACE) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_BACKSLASH) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_ENTER) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_LEFT) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_RIGHT) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_UP) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_DOWN) + PORT_START("X5") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_NAME("INP41") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_NAME("INP42") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_NAME("INP43") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_MINUS) PORT_NAME("INP44") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_EQUALS) PORT_NAME("INP45") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("INP46") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_LEFT) PORT_NAME("INP47") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_UP) PORT_NAME("INP48") - PORT_START("INP20") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Q) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_W) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_E) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_R) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Y) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_U) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_I) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_O) - - PORT_START("INP40") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_LALT) - PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("INP80") - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START("X6") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_RIGHT) PORT_NAME("INP49") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_DOWN) PORT_NAME("INP50") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_HOME) PORT_NAME("INP51") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_END) PORT_NAME("INP52") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_DEL) PORT_NAME("INP53") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("INP54") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_PGUP) PORT_NAME("INP55") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_SPACE) PORT_NAME("INP56") + PORT_START("X7") INPUT_PORTS_END @@ -298,7 +329,12 @@ void de_2_state::dig1_w(uint8_t data) m_segment2 |= 0x30000; if ((m_segment2 & 0x70000) == 0x30000) { - m_digits[m_strobe+16] = bitswap<16>(m_segment2, 11, 15, 12, 10, 8, 14, 13, 9, 7, 6, 5, 4, 3, 2, 1, 0); + u16 seg = m_segment2; + if (BIT(seg, 6)) + seg |= 0x800; // fix g seg + if (BIT(seg, 7)) + seg |= 0x8000; // fix comma + m_digits[m_strobe+16] = bitswap<16>(seg, 7, 15, 12, 10, 8, 14, 13, 9, 11, 6, 5, 4, 3, 2, 1, 0); m_segment2 |= 0x40000; } } @@ -362,22 +398,19 @@ void de_2_state::pia2c_pb_w(uint8_t data) // 6821 PIA at 0x3000 uint8_t de_2_state::switch_r() { - char kbdrow[8]; - sprintf(kbdrow,"INP%X",m_kbdrow); - return ~ioport(kbdrow)->read(); + u8 data = 0; + if (m_row < 0x81) + // last column is never used + for (u8 i = 0; i < 7; i++) + if (BIT(m_row, i)) + data |= m_io_keyboard[i]->read(); + + return data; } void de_2_state::switch_w(uint8_t data) { - int x; - // about every second, 0xFF is written here, but it would be impossible to select more than one set of switches - // at once, so just return the first bit set. Maybe 0xFF has special meaning, or is just a disable? - for(x=0;x<8;x++) - { - if(data & (1<("decocpu")->display_write_callback().set(FUNC(de_2_state::type2alpha3_display_w)); - - /* Video */ config.set_default_layout(layout_de2a3); } @@ -951,31 +982,31 @@ ROM_START(torp_a16) ROM_END -GAME( 1990, bttf_a28, 0, de_type3, de_2, de_2_state, empty_init, ROT0, "Data East", "Back to the Future - The Pinball (2.8)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1990, bttf_a27, bttf_a28, de_type3, de_2, de_2_state, empty_init, ROT0, "Data East", "Back to the Future - The Pinball (2.7)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1990, bttf_a20, bttf_a28, de_type3, de_2, de_2_state, empty_init, ROT0, "Data East", "Back to the Future - The Pinball (2.0)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1990, bttf_a21, bttf_a28, de_type3, de_2, de_2_state, empty_init, ROT0, "Data East", "Back to the Future - The Pinball (2.1)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 199?, bttf_g27, bttf_a28, de_type3, de_2, de_2_state, empty_init, ROT0, "Data East", "Back to the Future - The Pinball (2.7, Germany)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1990, kiko_a10, 0, de_type3, de_2, de_2_state, empty_init, ROT0, "Data East", "King Kong (1.0)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1987, lwar_a83, 0, de_type1, de_2, de_2_state, empty_init, ROT0, "Data East", "Laser War (8.3)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1987, lwar_a81, lwar_a83, de_type1, de_2, de_2_state, empty_init, ROT0, "Data East", "Laser War (8.1)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1987, lwar_e90, lwar_a83, de_type1, de_2, de_2_state, empty_init, ROT0, "Data East", "Laser War (9.0 Europe)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1989, mnfb_c29, 0, de_type2_alpha3, de_2, de_2_state, empty_init, ROT0, "Data East", "Monday Night Football (2.9, 50cts)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1989, mnfb_c27, mnfb_c29, de_type2_alpha3, de_2, de_2_state, empty_init, ROT0, "Data East", "Monday Night Football (2.7, 50cts)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1990, poto_a32, 0, de_type2_alpha3, de_2, de_2_state, empty_init, ROT0, "Data East", "The Phantom of the Opera (3.2)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1990, poto_a31, poto_a32, de_type2_alpha3, de_2, de_2_state, empty_init, ROT0, "Data East", "The Phantom of the Opera (3.1)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1990, poto_a29, poto_a32, de_type2_alpha3, de_2, de_2_state, empty_init, ROT0, "Data East", "The Phantom of the Opera (2.9)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1989, play_a24, 0, de_type2, de_2, de_2_state, empty_init, ROT0, "Data East", "Playboy 35th Anniversary (2.4)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1989, robo_a34, 0, de_type3, de_2, de_2_state, empty_init, ROT0, "Data East", "Robocop (3.4)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1989, robo_a30, robo_a34, de_type3, de_2, de_2_state, empty_init, ROT0, "Data East", "Robocop (3.0)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1989, robo_a29, robo_a34, de_type3, de_2, de_2_state, empty_init, ROT0, "Data East", "Robocop (2.9)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1988, ssvc_a26, 0, de_type2, de_2, de_2_state, empty_init, ROT0, "Data East", "Secret Service (2.6)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1988, ssvc_b26, ssvc_a26, de_type2, de_2, de_2_state, empty_init, ROT0, "Data East", "Secret Service (2.6 alternate sound)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1988, ssvc_a42, ssvc_a26, de_type2, de_2, de_2_state, empty_init, ROT0, "Data East", "Secret Service (4.2 alternate sound)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1990, simp_a27, 0, de_type3, de_2, de_2_state, empty_init, ROT0, "Data East", "The Simpsons (2.7)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1990, simp_a20, simp_a27, de_type3, de_2, de_2_state, empty_init, ROT0, "Data East", "The Simpsons (2.0)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1988, tmac_a24, 0, de_type2, de_2, de_2_state, empty_init, ROT0, "Data East", "Time Machine (2.4)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1988, tmac_a18, tmac_a24, de_type2, de_2, de_2_state, empty_init, ROT0, "Data East", "Time Machine (1.8)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1988, tmac_g18, tmac_a24, de_type2, de_2, de_2_state, empty_init, ROT0, "Data East", "Time Machine (1.8, Germany)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1988, torp_e21, 0, de_type2, de_2, de_2_state, empty_init, ROT0, "Data East", "Torpedo Alley (2.1, Europe)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1988, torp_a16, torp_e21, de_type2, de_2, de_2_state, empty_init, ROT0, "Data East", "Torpedo Alley (1.6)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1990, bttf_a28, 0, de_type3, de2, de_2_state, empty_init, ROT0, "Data East", "Back to the Future - The Pinball (2.8)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1990, bttf_a27, bttf_a28, de_type3, de2, de_2_state, empty_init, ROT0, "Data East", "Back to the Future - The Pinball (2.7)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1990, bttf_a20, bttf_a28, de_type3, de2, de_2_state, empty_init, ROT0, "Data East", "Back to the Future - The Pinball (2.0)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1990, bttf_a21, bttf_a28, de_type3, de2, de_2_state, empty_init, ROT0, "Data East", "Back to the Future - The Pinball (2.1)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 199?, bttf_g27, bttf_a28, de_type3, de2, de_2_state, empty_init, ROT0, "Data East", "Back to the Future - The Pinball (2.7, Germany)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1990, kiko_a10, 0, de_type3, de2, de_2_state, empty_init, ROT0, "Data East", "King Kong (1.0)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1987, lwar_a83, 0, de_type1, de2, de_2_state, empty_init, ROT0, "Data East", "Laser War (8.3)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1987, lwar_a81, lwar_a83, de_type1, de2, de_2_state, empty_init, ROT0, "Data East", "Laser War (8.1)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1987, lwar_e90, lwar_a83, de_type1, de2, de_2_state, empty_init, ROT0, "Data East", "Laser War (9.0 Europe)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1989, mnfb_c29, 0, de_type2_alpha3, de2, de_2_state, empty_init, ROT0, "Data East", "Monday Night Football (2.9, 50cts)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1989, mnfb_c27, mnfb_c29, de_type2_alpha3, de2, de_2_state, empty_init, ROT0, "Data East", "Monday Night Football (2.7, 50cts)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1990, poto_a32, 0, de_type2_alpha3, de2, de_2_state, empty_init, ROT0, "Data East", "The Phantom of the Opera (3.2)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1990, poto_a31, poto_a32, de_type2_alpha3, de2, de_2_state, empty_init, ROT0, "Data East", "The Phantom of the Opera (3.1)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1990, poto_a29, poto_a32, de_type2_alpha3, de2, de_2_state, empty_init, ROT0, "Data East", "The Phantom of the Opera (2.9)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1989, play_a24, 0, de_type2, de2, de_2_state, empty_init, ROT0, "Data East", "Playboy 35th Anniversary (2.4)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1989, robo_a34, 0, de_type3, de2, de_2_state, empty_init, ROT0, "Data East", "Robocop (3.4)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1989, robo_a30, robo_a34, de_type3, de2, de_2_state, empty_init, ROT0, "Data East", "Robocop (3.0)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1989, robo_a29, robo_a34, de_type3, de2, de_2_state, empty_init, ROT0, "Data East", "Robocop (2.9)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1988, ssvc_a26, 0, de_type2, de2, de_2_state, empty_init, ROT0, "Data East", "Secret Service (2.6)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1988, ssvc_b26, ssvc_a26, de_type2, de2, de_2_state, empty_init, ROT0, "Data East", "Secret Service (2.6 alternate sound)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1988, ssvc_a42, ssvc_a26, de_type2, de2, de_2_state, empty_init, ROT0, "Data East", "Secret Service (4.2 alternate sound)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1990, simp_a27, 0, de_type3, de2, de_2_state, empty_init, ROT0, "Data East", "The Simpsons (2.7)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1990, simp_a20, simp_a27, de_type3, de2, de_2_state, empty_init, ROT0, "Data East", "The Simpsons (2.0)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1988, tmac_a24, 0, de_type2, de2, de_2_state, empty_init, ROT0, "Data East", "Time Machine (2.4)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1988, tmac_a18, tmac_a24, de_type2, de2, de_2_state, empty_init, ROT0, "Data East", "Time Machine (1.8)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1988, tmac_g18, tmac_a24, de_type2, de2, de_2_state, empty_init, ROT0, "Data East", "Time Machine (1.8, Germany)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1988, torp_e21, 0, de_type2, de2, de_2_state, empty_init, ROT0, "Data East", "Torpedo Alley (2.1, Europe)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1988, torp_a16, torp_e21, de_type2, de2, de_2_state, empty_init, ROT0, "Data East", "Torpedo Alley (1.6)", MACHINE_IS_SKELETON_MECHANICAL) diff --git a/src/mame/drivers/de_3.cpp b/src/mame/drivers/de_3.cpp index b700451dde6..0966e993a3d 100644 --- a/src/mame/drivers/de_3.cpp +++ b/src/mame/drivers/de_3.cpp @@ -1,9 +1,43 @@ // license:BSD-3-Clause // copyright-holders:Miodrag Milanovic -/* - DataEast/Sega Version 3 -*/ +/******************************************************************************************************************** +PINBALL +Data East System 3 +Here are the key codes to enable play: + +Game NUM Start game End ball +--------------------------------------------------------------------------------------------- +Back to the Future 5009 +Checkpoint 5010 +Batman 5011 +The Simpsons 5012 +World's Fair (not emulated) 5013 +Star Trek 5014 +Total Recall (not emulated) 5015 +Kill Shot (not emulated) 5016 +Teenage Mutant Ninja Turtles 5017 +Tales from the Crypt 5018 +Hook 5019 +Jurassic Park 5020 +Operation Desert Storm (not emulated) 5021 +Adv. of Rocky & Bullwinkle & Friends 5022 +WWF Royal Rumble 5023 +Star Wars 5024 +Mad (not emulated) 5025 +Lethal Weapon 3 5026 +Last Action Hero 5027 +The Who's Tommy Pinball Wizard 5028 +Guns n' Roses 5029 +Aaron Spelling -- +Michael Jordan -- + + +Status: + +ToDo: + +*********************************************************************************************************************/ #include "emu.h" #include "audio/decobsmt.h" @@ -52,8 +86,6 @@ private: void pia2c_pa_w(uint8_t data); uint8_t pia2c_pb_r(); void pia2c_pb_w(uint8_t data); - DECLARE_WRITE_LINE_MEMBER(pia28_ca2_w) { } // comma3&4 - DECLARE_WRITE_LINE_MEMBER(pia28_cb2_w) { } // comma1&2 uint8_t pia28_w7_r(); void dig0_w(uint8_t data); void dig1_w(uint8_t data); @@ -86,13 +118,13 @@ private: // output_finder<32> m_digits; // output_finder<> m_diag_digit; -// uint32_t m_segment1; -// uint32_t m_segment2; - uint8_t m_strobe; - uint8_t m_kbdrow; - uint8_t m_diag; - bool m_ca1; - uint8_t m_sound_data; +// uint32_t m_segment1 = 0U; +// uint32_t m_segment2 = 0U; + uint8_t m_strobe = 0U; + uint8_t m_kbdrow = 0U; + uint8_t m_diag = 0U; + bool m_ca1 = 0; + uint8_t m_sound_data = 0U; }; @@ -102,66 +134,66 @@ static INPUT_PORTS_START( de_3 ) PORT_START("INP1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYPAD ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_START("INP2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_A) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_S) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_D) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_F) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_G) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_H) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_J) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_K) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_A) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_S) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_D) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_F) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_G) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_H) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_J) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_K) PORT_START("INP4") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_L) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Z) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_C) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_V) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_B) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_N) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_M) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_COMMA) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_L) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_Z) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_C) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_V) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_B) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_N) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_M) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_COMMA) PORT_START("INP8") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_STOP) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_SLASH) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_COLON) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_QUOTE) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_X) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_MINUS) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_EQUALS) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_BACKSPACE) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_STOP) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_SLASH) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_COLON) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_QUOTE) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_X) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_MINUS) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_EQUALS) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_BACKSPACE) PORT_START("INP10") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_OPENBRACE) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_CLOSEBRACE) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_BACKSLASH) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_ENTER) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_LEFT) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_RIGHT) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_UP) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_DOWN) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_OPENBRACE) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_CLOSEBRACE) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_BACKSLASH) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_ENTER) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_LEFT) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_RIGHT) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_UP) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_DOWN) PORT_START("INP20") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Q) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_W) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_E) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_R) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Y) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_U) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_I) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_O) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_Q) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_W) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_E) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_R) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_Y) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_U) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_I) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_O) PORT_START("INP40") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_LALT) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_LALT) PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("INP80") diff --git a/src/mame/drivers/de_3b.cpp b/src/mame/drivers/de_3b.cpp index 0b4cb76d898..67eb72675b7 100644 --- a/src/mame/drivers/de_3b.cpp +++ b/src/mame/drivers/de_3b.cpp @@ -1,10 +1,26 @@ // license:BSD-3-Clause // copyright-holders:Miodrag Milanovic -/* - DataEast/Sega Version 3b -*/ +/******************************************************************************************************************** +PINBALL +Data East System 3b +Here are the key codes to enable play: +Game NUM Start game End ball +--------------------------------------------------------------------------------------------- +Maverick the Movie 5031 +Baywatch 5033 +Mary Shelley's Frankenstein 5036 +Batman Forever 5038 +Derby Daze (not emulated) 5039 +Cut the Cheese (redemption) 5048 +Roach Racers (not emulated) 5054 + +Status: + +ToDo: + +*********************************************************************************************************************/ #include "emu.h" #include "machine/decopincpu.h" #include "video/decodmd3.h" @@ -16,17 +32,15 @@ extern const char layout_pinball[]; class de_3b_state : public genpin_class { public: - de_3b_state(const machine_config &mconfig, device_type type, const char *tag) : - genpin_class(mconfig, type, tag), - m_decobsmt(*this, "decobsmt"), - m_dmdtype3(*this, "decodmd") + de_3b_state(const machine_config &mconfig, device_type type, const char *tag) + : genpin_class(mconfig, type, tag) + , m_decobsmt(*this, "decobsmt") + , m_dmdtype3(*this, "decodmd") { } void detest(machine_config &config); void de_3b(machine_config &config); - void init_de_3b(); - private: // devices optional_device m_decobsmt; @@ -50,8 +64,8 @@ private: // driver_device overrides virtual void machine_reset() override; - uint8_t m_kbdrow; - uint8_t m_sound_data; + uint8_t m_row = 0U; + uint8_t m_sound_data = 0U; }; @@ -61,66 +75,66 @@ static INPUT_PORTS_START( de_3b ) PORT_START("INP1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYPAD ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_START("INP2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_A) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_S) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_D) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_F) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_G) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_H) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_J) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_K) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_A) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_S) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_D) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_F) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_G) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_H) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_J) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_K) PORT_START("INP4") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_L) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Z) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_C) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_V) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_B) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_N) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_M) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_COMMA) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_L) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_Z) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_C) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_V) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_B) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_N) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_M) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_COMMA) PORT_START("INP8") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_STOP) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_SLASH) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_COLON) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_QUOTE) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_X) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_MINUS) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_EQUALS) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_BACKSPACE) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_STOP) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_SLASH) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_COLON) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_QUOTE) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_X) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_MINUS) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_EQUALS) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_BACKSPACE) PORT_START("INP10") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_OPENBRACE) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_CLOSEBRACE) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_BACKSLASH) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_ENTER) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_LEFT) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_RIGHT) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_UP) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_DOWN) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_OPENBRACE) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_CLOSEBRACE) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_BACKSLASH) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_ENTER) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_LEFT) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_RIGHT) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_UP) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_DOWN) PORT_START("INP20") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Q) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_W) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_E) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_R) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Y) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_U) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_I) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_O) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_Q) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_W) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_E) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_R) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_Y) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_U) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_I) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_O) PORT_START("INP40") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_LALT) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_LALT) PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("INP80") @@ -130,7 +144,7 @@ INPUT_PORTS_END uint8_t de_3b_state::switch_r() { char kbdrow[8]; - sprintf(kbdrow,"INP%X",m_kbdrow); + sprintf(kbdrow,"INP%X",m_row); return ~ioport(kbdrow)->read(); } @@ -143,7 +157,7 @@ void de_3b_state::switch_w(uint8_t data) if(data & (1< + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/layout/de2.lay b/src/mame/layout/de2.lay index a4162aa9005..fd3a0478940 100644 --- a/src/mame/layout/de2.lay +++ b/src/mame/layout/de2.lay @@ -2,6 +2,8 @@ @@ -11,11 +13,6 @@ copyright-holders:Barry Rodewald - - - - - @@ -25,7 +22,7 @@ copyright-holders:Barry Rodewald - + @@ -37,31 +34,27 @@ copyright-holders:Barry Rodewald - - - + - - - +