summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author smf- <smf-@users.noreply.github.com>2017-11-28 09:09:43 +0000
committer smf- <smf-@users.noreply.github.com>2017-11-28 09:10:05 +0000
commitc2e7f912c14222e833cfd72f5c1651785ee01c01 (patch)
tree3c9560f578cdb735ea620a4ff735009bfd35ea64
parentb2478329475250e8a74104c234461a754347fdb2 (diff)
fix building with Visual Studio 2017 & clang 5.0.0 (also tested with gcc 7.2.0) (nw)
-rw-r--r--src/devices/cpu/es5510/es5510d.cpp1
-rw-r--r--src/devices/cpu/m6502/deco16d.cpp1
-rw-r--r--src/devices/cpu/m6502/m4510d.cpp1
-rw-r--r--src/devices/cpu/m6502/m6502d.cpp1
-rw-r--r--src/devices/cpu/m6502/m6509d.cpp1
-rw-r--r--src/devices/cpu/m6502/m6510d.cpp1
-rw-r--r--src/devices/cpu/m6502/m65c02d.cpp1
-rw-r--r--src/devices/cpu/m6502/m65ce02d.cpp1
-rw-r--r--src/devices/cpu/m6502/m740d.cpp1
-rw-r--r--src/devices/cpu/m6502/n2a03d.cpp1
-rw-r--r--src/devices/cpu/m6502/r65c02d.cpp1
-rw-r--r--src/devices/cpu/z8000/8000dasm.cpp7
-rw-r--r--src/emu/debug/debugbuf.h4
-rw-r--r--src/tools/unidasm.cpp23
14 files changed, 26 insertions, 19 deletions
diff --git a/src/devices/cpu/es5510/es5510d.cpp b/src/devices/cpu/es5510/es5510d.cpp
index 3436ba39fca..d563019f486 100644
--- a/src/devices/cpu/es5510/es5510d.cpp
+++ b/src/devices/cpu/es5510/es5510d.cpp
@@ -7,6 +7,7 @@
*
***************************************************************************/
+#include "emu.h"
#include "es5510d.h"
u32 es5510_disassembler::opcode_alignment() const
diff --git a/src/devices/cpu/m6502/deco16d.cpp b/src/devices/cpu/m6502/deco16d.cpp
index 1fba8c3ba45..8f126ef3023 100644
--- a/src/devices/cpu/m6502/deco16d.cpp
+++ b/src/devices/cpu/m6502/deco16d.cpp
@@ -8,6 +8,7 @@
***************************************************************************/
+#include "emu.h"
#include "deco16d.h"
#include "cpu/m6502/deco16d.hxx"
diff --git a/src/devices/cpu/m6502/m4510d.cpp b/src/devices/cpu/m6502/m4510d.cpp
index 6e7f0bcbb67..896a3f78124 100644
--- a/src/devices/cpu/m6502/m4510d.cpp
+++ b/src/devices/cpu/m6502/m4510d.cpp
@@ -8,6 +8,7 @@
***************************************************************************/
+#include "emu.h"
#include "m4510d.h"
#include "cpu/m6502/m4510d.hxx"
diff --git a/src/devices/cpu/m6502/m6502d.cpp b/src/devices/cpu/m6502/m6502d.cpp
index 8b8918e5ccf..89763113cde 100644
--- a/src/devices/cpu/m6502/m6502d.cpp
+++ b/src/devices/cpu/m6502/m6502d.cpp
@@ -8,6 +8,7 @@
***************************************************************************/
+#include "emu.h"
#include "m6502d.h"
#include "cpu/m6502/m6502d.hxx"
diff --git a/src/devices/cpu/m6502/m6509d.cpp b/src/devices/cpu/m6502/m6509d.cpp
index 93ef8d684a0..e7a27d9e1ce 100644
--- a/src/devices/cpu/m6502/m6509d.cpp
+++ b/src/devices/cpu/m6502/m6509d.cpp
@@ -8,6 +8,7 @@
***************************************************************************/
+#include "emu.h"
#include "m6509d.h"
#include "cpu/m6502/m6509d.hxx"
diff --git a/src/devices/cpu/m6502/m6510d.cpp b/src/devices/cpu/m6502/m6510d.cpp
index 79dacde3473..78be285262a 100644
--- a/src/devices/cpu/m6502/m6510d.cpp
+++ b/src/devices/cpu/m6502/m6510d.cpp
@@ -8,6 +8,7 @@
***************************************************************************/
+#include "emu.h"
#include "m6510d.h"
#include "cpu/m6502/m6510d.hxx"
diff --git a/src/devices/cpu/m6502/m65c02d.cpp b/src/devices/cpu/m6502/m65c02d.cpp
index 19be44c2db8..7a78219f129 100644
--- a/src/devices/cpu/m6502/m65c02d.cpp
+++ b/src/devices/cpu/m6502/m65c02d.cpp
@@ -9,6 +9,7 @@
***************************************************************************/
+#include "emu.h"
#include "m65c02d.h"
#include "cpu/m6502/m65c02d.hxx"
diff --git a/src/devices/cpu/m6502/m65ce02d.cpp b/src/devices/cpu/m6502/m65ce02d.cpp
index 5c79ee06e21..f815eae4b5a 100644
--- a/src/devices/cpu/m6502/m65ce02d.cpp
+++ b/src/devices/cpu/m6502/m65ce02d.cpp
@@ -8,6 +8,7 @@
***************************************************************************/
+#include "emu.h"
#include "m65ce02d.h"
#include "cpu/m6502/m65ce02d.hxx"
diff --git a/src/devices/cpu/m6502/m740d.cpp b/src/devices/cpu/m6502/m740d.cpp
index bed918d4999..5da5ef53020 100644
--- a/src/devices/cpu/m6502/m740d.cpp
+++ b/src/devices/cpu/m6502/m740d.cpp
@@ -8,6 +8,7 @@
***************************************************************************/
+#include "emu.h"
#include "m740d.h"
#include "cpu/m6502/m740d.hxx"
diff --git a/src/devices/cpu/m6502/n2a03d.cpp b/src/devices/cpu/m6502/n2a03d.cpp
index 452e9ef1753..bedb062f018 100644
--- a/src/devices/cpu/m6502/n2a03d.cpp
+++ b/src/devices/cpu/m6502/n2a03d.cpp
@@ -8,6 +8,7 @@
***************************************************************************/
+#include "emu.h"
#include "n2a03d.h"
#include "cpu/m6502/n2a03d.hxx"
diff --git a/src/devices/cpu/m6502/r65c02d.cpp b/src/devices/cpu/m6502/r65c02d.cpp
index 3b93c1b715a..20eae90c9bc 100644
--- a/src/devices/cpu/m6502/r65c02d.cpp
+++ b/src/devices/cpu/m6502/r65c02d.cpp
@@ -8,6 +8,7 @@
***************************************************************************/
+#include "emu.h"
#include "r65c02d.h"
#include "cpu/m6502/r65c02d.hxx"
diff --git a/src/devices/cpu/z8000/8000dasm.cpp b/src/devices/cpu/z8000/8000dasm.cpp
index a258a25ed92..42a7d0abeb3 100644
--- a/src/devices/cpu/z8000/8000dasm.cpp
+++ b/src/devices/cpu/z8000/8000dasm.cpp
@@ -724,17 +724,18 @@ offs_t z8000_disassembler::disassemble(std::ostream &stream, offs_t pc, const da
src++;
i = *src++ - '0';
if (m_config->get_segmented_mode()) {
+ uint32_t address;
if (w[i] & 0x8000) {
old_w = w[i];
for (j = i; j < o.size; j++)
w[j] = w[j + 1];
get_op(opcodes, o.size - 1, new_pc, w, b, n);
- w[i] = ((old_w & 0x7f00) << 16) | (w[i] & 0xffff);
+ address = ((old_w & 0x7f00) << 16) | (w[i] & 0xffff);
}
else {
- w[i] = ((w[i] & 0x7f00) << 16) | (w[i] & 0xff);
+ address = ((w[i] & 0x7f00) << 16) | (w[i] & 0xff);
}
- util::stream_format(stream, "<%%%02X>%%%04X", (w[i] >> 24) & 0xff, w[i] & 0xffff);
+ util::stream_format(stream, "<%%%02X>%%%04X", (address >> 24) & 0xff, address & 0xffff);
}
else util::stream_format(stream, "%%%04x", w[i]);
break;
diff --git a/src/emu/debug/debugbuf.h b/src/emu/debug/debugbuf.h
index ec6a95619e1..46ec8286417 100644
--- a/src/emu/debug/debugbuf.h
+++ b/src/emu/debug/debugbuf.h
@@ -68,10 +68,6 @@ private:
return reinterpret_cast<T *>(&m_buffer[0]) + ((lpc - m_lstart) & m_pc_mask);
}
- template<typename T> const T *get_ptr(offs_t lpc) const {
- return reinterpret_cast<const T *>(&m_buffer[0]) + ((lpc - m_lstart) & m_pc_mask);
- }
-
template<typename T> T get(offs_t lpc) const {
return reinterpret_cast<const T *>(&m_buffer[0])[(lpc - m_lstart) & m_pc_mask];
}
diff --git a/src/tools/unidasm.cpp b/src/tools/unidasm.cpp
index 1f093df9416..744d65282a3 100644
--- a/src/tools/unidasm.cpp
+++ b/src/tools/unidasm.cpp
@@ -710,7 +710,7 @@ unidasm_data_buffer::unidasm_data_buffer(util::disasm_interface *_disasm, const
break;
case -1:
- lr8 = [this](offs_t pc) -> u8 { abort(); };
+ lr8 = [](offs_t pc) -> u8 { abort(); };
lr16 = [this](offs_t pc) -> u16 {
const u16 *p = get_ptr<u16>(pc);
return p ?
@@ -758,8 +758,8 @@ unidasm_data_buffer::unidasm_data_buffer(util::disasm_interface *_disasm, const
break;
case -2:
- lr8 = [this](offs_t pc) -> u8 { abort(); };
- lr16 = [this](offs_t pc) -> u16 { abort(); };
+ lr8 = [](offs_t pc) -> u8 { abort(); };
+ lr16 = [](offs_t pc) -> u16 { abort(); };
lr32 = [this](offs_t pc) -> u16 {
const u32 *p = get_ptr<u32>(pc);
return p ?
@@ -789,9 +789,9 @@ unidasm_data_buffer::unidasm_data_buffer(util::disasm_interface *_disasm, const
break;
case -3:
- lr8 = [this](offs_t pc) -> u8 { abort(); };
- lr16 = [this](offs_t pc) -> u16 { abort(); };
- lr32 = [this](offs_t pc) -> u32 { abort(); };
+ lr8 = [](offs_t pc) -> u8 { abort(); };
+ lr16 = [](offs_t pc) -> u16 { abort(); };
+ lr32 = [](offs_t pc) -> u32 { abort(); };
lr64 = [this](offs_t pc) -> u64 {
const u64 *p = get_ptr<u64>(pc);
return p ?
@@ -801,10 +801,9 @@ unidasm_data_buffer::unidasm_data_buffer(util::disasm_interface *_disasm, const
break;
case 3:
- assert(entry->endian == );
- lr8 = [this](offs_t pc) -> u8 { abort(); };
- lr32 = [this](offs_t pc) -> u32 { abort(); };
- lr64 = [this](offs_t pc) -> u64 { abort(); };
+ lr8 = [](offs_t pc) -> u8 { abort(); };
+ lr32 = [](offs_t pc) -> u32 { abort(); };
+ lr64 = [](offs_t pc) -> u64 { abort(); };
lr16 = [this](offs_t pc) -> u16 {
if(pc < base_pc)
return 0x0000;
@@ -1028,7 +1027,7 @@ int main(int argc, char *argv[])
lpce &= pc_mask;
return dis->pc_linear_to_real(lpce);
};
- next_pc_wrap = [pc_mask, page_mask, dis = disasm.get()](offs_t pc, offs_t size) {
+ next_pc_wrap = [page_mask, dis = disasm.get()](offs_t pc, offs_t size) {
offs_t lpc = dis->pc_real_to_linear(pc);
offs_t lpce = (lpc & ~page_mask) | ((lpc + size) & page_mask);
return dis->pc_linear_to_real(lpce);
@@ -1042,7 +1041,7 @@ int main(int argc, char *argv[])
pce &= pc_mask;
return pce;
};
- next_pc_wrap = [pc_mask, page_mask](offs_t pc, offs_t size) {
+ next_pc_wrap = [page_mask](offs_t pc, offs_t size) {
offs_t pce = (pc & ~page_mask) | ((pc + size) & page_mask);
return pce;
};