From ec8042864703f9ce6cc9b0cf528e6a8528104b89 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Wed, 25 Nov 2020 19:18:26 +1100 Subject: Fairly significant overhaul of Lua engine and some cleanup. The things that were previously called device iterators are not iterators in the C++ sense of the word. This is confusing for newcomers. These have been renamed to be device enumerators. Several Lua methods and properties that previously returned tables now return lightweight wrappers for the underlying objects. This means creating them is a lot faster, but you can't modify them, and the performance characteristics of different operations varies. The render manager's target list uses 1-based indexing to be more like idiomatic Lua. It's now possible to create a device enumerator on any device, and then get subdevices (or sibling devices) using a relative tag. Much more render/layout functionality has been exposed to Lua. Layout scripts now have access to the layout file and can directly set the state of an item with no bindings, or register callbacks to obtain state. Some things that were previously methods are now read-only properties. Layout files are no longer required to supply a "name". This was problematic because the same layout file could be loaded for multiple instances of the same device, and each instance of the layout file should use the correct inputs (and in the future outputs) for the device instance it's associated with. This should also fix video output with MSVC builds by avoiding delegates that return things that don't fit in a register. --- src/emu/debug/debugcpu.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/emu/debug/debugcpu.cpp') diff --git a/src/emu/debug/debugcpu.cpp b/src/emu/debug/debugcpu.cpp index c3dd9a0c3a6..3c325d3a841 100644 --- a/src/emu/debug/debugcpu.cpp +++ b/src/emu/debug/debugcpu.cpp @@ -60,9 +60,9 @@ debugger_cpu::debugger_cpu(running_machine &machine) m_symtable->add("wpaddr", symbol_table::READ_ONLY, &m_wpaddr); m_symtable->add("wpdata", symbol_table::READ_ONLY, &m_wpdata); - screen_device_iterator screen_iterator = screen_device_iterator(m_machine.root_device()); - screen_device_iterator::auto_iterator iter = screen_iterator.begin(); - const uint32_t count = (uint32_t)screen_iterator.count(); + screen_device_enumerator screen_enumerator = screen_device_enumerator(m_machine.root_device()); + screen_device_enumerator::iterator iter = screen_enumerator.begin(); + const uint32_t count = (uint32_t)screen_enumerator.count(); if (count == 1) { @@ -104,7 +104,7 @@ void debugger_cpu::flush_traces() { /* this can be called on exit even when no debugging is enabled, so make sure the devdebug is valid before proceeding */ - for (device_t &device : device_iterator(m_machine.root_device())) + for (device_t &device : device_enumerator(m_machine.root_device())) if (device.debug() != nullptr) device.debug()->trace_flush(); } @@ -146,7 +146,7 @@ bool debugger_cpu::comment_save() // for each device bool found_comments = false; - for (device_t &device : device_iterator(m_machine.root_device())) + for (device_t &device : device_enumerator(m_machine.root_device())) if (device.debug() && device.debug()->comment_count() > 0) { // create a node for this device @@ -272,7 +272,7 @@ void debugger_cpu::on_vblank(screen_device &device, bool vblank_state) void debugger_cpu::reset_transient_flags() { /* loop over CPUs and reset the transient flags */ - for (device_t &device : device_iterator(m_machine.root_device())) + for (device_t &device : device_enumerator(m_machine.root_device())) device.debug()->reset_transient_flag(); m_stop_when_not_device = nullptr; } -- cgit v1.2.3