diff options
author | 2016-05-01 21:39:40 +0200 | |
---|---|---|
committer | 2016-05-01 21:39:40 +0200 | |
commit | 262524206b785344a0507bd236ffc152a5fe23ef (patch) | |
tree | 8d3abece3e490fe91757d3dc7758b2028c10bae2 /src/devices/cpu/e0c6200 | |
parent | be67262fc21f75d40dead90256c0ec3142be7b12 (diff) |
tms7000/e0c6200: renamed hxx(inc) to cpp
Diffstat (limited to 'src/devices/cpu/e0c6200')
-rw-r--r-- | src/devices/cpu/e0c6200/e0c6200.cpp | 2 | ||||
-rw-r--r-- | src/devices/cpu/e0c6200/e0c6200.h | 35 | ||||
-rw-r--r-- | src/devices/cpu/e0c6200/e0c6200op.cpp (renamed from src/devices/cpu/e0c6200/e0c6200op.hxx) | 36 |
3 files changed, 36 insertions, 37 deletions
diff --git a/src/devices/cpu/e0c6200/e0c6200.cpp b/src/devices/cpu/e0c6200/e0c6200.cpp index c61250f068c..940a5893ce8 100644 --- a/src/devices/cpu/e0c6200/e0c6200.cpp +++ b/src/devices/cpu/e0c6200/e0c6200.cpp @@ -21,8 +21,6 @@ #include "e0c6200.h" #include "debugger.h" -#include "e0c6200op.hxx" - // disasm void e0c6200_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const diff --git a/src/devices/cpu/e0c6200/e0c6200.h b/src/devices/cpu/e0c6200/e0c6200.h index 7e47f817380..280ad88bd99 100644 --- a/src/devices/cpu/e0c6200/e0c6200.h +++ b/src/devices/cpu/e0c6200/e0c6200.h @@ -72,26 +72,33 @@ protected: UINT8 m_yp, m_yh, m_yl; // " UINT8 m_sp; // stackpointer (SPH, SPL) UINT8 m_f; // flags + enum + { + C_FLAG = 1, + Z_FLAG = 2, + D_FLAG = 4, + I_FLAG = 8 + }; // internal data memory read/write - inline UINT8 read_mx(); - inline UINT8 read_my(); - inline UINT8 read_mn(); - inline void write_mx(UINT8 data); - inline void write_my(UINT8 data); - inline void write_mn(UINT8 data); + UINT8 read_mx(); + UINT8 read_my(); + UINT8 read_mn(); + void write_mx(UINT8 data); + void write_my(UINT8 data); + void write_mn(UINT8 data); // common stack ops - inline void push(UINT8 data); - inline UINT8 pop(); - inline void push_pc(); - inline void pop_pc(); + void push(UINT8 data); + UINT8 pop(); + void push_pc(); + void pop_pc(); // misc internal helpers - inline void set_cf(UINT8 data); - inline void set_zf(UINT8 data); - inline void inc_x(); - inline void inc_y(); + void set_cf(UINT8 data); + void set_zf(UINT8 data); + void inc_x(); + void inc_y(); void do_branch(int condition = 1); // opcode handlers diff --git a/src/devices/cpu/e0c6200/e0c6200op.hxx b/src/devices/cpu/e0c6200/e0c6200op.cpp index 09fc07b3c70..e6d2fed3933 100644 --- a/src/devices/cpu/e0c6200/e0c6200op.hxx +++ b/src/devices/cpu/e0c6200/e0c6200op.cpp @@ -3,38 +3,32 @@ // E0C6200 opcode handlers -enum -{ - C_FLAG = 1, - Z_FLAG = 2, - D_FLAG = 4, - I_FLAG = 8 -}; +#include "e0c6200.h" // internal data memory read/write // MX/MY -inline UINT8 e0c6200_cpu_device::read_mx() +UINT8 e0c6200_cpu_device::read_mx() { UINT16 address = m_xp << 8 | m_xh << 4 | m_xl; return m_data->read_byte(address) & 0xf; } -inline UINT8 e0c6200_cpu_device::read_my() +UINT8 e0c6200_cpu_device::read_my() { UINT16 address = m_yp << 8 | m_yh << 4 | m_yl; return m_data->read_byte(address) & 0xf; } -inline void e0c6200_cpu_device::write_mx(UINT8 data) +void e0c6200_cpu_device::write_mx(UINT8 data) { UINT16 address = m_xp << 8 | m_xh << 4 | m_xl; m_data->write_byte(address, data); } -inline void e0c6200_cpu_device::write_my(UINT8 data) +void e0c6200_cpu_device::write_my(UINT8 data) { UINT16 address = m_yp << 8 | m_yh << 4 | m_yl; m_data->write_byte(address, data); @@ -42,12 +36,12 @@ inline void e0c6200_cpu_device::write_my(UINT8 data) // Mn(RP) -inline UINT8 e0c6200_cpu_device::read_mn() +UINT8 e0c6200_cpu_device::read_mn() { return m_data->read_byte(m_op & 0xf) & 0xf; } -inline void e0c6200_cpu_device::write_mn(UINT8 data) +void e0c6200_cpu_device::write_mn(UINT8 data) { m_data->write_byte(m_op & 0xf, data); } @@ -55,17 +49,17 @@ inline void e0c6200_cpu_device::write_mn(UINT8 data) // common stack ops -inline void e0c6200_cpu_device::push(UINT8 data) +void e0c6200_cpu_device::push(UINT8 data) { m_data->write_byte(--m_sp, data); } -inline UINT8 e0c6200_cpu_device::pop() +UINT8 e0c6200_cpu_device::pop() { return m_data->read_byte(m_sp++) & 0xf; } -inline void e0c6200_cpu_device::push_pc() +void e0c6200_cpu_device::push_pc() { // the highest bit(bank bit) is not pushed onto the stack push(m_pc >> 8 & 0xf); @@ -73,7 +67,7 @@ inline void e0c6200_cpu_device::push_pc() push(m_pc & 0xf); } -inline void e0c6200_cpu_device::pop_pc() +void e0c6200_cpu_device::pop_pc() { // the highest bit(bank bit) is unchanged UINT16 bank = m_pc & 0x1000; @@ -86,19 +80,19 @@ inline void e0c6200_cpu_device::pop_pc() // misc internal helpers -inline void e0c6200_cpu_device::set_cf(UINT8 data) +void e0c6200_cpu_device::set_cf(UINT8 data) { // set carry flag if bit 4 is set, reset otherwise m_f = (m_f & ~C_FLAG) | ((data & 0x10) ? C_FLAG : 0); } -inline void e0c6200_cpu_device::set_zf(UINT8 data) +void e0c6200_cpu_device::set_zf(UINT8 data) { // set zero flag if 4-bit data is 0, reset otherwise m_f = (m_f & ~Z_FLAG) | ((data & 0xf) ? 0 : Z_FLAG); } -inline void e0c6200_cpu_device::inc_x() +void e0c6200_cpu_device::inc_x() { // increment X (XH.XL) m_xl++; @@ -106,7 +100,7 @@ inline void e0c6200_cpu_device::inc_x() m_xl &= 0xf; } -inline void e0c6200_cpu_device::inc_y() +void e0c6200_cpu_device::inc_y() { // increment Y (YH.YL) m_yl++; |