diff options
author | 2016-10-22 13:13:17 +0200 | |
---|---|---|
committer | 2016-10-22 13:13:17 +0200 | |
commit | ddb290d5f615019c33c42b8d94e5a5254cabcf33 (patch) | |
tree | a70f688b0df3acd19da7b1151e5902e3c6af3fa5 /src/devices/cpu/alph8201 | |
parent | 333bff8de64dfaeb98134000412796b4fdef970b (diff) |
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
Diffstat (limited to 'src/devices/cpu/alph8201')
-rw-r--r-- | src/devices/cpu/alph8201/8201dasm.cpp | 2 | ||||
-rw-r--r-- | src/devices/cpu/alph8201/alph8201.cpp | 34 | ||||
-rw-r--r-- | src/devices/cpu/alph8201/alph8201.h | 116 |
3 files changed, 76 insertions, 76 deletions
diff --git a/src/devices/cpu/alph8201/8201dasm.cpp b/src/devices/cpu/alph8201/8201dasm.cpp index 464813cd170..f8fadecaedb 100644 --- a/src/devices/cpu/alph8201/8201dasm.cpp +++ b/src/devices/cpu/alph8201/8201dasm.cpp @@ -334,7 +334,7 @@ static void InitDasm8201(void) Op[i].type = type; /* 2 byte code ? */ - while (isspace((UINT8)*p)) p++; + while (isspace((uint8_t)*p)) p++; if( (*p) ) Op[i].type |= 0x10; /* number of param */ diff --git a/src/devices/cpu/alph8201/alph8201.cpp b/src/devices/cpu/alph8201/alph8201.cpp index 26b358c7b90..509075e0bdb 100644 --- a/src/devices/cpu/alph8201/alph8201.cpp +++ b/src/devices/cpu/alph8201/alph8201.cpp @@ -184,7 +184,7 @@ const device_type ALPHA8301L = &device_creator<alpha8301_cpu_device>; #define FN(x) &alpha8201_cpu_device::x -alpha8201_cpu_device::alpha8201_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +alpha8201_cpu_device::alpha8201_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : cpu_device(mconfig, ALPHA8201L, "ALPHA-8201L", tag, owner, clock, "alpha8201l", __FILE__) , m_program_config("program", ENDIANNESS_LITTLE, 8, 10, 0) , m_io_config("io", ENDIANNESS_LITTLE, 8, 6, 0) @@ -193,7 +193,7 @@ alpha8201_cpu_device::alpha8201_cpu_device(const machine_config &mconfig, const } -alpha8201_cpu_device::alpha8201_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) +alpha8201_cpu_device::alpha8201_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source) : cpu_device(mconfig, type, name, tag, owner, clock, shortname, source) , m_program_config("program", ENDIANNESS_LITTLE, 8, 10, 0) , m_io_config("io", ENDIANNESS_LITTLE, 8, 6, 0) @@ -201,7 +201,7 @@ alpha8201_cpu_device::alpha8201_cpu_device(const machine_config &mconfig, device { } -alpha8301_cpu_device::alpha8301_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +alpha8301_cpu_device::alpha8301_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : alpha8201_cpu_device(mconfig, ALPHA8301L, "ALPHA-8301L", tag, owner, clock, "alpha8301l", __FILE__) { m_opmap = opcode_8301; @@ -217,49 +217,49 @@ unsigned alpha8201_cpu_device::M_RDMEM_OPCODE() return retval; } -void alpha8201_cpu_device::M_ADD(UINT8 dat) +void alpha8201_cpu_device::M_ADD(uint8_t dat) { - UINT16 temp = m_A + dat; + uint16_t temp = m_A + dat; m_A = temp & 0xff; m_zf = (m_A==0); m_cf = temp>>8; } -void alpha8201_cpu_device::M_ADDB(UINT8 dat) +void alpha8201_cpu_device::M_ADDB(uint8_t dat) { - UINT16 temp = m_B + dat; + uint16_t temp = m_B + dat; m_B = temp & 0xff; m_zf = (m_B==0); m_cf = temp>>8; } -void alpha8201_cpu_device::M_SUB(UINT8 dat) +void alpha8201_cpu_device::M_SUB(uint8_t dat) { m_cf = (m_A>=dat); // m_cf is No Borrow m_A -= dat; m_zf = (m_A==0); } -void alpha8201_cpu_device::M_AND(UINT8 dat) +void alpha8201_cpu_device::M_AND(uint8_t dat) { m_A &= dat; m_zf = (m_A==0); } -void alpha8201_cpu_device::M_OR(UINT8 dat) +void alpha8201_cpu_device::M_OR(uint8_t dat) { m_A |= dat; m_zf = (m_A==0); } -void alpha8201_cpu_device::M_XOR(UINT8 dat) +void alpha8201_cpu_device::M_XOR(uint8_t dat) { m_A ^= dat; m_zf = (m_A==0); m_cf = 0; } -void alpha8201_cpu_device::M_JMP(UINT8 dat) +void alpha8201_cpu_device::M_JMP(uint8_t dat) { m_pc.b.l = dat; /* update pc page */ @@ -279,8 +279,8 @@ void alpha8201_cpu_device::M_UNDEFINED() void alpha8201_cpu_device::M_UNDEFINED2() { - UINT8 op = M_RDOP(m_pc.w.l-1); - UINT8 imm = M_RDMEM_OPCODE(); + uint8_t op = M_RDOP(m_pc.w.l-1); + uint8_t imm = M_RDMEM_OPCODE(); logerror("alpha8201: PC = %03x, Unimplemented opcode = %02x,%02x\n", m_pc.w.l-2, op,imm); #if SHOW_MESSAGE_CONSOLE osd_printf_debug("alpha8201: PC = %03x, Unimplemented opcode = %02x,%02x\n", m_pc.w.l-2, op,imm); @@ -293,7 +293,7 @@ void alpha8201_cpu_device::M_UNDEFINED2() void alpha8201_cpu_device::stop() { - UINT8 pcptr = M_RDMEM(0x001) & 0x1f; + uint8_t pcptr = M_RDMEM(0x001) & 0x1f; M_WRMEM(pcptr,(M_RDMEM(pcptr)&0xf)+0x08); /* mark entry point ODD to HALT */ m_mb |= 0x08; /* mark internal HALT state */ } @@ -585,7 +585,7 @@ void alpha8201_cpu_device::device_reset() void alpha8201_cpu_device::execute_run() { unsigned opcode; - UINT8 pcptr; + uint8_t pcptr; if(m_halt) { @@ -673,7 +673,7 @@ void alpha8201_cpu_device::execute_set_input(int inputnum, int state) } -offs_t alpha8201_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) +offs_t alpha8201_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) { extern CPU_DISASSEMBLE( alpha8201 ); return CPU_DISASSEMBLE_NAME(alpha8201)(this, buffer, pc, oprom, opram, options); diff --git a/src/devices/cpu/alph8201/alph8201.h b/src/devices/cpu/alph8201/alph8201.h index 432f8193c69..d9b34389e69 100644 --- a/src/devices/cpu/alph8201/alph8201.h +++ b/src/devices/cpu/alph8201/alph8201.h @@ -50,8 +50,8 @@ class alpha8201_cpu_device : public cpu_device { public: // construction/destruction - alpha8201_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - alpha8201_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); + alpha8201_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + alpha8201_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source); protected: // device-level overrides @@ -59,9 +59,9 @@ protected: virtual void device_reset() override; // device_execute_interface overrides - virtual UINT32 execute_min_cycles() const override { return 1; } - virtual UINT32 execute_max_cycles() const override { return 16; } - virtual UINT32 execute_input_lines() const override { return 1; } + virtual uint32_t execute_min_cycles() const override { return 1; } + virtual uint32_t execute_max_cycles() const override { return 16; } + virtual uint32_t execute_input_lines() const override { return 1; } virtual void execute_run() override; virtual void execute_set_input(int inputnum, int state) override; @@ -74,25 +74,25 @@ protected: virtual void state_string_export(const device_state_entry &entry, std::string &str) const override; // device_disasm_interface overrides - virtual UINT32 disasm_min_opcode_bytes() const override { return 1; } - virtual UINT32 disasm_max_opcode_bytes() const override { return 4; } - 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 { return 1; } + virtual uint32_t disasm_max_opcode_bytes() const override { return 4; } + virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override; - UINT8 M_RDMEM(UINT16 A) { return m_program->read_byte(A); } - void M_WRMEM(UINT16 A,UINT8 V) { m_program->write_byte(A, V); } - UINT8 M_RDOP(UINT16 A) { return m_direct->read_byte(A); } - UINT8 M_RDOP_ARG(UINT16 A) { return m_direct->read_byte(A); } - UINT8 RD_REG(UINT8 x) { return m_RAM[(m_regPtr<<3)+(x)]; } - void WR_REG(UINT8 x, UINT8 d) { m_RAM[(m_regPtr<<3)+(x)]=(d); } + uint8_t M_RDMEM(uint16_t A) { return m_program->read_byte(A); } + void M_WRMEM(uint16_t A,uint8_t V) { m_program->write_byte(A, V); } + uint8_t M_RDOP(uint16_t A) { return m_direct->read_byte(A); } + uint8_t M_RDOP_ARG(uint16_t A) { return m_direct->read_byte(A); } + uint8_t RD_REG(uint8_t x) { return m_RAM[(m_regPtr<<3)+(x)]; } + void WR_REG(uint8_t x, uint8_t d) { m_RAM[(m_regPtr<<3)+(x)]=(d); } unsigned M_RDMEM_OPCODE(); - void M_ADD(UINT8 dat); - void M_ADDB(UINT8 dat); - void M_SUB(UINT8 dat); - void M_AND(UINT8 dat); - void M_OR(UINT8 dat); - void M_XOR(UINT8 dat); - void M_JMP(UINT8 dat); + void M_ADD(uint8_t dat); + void M_ADDB(uint8_t dat); + void M_SUB(uint8_t dat); + void M_AND(uint8_t dat); + void M_OR(uint8_t dat); + void M_XOR(uint8_t dat); + void M_JMP(uint8_t dat); void M_UNDEFINED(); void M_UNDEFINED2(); @@ -290,26 +290,26 @@ protected: void ld_lp2_n() { m_lp2 = M_RDMEM_OPCODE(); } void ld_b_n() { m_B = M_RDMEM_OPCODE(); } - void djnz_lp0() { UINT8 i=M_RDMEM_OPCODE(); m_lp0--; if (m_lp0 != 0) M_JMP(i); } - void djnz_lp1() { UINT8 i=M_RDMEM_OPCODE(); m_lp1--; if (m_lp1 != 0) M_JMP(i); } - void djnz_lp2() { UINT8 i=M_RDMEM_OPCODE(); m_lp2--; if (m_lp2 != 0) M_JMP(i); } - void jnz() { UINT8 i=M_RDMEM_OPCODE(); if (!m_zf) M_JMP(i); } - void jnc() { UINT8 i=M_RDMEM_OPCODE(); if (!m_cf) M_JMP(i);} - void jz() { UINT8 i=M_RDMEM_OPCODE(); if ( m_zf) M_JMP(i); } - void jc() { UINT8 i=M_RDMEM_OPCODE(); if ( m_cf) M_JMP(i);} + void djnz_lp0() { uint8_t i=M_RDMEM_OPCODE(); m_lp0--; if (m_lp0 != 0) M_JMP(i); } + void djnz_lp1() { uint8_t i=M_RDMEM_OPCODE(); m_lp1--; if (m_lp1 != 0) M_JMP(i); } + void djnz_lp2() { uint8_t i=M_RDMEM_OPCODE(); m_lp2--; if (m_lp2 != 0) M_JMP(i); } + void jnz() { uint8_t i=M_RDMEM_OPCODE(); if (!m_zf) M_JMP(i); } + void jnc() { uint8_t i=M_RDMEM_OPCODE(); if (!m_cf) M_JMP(i);} + void jz() { uint8_t i=M_RDMEM_OPCODE(); if ( m_zf) M_JMP(i); } + void jc() { uint8_t i=M_RDMEM_OPCODE(); if ( m_cf) M_JMP(i);} void jmp() { M_JMP(M_RDMEM_OPCODE() ); } void stop(); /* ALPHA 8301 : added instruction */ - void exg_a_ix0() { UINT8 t=m_A; m_A = m_ix0.b.l; m_ix0.b.l = t; } - void exg_a_ix1() { UINT8 t=m_A; m_A = m_ix1.b.l; m_ix1.b.l = t; } - void exg_a_ix2() { UINT8 t=m_A; m_A = m_ix2.b.l; m_ix2.b.l = t; } - void exg_a_lp0() { UINT8 t=m_A; m_A = m_lp0; m_lp0 = t; } - void exg_a_lp1() { UINT8 t=m_A; m_A = m_lp1; m_lp1 = t; } - void exg_a_lp2() { UINT8 t=m_A; m_A = m_lp2; m_lp2 = t; } - void exg_a_b() { UINT8 t=m_A; m_A = m_B; m_B = t; } - void exg_a_rb() { UINT8 t=m_A; m_A = m_regPtr; m_regPtr = t; } + void exg_a_ix0() { uint8_t t=m_A; m_A = m_ix0.b.l; m_ix0.b.l = t; } + void exg_a_ix1() { uint8_t t=m_A; m_A = m_ix1.b.l; m_ix1.b.l = t; } + void exg_a_ix2() { uint8_t t=m_A; m_A = m_ix2.b.l; m_ix2.b.l = t; } + void exg_a_lp0() { uint8_t t=m_A; m_A = m_lp0; m_lp0 = t; } + void exg_a_lp1() { uint8_t t=m_A; m_A = m_lp1; m_lp1 = t; } + void exg_a_lp2() { uint8_t t=m_A; m_A = m_lp2; m_lp2 = t; } + void exg_a_b() { uint8_t t=m_A; m_A = m_B; m_B = t; } + void exg_a_rb() { uint8_t t=m_A; m_A = m_regPtr; m_regPtr = t; } void ld_ix0_a() { m_ix0.b.l = m_A; } void ld_ix1_a() { m_ix1.b.l = m_A; } @@ -320,8 +320,8 @@ protected: void ld_b_a() { m_B = m_A; } void ld_rb_a() { m_regPtr = m_A; } - void exg_ix0_ix1() { UINT8 t=m_ix1.b.l; m_ix1.b.l = m_ix0.b.l; m_ix0.b.l = t; } - void exg_ix0_ix2() { UINT8 t=m_ix2.b.l; m_ix2.b.l = m_ix0.b.l; m_ix0.b.l = t; } + void exg_ix0_ix1() { uint8_t t=m_ix1.b.l; m_ix1.b.l = m_ix0.b.l; m_ix0.b.l = t; } + void exg_ix0_ix2() { uint8_t t=m_ix2.b.l; m_ix2.b.l = m_ix0.b.l; m_ix0.b.l = t; } void op_d4() { m_A = M_RDMEM( ((m_RAM[(7<<3)+7] & 3) << 8) | M_RDMEM_OPCODE() ); } void op_d5() { M_WRMEM( ((m_RAM[(7<<3)+7] & 3) << 8) | M_RDMEM_OPCODE(), m_A ); } @@ -337,16 +337,16 @@ protected: void op_rep_ld_b_ix0() { do { m_RAM[(m_B>>1)&0x3f] = M_RDMEM(m_ix0.w.l); m_ix0.b.l++; m_B+=2; m_lp0--; } while (m_lp0 != 0); } void ld_rxb_a() { m_RAM[(m_B>>1)&0x3f] = m_A; } void ld_a_rxb() { m_A = m_RAM[(m_B>>1)&0x3f]; } - void cmp_a_rxb() { UINT8 i=m_RAM[(m_B>>1)&0x3f]; m_zf = (m_A==i); m_cf = (m_A>=i); } + void cmp_a_rxb() { uint8_t i=m_RAM[(m_B>>1)&0x3f]; m_zf = (m_A==i); m_cf = (m_A>=i); } void xor_a_rxb() { M_XOR(m_RAM[(m_B>>1)&0x3f] ); } void add_a_cf() { if (m_cf) inc_a(); } void sub_a_cf() { if (m_cf) dec_a(); } void tst_a() { m_zf = (m_A==0); } void clr_a() { m_A = 0; m_zf = (m_A==0); } - void cmp_a_n() { UINT8 i=M_RDMEM_OPCODE(); m_zf = (m_A==i); m_cf = (m_A>=i); } + void cmp_a_n() { uint8_t i=M_RDMEM_OPCODE(); m_zf = (m_A==i); m_cf = (m_A>=i); } void xor_a_n() { M_XOR(M_RDMEM_OPCODE() ); } - void call() { UINT8 i=M_RDMEM_OPCODE(); m_retptr.w.l = m_pc.w.l; M_JMP(i); }; + void call() { uint8_t i=M_RDMEM_OPCODE(); m_retptr.w.l = m_pc.w.l; M_JMP(i); }; void ld_a_ix0_a() { m_A = M_RDMEM(m_ix0.w.l+m_A); } void ret() { m_mb = m_retptr.b.h; M_JMP( m_retptr.b.l ); }; void save_zc() { m_savez = m_zf; m_savec = m_cf; }; @@ -366,27 +366,27 @@ protected: address_space_config m_program_config; address_space_config m_io_config; - UINT8 m_RAM[8*8]; /* internal GP register 8 * 8bank */ + uint8_t m_RAM[8*8]; /* internal GP register 8 * 8bank */ unsigned m_PREVPC; PAIR m_retptr; /* for 8301, return address of CALL */ PAIR m_pc; /* 2bit+8bit program counter */ - UINT8 m_regPtr; /* RB register base */ - UINT8 m_mb; /* MB memory bank reg. latch after Branch */ - UINT8 m_cf; /* C flag */ - UINT8 m_zf; /* Z flag */ - UINT8 m_savec; /* for 8301, save flags */ - UINT8 m_savez; /* for 8301, save flags */ + uint8_t m_regPtr; /* RB register base */ + uint8_t m_mb; /* MB memory bank reg. latch after Branch */ + uint8_t m_cf; /* C flag */ + uint8_t m_zf; /* Z flag */ + uint8_t m_savec; /* for 8301, save flags */ + uint8_t m_savez; /* for 8301, save flags */ // PAIR m_ix0; /* 8bit memory read index reg. */ PAIR m_ix1; /* 8bitmemory read index reg. */ PAIR m_ix2; /* 8bitmemory write index reg. */ - UINT8 m_lp0; /* 8bit loop reg. */ - UINT8 m_lp1; /* 8bit loop reg. */ - UINT8 m_lp2; /* 8bit loop reg. */ - UINT8 m_A; /* 8bit accumerator */ - UINT8 m_B; /* 8bit regiser */ + uint8_t m_lp0; /* 8bit loop reg. */ + uint8_t m_lp1; /* 8bit loop reg. */ + uint8_t m_lp2; /* 8bit loop reg. */ + uint8_t m_A; /* 8bit accumerator */ + uint8_t m_B; /* 8bit regiser */ // - UINT8 m_halt; /* halt input line */ + uint8_t m_halt; /* halt input line */ address_space *m_program; direct_read_data *m_direct; @@ -396,9 +396,9 @@ protected: const s_opcode *m_opmap; // Used for import/export only - UINT8 m_sp; - UINT8 m_R[8]; - UINT8 m_flags; + uint8_t m_sp; + uint8_t m_R[8]; + uint8_t m_flags; }; @@ -406,7 +406,7 @@ class alpha8301_cpu_device : public alpha8201_cpu_device { public: // construction/destruction - alpha8301_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + alpha8301_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; |