summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2016-04-04 23:46:44 -0400
committer AJR <ajrhacker@users.noreply.github.com>2016-04-04 23:46:44 -0400
commitee12b7d2f74834cb9ca9dd8d6de7ba9d8c1f30e1 (patch)
tree18feb0ad0b3c6872533c73964440eb7f626a4174 /src/devices/cpu
parent1046be89db453886ee98b72c846f6e42e8da3cfa (diff)
Revert software-installed slot/image options when changing software
- Remove emu.h's stealth include of emuopts.h through mconfig.h; reduce dependency on emuopts.h in other headers and source files. - MCFG_CPU_FORCE_NO_DRC is now a CPU configuration parameter rather than a global one; it still works to override the -drc option setting.
Diffstat (limited to 'src/devices/cpu')
-rw-r--r--src/devices/cpu/drcbex64.cpp1
-rw-r--r--src/devices/cpu/drcbex86.cpp1
-rw-r--r--src/devices/cpu/drcuml.cpp1
-rw-r--r--src/devices/cpu/mips/mips3.cpp2
-rw-r--r--src/devices/cpu/mips/mips3drc.cpp4
-rw-r--r--src/devices/cpu/rsp/rsp.cpp2
-rw-r--r--src/devices/cpu/rsp/rspdrc.cpp4
-rw-r--r--src/devices/cpu/sh2/sh2.cpp4
-rw-r--r--src/devices/cpu/sh2/sh2drc.cpp5
9 files changed, 13 insertions, 11 deletions
diff --git a/src/devices/cpu/drcbex64.cpp b/src/devices/cpu/drcbex64.cpp
index 7e9628bc671..096dc2cbf5c 100644
--- a/src/devices/cpu/drcbex64.cpp
+++ b/src/devices/cpu/drcbex64.cpp
@@ -169,6 +169,7 @@
#include <stddef.h>
#include "emu.h"
#include "debugger.h"
+#include "emuopts.h"
#include "drcuml.h"
#include "drcbex64.h"
diff --git a/src/devices/cpu/drcbex86.cpp b/src/devices/cpu/drcbex86.cpp
index 92b5f628939..4ff6a90774b 100644
--- a/src/devices/cpu/drcbex86.cpp
+++ b/src/devices/cpu/drcbex86.cpp
@@ -85,6 +85,7 @@
#include <stddef.h>
#include "emu.h"
#include "debugger.h"
+#include "emuopts.h"
#include "drcuml.h"
#include "drcbex86.h"
diff --git a/src/devices/cpu/drcuml.cpp b/src/devices/cpu/drcuml.cpp
index 5c13c76b4c6..736301ff606 100644
--- a/src/devices/cpu/drcuml.cpp
+++ b/src/devices/cpu/drcuml.cpp
@@ -35,6 +35,7 @@
***************************************************************************/
#include "emu.h"
+#include "emuopts.h"
#include "drcuml.h"
#include "drcbec.h"
#include "drcbex86.h"
diff --git a/src/devices/cpu/mips/mips3.cpp b/src/devices/cpu/mips/mips3.cpp
index 20d82bd3725..279f9404c50 100644
--- a/src/devices/cpu/mips/mips3.cpp
+++ b/src/devices/cpu/mips/mips3.cpp
@@ -316,7 +316,7 @@ void mips3_device::check_irqs()
void mips3_device::device_start()
{
- m_isdrc = (mconfig().options().drc() && !mconfig().m_force_no_drc) ? true : false;
+ m_isdrc = allow_drc();
/* allocate the implementation-specific state from the full cache */
m_core = (internal_mips3_state *)m_cache.alloc_near(sizeof(internal_mips3_state));
diff --git a/src/devices/cpu/mips/mips3drc.cpp b/src/devices/cpu/mips/mips3drc.cpp
index 7b6da3a1626..9995cdb105f 100644
--- a/src/devices/cpu/mips/mips3drc.cpp
+++ b/src/devices/cpu/mips/mips3drc.cpp
@@ -150,7 +150,7 @@ inline void mips3_device::save_fast_iregs(drcuml_block *block)
void mips3_device::mips3drc_set_options(UINT32 options)
{
- if (!(mconfig().options().drc() && !mconfig().m_force_no_drc)) return;
+ if (!allow_drc()) return;
m_drcoptions = options;
}
@@ -196,7 +196,7 @@ void mips3_device::add_fastram(offs_t start, offs_t end, UINT8 readonly, void *b
void mips3_device::mips3drc_add_hotspot(offs_t pc, UINT32 opcode, UINT32 cycles)
{
- if (!(mconfig().options().drc() && !mconfig().m_force_no_drc)) return;
+ if (!allow_drc()) return;
if (m_hotspot_select < ARRAY_LENGTH(m_hotspot))
{
m_hotspot[m_hotspot_select].pc = pc;
diff --git a/src/devices/cpu/rsp/rsp.cpp b/src/devices/cpu/rsp/rsp.cpp
index 246843fb6af..9fd2525e193 100644
--- a/src/devices/cpu/rsp/rsp.cpp
+++ b/src/devices/cpu/rsp/rsp.cpp
@@ -361,7 +361,7 @@ void rsp_device::resolve_cb()
void rsp_device::device_start()
{
- m_isdrc = (mconfig().options().drc() && !mconfig().m_force_no_drc) ? true : false;
+ m_isdrc = allow_drc();
m_rsp_state = (internal_rsp_state *)m_cache.alloc_near(sizeof(internal_rsp_state));
if (LOG_INSTRUCTION_EXECUTION)
diff --git a/src/devices/cpu/rsp/rspdrc.cpp b/src/devices/cpu/rsp/rspdrc.cpp
index c581cfb3aba..ce334b91cc8 100644
--- a/src/devices/cpu/rsp/rspdrc.cpp
+++ b/src/devices/cpu/rsp/rspdrc.cpp
@@ -183,7 +183,7 @@ static void cfunc_write32(void *param)
void rsp_device::rspdrc_set_options(UINT32 options)
{
- if (!(mconfig().options().drc() && !mconfig().m_force_no_drc)) return;
+ if (!allow_drc()) return;
m_drcoptions = options;
}
@@ -307,7 +307,7 @@ void rsp_device::execute_run_drc()
void rsp_device::rspdrc_flush_drc_cache()
{
- if (!(mconfig().options().drc() && !mconfig().m_force_no_drc)) return;
+ if (!allow_drc()) return;
m_cache_dirty = TRUE;
}
diff --git a/src/devices/cpu/sh2/sh2.cpp b/src/devices/cpu/sh2/sh2.cpp
index 751349dbd0c..0201e8d8a44 100644
--- a/src/devices/cpu/sh2/sh2.cpp
+++ b/src/devices/cpu/sh2/sh2.cpp
@@ -193,7 +193,7 @@ sh2_device::sh2_device(const machine_config &mconfig, const char *tag, device_t
, m_out_of_cycles(nullptr)
, m_debugger_temp(0)
{
- m_isdrc = (mconfig.options().drc() && !mconfig.m_force_no_drc) ? true : false;
+ m_isdrc = allow_drc();
}
@@ -225,7 +225,7 @@ sh2_device::sh2_device(const machine_config &mconfig, device_type type, const ch
, m_nocode(nullptr)
, m_out_of_cycles(nullptr)
{
- m_isdrc = (mconfig.options().drc() && !mconfig.m_force_no_drc) ? true : false;
+ m_isdrc = allow_drc();
}
sh2a_device::sh2a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
diff --git a/src/devices/cpu/sh2/sh2drc.cpp b/src/devices/cpu/sh2/sh2drc.cpp
index db732e57b40..e7b2460198a 100644
--- a/src/devices/cpu/sh2/sh2drc.cpp
+++ b/src/devices/cpu/sh2/sh2drc.cpp
@@ -11,7 +11,6 @@
#include "debugger.h"
#include "sh2.h"
#include "sh2comn.h"
-#include "mconfig.h"
extern unsigned DasmSH2(char *buffer, unsigned pc, UINT16 opcode);
@@ -2946,7 +2945,7 @@ int sh2_device::generate_group_12(drcuml_block *block, compiler_state *compiler,
void sh2_device::sh2drc_set_options(UINT32 options)
{
- if (!(mconfig().options().drc() && !mconfig().m_force_no_drc)) return;
+ if (!allow_drc()) return;
m_drcoptions = options;
}
@@ -2958,7 +2957,7 @@ void sh2_device::sh2drc_set_options(UINT32 options)
void sh2_device::sh2drc_add_pcflush(offs_t address)
{
- if (!(mconfig().options().drc() && !mconfig().m_force_no_drc)) return;
+ if (!allow_drc()) return;
if (m_pcfsel < ARRAY_LENGTH(m_pcflushes))
m_pcflushes[m_pcfsel++] = address;