summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/c64/fcc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/c64/fcc.cpp')
-rw-r--r--src/devices/bus/c64/fcc.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/devices/bus/c64/fcc.cpp b/src/devices/bus/c64/fcc.cpp
index 405c1761a2e..879f69899ba 100644
--- a/src/devices/bus/c64/fcc.cpp
+++ b/src/devices/bus/c64/fcc.cpp
@@ -97,7 +97,10 @@ c64_final_chesscard_device::c64_final_chesscard_device(const machine_config &mco
void c64_final_chesscard_device::device_start()
{
+ m_nvram = std::make_unique<uint8_t[]>(0x2000);
+
// state saving
+ save_pointer(NAME(m_nvram), 0x2000);
save_item(NAME(m_bank));
save_item(NAME(m_hidden));
}
@@ -120,6 +123,25 @@ void c64_final_chesscard_device::device_reset()
}
+void c64_final_chesscard_device::nvram_default()
+{
+}
+
+
+bool c64_final_chesscard_device::nvram_read(util::read_stream &file)
+{
+ auto const [err, actual] = read(file, m_nvram.get(), 0x2000);
+ return !err && (actual == 0x2000);
+}
+
+
+bool c64_final_chesscard_device::nvram_write(util::write_stream &file)
+{
+ auto const [err, actual] = write(file, m_nvram.get(), 0x2000);
+ return !err;
+}
+
+
//-------------------------------------------------
// c64_cd_r - cartridge data read
//-------------------------------------------------