summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2022-06-18 00:44:21 +1000
committer Vas Crabb <vas@vastheman.com>2022-06-18 00:44:21 +1000
commitbf0c459df00090a4320e86a68c2a2291863fa136 (patch)
treeb643931d60ff1069c2d8028ca26f62be78e3a5d6 /src/mame/drivers
parent60179d8c952f48d4ee28dc6e9e12332dac20cf20 (diff)
hp2640.cpp: Fixed some uninitialised memory accesses.
Diffstat (limited to 'src/mame/drivers')
-rw-r--r--src/mame/drivers/hp2640.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mame/drivers/hp2640.cpp b/src/mame/drivers/hp2640.cpp
index a33f75820b8..85c98f71d43 100644
--- a/src/mame/drivers/hp2640.cpp
+++ b/src/mame/drivers/hp2640.cpp
@@ -319,6 +319,18 @@ void hp2640_base_state::machine_start()
{
m_screen->register_screen_bitmap(m_bitmap);
+ // these are set in machine_reset, but device reset callbacks end up reading them before then
+ // (machine_reset is called after all child devices are reset)
+ m_mode_byte = false;
+ m_timer_irq = m_datacom_irq = m_tape_irq = false;
+ m_async_control = 0;
+
+ m_even = true;
+ m_line_done = false;
+ m_dma_addr = 0;
+ m_row_counter = 0;
+ m_row_reset = false;
+
// TODO: save more state
save_item(NAME(m_mode_byte));
save_item(NAME(m_timer_irq));