From 631ee9590ff163d981b16a254f43aec1c1687e41 Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 7 May 2021 17:10:53 +0200 Subject: [PATCH] milano/sexpert: don't save oddly sized nvram file --- src/mame/drivers/mephisto_milano.cpp | 3 ++- src/mame/drivers/mephisto_mm2.cpp | 6 ++---- src/mame/drivers/mephisto_montec.cpp | 6 ++---- src/mame/drivers/novag_sexpert.cpp | 3 ++- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/mame/drivers/mephisto_milano.cpp b/src/mame/drivers/mephisto_milano.cpp index ff6eb6f91a7..6e9fce53faf 100644 --- a/src/mame/drivers/mephisto_milano.cpp +++ b/src/mame/drivers/mephisto_milano.cpp @@ -124,7 +124,8 @@ u8 milano_state::keys_r(offs_t offset) void milano_state::milano_mem(address_map &map) { - map(0x0000, 0x1fbf).ram().share("nvram"); + map(0x0000, 0x1fff).ram().share("nvram"); + map(0x1fc0, 0x1fff).unmaprw(); map(0x1fc0, 0x1fc0).w(m_display, FUNC(mephisto_display2_device::latch_w)); map(0x1fd0, 0x1fd0).w(FUNC(milano_state::board_w)); map(0x1fe0, 0x1fe0).r(FUNC(milano_state::board_r)); diff --git a/src/mame/drivers/mephisto_mm2.cpp b/src/mame/drivers/mephisto_mm2.cpp index 0116edea644..4b0aace06f1 100644 --- a/src/mame/drivers/mephisto_mm2.cpp +++ b/src/mame/drivers/mephisto_mm2.cpp @@ -110,7 +110,6 @@ public: , m_maincpu(*this, "maincpu") , m_outlatch(*this, "outlatch") , m_display(*this, "display") - , m_dac(*this, "dac") , m_keys(*this, "KEY.%u", 0) { } @@ -131,7 +130,6 @@ private: required_device m_maincpu; required_device m_outlatch; required_device m_display; - required_device m_dac; required_ioport_array<2> m_keys; void bup_mem(address_map &map); @@ -314,7 +312,7 @@ void mm2_state::rebel5(machine_config &config) m_outlatch->q_out_cb<3>().set_output("led103"); m_outlatch->q_out_cb<4>().set_output("led104"); m_outlatch->q_out_cb<5>().set_output("led105"); - m_outlatch->q_out_cb<6>().set(m_dac, FUNC(dac_bit_interface::write)); + m_outlatch->q_out_cb<6>().set("dac", FUNC(dac_1bit_device::write)); m_outlatch->q_out_cb<7>().set(m_display, FUNC(mephisto_display1_device::strobe_w)).invert(); MEPHISTO_SENSORS_BOARD(config, "board"); @@ -323,7 +321,7 @@ void mm2_state::rebel5(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25); + DAC_1BIT(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); } void mm2_state::mm5p(machine_config &config) diff --git a/src/mame/drivers/mephisto_montec.cpp b/src/mame/drivers/mephisto_montec.cpp index e23209c3bb7..1d20b40338d 100644 --- a/src/mame/drivers/mephisto_montec.cpp +++ b/src/mame/drivers/mephisto_montec.cpp @@ -51,7 +51,6 @@ public: , m_lcd_latch(*this, "lcd_latch") , m_led_pwm(*this, "led_pwm") , m_lcd(*this, "lcd%u", 0) - , m_dac(*this, "dac") , m_keys(*this, "KEY.%u", 0) , m_digits(*this, "digit%u", 0U) { } @@ -68,7 +67,6 @@ private: required_device m_lcd_latch; required_device m_led_pwm; required_device_array m_lcd; - required_device m_dac; required_ioport_array<2> m_keys; output_finder<8> m_digits; @@ -191,7 +189,7 @@ void montec_state::montec(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); HC259(config, m_lcd_latch); - m_lcd_latch->q_out_cb<2>().set(m_dac, FUNC(dac_bit_interface::write)).invert(); + m_lcd_latch->q_out_cb<2>().set("dac", FUNC(dac_1bit_device::write)).invert(); m_lcd_latch->q_out_cb<4>().set(m_lcd[0], FUNC(pcf2112_device::data_w)); m_lcd_latch->q_out_cb<4>().append(m_lcd[1], FUNC(pcf2112_device::data_w)); m_lcd_latch->q_out_cb<5>().set(m_lcd[1], FUNC(pcf2112_device::dlen_w)); @@ -213,7 +211,7 @@ void montec_state::montec(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25); + DAC_1BIT(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); } void montec_state::montec4le(machine_config &config) diff --git a/src/mame/drivers/novag_sexpert.cpp b/src/mame/drivers/novag_sexpert.cpp index c6be3731712..b769dd64523 100644 --- a/src/mame/drivers/novag_sexpert.cpp +++ b/src/mame/drivers/novag_sexpert.cpp @@ -331,7 +331,8 @@ void sforte_state::lcd_data_w(u8 data) void sexpert_state::sexpert_map(address_map &map) { - map(0x0000, 0x1fef).ram().share("nvram"); // 8KB RAM, but RAM CE pin is deactivated on $1ff0-$1fff + map(0x0000, 0x1fff).ram().share("nvram"); + map(0x1ff0, 0x1fff).unmaprw(); // 8KB RAM, but RAM CE pin is deactivated on $1ff0-$1fff map(0x1ff0, 0x1ff0).r(FUNC(sexpert_state::input1_r)); map(0x1ff1, 0x1ff1).r(FUNC(sexpert_state::input2_r)); map(0x1ff2, 0x1ff2).nopw(); // printer