diff options
Diffstat (limited to 'src/devices/cpu/melps4/melps4op.cpp')
-rw-r--r-- | src/devices/cpu/melps4/melps4op.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/devices/cpu/melps4/melps4op.cpp b/src/devices/cpu/melps4/melps4op.cpp index 4f77764a66b..44d17ae2d4c 100644 --- a/src/devices/cpu/melps4/melps4op.cpp +++ b/src/devices/cpu/melps4/melps4op.cpp @@ -8,15 +8,15 @@ // internal helpers -inline UINT8 melps4_cpu_device::ram_r() +inline uint8_t melps4_cpu_device::ram_r() { - UINT8 address = (m_z << 6 | m_x << 4 | m_y) & m_datamask; + uint8_t address = (m_z << 6 | m_x << 4 | m_y) & m_datamask; return m_data->read_byte(address) & 0xf; } -inline void melps4_cpu_device::ram_w(UINT8 data) +inline void melps4_cpu_device::ram_w(uint8_t data) { - UINT8 address = (m_z << 6 | m_x << 4 | m_y) & m_datamask; + uint8_t address = (m_z << 6 | m_x << 4 | m_y) & m_datamask; m_data->write_byte(address, data & 0xf); } @@ -134,7 +134,7 @@ void melps4_cpu_device::op_lcps() m_cps = m_op & 1; // swap registers - UINT8 x, y, z, cy; + uint8_t x, y, z, cy; x = m_x; y = m_y; z = m_z; @@ -171,7 +171,7 @@ void melps4_cpu_device::op_tam() void melps4_cpu_device::op_xam() { // XAM j: exchange RAM with A, xor X with j - UINT8 a = m_a; + uint8_t a = m_a; m_a = ram_r(); ram_w(a); m_x ^= m_op & 3; @@ -227,7 +227,7 @@ void melps4_cpu_device::op_amcs() void melps4_cpu_device::op_a() { // A n: add immediate to A, skip next on no carry (except when n=6) - UINT8 n = m_op & 0xf; + uint8_t n = m_op & 0xf; m_a += n; m_skip = !(m_a & 0x10 || n == 6); m_a &= 0xf; @@ -260,7 +260,7 @@ void melps4_cpu_device::op_cma() void melps4_cpu_device::op_rl() { // RL(undocumented): rotate A left through carry - UINT8 c = m_a >> 3 & 1; + uint8_t c = m_a >> 3 & 1; m_a = (m_a << 1 | m_cy) & 0xf; m_cy = c; } @@ -268,7 +268,7 @@ void melps4_cpu_device::op_rl() void melps4_cpu_device::op_rr() { // RR(undocumented): rotate A right through carry - UINT8 c = m_a & 1; + uint8_t c = m_a & 1; m_a = m_a >> 1 | m_cy << 3; m_cy = c; } @@ -333,7 +333,7 @@ void melps4_cpu_device::op_taj() void melps4_cpu_device::op_xal() { // XAL: exchange A with L - UINT8 a = m_a; + uint8_t a = m_a; m_a = m_l; m_l = a; } @@ -341,7 +341,7 @@ void melps4_cpu_device::op_xal() void melps4_cpu_device::op_xah() { // XAH: exchange A with H - UINT8 a = m_a; + uint8_t a = m_a; m_a = m_h; m_h = a; } @@ -362,7 +362,7 @@ void melps4_cpu_device::op_dec() void melps4_cpu_device::op_shl() { // SHL: set bit in L or H designated by C - UINT8 mask = 1 << (m_c & 3); + uint8_t mask = 1 << (m_c & 3); if (m_c & 4) m_h |= mask; else @@ -372,7 +372,7 @@ void melps4_cpu_device::op_shl() void melps4_cpu_device::op_rhl() { // RHL: reset bit in L or H designated by C - UINT8 mask = 1 << (m_c & 3); + uint8_t mask = 1 << (m_c & 3); if (m_c & 4) m_h &= ~mask; else @@ -498,7 +498,7 @@ void melps4_cpu_device::op_b() // - short call: subroutine page // - short jump: current page, or sub. page + 1 when in sub. mode // - long jump/call(B/BM preceded by SP): temp SP register - UINT8 page = m_pc >> 7; + uint8_t page = m_pc >> 7; if ((m_prev_op & ~0xf) == m_sp_mask) { m_sm = false; |