From ddb290d5f615019c33c42b8d94e5a5254cabcf33 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 22 Oct 2016 13:13:17 +0200 Subject: NOTICE (TYPE NAME CONSOLIDATION) Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8 also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8 --- src/devices/cpu/i8008/8008dasm.cpp | 4 ++-- src/devices/cpu/i8008/i8008.cpp | 46 +++++++++++++++++++------------------- src/devices/cpu/i8008/i8008.h | 46 +++++++++++++++++++------------------- 3 files changed, 48 insertions(+), 48 deletions(-) (limited to 'src/devices/cpu/i8008') diff --git a/src/devices/cpu/i8008/8008dasm.cpp b/src/devices/cpu/i8008/8008dasm.cpp index d5f1e082d5e..39615eb4f26 100644 --- a/src/devices/cpu/i8008/8008dasm.cpp +++ b/src/devices/cpu/i8008/8008dasm.cpp @@ -18,9 +18,9 @@ static const char flag_names[] = { 'c', 'z', 's', 'p' }; CPU_DISASSEMBLE( i8008 ) { - UINT32 flags = 0; + uint32_t flags = 0; unsigned PC = pc; - UINT8 op = OP(pc++); + uint8_t op = OP(pc++); switch (op >> 6) { case 0x03: // starting with 11 diff --git a/src/devices/cpu/i8008/i8008.cpp b/src/devices/cpu/i8008/i8008.cpp index c8e1f74195b..a323ed077c4 100644 --- a/src/devices/cpu/i8008/i8008.cpp +++ b/src/devices/cpu/i8008/i8008.cpp @@ -33,7 +33,7 @@ const device_type I8008 = &device_creator; //------------------------------------------------- // i8008_device - constructor //------------------------------------------------- -i8008_device::i8008_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +i8008_device::i8008_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : cpu_device(mconfig, I8008, "i8008", tag, owner, clock, "i8008", __FILE__), m_program_config("program", ENDIANNESS_LITTLE, 8, 14), m_io_config("io", ENDIANNESS_LITTLE, 8, 8), @@ -102,7 +102,7 @@ void i8008_device::device_start() void i8008_device::init_tables (void) { int i; - UINT8 p; + uint8_t p; for (i = 0; i < 256; i++) { p = 0; @@ -206,7 +206,7 @@ void i8008_device::state_string_export(const device_state_entry &entry, std::str // of the shortest instruction, in bytes //------------------------------------------------- -UINT32 i8008_device::disasm_min_opcode_bytes() const +uint32_t i8008_device::disasm_min_opcode_bytes() const { return 1; } @@ -216,7 +216,7 @@ UINT32 i8008_device::disasm_min_opcode_bytes() const // of the longest instruction, in bytes //------------------------------------------------- -UINT32 i8008_device::disasm_max_opcode_bytes() const +uint32_t i8008_device::disasm_max_opcode_bytes() const { return 3; } @@ -226,7 +226,7 @@ UINT32 i8008_device::disasm_max_opcode_bytes() const // helper function //------------------------------------------------- -offs_t i8008_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) +offs_t i8008_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) { extern CPU_DISASSEMBLE( i8008 ); return CPU_DISASSEMBLE_NAME(i8008)(this, buffer, pc, oprom, opram, options); @@ -241,7 +241,7 @@ offs_t i8008_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *op // cycles it takes for one instruction to execute //------------------------------------------------- -UINT32 i8008_device::execute_min_cycles() const +uint32_t i8008_device::execute_min_cycles() const { return 8; } @@ -251,7 +251,7 @@ UINT32 i8008_device::execute_min_cycles() const // cycles it takes for one instruction to execute //------------------------------------------------- -UINT32 i8008_device::execute_max_cycles() const +uint32_t i8008_device::execute_max_cycles() const { return 16; } @@ -281,7 +281,7 @@ void i8008_device::execute_run() } while (m_icount > 0); } -inline void i8008_device::illegal(UINT8 opcode) +inline void i8008_device::illegal(uint8_t opcode) { if ((machine().debug_flags & DEBUG_FLAG_ENABLED) != 0) { @@ -302,7 +302,7 @@ void i8008_device::take_interrupt() inline void i8008_device::execute_one(int opcode) { - UINT16 tmp; + uint16_t tmp; switch (opcode >> 6) { @@ -618,17 +618,17 @@ inline void i8008_device::pop_stack() m_pc_pos = (m_pc_pos - 1) & 7; } -inline UINT8 i8008_device::rop() +inline uint8_t i8008_device::rop() { - UINT8 retVal = m_direct->read_byte(GET_PC.w.l); + uint8_t retVal = m_direct->read_byte(GET_PC.w.l); GET_PC.w.l = (GET_PC.w.l + 1) & 0x3fff; m_PC = GET_PC; return retVal; } -inline UINT8 i8008_device::get_reg(UINT8 reg) +inline uint8_t i8008_device::get_reg(uint8_t reg) { - UINT8 retVal; + uint8_t retVal; switch(reg) { case 0 : retVal = m_A; break; case 1 : retVal = m_B; break; @@ -642,7 +642,7 @@ inline UINT8 i8008_device::get_reg(UINT8 reg) return retVal; } -inline void i8008_device::set_reg(UINT8 reg, UINT8 val) +inline void i8008_device::set_reg(uint8_t reg, uint8_t val) { switch(reg) { case 0 : m_A = val; break; @@ -656,25 +656,25 @@ inline void i8008_device::set_reg(UINT8 reg, UINT8 val) } } -inline UINT8 i8008_device::arg() +inline uint8_t i8008_device::arg() { - UINT8 retVal = m_direct->read_byte(GET_PC.w.l); + uint8_t retVal = m_direct->read_byte(GET_PC.w.l); GET_PC.w.l = (GET_PC.w.l + 1) & 0x3fff; m_PC = GET_PC; return retVal; } -inline void i8008_device::update_flags(UINT8 val) +inline void i8008_device::update_flags(uint8_t val) { m_ZF = (val == 0) ? 1 : 0; m_SF = (val & 0x80) ? 1 : 0; m_PF = m_PARITY[val]; } -inline UINT8 i8008_device::do_condition(UINT8 val) +inline uint8_t i8008_device::do_condition(uint8_t val) { - UINT8 v = (val >> 5) & 1; - UINT8 cond = 0; + uint8_t v = (val >> 5) & 1; + uint8_t cond = 0; switch((val>> 3) & 0x03) { case 0 : if (m_CF==v) cond = 1; @@ -692,9 +692,9 @@ inline UINT8 i8008_device::do_condition(UINT8 val) return cond; } -inline UINT16 i8008_device::get_addr() +inline uint16_t i8008_device::get_addr() { - UINT8 lo = arg(); - UINT8 hi = arg(); + uint8_t lo = arg(); + uint8_t hi = arg(); return ((hi & 0x3f) << 8) + lo; } diff --git a/src/devices/cpu/i8008/i8008.h b/src/devices/cpu/i8008/i8008.h index 14fcf28d0dc..4ba000f3fe9 100644 --- a/src/devices/cpu/i8008/i8008.h +++ b/src/devices/cpu/i8008/i8008.h @@ -25,7 +25,7 @@ class i8008_device : public cpu_device { public: // construction/destruction - i8008_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + i8008_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: // device-level overrides @@ -33,8 +33,8 @@ protected: virtual void device_reset() override; // device_execute_interface overrides - virtual UINT32 execute_min_cycles() const override; - virtual UINT32 execute_max_cycles() const override; + virtual uint32_t execute_min_cycles() const override; + virtual uint32_t execute_max_cycles() const override; virtual void execute_run() override; virtual void execute_set_input(int inputnum, int state) override; @@ -48,22 +48,22 @@ protected: // device_disasm_interface overrides - virtual UINT32 disasm_min_opcode_bytes() const override; - virtual UINT32 disasm_max_opcode_bytes() const override; - virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override; + virtual uint32_t disasm_min_opcode_bytes() const override; + virtual uint32_t disasm_max_opcode_bytes() const override; + virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override; virtual void execute_one(int opcode); void push_stack(); void pop_stack(); - UINT8 rop(); - UINT8 get_reg(UINT8 reg); - void set_reg(UINT8 reg, UINT8 val); - UINT8 arg(); - void update_flags(UINT8 val); - UINT8 do_condition(UINT8 val); - UINT16 get_addr(); - void illegal(UINT8 opcode); + uint8_t rop(); + uint8_t get_reg(uint8_t reg); + void set_reg(uint8_t reg, uint8_t val); + uint8_t arg(); + void update_flags(uint8_t val); + uint8_t do_condition(uint8_t val); + uint16_t get_addr(); + void illegal(uint8_t opcode); void take_interrupt(); void init_tables(void); @@ -74,19 +74,19 @@ protected: const address_space_config m_program_config; const address_space_config m_io_config; - UINT8 m_A,m_B,m_C,m_D,m_E,m_H,m_L; + uint8_t m_A,m_B,m_C,m_D,m_E,m_H,m_L; PAIR m_PC; // It is in fact one of ADDR regs PAIR m_ADDR[8]; // Address registers - UINT8 m_CF; // Carry flag - UINT8 m_ZF; // Zero flag - UINT8 m_SF; // Sign flag - UINT8 m_PF; // Parity flag - UINT8 m_HALT; - UINT8 m_flags; // temporary I/O only + uint8_t m_CF; // Carry flag + uint8_t m_ZF; // Zero flag + uint8_t m_SF; // Sign flag + uint8_t m_PF; // Parity flag + uint8_t m_HALT; + uint8_t m_flags; // temporary I/O only - UINT8 m_irq_state; + uint8_t m_irq_state; - UINT8 m_PARITY[256]; + uint8_t m_PARITY[256]; address_space *m_program; address_space *m_io; -- cgit v1.2.3-70-g09d2