summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/c64/neoram.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/c64/neoram.cpp')
-rw-r--r--src/devices/bus/c64/neoram.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/devices/bus/c64/neoram.cpp b/src/devices/bus/c64/neoram.cpp
index 4cb34cbbb57..e10ccac39b5 100644
--- a/src/devices/bus/c64/neoram.cpp
+++ b/src/devices/bus/c64/neoram.cpp
@@ -43,7 +43,7 @@ c64_neoram_cartridge_device::c64_neoram_cartridge_device(const machine_config &m
void c64_neoram_cartridge_device::device_start()
{
// allocate memory
- m_nvram.allocate(0x200000);
+ m_nvram = std::make_unique<uint8_t[]>(0x200000);
// state saving
save_item(NAME(m_bank));
@@ -76,6 +76,25 @@ uint8_t c64_neoram_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int s
}
+void c64_neoram_cartridge_device::nvram_default()
+{
+}
+
+
+bool c64_neoram_cartridge_device::nvram_read(util::read_stream &file)
+{
+ auto const [err, actual] = read(file, m_nvram.get(), 0x200000);
+ return !err && (actual == 0x200000);
+}
+
+
+bool c64_neoram_cartridge_device::nvram_write(util::write_stream &file)
+{
+ auto const [err, actual] = write(file, m_nvram.get(), 0x200000);
+ return !err;
+}
+
+
//-------------------------------------------------
// c64_cd_w - cartridge data write
//-------------------------------------------------