From e97378f50be77e348ebadc6697f7f8a25877b4f9 Mon Sep 17 00:00:00 2001 From: hap Date: Sun, 12 Nov 2023 00:11:25 +0100 Subject: psion: fix crash regression --- src/mame/psion/psion.cpp | 13 ++++++------- src/mame/psion/psion.h | 6 +----- src/mame/saitek/ccompan2.cpp | 1 - 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/mame/psion/psion.cpp b/src/mame/psion/psion.cpp index e15080ccf17..d78da75b5ab 100644 --- a/src/mame/psion/psion.cpp +++ b/src/mame/psion/psion.cpp @@ -450,9 +450,9 @@ void psion_state::machine_start() membank("rambank")->set_entry(0); } - m_nvram2->set_base(m_ram, m_ram.bytes()); - if (m_nvram3) - m_nvram3->set_base(m_paged_ram.get(), m_ram_bank_count * 0x4000); + m_nvram1->set_base(m_ram, m_ram.bytes()); + if (m_nvram2) + m_nvram2->set_base(m_paged_ram.get(), m_ram_bank_count * 0x4000); save_item(NAME(m_kb_counter)); save_item(NAME(m_enable_nmi)); @@ -555,8 +555,7 @@ void psion_state::psion_2lines(machine_config &config) SPEAKER(config, "mono").front_center(); BEEP(config, m_beep, 3250).add_route(ALL_OUTPUTS, "mono", 1.00); - //NVRAM(config, "nvram1"); // sys_regs - NVRAM(config, "nvram2", nvram_device::DEFAULT_ALL_0); // RAM + NVRAM(config, "nvram1", nvram_device::DEFAULT_ALL_0); // RAM TIMER(config, "nmi_timer").configure_periodic(FUNC(psion_state::nmi_timer), attotime::from_seconds(1)); @@ -635,7 +634,7 @@ void psion_state::psionp350(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &psion_state::psionp350_mem); - NVRAM(config, "nvram3", nvram_device::DEFAULT_ALL_0); // paged RAM + NVRAM(config, "nvram2", nvram_device::DEFAULT_ALL_0); // paged RAM } void psion_state::psionlz(machine_config &config) @@ -644,7 +643,7 @@ void psion_state::psionlz(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &psion_state::psionlz_mem); - NVRAM(config, "nvram3", nvram_device::DEFAULT_ALL_0); // paged RAM + NVRAM(config, "nvram2", nvram_device::DEFAULT_ALL_0); // paged RAM } /* ROM definition */ diff --git a/src/mame/psion/psion.h b/src/mame/psion/psion.h index 8e0f1de1f57..42941d87a42 100644 --- a/src/mame/psion/psion.h +++ b/src/mame/psion/psion.h @@ -33,8 +33,6 @@ public: , m_pack2(*this, "pack2") , m_nvram1(*this, "nvram1") , m_nvram2(*this, "nvram2") - , m_nvram3(*this, "nvram3") - , m_sys_register(*this, "sys_register") , m_ram(*this, "ram") , m_kb_lines(*this, "K%u", 1U) { } @@ -56,12 +54,10 @@ protected: required_device m_pack1; required_device m_pack2; required_device m_nvram1; - required_device m_nvram2; - optional_device m_nvram3; + optional_device m_nvram2; uint16_t m_kb_counter = 0; bool m_enable_nmi = false; - optional_shared_ptr m_sys_register; uint8_t m_pulse = 0; // RAM/ROM banks diff --git a/src/mame/saitek/ccompan2.cpp b/src/mame/saitek/ccompan2.cpp index 0be2555313f..12b4308c888 100644 --- a/src/mame/saitek/ccompan2.cpp +++ b/src/mame/saitek/ccompan2.cpp @@ -54,7 +54,6 @@ is either VCC or GND to distinguish between the two. #include "emu.h" #include "cpu/m6800/m6801.h" -#include "machine/nvram.h" #include "machine/sensorboard.h" #include "sound/dac.h" #include "video/pwm.h" -- cgit v1.2.3