From 84c051119de36e61f28f1aa060329ef4b1a47074 Mon Sep 17 00:00:00 2001 From: hap Date: Mon, 13 Apr 2020 12:45:02 +0200 Subject: [PATCH] microvsn: internal artwork for lcd (nw) --- hash/fidel_scc.xml | 2 +- hash/microvision.xml | 28 ++++++------- src/mame/drivers/mephisto_mondial.cpp | 4 ++ src/mame/drivers/mephisto_mondial68k.cpp | 10 +---- src/mame/drivers/mephisto_montec.cpp | 1 - src/mame/drivers/microvsn.cpp | 53 +++++------------------- src/mame/drivers/saitek_mark5.cpp | 22 +++++++--- src/mame/layout/microvision.lay | 32 ++++++++++++++ src/mame/layout/saitek_mark5.lay | 16 +++---- src/mame/layout/saitek_mark6.lay | 16 +++---- 10 files changed, 96 insertions(+), 88 deletions(-) create mode 100644 src/mame/layout/microvision.lay diff --git a/hash/fidel_scc.xml b/hash/fidel_scc.xml index 77ca676293c..6d4b6e17c4f 100644 --- a/hash/fidel_scc.xml +++ b/hash/fidel_scc.xml @@ -14,7 +14,7 @@ license:CC0 Fidelity Electronics - + diff --git a/hash/microvision.xml b/hash/microvision.xml index 701f20f5651..7556eed817e 100644 --- a/hash/microvision.xml +++ b/hash/microvision.xml @@ -26,7 +26,7 @@ One more game "Barrage" was announced but not released. The "clock" feature is used to indicate MCU clock frequency The "pla" feature is for TMS1100 output PLA type The "paddle" feature is used to indicate whether there is paddle circuitry on the PCB -The "overlay" feature indicates screen/keypad overlay +The "butmask" feature indicates cartridge button restrict mask (active-low) --> @@ -41,7 +41,7 @@ The "overlay" feature indicates screen/keypad overlay - + @@ -58,7 +58,7 @@ The "overlay" feature indicates screen/keypad overlay - + @@ -75,7 +75,7 @@ The "overlay" feature indicates screen/keypad overlay - + @@ -92,7 +92,7 @@ The "overlay" feature indicates screen/keypad overlay - + @@ -109,7 +109,7 @@ The "overlay" feature indicates screen/keypad overlay - + @@ -125,7 +125,7 @@ The "overlay" feature indicates screen/keypad overlay - + @@ -142,7 +142,7 @@ The "overlay" feature indicates screen/keypad overlay - + @@ -159,7 +159,7 @@ The "overlay" feature indicates screen/keypad overlay - + @@ -176,7 +176,7 @@ The "overlay" feature indicates screen/keypad overlay - + @@ -193,7 +193,7 @@ The "overlay" feature indicates screen/keypad overlay - + @@ -210,7 +210,7 @@ The "overlay" feature indicates screen/keypad overlay - + @@ -227,7 +227,7 @@ The "overlay" feature indicates screen/keypad overlay - + @@ -244,7 +244,7 @@ The "overlay" feature indicates screen/keypad overlay - + diff --git a/src/mame/drivers/mephisto_mondial.cpp b/src/mame/drivers/mephisto_mondial.cpp index b9f0b01c845..030fce9ee53 100644 --- a/src/mame/drivers/mephisto_mondial.cpp +++ b/src/mame/drivers/mephisto_mondial.cpp @@ -6,6 +6,10 @@ Mephisto Mondial Mephisto Mondial II + TODO: + - split driver into 2? they're not on the same hardware + - add mondial MM 1000 module + **************************************************************************************************/ #include "emu.h" diff --git a/src/mame/drivers/mephisto_mondial68k.cpp b/src/mame/drivers/mephisto_mondial68k.cpp index bbcc6598dfd..cd452ffd3d3 100644 --- a/src/mame/drivers/mephisto_mondial68k.cpp +++ b/src/mame/drivers/mephisto_mondial68k.cpp @@ -51,14 +51,13 @@ protected: void mondial68k_mem(address_map &map); DECLARE_WRITE32_MEMBER(lcd_s_w); - DECLARE_WRITE_LINE_MEMBER(speaker_w); DECLARE_WRITE8_MEMBER(input_mux_w); DECLARE_WRITE8_MEMBER(board_mux_w); DECLARE_READ8_MEMBER(inputs_r); TIMER_DEVICE_CALLBACK_MEMBER(refresh_leds); required_device m_maincpu; - required_device m_dac; + required_device m_dac; required_device m_board; required_device m_lcd; required_ioport_array<4> m_inputs; @@ -104,11 +103,6 @@ WRITE32_MEMBER(mondial68k_state::lcd_s_w) m_digits[i] = bitswap<8>((data & 0x7fffffff) >> (8 * i), 7,4,5,0,1,2,3,6); } -WRITE_LINE_MEMBER(mondial68k_state::speaker_w) -{ - m_dac->write(state); -} - WRITE8_MEMBER(mondial68k_state::board_mux_w) { m_board_mux = data; @@ -208,7 +202,7 @@ void mondial68k_state::mondial68k(machine_config &config) outlatch.q_out_cb<1>().set(m_lcd, FUNC(pcf2112_device::data_w)); outlatch.q_out_cb<2>().set(m_lcd, FUNC(pcf2112_device::dlen_w)); outlatch.q_out_cb<6>().set_nop(); // another DAC input? - outlatch.q_out_cb<7>().set(FUNC(mondial68k_state::speaker_w)); + outlatch.q_out_cb<7>().set(m_dac, FUNC(dac_1bit_device::write)); SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS); m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess)); diff --git a/src/mame/drivers/mephisto_montec.cpp b/src/mame/drivers/mephisto_montec.cpp index 1ac523cfeb9..ec157db1d80 100644 --- a/src/mame/drivers/mephisto_montec.cpp +++ b/src/mame/drivers/mephisto_montec.cpp @@ -17,7 +17,6 @@ - megaiv/smondial leds are tri-color - why are megaiv/smondial2 beeps noisy? - add Monte Carlo IV (non-LE) - - add MM 1000 module **************************************************************************************************/ diff --git a/src/mame/drivers/microvsn.cpp b/src/mame/drivers/microvsn.cpp index d7b5230d397..a4de725d2c1 100644 --- a/src/mame/drivers/microvsn.cpp +++ b/src/mame/drivers/microvsn.cpp @@ -15,7 +15,7 @@ games had an Intel 8021 MCU at first, but Milton Bradley switched to TMS1100. Each game had a screen- and keypad overlay attached to it, MAME external artwork is recommended. It's also advised to disable screen filtering, -eg. with -prescale, or on Windows simply -video gdi. +eg. with -prescale or -nofilter. TODO: - dump/add remaining 8021 cartridges @@ -39,6 +39,8 @@ TODO: #include "screen.h" #include "speaker.h" +#include "microvision.lh" + namespace { @@ -56,8 +58,7 @@ public: m_paddle_timer(*this, "paddle_timer"), m_inputs(*this, "COL%u", 0), m_paddle(*this, "PADDLE"), - m_conf(*this, "CONF"), - m_overlay_out(*this, "overlay") + m_conf(*this, "CONF") { } void microvision(machine_config &config); @@ -80,14 +81,13 @@ private: required_ioport_array<3> m_inputs; required_ioport m_paddle; required_ioport m_conf; - output_finder<> m_overlay_out; u32 tms1100_decode_micro(offs_t offset); DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load); void apply_settings(void); u8 m_pla_auto; - u8 m_overlay_auto; + u16 m_butmask_auto; u16 m_button_mask; bool m_paddle_auto; bool m_paddle_on; @@ -115,14 +115,12 @@ private: void microvision_state::machine_start() { - m_overlay_out.resolve(); - // register for savestates save_item(NAME(m_r)); save_item(NAME(m_p0)); save_item(NAME(m_p2)); - // don't save: m_pla_auto, m_overlay_auto, m_paddle_auto, + // don't save: m_pla_auto, m_butmask_auto, m_paddle_auto, // m_button_mask, m_paddle_on } @@ -204,7 +202,7 @@ DEVICE_IMAGE_LOAD_MEMBER(microvision_state::cart_load) // set default settings u32 clock = (size == 0x400) ? 3500000 : 500000; m_pla_auto = 0; - m_overlay_auto = 0; + m_butmask_auto = 0xfff; m_paddle_auto = false; if (image.loaded_through_softlist()) @@ -213,7 +211,7 @@ DEVICE_IMAGE_LOAD_MEMBER(microvision_state::cart_load) if (sclock != 0) clock = sclock; - m_overlay_auto = strtoul(image.get_feature("overlay"), nullptr, 0); + m_butmask_auto = ~strtoul(image.get_feature("butmask"), nullptr, 0) & 0xfff; m_pla_auto = strtoul(image.get_feature("pla"), nullptr, 0) ? 1 : 0; m_paddle_auto = bool(strtoul(image.get_feature("paddle"), nullptr, 0) ? 1 : 0); } @@ -239,38 +237,8 @@ void microvision_state::apply_settings() { u8 conf = m_conf->read(); - u8 overlay = (conf & 1) ? m_overlay_auto : 0; - m_overlay_out = overlay; - - // overlay physically restricts button panel - switch (overlay) - { - case 1: case 5: - m_button_mask = 0x454; - break; - case 2: case 8: case 10: - m_button_mask = 0x555; - break; - case 3: - m_button_mask = 0x858; - break; - case 4: - m_button_mask = 0xaea; - break; - case 6: - m_button_mask = 0xaaa; - break; - case 11: - m_button_mask = 0xafa; - break; - case 12: - m_button_mask = 0x404; - break; - - default: - m_button_mask = 0xfff; - break; - } + // cartridge physically restricts button panel (some glitches otherwise) + m_button_mask = (conf & 1) ? m_butmask_auto : 0xfff; u8 pla = ((conf & 0x18) == 0x10) ? m_pla_auto : (conf >> 3 & 1); m_tms1100->set_output_pla(microvision_output_pla[pla]); @@ -494,6 +462,7 @@ void microvision_state::microvision(machine_config &config) m_lcd->write_cols().set(FUNC(microvision_state::lcd_output_w)); PWM_DISPLAY(config, m_lcd_pwm).set_size(16, 16); + config.set_default_layout(layout_microvision); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD)); screen.set_refresh_hz(60); diff --git a/src/mame/drivers/saitek_mark5.cpp b/src/mame/drivers/saitek_mark5.cpp index 2fa81958029..2accd278b81 100644 --- a/src/mame/drivers/saitek_mark5.cpp +++ b/src/mame/drivers/saitek_mark5.cpp @@ -99,7 +99,7 @@ private: required_device_array m_lcd; required_device m_dac; required_shared_ptr m_nvram; - required_ioport_array<7+1> m_inputs; + required_ioport_array<7+2> m_inputs; output_finder<3, 8, 34> m_out_x; // address maps @@ -364,11 +364,11 @@ static INPUT_PORTS_START( mark5 ) PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_M) PORT_NAME("Mode") PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_COMMA) PORT_NAME("Start Clock") - PORT_START("IN.5") // square 'd-pad' (8-way, so define joystick) - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP) PORT_CODE(KEYCODE_UP) PORT_NAME("Cursor Up") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN) PORT_CODE(KEYCODE_DOWN) PORT_NAME("Cursor Down") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT) PORT_CODE(KEYCODE_RIGHT) PORT_NAME("Cursor Right") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT) PORT_CODE(KEYCODE_LEFT) PORT_NAME("Cursor Left") + PORT_START("IN.5") // d-pad reads here + PORT_BIT(0x01, 0x01, IPT_CUSTOM) PORT_CONDITION("IN.8", 0x31, NOTEQUALS, 0x00) + PORT_BIT(0x02, 0x02, IPT_CUSTOM) PORT_CONDITION("IN.8", 0xc2, NOTEQUALS, 0x00) + PORT_BIT(0x04, 0x04, IPT_CUSTOM) PORT_CONDITION("IN.8", 0xa4, NOTEQUALS, 0x00) + PORT_BIT(0x08, 0x08, IPT_CUSTOM) PORT_CONDITION("IN.8", 0x58, NOTEQUALS, 0x00) PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNUSED) PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNUSED) @@ -389,6 +389,16 @@ static INPUT_PORTS_START( mark5 ) PORT_CONFNAME( 0x02, 0x02, "LCD Light" ) PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) PORT_CONFSETTING( 0x02, DEF_STR( On ) ) + + PORT_START("IN.8") // square 'd-pad' (8-way, so define joystick) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP) PORT_CODE(KEYCODE_UP) PORT_NAME("Cursor Up") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN) PORT_CODE(KEYCODE_DOWN) PORT_NAME("Cursor Down") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT) PORT_CODE(KEYCODE_RIGHT) PORT_NAME("Cursor Right") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT) PORT_CODE(KEYCODE_LEFT) PORT_NAME("Cursor Left") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_OTHER) // ul + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_OTHER) // ur + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_OTHER) // dl + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_OTHER) // dr INPUT_PORTS_END static INPUT_PORTS_START( mark6 ) diff --git a/src/mame/layout/microvision.lay b/src/mame/layout/microvision.lay new file mode 100644 index 00000000000..a80d1fe24fc --- /dev/null +++ b/src/mame/layout/microvision.lay @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/layout/saitek_mark5.lay b/src/mame/layout/saitek_mark5.lay index 10da1966673..d16efecf8fd 100644 --- a/src/mame/layout/saitek_mark5.lay +++ b/src/mame/layout/saitek_mark5.lay @@ -208,14 +208,14 @@ license:CC0 - - - - - - - - + + + + + + + + diff --git a/src/mame/layout/saitek_mark6.lay b/src/mame/layout/saitek_mark6.lay index 2946308a2f2..4f746395c0f 100644 --- a/src/mame/layout/saitek_mark6.lay +++ b/src/mame/layout/saitek_mark6.lay @@ -522,14 +522,14 @@ license:CC0 - - - - - - - - + + + + + + + +