summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2020-12-31 23:19:36 -0500
committer AJR <ajrhacker@users.noreply.github.com>2020-12-31 23:19:36 -0500
commit672787fe45e9d508b112293fc59ae99b79b3ce9f (patch)
treea4d423014a60a6f187ddd77203a29f1ef8cd7758
parentd961efa925c092a89dffd0866792c8f129f15552 (diff)
hitpoker.cpp, tlc34076: Initialize more pointers and variables
-rw-r--r--src/devices/video/tlc34076.cpp7
-rw-r--r--src/mame/drivers/hitpoker.cpp6
2 files changed, 9 insertions, 4 deletions
diff --git a/src/devices/video/tlc34076.cpp b/src/devices/video/tlc34076.cpp
index 37dd95a40b1..01cc9070fb3 100644
--- a/src/devices/video/tlc34076.cpp
+++ b/src/devices/video/tlc34076.cpp
@@ -56,10 +56,15 @@ void tlc34076_device::device_start()
{
for (int i = 0; i < 3; i++)
{
- m_local_paletteram[i] = std::make_unique<uint8_t[]>(0x100);
+ m_local_paletteram[i] = make_unique_clear<uint8_t[]>(0x100);
save_pointer(NAME(m_local_paletteram[i]), 0x100, i);
}
+ std::fill(std::begin(m_regs), std::end(m_regs), 0);
+ std::fill(std::begin(m_palettedata), std::end(m_palettedata), 0);
+ m_readindex = 0;
+ m_writeindex = 0;
+
save_item(NAME(m_regs));
save_item(NAME(m_writeindex));
diff --git a/src/mame/drivers/hitpoker.cpp b/src/mame/drivers/hitpoker.cpp
index ddab3fe1dec..c52f6d74c43 100644
--- a/src/mame/drivers/hitpoker.cpp
+++ b/src/mame/drivers/hitpoker.cpp
@@ -100,9 +100,9 @@ private:
void hitpoker_state::video_start()
{
- m_videoram = std::make_unique<uint8_t[]>(0x3600);
- m_paletteram = std::make_unique<uint8_t[]>(0x1000);
- m_colorram = std::make_unique<uint8_t[]>(0x2000);
+ m_videoram = make_unique_clear<uint8_t[]>(0x3600);
+ m_paletteram = make_unique_clear<uint8_t[]>(0x1000);
+ m_colorram = make_unique_clear<uint8_t[]>(0x2000);
}
uint32_t hitpoker_state::screen_update_hitpoker(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)