summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/devcpu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/devcpu.cpp')
-rw-r--r--src/emu/devcpu.cpp31
1 files changed, 18 insertions, 13 deletions
diff --git a/src/emu/devcpu.cpp b/src/emu/devcpu.cpp
index efd12d682a9..616a501f438 100644
--- a/src/emu/devcpu.cpp
+++ b/src/emu/devcpu.cpp
@@ -21,15 +21,15 @@
// cpu_device - constructor
//-------------------------------------------------
-cpu_device::cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock)
- : device_t(mconfig, type, tag, owner, clock),
- device_execute_interface(mconfig, *this),
- device_memory_interface(mconfig, *this),
- device_state_interface(mconfig, *this),
- device_disasm_interface(mconfig, *this),
- m_force_no_drc(false),
- m_access_to_be_redone(false),
- m_access_before_delay_tag(nullptr)
+cpu_device::cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) :
+ device_t(mconfig, type, tag, owner, clock),
+ device_execute_interface(mconfig, *this),
+ device_memory_interface(mconfig, *this),
+ device_state_interface(mconfig, *this),
+ device_disasm_interface(mconfig, *this),
+ m_force_no_drc(false),
+ m_access_to_be_redone(false),
+ m_access_before_delay_tag(nullptr)
{
}
@@ -63,9 +63,7 @@ bool cpu_device::access_before_time(u64 access_time, u64 current_time) noexcept
{
s32 delta = access_time - current_time;
if(*m_icountptr <= delta) {
- if(*m_icountptr > 0)
- *m_icountptr = 0;
- m_access_to_be_redone = true;
+ defer_access();
return true;
}
@@ -100,6 +98,13 @@ void cpu_device::access_after_delay(u32 cycles) noexcept
void cpu_device::defer_access() noexcept
{
+ if(*m_icountptr > 0)
+ *m_icountptr = 0;
+ m_access_to_be_redone = true;
+}
+
+void cpu_device::retry_access() noexcept
+{
+ abort_timeslice();
m_access_to_be_redone = true;
- *m_icountptr = 0;
}