summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus
diff options
context:
space:
mode:
author Nigel Barnes <Pernod70@users.noreply.github.com>2020-07-16 13:21:37 +0100
committer Nigel Barnes <Pernod70@users.noreply.github.com>2020-07-16 13:22:42 +0100
commitb2aba645fbded4a58c0f5391d3c73fed203299af (patch)
tree8d7dd157096a441843ad5edf4c5cd2ad57a1bc24 /src/devices/bus
parent49ed7484012657cd9c33ab58aba62c09bfc0c396 (diff)
bbc_tube_z80/bbc_tube_zep100: Clear RAM at startup and fix save state size.
Diffstat (limited to 'src/devices/bus')
-rw-r--r--src/devices/bus/bbc/tube/tube_z80.cpp11
-rw-r--r--src/devices/bus/bbc/tube/tube_zep100.cpp3
2 files changed, 8 insertions, 6 deletions
diff --git a/src/devices/bus/bbc/tube/tube_z80.cpp b/src/devices/bus/bbc/tube/tube_z80.cpp
index d6c65c64812..ff5cba9a490 100644
--- a/src/devices/bus/bbc/tube/tube_z80.cpp
+++ b/src/devices/bus/bbc/tube/tube_z80.cpp
@@ -95,7 +95,7 @@ const tiny_rom_entry *bbc_tube_z80_device::device_rom_region() const
return ROM_NAME( tube_z80 );
}
-const tiny_rom_entry* bbc_tube_z80w_device::device_rom_region() const
+const tiny_rom_entry *bbc_tube_z80w_device::device_rom_region() const
{
return ROM_NAME( tube_z80w );
}
@@ -108,7 +108,7 @@ const tiny_rom_entry* bbc_tube_z80w_device::device_rom_region() const
// bbc_tube_z80_device - constructor
//-------------------------------------------------
-bbc_tube_z80_device::bbc_tube_z80_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock)
+bbc_tube_z80_device::bbc_tube_z80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, type, tag, owner, clock)
, device_bbc_tube_interface(mconfig, *this)
, m_z80(*this, "z80")
@@ -118,12 +118,12 @@ bbc_tube_z80_device::bbc_tube_z80_device(const machine_config& mconfig, device_t
{
}
-bbc_tube_z80_device::bbc_tube_z80_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock)
+bbc_tube_z80_device::bbc_tube_z80_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: bbc_tube_z80_device(mconfig, BBC_TUBE_Z80, tag, owner, clock)
{
}
-bbc_tube_z80w_device::bbc_tube_z80w_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock)
+bbc_tube_z80w_device::bbc_tube_z80w_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: bbc_tube_z80_device(mconfig, BBC_TUBE_Z80W, tag, owner, clock)
{
}
@@ -135,9 +135,10 @@ bbc_tube_z80w_device::bbc_tube_z80w_device(const machine_config& mconfig, const
void bbc_tube_z80_device::device_start()
{
m_ram = std::make_unique<uint8_t[]>(0x10000);
+ memset(m_ram.get(), 0xff, 0x10000);
/* register for save states */
- save_pointer(NAME(m_ram), 0x100000);
+ save_pointer(NAME(m_ram), 0x10000);
}
//-------------------------------------------------
diff --git a/src/devices/bus/bbc/tube/tube_zep100.cpp b/src/devices/bus/bbc/tube/tube_zep100.cpp
index 32d9a556bfa..6ed1328da3d 100644
--- a/src/devices/bus/bbc/tube/tube_zep100.cpp
+++ b/src/devices/bus/bbc/tube/tube_zep100.cpp
@@ -189,9 +189,10 @@ bbc_tube_zep100m_device::bbc_tube_zep100m_device(const machine_config &mconfig,
void bbc_tube_zep100_device::device_start()
{
m_ram = std::make_unique<uint8_t[]>(0x10000);
+ memset(m_ram.get(), 0xff, 0x10000);
/* register for save states */
- save_pointer(NAME(m_ram), 0x100000);
+ save_pointer(NAME(m_ram), 0x10000);
}
//-------------------------------------------------