summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2015-03-20 23:56:45 +1100
committer Vas Crabb <vas@vastheman.com>2015-03-20 23:56:45 +1100
commitca94bb7905e486fc68369893531db858645d38e7 (patch)
tree594ed1dc45470a2671f3d61d8f72fc3a61578076 /src
parent4282a7c9f201b957b34f2142746b939e02ead0a9 (diff)
Changing FASTDEBUG to be assert-free is too big a change to push through without public discussion
Diffstat (limited to 'src')
-rw-r--r--src/emu/emucore.h5
-rw-r--r--src/emu/schedule.c2
2 files changed, 3 insertions, 4 deletions
diff --git a/src/emu/emucore.h b/src/emu/emucore.h
index 0f89ae59f50..950209f6f33 100644
--- a/src/emu/emucore.h
+++ b/src/emu/emucore.h
@@ -67,10 +67,7 @@ private:
#undef assert
#undef assert_always
-#if defined(MAME_DEBUG_FAST)
-#define assert(x) do { } while (0)
-#define assert_always(x, msg) do { if (!(x)) throw emu_fatalerror("Fatal error: %s\nCaused by assert: %s:%d: %s", msg, __FILE__, __LINE__, #x); } while (0)
-#elif defined(MAME_DEBUG)
+#ifdef MAME_DEBUG
#define assert(x) do { if (!(x)) throw emu_fatalerror("assert: %s:%d: %s", __FILE__, __LINE__, #x); } while (0)
#define assert_always(x, msg) do { if (!(x)) throw emu_fatalerror("Fatal error: %s\nCaused by assert: %s:%d: %s", msg, __FILE__, __LINE__, #x); } while (0)
#else
diff --git a/src/emu/schedule.c b/src/emu/schedule.c
index d0d28af80e4..74dfa661469 100644
--- a/src/emu/schedule.c
+++ b/src/emu/schedule.c
@@ -451,7 +451,9 @@ void device_scheduler::timeslice()
attoseconds_t delta = target.attoseconds - exec->m_localtime.attoseconds;
if (delta < 0 && target.seconds > exec->m_localtime.seconds)
delta += ATTOSECONDS_PER_SECOND;
+#ifndef MAME_DEBUG_FAST
assert(delta == (target - exec->m_localtime).as_attoseconds());
+#endif
// if we have enough for at least 1 cycle, do the math
if (delta >= exec->m_attoseconds_per_cycle)