Previous 15994 Revisions Next

r15880 Monday 13th August, 2012 at 07:21:53 UTC by Miodrag Milanović
Made MCFG_QUANTUM_PERFECT_CPU able to work within devices (no whatsnew)

require clean compile
[src/emu]mconfig.c mconfig.h schedule.c

src/emu/schedule.c
r15879r15880
761761         min_quantum = attotime::from_hz(60);
762762
763763      // if the configuration specifies a device to make perfect, pick that as the minimum
764      if (machine().config().m_perfect_cpu_quantum != NULL)
764      if (machine().config().m_perfect_cpu_quantum)
765765      {
766766         device_t *device = machine().device(machine().config().m_perfect_cpu_quantum);
767767         if (device == NULL)
768            fatalerror("Device '%s' specified for perfect interleave is not present!", machine().config().m_perfect_cpu_quantum);
768            fatalerror("Device '%s' specified for perfect interleave is not present!", machine().config().m_perfect_cpu_quantum.cstr());
769769
770770         device_execute_interface *exec;
771771         if (!device->interface(exec))
772            fatalerror("Device '%s' specified for perfect interleave is not an executing device!", machine().config().m_perfect_cpu_quantum);
772            fatalerror("Device '%s' specified for perfect interleave is not an executing device!", machine().config().m_perfect_cpu_quantum.cstr());
773773
774774         min_quantum = min(attotime(0, exec->minimum_quantum()), min_quantum);
775775      }
src/emu/mconfig.c
r15879r15880
5252
5353machine_config::machine_config(const game_driver &gamedrv, emu_options &options)
5454   : m_minimum_quantum(attotime::zero),
55     m_perfect_cpu_quantum(NULL),
5655     m_watchdog_vblank_count(0),
5756     m_watchdog_time(attotime::zero),
5857     m_nvram_handler(NULL),
src/emu/mconfig.h
r15879r15880
136136
137137   // public state
138138   attotime            m_minimum_quantum;         // minimum scheduling quantum
139   const char *         m_perfect_cpu_quantum;      // tag of CPU to use for "perfect" scheduling
139   astring               m_perfect_cpu_quantum;      // tag of CPU to use for "perfect" scheduling
140140   INT32               m_watchdog_vblank_count;   // number of VBLANKs until the watchdog kills us
141141   attotime            m_watchdog_time;         // length of time until the watchdog kills us
142142
r15879r15880
221221   config.m_minimum_quantum = _time; \
222222
223223#define MCFG_QUANTUM_PERFECT_CPU(_cputag) \
224   config.m_perfect_cpu_quantum = _cputag; \
224   owner->subtag(config.m_perfect_cpu_quantum, _cputag); \
225225
226226
227
227228// watchdog configuration
228229#define MCFG_WATCHDOG_VBLANK_INIT(_count) \
229230   config.m_watchdog_vblank_count = _count; \

Previous 15994 Revisions Next


© 1998-2018 The MESS Team