summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2011-10-04 17:16:07 +0000
committer Miodrag Milanovic <mmicko@gmail.com>2011-10-04 17:16:07 +0000
commit4aae041c38634ab16a1890f2e4152a21d8320e9e (patch)
treebc421cc1e5eb173c1241e459af432e21c3cf592c /src/emu
parent725f8c8296b674838589fd08110782db527095d3 (diff)
Simplified way of getting octal info (no whatsnew)
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/machine.c15
-rw-r--r--src/emu/machine.h1
-rw-r--r--src/emu/memory.c20
3 files changed, 15 insertions, 21 deletions
diff --git a/src/emu/machine.c b/src/emu/machine.c
index c5b3eb14401..ada2b48e5f1 100644
--- a/src/emu/machine.c
+++ b/src/emu/machine.c
@@ -882,21 +882,6 @@ void running_machine::logfile_callback(running_machine &machine, const char *buf
machine.m_logfile->puts(buffer);
}
-//-------------------------------------------------
-// is_octal - returs if output should be hex or octal
-//-------------------------------------------------
-
-bool running_machine::is_octal()
-{
- device_execute_interface *executing = m_scheduler.currently_executing();
- if (executing != NULL)
- {
- cpu_device *cpu = downcast<cpu_device *>(&executing->device());
- if (cpu != NULL)
- return cpu->is_octal();
- }
- return false;
-}
/***************************************************************************
MEMORY REGIONS
***************************************************************************/
diff --git a/src/emu/machine.h b/src/emu/machine.h
index 6df3a803bb5..04b65b410ac 100644
--- a/src/emu/machine.h
+++ b/src/emu/machine.h
@@ -352,7 +352,6 @@ public:
int sample_rate() const { return m_sample_rate; }
bool save_or_load_pending() const { return m_saveload_pending_file; }
screen_device *first_screen() const { return primary_screen; }
- bool is_octal();
// additional helpers
emu_options &options() const { return m_config.options(); }
diff --git a/src/emu/memory.c b/src/emu/memory.c
index cf7e713d4d7..70bbd21d7c4 100644
--- a/src/emu/memory.c
+++ b/src/emu/memory.c
@@ -931,11 +931,16 @@ private:
template<typename _UintType>
_UintType unmap_r(address_space &space, offs_t offset, _UintType mask)
{
+ device_execute_interface *intf;
+ bool is_octal = false;
+ if (m_space.device().interface(intf))
+ is_octal = intf->is_octal();
+
if (m_space.log_unmap() && !m_space.debugger_access())
logerror("%s: unmapped %s memory read from %s & %s\n",
m_space.machine().describe_context(), m_space.name(),
- core_i64_format(m_space.byte_to_address(offset * sizeof(_UintType)), m_space.addrchars(),m_space.machine().is_octal()),
- core_i64_format(mask, 2 * sizeof(_UintType),m_space.machine().is_octal()));
+ core_i64_format(m_space.byte_to_address(offset * sizeof(_UintType)), m_space.addrchars(),is_octal),
+ core_i64_format(mask, 2 * sizeof(_UintType),is_octal));
return m_space.unmap();
}
@@ -997,12 +1002,17 @@ private:
template<typename _UintType>
void unmap_w(address_space &space, offs_t offset, _UintType data, _UintType mask)
{
+ device_execute_interface *intf;
+ bool is_octal = false;
+ if (m_space.device().interface(intf))
+ is_octal = intf->is_octal();
+
if (m_space.log_unmap() && !m_space.debugger_access())
logerror("%s: unmapped %s memory write to %s = %s & %s\n",
m_space.machine().describe_context(), m_space.name(),
- core_i64_format(m_space.byte_to_address(offset * sizeof(_UintType)), m_space.addrchars(),m_space.machine().is_octal()),
- core_i64_format(data, 2 * sizeof(_UintType),m_space.machine().is_octal()),
- core_i64_format(mask, 2 * sizeof(_UintType),m_space.machine().is_octal()));
+ core_i64_format(m_space.byte_to_address(offset * sizeof(_UintType)), m_space.addrchars(),is_octal),
+ core_i64_format(data, 2 * sizeof(_UintType),is_octal),
+ core_i64_format(mask, 2 * sizeof(_UintType),is_octal));
}
template<typename _UintType>