diff options
Diffstat (limited to 'src/devices/cpu/e0c6200/e0c6200op.cpp')
-rw-r--r-- | src/devices/cpu/e0c6200/e0c6200op.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/devices/cpu/e0c6200/e0c6200op.cpp b/src/devices/cpu/e0c6200/e0c6200op.cpp index e6d2fed3933..ed2d4a06031 100644 --- a/src/devices/cpu/e0c6200/e0c6200op.cpp +++ b/src/devices/cpu/e0c6200/e0c6200op.cpp @@ -10,38 +10,38 @@ // MX/MY -UINT8 e0c6200_cpu_device::read_mx() +uint8_t e0c6200_cpu_device::read_mx() { - UINT16 address = m_xp << 8 | m_xh << 4 | m_xl; + uint16_t address = m_xp << 8 | m_xh << 4 | m_xl; return m_data->read_byte(address) & 0xf; } -UINT8 e0c6200_cpu_device::read_my() +uint8_t e0c6200_cpu_device::read_my() { - UINT16 address = m_yp << 8 | m_yh << 4 | m_yl; + uint16_t address = m_yp << 8 | m_yh << 4 | m_yl; return m_data->read_byte(address) & 0xf; } -void e0c6200_cpu_device::write_mx(UINT8 data) +void e0c6200_cpu_device::write_mx(uint8_t data) { - UINT16 address = m_xp << 8 | m_xh << 4 | m_xl; + uint16_t address = m_xp << 8 | m_xh << 4 | m_xl; m_data->write_byte(address, data); } -void e0c6200_cpu_device::write_my(UINT8 data) +void e0c6200_cpu_device::write_my(uint8_t data) { - UINT16 address = m_yp << 8 | m_yh << 4 | m_yl; + uint16_t address = m_yp << 8 | m_yh << 4 | m_yl; m_data->write_byte(address, data); } // Mn(RP) -UINT8 e0c6200_cpu_device::read_mn() +uint8_t e0c6200_cpu_device::read_mn() { return m_data->read_byte(m_op & 0xf) & 0xf; } -void e0c6200_cpu_device::write_mn(UINT8 data) +void e0c6200_cpu_device::write_mn(uint8_t data) { m_data->write_byte(m_op & 0xf, data); } @@ -49,12 +49,12 @@ void e0c6200_cpu_device::write_mn(UINT8 data) // common stack ops -void e0c6200_cpu_device::push(UINT8 data) +void e0c6200_cpu_device::push(uint8_t data) { m_data->write_byte(--m_sp, data); } -UINT8 e0c6200_cpu_device::pop() +uint8_t e0c6200_cpu_device::pop() { return m_data->read_byte(m_sp++) & 0xf; } @@ -70,7 +70,7 @@ void e0c6200_cpu_device::push_pc() void e0c6200_cpu_device::pop_pc() { // the highest bit(bank bit) is unchanged - UINT16 bank = m_pc & 0x1000; + uint16_t bank = m_pc & 0x1000; m_pc = pop(); m_pc |= pop() << 4; m_pc |= pop() << 8; @@ -80,13 +80,13 @@ void e0c6200_cpu_device::pop_pc() // misc internal helpers -void e0c6200_cpu_device::set_cf(UINT8 data) +void e0c6200_cpu_device::set_cf(uint8_t data) { // set carry flag if bit 4 is set, reset otherwise m_f = (m_f & ~C_FLAG) | ((data & 0x10) ? C_FLAG : 0); } -void e0c6200_cpu_device::set_zf(UINT8 data) +void e0c6200_cpu_device::set_zf(uint8_t data) { // set zero flag if 4-bit data is 0, reset otherwise m_f = (m_f & ~Z_FLAG) | ((data & 0xf) ? 0 : Z_FLAG); @@ -121,7 +121,7 @@ void e0c6200_cpu_device::do_branch(int condition) // arithmetic instructions -UINT8 e0c6200_cpu_device::op_inc(UINT8 x) +uint8_t e0c6200_cpu_device::op_inc(uint8_t x) { // INC x: increment x (flags: C, Z) m_icount -= 2; @@ -130,7 +130,7 @@ UINT8 e0c6200_cpu_device::op_inc(UINT8 x) return x & 0xf; } -UINT8 e0c6200_cpu_device::op_dec(UINT8 x) +uint8_t e0c6200_cpu_device::op_dec(uint8_t x) { // DEC x: decrement x (flags: C, Z) m_icount -= 2; @@ -139,7 +139,7 @@ UINT8 e0c6200_cpu_device::op_dec(UINT8 x) return x & 0xf; } -UINT8 e0c6200_cpu_device::op_add(UINT8 x, UINT8 y, int decimal) +uint8_t e0c6200_cpu_device::op_add(uint8_t x, uint8_t y, int decimal) { // ADD x,y: add y to x (flags: C, Z) m_icount -= 2; @@ -157,13 +157,13 @@ UINT8 e0c6200_cpu_device::op_add(UINT8 x, UINT8 y, int decimal) return x & 0xf; } -UINT8 e0c6200_cpu_device::op_adc(UINT8 x, UINT8 y, int decimal) +uint8_t e0c6200_cpu_device::op_adc(uint8_t x, uint8_t y, int decimal) { // ADC x,y: add with carry y to x (flags: C, Z) return op_add(x, y + (m_f & 1), decimal); } -UINT8 e0c6200_cpu_device::op_sub(UINT8 x, UINT8 y, int decimal) +uint8_t e0c6200_cpu_device::op_sub(uint8_t x, uint8_t y, int decimal) { // SUB x,y: subtract y from x (flags: C, Z) m_icount -= 2; @@ -178,7 +178,7 @@ UINT8 e0c6200_cpu_device::op_sub(UINT8 x, UINT8 y, int decimal) return x & 0xf; } -UINT8 e0c6200_cpu_device::op_sbc(UINT8 x, UINT8 y, int decimal) +uint8_t e0c6200_cpu_device::op_sbc(uint8_t x, uint8_t y, int decimal) { // SBC x,y: subtract with carry y from x (flags: C, Z) return op_sub(x, y + (m_f & 1), decimal); @@ -187,7 +187,7 @@ UINT8 e0c6200_cpu_device::op_sbc(UINT8 x, UINT8 y, int decimal) // logical instructions -UINT8 e0c6200_cpu_device::op_and(UINT8 x, UINT8 y) +uint8_t e0c6200_cpu_device::op_and(uint8_t x, uint8_t y) { // AND x,y: logical AND x with y (flags: Z) m_icount -= 2; @@ -196,7 +196,7 @@ UINT8 e0c6200_cpu_device::op_and(UINT8 x, UINT8 y) return x; } -UINT8 e0c6200_cpu_device::op_or(UINT8 x, UINT8 y) +uint8_t e0c6200_cpu_device::op_or(uint8_t x, uint8_t y) { // OR x,y: logical OR x with y (flags: Z) m_icount -= 2; @@ -205,7 +205,7 @@ UINT8 e0c6200_cpu_device::op_or(UINT8 x, UINT8 y) return x; } -UINT8 e0c6200_cpu_device::op_xor(UINT8 x, UINT8 y) +uint8_t e0c6200_cpu_device::op_xor(uint8_t x, uint8_t y) { // XOR x,y: exclusive-OR x with y (flags: Z) m_icount -= 2; @@ -214,7 +214,7 @@ UINT8 e0c6200_cpu_device::op_xor(UINT8 x, UINT8 y) return x; } -UINT8 e0c6200_cpu_device::op_rlc(UINT8 x) +uint8_t e0c6200_cpu_device::op_rlc(uint8_t x) { // RLC x: rotate x left through carry (flags: C, Z) m_icount -= 2; @@ -223,7 +223,7 @@ UINT8 e0c6200_cpu_device::op_rlc(UINT8 x) return x & 0xf; } -UINT8 e0c6200_cpu_device::op_rrc(UINT8 x) +uint8_t e0c6200_cpu_device::op_rrc(uint8_t x) { // RRC x: rotate x right through carry (flags: C, Z) // note: RRC only takes 5 clock cycles |