summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Curt Coder <curtcoder@mail.com>2013-03-05 19:54:55 +0000
committer Curt Coder <curtcoder@mail.com>2013-03-05 19:54:55 +0000
commitab4d9ca569904a4c8edc3a6862e53ead716f0c31 (patch)
treedbdf7f30982f3c5d05c3b40acfbfe51cb8b6bdb7
parent2a43be4b00a6861f5681f363634fbd0ef9c969f0 (diff)
m6809: Fixed compile on older OS X tools. (nw)
-rw-r--r--src/emu/cpu/m6809/hd6309.h34
-rw-r--r--src/emu/cpu/m6809/konami.ops2
-rw-r--r--src/emu/cpu/m6809/m6809.h66
3 files changed, 60 insertions, 42 deletions
diff --git a/src/emu/cpu/m6809/hd6309.h b/src/emu/cpu/m6809/hd6309.h
index 546263fa773..f2deda9c24f 100644
--- a/src/emu/cpu/m6809/hd6309.h
+++ b/src/emu/cpu/m6809/hd6309.h
@@ -46,22 +46,28 @@ private:
typedef m6809_base_device super;
// addressing modes
- static const int ADDRESSING_MODE_REGISTER_E = 5;
- static const int ADDRESSING_MODE_REGISTER_F = 6;
- static const int ADDRESSING_MODE_REGISTER_W = 7;
- static const int ADDRESSING_MODE_REGISTER_X = 8;
- static const int ADDRESSING_MODE_REGISTER_Y = 9;
- static const int ADDRESSING_MODE_REGISTER_U = 10;
- static const int ADDRESSING_MODE_REGISTER_S = 11;
- static const int ADDRESSING_MODE_REGISTER_CC = 12;
- static const int ADDRESSING_MODE_REGISTER_DP = 13;
- static const int ADDRESSING_MODE_REGISTER_PC = 14;
- static const int ADDRESSING_MODE_REGISTER_V = 15;
- static const int ADDRESSING_MODE_ZERO = 16;
+ enum
+ {
+ ADDRESSING_MODE_REGISTER_E = 5,
+ ADDRESSING_MODE_REGISTER_F = 6,
+ ADDRESSING_MODE_REGISTER_W = 7,
+ ADDRESSING_MODE_REGISTER_X = 8,
+ ADDRESSING_MODE_REGISTER_Y = 9,
+ ADDRESSING_MODE_REGISTER_U = 10,
+ ADDRESSING_MODE_REGISTER_S = 11,
+ ADDRESSING_MODE_REGISTER_CC = 12,
+ ADDRESSING_MODE_REGISTER_DP = 13,
+ ADDRESSING_MODE_REGISTER_PC = 14,
+ ADDRESSING_MODE_REGISTER_V = 15,
+ ADDRESSING_MODE_ZERO = 16
+ };
// interrupt vectors
- static const UINT16 VECTOR_ILLEGAL = 0xFFF0;
-
+ enum
+ {
+ VECTOR_ILLEGAL = 0xFFF0
+ };
+
// CPU registers
PAIR16 m_w;
PAIR16 m_v;
diff --git a/src/emu/cpu/m6809/konami.ops b/src/emu/cpu/m6809/konami.ops
index fae445cf115..8152fd17c75 100644
--- a/src/emu/cpu/m6809/konami.ops
+++ b/src/emu/cpu/m6809/konami.ops
@@ -517,7 +517,7 @@ LSRD:
else
m_cc &= ~CC_C;
- m_d.w = set_flags<UINT16>(CC_NZ, safe_shift_right<UINT16>(m_d.w, m_temp.b.l));
+ m_d.w = set_flags<UINT16>(CC_NZ, safe_shift_right<INT16>(m_d.w, m_temp.b.l));
}
eat(1);
return;
diff --git a/src/emu/cpu/m6809/m6809.h b/src/emu/cpu/m6809/m6809.h
index 655b854ae83..0c0fcfb8a97 100644
--- a/src/emu/cpu/m6809/m6809.h
+++ b/src/emu/cpu/m6809/m6809.h
@@ -79,11 +79,14 @@ protected:
virtual void state_string_export(const device_state_entry &entry, astring &string);
// addressing modes
- static const int ADDRESSING_MODE_IMMEDIATE = 0;
- static const int ADDRESSING_MODE_EA = 1;
- static const int ADDRESSING_MODE_REGISTER_A = 2;
- static const int ADDRESSING_MODE_REGISTER_B = 3;
- static const int ADDRESSING_MODE_REGISTER_D = 4;
+ enum
+ {
+ ADDRESSING_MODE_IMMEDIATE = 0,
+ ADDRESSING_MODE_EA = 1,
+ ADDRESSING_MODE_REGISTER_A = 2,
+ ADDRESSING_MODE_REGISTER_B = 3,
+ ADDRESSING_MODE_REGISTER_D = 4
+ };
// register transfer
struct exgtfr_register
@@ -93,32 +96,41 @@ protected:
};
// flag bits in the cc register
- static const UINT8 CC_C = 0x01; // Carry
- static const UINT8 CC_V = 0x02; // Overflow
- static const UINT8 CC_Z = 0x04; // Zero
- static const UINT8 CC_N = 0x08; // Negative
- static const UINT8 CC_I = 0x10; // Inhibit IRQ
- static const UINT8 CC_H = 0x20; // Half (auxiliary) carry
- static const UINT8 CC_F = 0x40; // Inhibit FIRQ
- static const UINT8 CC_E = 0x80; // Entire state pushed
+ enum
+ {
+ CC_C = 0x01, // Carry
+ CC_V = 0x02, // Overflow
+ CC_Z = 0x04, // Zero
+ CC_N = 0x08, // Negative
+ CC_I = 0x10, // Inhibit IRQ
+ CC_H = 0x20, // Half (auxiliary) carry
+ CC_F = 0x40, // Inhibit FIRQ
+ CC_E = 0x80 // Entire state pushed
+ };
// flag combinations
- static const UINT8 CC_VC = CC_V | CC_C;
- static const UINT8 CC_ZC = CC_Z | CC_C;
- static const UINT8 CC_NZ = CC_N | CC_Z;
- static const UINT8 CC_NZC = CC_N | CC_Z | CC_C;
- static const UINT8 CC_NZV = CC_N | CC_Z | CC_V;
- static const UINT8 CC_NZVC = CC_N | CC_Z | CC_V | CC_C;
- static const UINT8 CC_HNZVC = CC_H | CC_N | CC_Z | CC_V | CC_C;
+ enum
+ {
+ CC_VC = CC_V | CC_C,
+ CC_ZC = CC_Z | CC_C,
+ CC_NZ = CC_N | CC_Z,
+ CC_NZC = CC_N | CC_Z | CC_C,
+ CC_NZV = CC_N | CC_Z | CC_V,
+ CC_NZVC = CC_N | CC_Z | CC_V | CC_C,
+ CC_HNZVC = CC_H | CC_N | CC_Z | CC_V | CC_C
+ };
// interrupt vectors
- static const UINT16 VECTOR_SWI3 = 0xFFF2;
- static const UINT16 VECTOR_SWI2 = 0xFFF4;
- static const UINT16 VECTOR_FIRQ = 0xFFF6;
- static const UINT16 VECTOR_IRQ = 0xFFF8;
- static const UINT16 VECTOR_SWI = 0xFFFA;
- static const UINT16 VECTOR_NMI = 0xFFFC;
- static const UINT16 VECTOR_RESET_FFFE = 0xFFFE;
+ enum
+ {
+ VECTOR_SWI3 = 0xFFF2,
+ VECTOR_SWI2 = 0xFFF4,
+ VECTOR_FIRQ = 0xFFF6,
+ VECTOR_IRQ = 0xFFF8,
+ VECTOR_SWI = 0xFFFA,
+ VECTOR_NMI = 0xFFFC,
+ VECTOR_RESET_FFFE = 0xFFFE
+ };
// CPU registers
PAIR16 m_pc; // program counter
V_CPU_PROGRAM_MAP, MDRV_CPU_DATA_MAP, Aaron Giles2009-05-091-5/+5 * Removed device types from device queries that use tags, under the Aaron Giles2009-03-021-13/+13 * Another batch of tagging, this time for speakers/screens: Aaron Giles2009-02-251-12/+12 * Ok, this is The Big One. Aaron Giles2009-02-111-72/+48 * From: Atari Ace [mailto:atari_ace@verizon.net] Aaron Giles2009-01-131-17/+9 * Removed mame_find_cpu_index(). Use cputag_get_cpu() instead. Aaron Giles2008-12-061-5/+5 * Changed save state system to accept machine parameters where Aaron Giles2008-12-051-10/+10 * Another big one. Aaron Giles2008-11-201-1/+1 * WARNING: this compiles, but not fully cleanly, and a number of drivers Aaron Giles2008-11-141-39/+39 * From: Atari Ace [mailto:atari_ace@verizon.net] Aaron Giles2008-09-111-1/+1 * reverted unit mask changes and removed the unused & unsafe memory_install fun... smf-2008-08-181-1/+1 * Added unit mask to all memory installs that override the bus width. You could... smf-2008-08-171-1/+1 * This (mostly - see below) completes the structure, lower-casing functions and... Derrick Renaud2008-08-111-12/+12 * Updated src\emu\sound headers from K-S, so they use latest naming/structure a... Derrick Renaud2008-08-101-17/+17 * Some more structure/naming updates of sound cores. Derrick Renaud2008-08-091-6/+6 * NOTE: with this change, I have also removed PORT_START and renamed Aaron Giles2008-08-061-3/+3 * Cleanups/version bump.mame0126u3 Aaron Giles2008-07-311-1/+1 * Region classes go bye-bye. Aaron Giles2008-07-281-3/+3 * Changed the way memory regions are referenced. Instead of a single