mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
tms9900: fix crash at start
This commit is contained in:
parent
fcb39a03d1
commit
2bfe2358fb
2 changed files with 4 additions and 4 deletions
|
@ -341,7 +341,7 @@ void tms99xx_device::state_import(const device_state_entry &entry)
|
|||
break;
|
||||
default:
|
||||
// Workspace registers
|
||||
if (index <= TMS9900_R15)
|
||||
if (index <= TMS9900_R15 && started())
|
||||
write_workspace_register_debug(index-TMS9900_R0, (uint16_t)m_state_any);
|
||||
break;
|
||||
}
|
||||
|
@ -373,7 +373,7 @@ void tms99xx_device::state_export(const device_state_entry &entry)
|
|||
default:
|
||||
// Workspace registers
|
||||
if (index <= TMS9900_R15)
|
||||
m_state_any = read_workspace_register_debug(index-TMS9900_R0);
|
||||
m_state_any = started() ? read_workspace_register_debug(index-TMS9900_R0) : 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -339,7 +339,7 @@ void tms9995_device::state_import(const device_state_entry &entry)
|
|||
break;
|
||||
default:
|
||||
// Workspace registers
|
||||
if (index <= TMS9995_R15)
|
||||
if (index <= TMS9995_R15 && started())
|
||||
write_workspace_register_debug(index-TMS9995_R0, (uint16_t)m_state_any);
|
||||
break;
|
||||
}
|
||||
|
@ -371,7 +371,7 @@ void tms9995_device::state_export(const device_state_entry &entry)
|
|||
default:
|
||||
// Workspace registers
|
||||
if (index <= TMS9995_R15)
|
||||
m_state_any = read_workspace_register_debug(index-TMS9995_R0);
|
||||
m_state_any = started() ? read_workspace_register_debug(index-TMS9995_R0) : 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue