summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/emu/debug/debugcpu.cpp3
-rw-r--r--src/emu/emuopts.cpp1
-rw-r--r--src/emu/emuopts.h2
-rw-r--r--src/emu/machine.cpp4
-rw-r--r--src/emu/mame.cpp9
5 files changed, 18 insertions, 1 deletions
diff --git a/src/emu/debug/debugcpu.cpp b/src/emu/debug/debugcpu.cpp
index 293657b1f45..c4686c5566f 100644
--- a/src/emu/debug/debugcpu.cpp
+++ b/src/emu/debug/debugcpu.cpp
@@ -19,6 +19,7 @@
#include "uiinput.h"
#include "xmlfile.h"
#include "coreutil.h"
+#include "luaengine.h"
#include <ctype.h>
@@ -1928,6 +1929,8 @@ void device_debug::instruction_hook(offs_t curpc)
// flush any pending updates before waiting again
machine.debug_view().flush_osd_updates();
+ machine.manager().lua()->periodic_check();
+
// clear the memory modified flag and wait
global->memory_modified = false;
if (machine.debug_flags & DEBUG_FLAG_OSD_ENABLED)
diff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp
index f5d014750b2..97e107ebb49 100644
--- a/src/emu/emuopts.cpp
+++ b/src/emu/emuopts.cpp
@@ -43,6 +43,7 @@ const options_entry emu_options::s_option_entries[] =
{ OPTION_FONTPATH, ".", OPTION_STRING, "path to font files" },
{ OPTION_CHEATPATH, "cheat", OPTION_STRING, "path to cheat files" },
{ OPTION_CROSSHAIRPATH, "crosshair", OPTION_STRING, "path to crosshair files" },
+ { OPTION_PLUGINSPATH, "plugins", OPTION_STRING, "path to plugin files" },
// output directory options
{ nullptr, nullptr, OPTION_HEADER, "CORE OUTPUT DIRECTORY OPTIONS" },
diff --git a/src/emu/emuopts.h b/src/emu/emuopts.h
index 916a0f263f5..c8bbc58435a 100644
--- a/src/emu/emuopts.h
+++ b/src/emu/emuopts.h
@@ -56,6 +56,7 @@ enum
#define OPTION_FONTPATH "fontpath"
#define OPTION_CHEATPATH "cheatpath"
#define OPTION_CROSSHAIRPATH "crosshairpath"
+#define OPTION_PLUGINSPATH "pluginspath"
// core directory options
#define OPTION_CFG_DIRECTORY "cfg_directory"
@@ -231,6 +232,7 @@ public:
const char *font_path() const { return value(OPTION_FONTPATH); }
const char *cheat_path() const { return value(OPTION_CHEATPATH); }
const char *crosshair_path() const { return value(OPTION_CROSSHAIRPATH); }
+ const char *plugins_path() const { return value(OPTION_PLUGINSPATH); }
// core directory options
const char *cfg_directory() const { return value(OPTION_CFG_DIRECTORY); }
diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp
index 7c59ef69a2d..5119dec397c 100644
--- a/src/emu/machine.cpp
+++ b/src/emu/machine.cpp
@@ -387,8 +387,10 @@ int running_machine::run(bool firstrun)
// execute CPUs if not paused
if (!m_paused)
+ {
m_scheduler.timeslice();
-
+ manager().lua()->periodic_check();
+ }
// otherwise, just pump video updates through
else
m_video->frame_update();
diff --git a/src/emu/mame.cpp b/src/emu/mame.cpp
index f17c04e3b68..55fc78928f8 100644
--- a/src/emu/mame.cpp
+++ b/src/emu/mame.cpp
@@ -167,6 +167,15 @@ int machine_manager::execute()
int error = MAMERR_NONE;
m_lua->initialize();
+ {
+ emu_file file(options().plugins_path(), OPEN_FLAG_READ);
+ file_error filerr = file.open("boot.lua");
+ if (filerr == FILERR_NONE)
+ {
+ m_lua->load_script(file.fullpath());
+ }
+ }
+
if (m_options.console()) {
m_lua->start_console();
}