summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2015-07-03 23:04:24 +0200
committer hap <happppp@users.noreply.github.com>2015-07-03 23:04:24 +0200
commit563b4967926a0eda52a2a663be6503f6e6e6c554 (patch)
tree028c0fe1d8e291ec0406b4b5ba8bfeced1b776df
parent9c8b2c6a1afacc15b669524a1cd7d324c136ac08 (diff)
renamed some cpu core inc files to c
-rw-r--r--scripts/src/cpu.lua4
-rw-r--r--src/emu/cpu/amis2000/amis2000.c2
-rw-r--r--src/emu/cpu/amis2000/amis2000op.c (renamed from src/emu/cpu/amis2000/amis2000op.inc)4
-rw-r--r--src/emu/cpu/hmcs40/hmcs40.c17
-rw-r--r--src/emu/cpu/hmcs40/hmcs40.h10
-rw-r--r--src/emu/cpu/hmcs40/hmcs40d.c2
-rw-r--r--src/emu/cpu/hmcs40/hmcs40op.c (renamed from src/emu/cpu/hmcs40/hmcs40op.inc)5
-rw-r--r--src/emu/cpu/melps4/melps4.c2
-rw-r--r--src/emu/cpu/melps4/melps4op.c (renamed from src/emu/cpu/melps4/melps4op.inc)3
-rw-r--r--src/emu/cpu/ucom4/ucom4.c9
-rw-r--r--src/emu/cpu/ucom4/ucom4.h8
-rw-r--r--src/emu/cpu/ucom4/ucom4op.c (renamed from src/emu/cpu/ucom4/ucom4op.inc)3
12 files changed, 39 insertions, 30 deletions
diff --git a/scripts/src/cpu.lua b/scripts/src/cpu.lua
index fba4b569059..ddbcfb768ab 100644
--- a/scripts/src/cpu.lua
+++ b/scripts/src/cpu.lua
@@ -164,6 +164,7 @@ if (CPUS["AMIS2000"]~=null) then
files {
MAME_DIR .. "src/emu/cpu/amis2000/amis2000.c",
MAME_DIR .. "src/emu/cpu/amis2000/amis2000.h",
+ MAME_DIR .. "src/emu/cpu/amis2000/amis2000op.c",
}
end
@@ -583,6 +584,7 @@ if (CPUS["HMCS40"]~=null) then
files {
MAME_DIR .. "src/emu/cpu/hmcs40/hmcs40.c",
MAME_DIR .. "src/emu/cpu/hmcs40/hmcs40.h",
+ MAME_DIR .. "src/emu/cpu/hmcs40/hmcs40op.c",
}
end
@@ -1076,6 +1078,7 @@ if (CPUS["MELPS4"]~=null) then
files {
MAME_DIR .. "src/emu/cpu/melps4/melps4.c",
MAME_DIR .. "src/emu/cpu/melps4/melps4.h",
+ MAME_DIR .. "src/emu/cpu/melps4/melps4op.c",
MAME_DIR .. "src/emu/cpu/melps4/m58846.c",
MAME_DIR .. "src/emu/cpu/melps4/m58846.h",
}
@@ -1467,6 +1470,7 @@ if (CPUS["UCOM4"]~=null) then
files {
MAME_DIR .. "src/emu/cpu/ucom4/ucom4.c",
MAME_DIR .. "src/emu/cpu/ucom4/ucom4.h",
+ MAME_DIR .. "src/emu/cpu/ucom4/ucom4op.c",
}
end
diff --git a/src/emu/cpu/amis2000/amis2000.c b/src/emu/cpu/amis2000/amis2000.c
index 1d3c198952f..3082b09f14b 100644
--- a/src/emu/cpu/amis2000/amis2000.c
+++ b/src/emu/cpu/amis2000/amis2000.c
@@ -21,8 +21,6 @@
#include "amis2000.h"
#include "debugger.h"
-#include "amis2000op.inc"
-
// S2000 is the most basic one, 64 nibbles internal RAM and 1KB internal ROM
// S2150 increased RAM to 80 nibbles and ROM to 1.5KB
diff --git a/src/emu/cpu/amis2000/amis2000op.inc b/src/emu/cpu/amis2000/amis2000op.c
index f561b67f5eb..02f23ebed0a 100644
--- a/src/emu/cpu/amis2000/amis2000op.inc
+++ b/src/emu/cpu/amis2000/amis2000op.c
@@ -1,7 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:hap
+
// AMI S2000 opcode handlers
+#include "amis2000.h"
+
+
// internal helpers
inline UINT8 amis2000_base_device::ram_r()
diff --git a/src/emu/cpu/hmcs40/hmcs40.c b/src/emu/cpu/hmcs40/hmcs40.c
index fdcaa430189..d76385cf2ba 100644
--- a/src/emu/cpu/hmcs40/hmcs40.c
+++ b/src/emu/cpu/hmcs40/hmcs40.c
@@ -11,23 +11,12 @@
*/
-enum
-{
- FAMILY_HMCS42 = 0,
- FAMILY_HMCS43,
- FAMILY_HMCS44,
- FAMILY_HMCS45,
- FAMILY_HMCS46,
- FAMILY_HMCS47,
-};
-
#define IS_PMOS 0
#define IS_CMOS ~0
#include "hmcs40.h"
#include "debugger.h"
-#include "hmcs40op.inc"
// MCU types
@@ -90,7 +79,7 @@ ADDRESS_MAP_END
// device definitions
hmcs43_cpu_device::hmcs43_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT16 polarity, const char *shortname)
- : hmcs40_cpu_device(mconfig, type, name, tag, owner, clock, FAMILY_HMCS43, polarity, 3 /* stack levels */, 10 /* pc width */, 11 /* prg width */, ADDRESS_MAP_NAME(program_1k), 7 /* data width */, ADDRESS_MAP_NAME(data_80x4), shortname, __FILE__)
+ : hmcs40_cpu_device(mconfig, type, name, tag, owner, clock, HMCS40_FAMILY_HMCS43, polarity, 3 /* stack levels */, 10 /* pc width */, 11 /* prg width */, ADDRESS_MAP_NAME(program_1k), 7 /* data width */, ADDRESS_MAP_NAME(data_80x4), shortname, __FILE__)
{ }
hd38750_device::hd38750_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
@@ -108,7 +97,7 @@ hd44758_device::hd44758_device(const machine_config &mconfig, const char *tag, d
hmcs44_cpu_device::hmcs44_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT16 polarity, const char *shortname)
- : hmcs40_cpu_device(mconfig, type, name, tag, owner, clock, FAMILY_HMCS44, polarity, 4, 11, 12, ADDRESS_MAP_NAME(program_2k), 8, ADDRESS_MAP_NAME(data_160x4), shortname, __FILE__)
+ : hmcs40_cpu_device(mconfig, type, name, tag, owner, clock, HMCS40_FAMILY_HMCS44, polarity, 4, 11, 12, ADDRESS_MAP_NAME(program_2k), 8, ADDRESS_MAP_NAME(data_160x4), shortname, __FILE__)
{ }
hd38800_device::hd38800_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
@@ -126,7 +115,7 @@ hd44808_device::hd44808_device(const machine_config &mconfig, const char *tag, d
hmcs45_cpu_device::hmcs45_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT16 polarity, const char *shortname)
- : hmcs40_cpu_device(mconfig, type, name, tag, owner, clock, FAMILY_HMCS45, polarity, 4, 11, 12, ADDRESS_MAP_NAME(program_2k), 8, ADDRESS_MAP_NAME(data_160x4), shortname, __FILE__)
+ : hmcs40_cpu_device(mconfig, type, name, tag, owner, clock, HMCS40_FAMILY_HMCS45, polarity, 4, 11, 12, ADDRESS_MAP_NAME(program_2k), 8, ADDRESS_MAP_NAME(data_160x4), shortname, __FILE__)
{ }
hd38820_device::hd38820_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
diff --git a/src/emu/cpu/hmcs40/hmcs40.h b/src/emu/cpu/hmcs40/hmcs40.h
index 8b912739541..50e3a80db62 100644
--- a/src/emu/cpu/hmcs40/hmcs40.h
+++ b/src/emu/cpu/hmcs40/hmcs40.h
@@ -45,6 +45,16 @@ enum
HMCS40_INPUT_LINE_HLT
};
+enum
+{
+ HMCS40_FAMILY_HMCS42 = 0,
+ HMCS40_FAMILY_HMCS43,
+ HMCS40_FAMILY_HMCS44,
+ HMCS40_FAMILY_HMCS45,
+ HMCS40_FAMILY_HMCS46,
+ HMCS40_FAMILY_HMCS47,
+};
+
// pinout reference
diff --git a/src/emu/cpu/hmcs40/hmcs40d.c b/src/emu/cpu/hmcs40/hmcs40d.c
index 8bd9ce4e043..b63ba1fde4d 100644
--- a/src/emu/cpu/hmcs40/hmcs40d.c
+++ b/src/emu/cpu/hmcs40/hmcs40d.c
@@ -85,7 +85,7 @@ static const UINT32 s_flags[] =
static const INT8 s_next_pc[0x40] =
{
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32+0x40,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32+0x40 /* rollback */,
-32, -31, -30, -29, -28, -27, -26, -25, -24, -23, -22, -21, -20, -19, -18, -17,
-15, -14, -13, -12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, -1
};
diff --git a/src/emu/cpu/hmcs40/hmcs40op.inc b/src/emu/cpu/hmcs40/hmcs40op.c
index 6e905c71796..f6faab90360 100644
--- a/src/emu/cpu/hmcs40/hmcs40op.inc
+++ b/src/emu/cpu/hmcs40/hmcs40op.c
@@ -3,6 +3,9 @@
// HMCS40 opcode handlers
+#include "hmcs40.h"
+
+
// internal helpers
inline UINT8 hmcs40_cpu_device::ram_r()
@@ -82,7 +85,7 @@ void hmcs40_cpu_device::op_xamr()
// HMCS42: MR0 on file 0, MR4-MR15 on file 4 (there is no file 1-3)
// HMCS43: MR0-MR3 on file 0-3, MR4-MR15 on file 4
- if (m_family == FAMILY_HMCS42 || m_family == FAMILY_HMCS43)
+ if (m_family == HMCS40_FAMILY_HMCS42 || m_family == HMCS40_FAMILY_HMCS43)
address |= (address < 4) ? (address << 4) : 0x40;
// HMCS44/45/46/47: all on last file
diff --git a/src/emu/cpu/melps4/melps4.c b/src/emu/cpu/melps4/melps4.c
index 9986407aad4..b7390eaccf5 100644
--- a/src/emu/cpu/melps4/melps4.c
+++ b/src/emu/cpu/melps4/melps4.c
@@ -40,8 +40,6 @@
#include "melps4.h"
#include "debugger.h"
-#include "melps4op.inc"
-
// disasm
void melps4_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
diff --git a/src/emu/cpu/melps4/melps4op.inc b/src/emu/cpu/melps4/melps4op.c
index f9afc5eda91..4f77764a66b 100644
--- a/src/emu/cpu/melps4/melps4op.inc
+++ b/src/emu/cpu/melps4/melps4op.c
@@ -3,6 +3,9 @@
// MELPS 4 opcode handlers
+#include "melps4.h"
+
+
// internal helpers
inline UINT8 melps4_cpu_device::ram_r()
diff --git a/src/emu/cpu/ucom4/ucom4.c b/src/emu/cpu/ucom4/ucom4.c
index ceb074728e5..d480b04fce5 100644
--- a/src/emu/cpu/ucom4/ucom4.c
+++ b/src/emu/cpu/ucom4/ucom4.c
@@ -15,18 +15,9 @@
*/
-enum
-{
- NEC_UCOM43 = 0,
- NEC_UCOM44,
- NEC_UCOM45
-};
-
#include "ucom4.h"
#include "debugger.h"
-#include "ucom4op.inc"
-
// uCOM-43 products: 2000x8 ROM, RAM size custom, supports full instruction set
const device_type NEC_D553 = &device_creator<upd553_cpu_device>; // 42-pin PMOS, 35 pins for I/O, Open Drain output, 96x4 RAM
diff --git a/src/emu/cpu/ucom4/ucom4.h b/src/emu/cpu/ucom4/ucom4.h
index a0f3353c5e5..e6165bcde28 100644
--- a/src/emu/cpu/ucom4/ucom4.h
+++ b/src/emu/cpu/ucom4/ucom4.h
@@ -44,7 +44,6 @@
#define MCFG_UCOM4_WRITE_I_CB(_devcb) \
ucom4_cpu_device::set_write_i_callback(*device, DEVCB_##_devcb);
-
enum
{
NEC_UCOM4_PORTA = 0,
@@ -58,6 +57,13 @@ enum
NEC_UCOM4_PORTI
};
+enum
+{
+ NEC_UCOM43 = 0,
+ NEC_UCOM44,
+ NEC_UCOM45
+};
+
// pinout reference
diff --git a/src/emu/cpu/ucom4/ucom4op.inc b/src/emu/cpu/ucom4/ucom4op.c
index 0f7aaa7902e..11475ee254d 100644
--- a/src/emu/cpu/ucom4/ucom4op.inc
+++ b/src/emu/cpu/ucom4/ucom4op.c
@@ -3,6 +3,9 @@
// uCOM-4 opcode handlers
+#include "ucom4.h"
+
+
// internal helpers
inline UINT8 ucom4_cpu_device::ram_r()