summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/pofo/ram.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/pofo/ram.cpp')
-rw-r--r--src/devices/bus/pofo/ram.cpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/devices/bus/pofo/ram.cpp b/src/devices/bus/pofo/ram.cpp
index 5498a9b8c32..253b30d228b 100644
--- a/src/devices/bus/pofo/ram.cpp
+++ b/src/devices/bus/pofo/ram.cpp
@@ -29,7 +29,8 @@ DEFINE_DEVICE_TYPE(PORTFOLIO_RAM_CARD, portfolio_ram_card_device, "portfolio_ram
portfolio_ram_card_device::portfolio_ram_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, PORTFOLIO_RAM_CARD, tag, owner, clock),
device_portfolio_memory_card_slot_interface(mconfig, *this),
- device_nvram_interface(mconfig, *this)
+ device_nvram_interface(mconfig, *this),
+ m_nvram(*this, "nvram", 0x20000, ENDIANNESS_LITTLE)
{
}
@@ -40,7 +41,25 @@ portfolio_ram_card_device::portfolio_ram_card_device(const machine_config &mconf
void portfolio_ram_card_device::device_start()
{
- m_nvram.allocate(0x20000);
+}
+
+
+void portfolio_ram_card_device::nvram_default()
+{
+}
+
+
+bool portfolio_ram_card_device::nvram_read(util::read_stream &file)
+{
+ auto const [err, actual] = read(file, m_nvram, m_nvram.bytes());
+ return !err && (actual == m_nvram.bytes());
+}
+
+
+bool portfolio_ram_card_device::nvram_write(util::write_stream &file)
+{
+ auto const [err, actual] = write(file, m_nvram, m_nvram.bytes());
+ return !err;
}