diff options
Diffstat (limited to 'src/devices/machine/strata.cpp')
-rw-r--r-- | src/devices/machine/strata.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/devices/machine/strata.cpp b/src/devices/machine/strata.cpp index df434adbd24..7ed6251bba0 100644 --- a/src/devices/machine/strata.cpp +++ b/src/devices/machine/strata.cpp @@ -66,9 +66,11 @@ void strataflash_device::nvram_default() // .nv file //------------------------------------------------- -void strataflash_device::nvram_read(emu_file &file) +bool strataflash_device::nvram_read(util::read_stream &file) { - file.read(m_flashmemory.get(), COMPLETE_SIZE); + auto const [err, actual] = read(file, m_flashmemory.get(), COMPLETE_SIZE); + if (err || (COMPLETE_SIZE != actual)) + return false; // TODO @@ -111,6 +113,8 @@ void strataflash_device::nvram_read(emu_file &file) return 0; */ + + return true; } //------------------------------------------------- @@ -118,7 +122,7 @@ void strataflash_device::nvram_read(emu_file &file) // .nv file //------------------------------------------------- -void strataflash_device::nvram_write(emu_file &file) +bool strataflash_device::nvram_write(util::write_stream &file) { // TODO @@ -172,7 +176,8 @@ void strataflash_device::nvram_write(emu_file &file) return 0; */ - file.write(m_flashmemory.get(), COMPLETE_SIZE); + auto const [err, actual] = write(file, m_flashmemory.get(), COMPLETE_SIZE); + return !err; } //------------------------------------------------- @@ -500,6 +505,7 @@ void strataflash_device::write8_16(offs_t offset, uint16_t data, bus_width_t bus else m_wrbuf_base = offset; memset(m_wrbuf, 0xff, m_wrbuf_len); /* right??? */ + [[fallthrough]]; case FM_WRBUFPART3: if ((offset < m_wrbuf_base) || (offset >= (m_wrbuf_base + m_wrbuf_len))) m_status |= 0x30; |