diff options
Diffstat (limited to 'src/mame/drivers/hh_tms1k.cpp')
-rw-r--r-- | src/mame/drivers/hh_tms1k.cpp | 139 |
1 files changed, 33 insertions, 106 deletions
diff --git a/src/mame/drivers/hh_tms1k.cpp b/src/mame/drivers/hh_tms1k.cpp index d048b615392..1bd835b36bd 100644 --- a/src/mame/drivers/hh_tms1k.cpp +++ b/src/mame/drivers/hh_tms1k.cpp @@ -211,6 +211,7 @@ #include "merlin.lh" // clickable #include "mmerlin.lh" // clickable #include "monkeysee.lh" +#include "phpball.lh" #include "quizwizc.lh" #include "raisedvl.lh" #include "simon.lh" // clickable @@ -229,7 +230,7 @@ #include "xl25.lh" // clickable #include "zodiac.lh" -#include "hh_tms1k_test.lh" // common test-layout - use external artwork +//#include "hh_tms1k_test.lh" // common test-layout - use external artwork // machine_start/reset @@ -393,6 +394,12 @@ u8 hh_tms1k_state::read_rotated_inputs(int columns, u8 rowmask) return ret; } +INPUT_CHANGED_MEMBER(hh_tms1k_state::reset_button) +{ + // when an input is directly wired to MCU INIT pin + m_maincpu->set_input_line(INPUT_LINE_RESET, newval ? ASSERT_LINE : CLEAR_LINE); +} + INPUT_CHANGED_MEMBER(hh_tms1k_state::power_button) { m_power_on = (bool)(uintptr_t)param; @@ -798,41 +805,13 @@ static INPUT_PORTS_START( mathmagi ) PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END -// output PLA is not decapped +// output PLA is not decapped, this was made by hand static const u16 mathmagi_output_pla[0x20] = { - lA+lB+lC+lD+lE+lF, // 0 - lB+lC, // 1 - lA+lB+lG+lE+lD, // 2 - lA+lB+lG+lC+lD, // 3 - lF+lB+lG+lC, // 4 - lA+lF+lG+lC+lD, // 5 - lA+lF+lG+lC+lD+lE, // 6 - lA+lB+lC, // 7 - lA+lB+lC+lD+lE+lF+lG, // 8 - lA+lB+lG+lF+lC+lD, // 9 - lA+lB+lG+lE, // question mark - lE+lG, // r - lD, // underscore? - lA+lF+lG+lE+lD, // E - lG, // - - 0, // empty - 0, // empty - lG, // lamp 4 or MATH - - lD, // lamp 3 - lF+lE+lD+lC+lG, // b - lB, // lamp 2 - lB+lG, // MATH + - lB+lC, // MATH mul - lF+lG+lB+lC+lD, // y - lA, // lamp 1 - lA+lG, // MATH div - lA+lD, // EQUALS - 0, // ? - 0, // ? - lE+lD+lC+lG, // o - 0, // ? - lA+lF+lE+lD+lC // G + 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, // 0, 1, 2, 3, 4, 5, 6, 7 + 0x7f, 0x6f, 0x53, 0x50, 0x08, 0x79, 0x40, 0x00, // 8, 9, questionmark, r, underscore?, E, -(negative), empty + 0x00, 0x40, 0x08, 0x7c, 0x02, 0x42, 0x06, 0x6e, // empty, led4/-, led3, b, led2, +, ×, y + 0x01, 0x41, 0x09, 0, 0, 0x5c, 0, 0x3d // led1, ÷, =, ?, ?, o, ?, G }; void mathmagi_state::mathmagi(machine_config &config) @@ -1175,7 +1154,7 @@ WRITE16_MEMBER(zodiac_state::write_r) WRITE16_MEMBER(zodiac_state::write_o) { // O0-O7: digit segment/led data - m_o = data; + m_o = bitswap<8>(data,0,7,6,5,4,3,2,1); prepare_display(); } @@ -1244,41 +1223,11 @@ static INPUT_PORTS_START( zodiac ) PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END -// output PLA is not decapped +// output PLA is not decapped, dumped electronically static const u16 zodiac_output_pla[0x20] = { - 0x80, // empty/led 1/7 - lC, // i/led 2/8 - lE+lG, // r/led 3/9 - lC+lE+lG, // n - lF, // seg F/led 4/10 - 0, // ? - 0, // ? - lC+lE+lF+lG, // h - lB, // seg B/led 5/11 - lD, // seg D/led 6/12 - 0, // ? - 0, // ? - 0, // ? - 0, // ? - lA+lB+lE+lF+lG, // P - 0, // ? - lA+lB+lC+lD+lE+lF, // 0 - lB+lC, // 1 - lA+lB+lD+lE+lG, // 2 - lA+lB+lC+lD+lG, // 3 - lB+lC+lF+lG, // 4 - lA+lC+lD+lF+lG, // 5 - lA+lC+lD+lE+lF+lG, // 6 - lA+lB+lC, // 7 - lA+lB+lC+lD+lE+lF+lG, // 8 - lA+lB+lC+lD+lF+lG, // 9 - lA+lB+lC+lE+lF+lG, // A - lB+lC+lD+lE+lG, // d - lA+lD+lE+lF+lG, // E - lB+lC+lD+lE, // J - lD+lE+lF, // L - lB+lC+lD+lE+lF // U + 0x01, 0x08, 0xa0, 0xa8, 0x40, 0x48, 0xe0, 0xe8, 0x06, 0x10, 0xa6, 0xb0, 0x46, 0x50, 0xe6, 0xf0, + 0x7e, 0x0c, 0xb6, 0x9e, 0xcc, 0xda, 0xfa, 0x0e, 0xfe, 0xce, 0xee, 0xbc, 0xf2, 0x3c, 0x70, 0x7c }; void zodiac_state::zodiac(machine_config &config) @@ -2906,7 +2855,7 @@ static const u16 cnfball2_output_pla[0x20] = // first half was dumped electronically 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 0x40, 0x01, 0x08, 0x02, 0x04, 0x00, - // rest is unknown + // rest is unused, game only outputs with status bit clear 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; @@ -2972,8 +2921,6 @@ public: DECLARE_WRITE16_MEMBER(write_r); DECLARE_WRITE16_MEMBER(write_o); DECLARE_READ8_MEMBER(read_k); - - DECLARE_INPUT_CHANGED_MEMBER(reset_button); void eleciq(machine_config &config); }; @@ -3056,15 +3003,9 @@ static INPUT_PORTS_START( eleciq ) PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START("RESET") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_R) PORT_NAME("Reset") PORT_CHANGED_MEMBER(DEVICE_SELF, eleciq_state, reset_button, nullptr) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_R) PORT_NAME("Reset") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, reset_button, nullptr) INPUT_PORTS_END -INPUT_CHANGED_MEMBER(eleciq_state::reset_button) -{ - // reset button is directly wired to TMS1000 INIT pin - m_maincpu->set_input_line(INPUT_LINE_RESET, newval ? ASSERT_LINE : CLEAR_LINE); -} - void eleciq_state::eleciq(machine_config &config) { /* basic machine hardware */ @@ -4374,8 +4315,6 @@ public: DECLARE_WRITE16_MEMBER(write_r); DECLARE_WRITE16_MEMBER(write_o); DECLARE_READ8_MEMBER(read_k); - - DECLARE_INPUT_CHANGED_MEMBER(reset_button); void f2pbball(machine_config &config); }; @@ -4438,15 +4377,9 @@ static INPUT_PORTS_START( f2pbball ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_COCKTAIL PORT_NAME("P2 Fast") PORT_START("RESET") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("P1 Reset") PORT_CHANGED_MEMBER(DEVICE_SELF, f2pbball_state, reset_button, nullptr) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("P1 Reset") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, reset_button, nullptr) INPUT_PORTS_END -INPUT_CHANGED_MEMBER(f2pbball_state::reset_button) -{ - // reset button is directly wired to TMS1000 INIT pin - m_maincpu->set_input_line(INPUT_LINE_RESET, newval ? ASSERT_LINE : CLEAR_LINE); -} - void f2pbball_state::f2pbball(machine_config &config) { /* basic machine hardware */ @@ -4728,7 +4661,7 @@ static INPUT_PORTS_START( gpoker ) PORT_START("IN.3") // R3 PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3") - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_CODE(KEYCODE_D) PORT_NAME("9/Deal") // DL, shares pad with 9 + PORT_BIT( 0x02, 0x02, IPT_CUSTOM ) PORT_CONDITION("FAKE", 0x03, NOTEQUALS, 0x00) // 9/DL PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("Clear Entry") // CE @@ -4746,6 +4679,10 @@ static INPUT_PORTS_START( gpoker ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_T) PORT_NAME("Total") // T PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_B) PORT_NAME("Bet") // BT + + PORT_START("FAKE") // 9/DL are electronically the same button + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_D) PORT_NAME("Deal") // DL INPUT_PORTS_END void gpoker_state::gpoker(machine_config &config) @@ -4827,7 +4764,7 @@ WRITE16_MEMBER(gjackpot_state::write_r) DB] SP] [1] [2] [3] [DS] [DR] BT] HT] - [10/1] [T] [MD [CH [AC] + [10/0] [T] [MD [CH [AC] GO] ST] */ @@ -5890,23 +5827,13 @@ static INPUT_PORTS_START( elecbowl ) PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_V) // 2 players sw? INPUT_PORTS_END -// output PLA is not decapped +// output PLA is not decapped, this was made by hand static const u16 elecbowl_output_pla[0x20] = { - lA+lB+lC+lD+lE+lF, // 0 - lB+lC, // 1 - lA+lB+lG+lE+lD, // 2 - lA+lB+lG+lC+lD, // 3 - lF+lB+lG+lC, // 4 - lA+lF+lG+lC+lD, // 5 - lA+lF+lG+lC+lD+lE, // 6 - lA+lB+lC, // 7 - lA+lB+lC+lD+lE+lF+lG, // 8 - lA+lB+lG+lF+lC+lD, // 9 - - 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, - 0,1,2,3,4,5,6,7, // lamp muxes select - 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f + 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, // 0-9 + 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, // ? + 0, 1, 2, 3, 4, 5, 6, 7, // lamp muxes select + 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f // ? }; void elecbowl_state::elecbowl(machine_config &config) @@ -8879,7 +8806,7 @@ static INPUT_PORTS_START( tandy12 ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Button 5") INPUT_PORTS_END -// output PLA is not decapped +// output PLA is not decapped, this was made by hand static const u16 tandy12_output_pla[0x20] = { // these are certain @@ -10033,7 +9960,7 @@ void phpball_state::phpball(machine_config &config) m_maincpu->o().set(FUNC(phpball_state::write_o)); TIMER(config, "display_decay").configure_periodic(FUNC(hh_tms1k_state::display_decay_tick), attotime::from_msec(1)); - config.set_default_layout(layout_hh_tms1k_test); + config.set_default_layout(layout_phpball); /* sound hardware */ SPEAKER(config, "mono").front_center(); |