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/tlcs90 | |
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/tlcs90')
-rw-r--r-- | src/devices/cpu/tlcs90/tlcs90.cpp | 156 | ||||
-rw-r--r-- | src/devices/cpu/tlcs90/tlcs90.h | 104 |
2 files changed, 130 insertions, 130 deletions
diff --git a/src/devices/cpu/tlcs90/tlcs90.cpp b/src/devices/cpu/tlcs90/tlcs90.cpp index a347d93a632..820d5634126 100644 --- a/src/devices/cpu/tlcs90/tlcs90.cpp +++ b/src/devices/cpu/tlcs90/tlcs90.cpp @@ -53,7 +53,7 @@ static ADDRESS_MAP_START(tmp91641_mem, AS_PROGRAM, 8, tlcs90_device ) ADDRESS_MAP_END -tlcs90_device::tlcs90_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, address_map_constructor program_map) +tlcs90_device::tlcs90_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, address_map_constructor program_map) : cpu_device(mconfig, type, name, tag, owner, clock, shortname, source) , m_program_config("program", ENDIANNESS_LITTLE, 8, 20, 0, program_map) , m_io_config("io", ENDIANNESS_LITTLE, 8, 16, 0) @@ -61,30 +61,30 @@ tlcs90_device::tlcs90_device(const machine_config &mconfig, device_type type, co } -tmp90840_device::tmp90840_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +tmp90840_device::tmp90840_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : tlcs90_device(mconfig, TMP90840, "TMP90840", tag, owner, clock, "tmp90840", __FILE__, ADDRESS_MAP_NAME(tmp90840_mem)) { } -tmp90841_device::tmp90841_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +tmp90841_device::tmp90841_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : tlcs90_device(mconfig, TMP90841, "TMP90841", tag, owner, clock, "tmp90841", __FILE__, ADDRESS_MAP_NAME(tmp90841_mem)) { } -tmp90845_device::tmp90845_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +tmp90845_device::tmp90845_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : tlcs90_device(mconfig, TMP90841, "TMP90845", tag, owner, clock, "tmp90845", __FILE__, ADDRESS_MAP_NAME(tmp90841_mem)) { } -tmp91640_device::tmp91640_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +tmp91640_device::tmp91640_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : tlcs90_device(mconfig, TMP91640, "TMP91640", tag, owner, clock, "tmp91640", __FILE__, ADDRESS_MAP_NAME(tmp91640_mem)) { } -tmp91641_device::tmp91641_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +tmp91641_device::tmp91641_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : tlcs90_device(mconfig, TMP91641, "TMP91641", tag, owner, clock, "tmp91641", __FILE__, ADDRESS_MAP_NAME(tmp91641_mem)) { } @@ -158,11 +158,11 @@ static const char *const r16_names[] = { "bc", "de", "hl", "??", #define ZF 0x40 #define SF 0x80 -static UINT8 SZ[256]; /* zero and sign flags */ -static UINT8 SZ_BIT[256]; /* zero, sign and parity/overflow (=zero) flags for BIT opcode */ -static UINT8 SZP[256]; /* zero, sign and parity flags */ -static UINT8 SZHV_inc[256]; /* zero, sign, half carry and overflow flags INC r8 */ -static UINT8 SZHV_dec[256]; /* zero, sign, half carry and overflow flags DEC r8 */ +static uint8_t SZ[256]; /* zero and sign flags */ +static uint8_t SZ_BIT[256]; /* zero, sign and parity/overflow (=zero) flags for BIT opcode */ +static uint8_t SZP[256]; /* zero, sign and parity flags */ +static uint8_t SZHV_inc[256]; /* zero, sign, half carry and overflow flags INC r8 */ +static uint8_t SZHV_dec[256]; /* zero, sign, half carry and overflow flags DEC r8 */ static const char *const cc_names[] = { "f", "lt", "le", "ule", "ov", "mi", "z", "c", "", "ge", "gt", "ugt", "nov", "pl", "nz", "nc" }; @@ -197,25 +197,25 @@ static const char *const cc_names[] = { "f", "lt", "le", "ule", "ov" #define R16D8( N,R,I ) m_mode##N = MODE_R16D8; m_r##N = R; m_r##N##b = I; #define R16R8( N,R,g ) m_mode##N = MODE_R16R8; m_r##N = R; m_r##N##b = g; -UINT8 tlcs90_device::RM8 (UINT32 a) { return m_program->read_byte( a ); } -UINT16 tlcs90_device::RM16(UINT32 a) { return RM8(a) | (RM8( (a+1) & 0xffff ) << 8); } +uint8_t tlcs90_device::RM8 (uint32_t a) { return m_program->read_byte( a ); } +uint16_t tlcs90_device::RM16(uint32_t a) { return RM8(a) | (RM8( (a+1) & 0xffff ) << 8); } -void tlcs90_device::WM8 (UINT32 a, UINT8 v) { m_program->write_byte( a, v ); } -void tlcs90_device::WM16(UINT32 a, UINT16 v) { WM8(a,v); WM8( (a+1) & 0xffff, v >> 8); } +void tlcs90_device::WM8 (uint32_t a, uint8_t v) { m_program->write_byte( a, v ); } +void tlcs90_device::WM16(uint32_t a, uint16_t v) { WM8(a,v); WM8( (a+1) & 0xffff, v >> 8); } -UINT8 tlcs90_device::RX8 (UINT32 a, UINT32 base) { return m_program->read_byte( base | a ); } -UINT16 tlcs90_device::RX16(UINT32 a, UINT32 base) { return RX8(a,base) | (RX8( (a+1) & 0xffff, base ) << 8); } +uint8_t tlcs90_device::RX8 (uint32_t a, uint32_t base) { return m_program->read_byte( base | a ); } +uint16_t tlcs90_device::RX16(uint32_t a, uint32_t base) { return RX8(a,base) | (RX8( (a+1) & 0xffff, base ) << 8); } -void tlcs90_device::WX8 (UINT32 a, UINT8 v, UINT32 base) { m_program->write_byte( base | a, v ); } -void tlcs90_device::WX16(UINT32 a, UINT16 v, UINT32 base) { WX8(a,v,base); WX8( (a+1) & 0xffff, v >> 8, base); } +void tlcs90_device::WX8 (uint32_t a, uint8_t v, uint32_t base) { m_program->write_byte( base | a, v ); } +void tlcs90_device::WX16(uint32_t a, uint16_t v, uint32_t base) { WX8(a,v,base); WX8( (a+1) & 0xffff, v >> 8, base); } -UINT8 tlcs90_device::READ8() { UINT8 b0 = RM8( m_addr++ ); m_addr &= 0xffff; return b0; } -UINT16 tlcs90_device::READ16() { UINT8 b0 = READ8(); return b0 | (READ8() << 8); } +uint8_t tlcs90_device::READ8() { uint8_t b0 = RM8( m_addr++ ); m_addr &= 0xffff; return b0; } +uint16_t tlcs90_device::READ16() { uint8_t b0 = READ8(); return b0 | (READ8() << 8); } void tlcs90_device::decode() { - UINT8 b0, b1, b2, b3; - UINT16 imm16; + uint8_t b0, b1, b2, b3; + uint16_t imm16; b0 = READ8(); @@ -984,14 +984,14 @@ static const char *const ir_names[] = { "DMAEH", "SCMOD", "SCCR", "SCBUF", "BX", "BY", "ADREG", "ADMOD" }; -const char *tlcs90_device::internal_registers_names(UINT16 x) +const char *tlcs90_device::internal_registers_names(uint16_t x) { int ir = x - T90_IOBASE; if ( ir >= 0 && ir < ARRAY_LENGTH(ir_names) ) return ir_names[ir]; return nullptr; } -int tlcs90_device::sprint_arg(char *buffer, UINT32 pc, const char *pre, const e_mode mode, const UINT16 r, const UINT16 rb) +int tlcs90_device::sprint_arg(char *buffer, uint32_t pc, const char *pre, const e_mode mode, const uint16_t r, const uint16_t rb) { const char *reg_name; switch ( mode ) @@ -1027,7 +1027,7 @@ int tlcs90_device::sprint_arg(char *buffer, UINT32 pc, const char *pre, const e_ //return 0; } -offs_t tlcs90_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) +offs_t tlcs90_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) { int len; @@ -1045,7 +1045,7 @@ offs_t tlcs90_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *o } -UINT16 tlcs90_device::r8( const UINT16 r ) +uint16_t tlcs90_device::r8( const uint16_t r ) { switch( r ) { @@ -1062,7 +1062,7 @@ UINT16 tlcs90_device::r8( const UINT16 r ) } } -void tlcs90_device::w8( const UINT16 r, UINT16 value ) +void tlcs90_device::w8( const uint16_t r, uint16_t value ) { switch( r ) { @@ -1079,7 +1079,7 @@ void tlcs90_device::w8( const UINT16 r, UINT16 value ) } } -UINT16 tlcs90_device::r16( const UINT16 r ) +uint16_t tlcs90_device::r16( const uint16_t r ) { switch( r ) { @@ -1100,7 +1100,7 @@ UINT16 tlcs90_device::r16( const UINT16 r ) } } -void tlcs90_device::w16( const UINT16 r, UINT16 value ) +void tlcs90_device::w16( const uint16_t r, uint16_t value ) { switch( r ) { @@ -1121,15 +1121,15 @@ void tlcs90_device::w16( const UINT16 r, UINT16 value ) #define READ_FN( N ) \ -UINT8 tlcs90_device::Read##N##_8() { \ +uint8_t tlcs90_device::Read##N##_8() { \ switch ( m_mode##N ) { \ case MODE_CC: \ case MODE_BIT8: \ - case MODE_I8: return (UINT8)m_r##N; \ - case MODE_D8: return (UINT8)m_r##N; \ - case MODE_R8: return (UINT8)r8(m_r##N); \ + case MODE_I8: return (uint8_t)m_r##N; \ + case MODE_D8: return (uint8_t)m_r##N; \ + case MODE_R8: return (uint8_t)r8(m_r##N); \ case MODE_MI16: return RM8(m_r##N); \ - case MODE_MR16R8: return RM8((UINT16)(r16(m_r##N) + (INT8)r8(m_r##N##b))); \ + case MODE_MR16R8: return RM8((uint16_t)(r16(m_r##N) + (int8_t)r8(m_r##N##b))); \ case MODE_MR16: \ switch( m_r##N ) { \ case IX: return RX8(m_ix.w.l,m_ixbase); \ @@ -1138,24 +1138,24 @@ UINT8 tlcs90_device::Read##N##_8() { \ return RM8(r16(m_r##N)); \ case MODE_MR16D8: \ switch( m_r##N ) { \ - case IX: return RX8((UINT16)(m_ix.w.l + (INT8)m_r##N##b),m_ixbase); \ - case IY: return RX8((UINT16)(m_iy.w.l + (INT8)m_r##N##b),m_iybase); \ + case IX: return RX8((uint16_t)(m_ix.w.l + (int8_t)m_r##N##b),m_ixbase); \ + case IY: return RX8((uint16_t)(m_iy.w.l + (int8_t)m_r##N##b),m_iybase); \ } \ - return RM8((UINT16)(r16(m_r##N) + (INT8)m_r##N##b)); \ + return RM8((uint16_t)(r16(m_r##N) + (int8_t)m_r##N##b)); \ default: \ fatalerror("%04x: unimplemented Read%d_8 mode = %d\n",m_pc.w.l,N,m_mode##N); \ } \ return 0; \ } \ -UINT16 tlcs90_device::Read##N##_16() { \ +uint16_t tlcs90_device::Read##N##_16() { \ switch ( m_mode##N ) { \ case MODE_I16: return m_r##N; \ case MODE_D16: return m_r##N - 1; \ case MODE_R16: return r16(m_r##N); \ - case MODE_R16D8: return r16(m_r##N) + (INT8)m_r##N##b; \ - case MODE_R16R8: return r16(m_r##N) + (INT8)r8(m_r##N##b); \ + case MODE_R16D8: return r16(m_r##N) + (int8_t)m_r##N##b; \ + case MODE_R16R8: return r16(m_r##N) + (int8_t)r8(m_r##N##b); \ case MODE_MI16: return RM16(m_r##N); \ - case MODE_MR16R8: return RM16((UINT16)(r16(m_r##N) + (INT8)r8(m_r##N##b))); \ + case MODE_MR16R8: return RM16((uint16_t)(r16(m_r##N) + (int8_t)r8(m_r##N##b))); \ case MODE_MR16: \ switch( m_r##N ) { \ case IX: return RX16(m_ix.w.l,m_ixbase); \ @@ -1164,10 +1164,10 @@ UINT16 tlcs90_device::Read##N##_16() { \ return RM16(r16(m_r##N)); \ case MODE_MR16D8: \ switch( m_r##N ) { \ - case IX: return RX16((UINT16)(m_ix.w.l + (INT8)m_r##N##b),m_ixbase); \ - case IY: return RX16((UINT16)(m_iy.w.l + (INT8)m_r##N##b),m_iybase); \ + case IX: return RX16((uint16_t)(m_ix.w.l + (int8_t)m_r##N##b),m_ixbase); \ + case IY: return RX16((uint16_t)(m_iy.w.l + (int8_t)m_r##N##b),m_iybase); \ } \ - return RM16((UINT16)(r16(m_r##N) + (INT8)m_r##N##b)); \ + return RM16((uint16_t)(r16(m_r##N) + (int8_t)m_r##N##b)); \ default: \ fatalerror("%04x: unimplemented Read%d_16 modes = %d\n",m_pc.w.l,N,m_mode##N); \ } \ @@ -1177,11 +1177,11 @@ UINT16 tlcs90_device::Read##N##_16() { \ #define WRITE_FN( N ) \ -void tlcs90_device::Write##N##_8( UINT8 value ) { \ +void tlcs90_device::Write##N##_8( uint8_t value ) { \ switch ( m_mode##N ) { \ case MODE_R8: w8(m_r##N,value); return; \ case MODE_MI16: WM8(m_r##N, value); return; \ - case MODE_MR16R8: WM8((UINT16)(r16(m_r##N) + (INT8)r8(m_r##N##b)), value); return; \ + case MODE_MR16R8: WM8((uint16_t)(r16(m_r##N) + (int8_t)r8(m_r##N##b)), value); return; \ case MODE_MR16: \ switch( m_r##N ) { \ case IX: WX8(m_ix.w.l,value,m_ixbase); return; \ @@ -1190,20 +1190,20 @@ void tlcs90_device::Write##N##_8( UINT8 value ) { \ WM8(r16(m_r##N), value); return; \ case MODE_MR16D8: \ switch( m_r##N ) { \ - case IX: WX8((UINT16)(m_ix.w.l + (INT8)m_r##N##b),value,m_ixbase); return; \ - case IY: WX8((UINT16)(m_iy.w.l + (INT8)m_r##N##b),value,m_iybase); return; \ + case IX: WX8((uint16_t)(m_ix.w.l + (int8_t)m_r##N##b),value,m_ixbase); return; \ + case IY: WX8((uint16_t)(m_iy.w.l + (int8_t)m_r##N##b),value,m_iybase); return; \ } \ - WM8((UINT16)(r16(m_r##N) + (INT8)m_r##N##b), value); return; \ + WM8((uint16_t)(r16(m_r##N) + (int8_t)m_r##N##b), value); return; \ default: \ fatalerror("%04x: unimplemented Write%d_8 mode = %d\n",m_pc.w.l,N,m_mode##N); \ } \ } \ -void tlcs90_device::Write##N##_16( UINT16 value ) \ +void tlcs90_device::Write##N##_16( uint16_t value ) \ { \ switch ( m_mode##N ) { \ case MODE_R16: w16(m_r##N,value); return; \ case MODE_MI16: WM16(m_r##N, value); return; \ - case MODE_MR16R8: WM16((UINT16)(r16(m_r##N) + (INT8)r8(m_r##N##b)), value); return; \ + case MODE_MR16R8: WM16((uint16_t)(r16(m_r##N) + (int8_t)r8(m_r##N##b)), value); return; \ case MODE_MR16: \ switch( m_r##N ) { \ case IX: WX16(m_ix.w.l,value,m_ixbase); return; \ @@ -1212,10 +1212,10 @@ void tlcs90_device::Write##N##_16( UINT16 value ) \ WM16(r16(m_r##N), value); return; \ case MODE_MR16D8: \ switch( m_r##N ) { \ - case IX: WX16((UINT16)(m_ix.w.l + (INT8)m_r##N##b),value,m_ixbase); return; \ - case IY: WX16((UINT16)(m_iy.w.l + (INT8)m_r##N##b),value,m_iybase); return; \ + case IX: WX16((uint16_t)(m_ix.w.l + (int8_t)m_r##N##b),value,m_ixbase); return; \ + case IY: WX16((uint16_t)(m_iy.w.l + (int8_t)m_r##N##b),value,m_iybase); return; \ } \ - WM16((UINT16)(r16(m_r##N) + (INT8)m_r##N##b), value); return; \ + WM16((uint16_t)(r16(m_r##N) + (int8_t)m_r##N##b), value); return; \ default: \ fatalerror("%04x: unimplemented Write%d_16 mode = %d\n",m_pc.w.l,N,m_mode##N); \ } \ @@ -1226,7 +1226,7 @@ READ_FN(2) WRITE_FN(1) WRITE_FN(2) -int tlcs90_device::Test( UINT8 cond ) +int tlcs90_device::Test( uint8_t cond ) { int s,v; switch ( cond ) @@ -1255,12 +1255,12 @@ int tlcs90_device::Test( UINT8 cond ) //return 0; } -void tlcs90_device::Push( UINT16 rr ) +void tlcs90_device::Push( uint16_t rr ) { m_sp.w.l -= 2; WM16( m_sp.w.l, r16(rr) ); } -void tlcs90_device::Pop( UINT16 rr ) +void tlcs90_device::Pop( uint16_t rr ) { w16( rr, RM16( m_sp.w.l ) ); m_sp.w.l += 2; @@ -1384,8 +1384,8 @@ void tlcs90_device::Cyc_f() { m_icount -= m_cyc_f; } void tlcs90_device::execute_run() { - UINT8 a8,b8; - UINT16 a16,b16; + uint8_t a8,b8; + uint16_t a16,b16; unsigned a32; PAIR tmp; @@ -1531,7 +1531,7 @@ void tlcs90_device::execute_run() case JR: if ( Test( Read1_8() ) ) { - m_pc.w.l += /*2 +*/ (INT8)Read2_8(); + m_pc.w.l += /*2 +*/ (int8_t)Read2_8(); Cyc(); } else Cyc_f(); @@ -1595,7 +1595,7 @@ void tlcs90_device::execute_run() case DAA: { - UINT8 cf, nf, hf, lo, hi, diff; + uint8_t cf, nf, hf, lo, hi, diff; cf = F & CF; nf = F & NF; hf = F & HF; @@ -1644,7 +1644,7 @@ void tlcs90_device::execute_run() a8 = 0; b8 = m_af.b.h; a32 = a8 - b8; - F = (F & IF) | SZ[(UINT8)a32] | NF; + F = (F & IF) | SZ[(uint8_t)a32] | NF; if (a32 & 0x100) F |= CF | XCF; //X? if ((a8 ^ a32 ^ b8) & 0x10) F |= HF; if ((b8 ^ a8) & (a8 ^ a32) & 0x80) F |= VF; @@ -1716,7 +1716,7 @@ void tlcs90_device::execute_run() a32 = a16 + 1; Write1_16( a32 ); F &= IF | CF; - if ((UINT16)a32 == 0) F |= ZF | XCF; + if ((uint16_t)a32 == 0) F |= ZF | XCF; if (a32 & 0x8000) F |= SF; if ((a16 ^ 0x8000) & a32 & 0x8000) F |= VF; if ((a16 ^ a32 ^ 1) & 0x1000) F |= HF; //?? @@ -1754,7 +1754,7 @@ void tlcs90_device::execute_run() a32 = a16 - 1; Write1_16( a32 ); F = (F & (IF | CF)) | NF; - if ((UINT16)a32 == 0) F |= ZF | XCF; + if ((uint16_t)a32 == 0) F |= ZF | XCF; if (a32 & 0x8000) F |= SF; if (a16 == 0x8000) F |= VF; if ((a16 ^ a32 ^ 1) & 0x1000) F |= HF; //?? @@ -1768,7 +1768,7 @@ void tlcs90_device::execute_run() a32 = a8 + b8; if ( (m_op == ADC) && (F & CF) ) a32 += 1; Write1_8( a32 ); - F = (F & IF) | SZ[(UINT8)a32]; + F = (F & IF) | SZ[(uint8_t)a32]; if (a32 & 0x100) F |= CF | XCF; //X? if ((a8 ^ a32 ^ b8) & 0x10) F |= HF; if ((b8 ^ a8 ^ 0x80) & (b8 ^ a32) & 0x80) F |= VF; @@ -1788,7 +1788,7 @@ void tlcs90_device::execute_run() else { F &= IF; - if ((UINT16)a32 == 0) F |= ZF; + if ((uint16_t)a32 == 0) F |= ZF; if (a32 & 0x8000) F |= SF; if ((b16 ^ a16 ^ 0x8000) & (b16 ^ a32) & 0x8000) F |= VF; } @@ -1804,7 +1804,7 @@ void tlcs90_device::execute_run() b8 = Read2_8(); a32 = a8 - b8; if ( (m_op == SBC) && (F & CF) ) a32 -= 1; - F = (F & IF) | SZ[(UINT8)a32] | NF; + F = (F & IF) | SZ[(uint8_t)a32] | NF; if (a32 & 0x100) F |= CF | XCF; //X? if ((a8 ^ a32 ^ b8) & 0x10) F |= HF; if ((b8 ^ a8) & (a8 ^ a32) & 0x80) F |= VF; @@ -1820,7 +1820,7 @@ void tlcs90_device::execute_run() a32 = a16 - b16; if ( (m_op == (SBC | OP_16)) && (F & CF) ) a32 -= 1; F = (F & IF) | NF; - if ((UINT16)a32 == 0) F |= ZF; + if ((uint16_t)a32 == 0) F |= ZF; if (a32 & 0x8000) F |= SF; if (a32 & 0x10000) F |= CF | XCF; //X? if ((a16 ^ a32 ^ b16) & 0x1000) F |= HF; //?? @@ -1967,7 +1967,7 @@ void tlcs90_device::execute_run() case DJNZ: if ( --m_bc.b.h ) { - m_pc.w.l += /*2 +*/ (INT8)Read1_8(); + m_pc.w.l += /*2 +*/ (int8_t)Read1_8(); Cyc(); } else Cyc_f(); @@ -1975,19 +1975,19 @@ void tlcs90_device::execute_run() case DJNZ | OP_16: if ( --m_bc.w.l ) { - m_pc.w.l += /*2 +*/ (INT8)Read2_8(); + m_pc.w.l += /*2 +*/ (int8_t)Read2_8(); Cyc(); } else Cyc_f(); break; case MUL: - m_hl.w.l = (UINT16)m_hl.b.l * (UINT16)Read2_8(); + m_hl.w.l = (uint16_t)m_hl.b.l * (uint16_t)Read2_8(); Cyc(); break; case DIV: a16 = m_hl.w.l; - b16 = (UINT16)Read2_8(); + b16 = (uint16_t)Read2_8(); if (b16 == 0) { F |= VF; @@ -2037,7 +2037,7 @@ void tlcs90_device::device_reset() memset(m_internal_registers, 0, sizeof(m_internal_registers)); } -void tlcs90_device::execute_burn(INT32 cycles) +void tlcs90_device::execute_burn(int32_t cycles) { m_icount -= 4 * ((cycles + 3) / 4); } @@ -2318,7 +2318,7 @@ READ8_MEMBER( tlcs90_device::t90_internal_registers_r ) { #define RIO m_io->read_byte( T90_IOBASE+offset ) - UINT8 data = m_internal_registers[offset]; + uint8_t data = m_internal_registers[offset]; switch ( T90_IOBASE + offset ) { case T90_P3: // 7,4,1,0 @@ -2512,14 +2512,14 @@ WRITE8_MEMBER( tlcs90_device::t90_internal_registers_w ) { #define WIO m_io->write_byte( T90_IOBASE+offset, data ) - UINT8 out_mask; - UINT8 old = m_internal_registers[offset]; + uint8_t out_mask; + uint8_t old = m_internal_registers[offset]; switch ( T90_IOBASE + offset ) { case T90_TRUN: { int i; - UINT8 mask; + uint8_t mask; // Timers 0-3 for (i = 0; i < 4; i++) { diff --git a/src/devices/cpu/tlcs90/tlcs90.h b/src/devices/cpu/tlcs90/tlcs90.h index 68f853994e9..3d622a74e32 100644 --- a/src/devices/cpu/tlcs90/tlcs90.h +++ b/src/devices/cpu/tlcs90/tlcs90.h @@ -25,7 +25,7 @@ class tlcs90_device : public cpu_device { public: // construction/destruction - tlcs90_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, address_map_constructor program_map); + tlcs90_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, address_map_constructor program_map); DECLARE_READ8_MEMBER( t90_internal_registers_r ); DECLARE_WRITE8_MEMBER( t90_internal_registers_w ); @@ -41,13 +41,13 @@ protected: virtual void device_reset() override; // device_execute_interface overrides - virtual UINT32 execute_min_cycles() const override { return 2; } - virtual UINT32 execute_max_cycles() const override { return 26; } - virtual UINT32 execute_input_lines() const override { return 1; } - virtual UINT32 execute_default_irq_vector() const override { return 0xff; } + virtual uint32_t execute_min_cycles() const override { return 2; } + virtual uint32_t execute_max_cycles() const override { return 26; } + virtual uint32_t execute_input_lines() const override { return 1; } + virtual uint32_t execute_default_irq_vector() const override { return 0xff; } virtual void execute_run() override; virtual void execute_set_input(int inputnum, int state) override; - virtual void execute_burn(INT32 cycles) override; + virtual void execute_burn(int32_t cycles) override; // device_memory_interface overrides virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); } @@ -56,9 +56,9 @@ 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 6; } - 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 6; } + virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override; private: enum e_mode { @@ -74,62 +74,62 @@ private: PAIR m_prvpc,m_pc,m_sp,m_af,m_bc,m_de,m_hl,m_ix,m_iy; PAIR m_af2,m_bc2,m_de2,m_hl2; - UINT8 m_halt, m_after_EI; - UINT16 m_irq_state, m_irq_mask; + uint8_t m_halt, m_after_EI; + uint16_t m_irq_state, m_irq_mask; address_space *m_program; address_space *m_io; int m_icount; int m_extra_cycles; // extra cycles for interrupts - UINT8 m_internal_registers[48]; - UINT32 m_ixbase,m_iybase; + uint8_t m_internal_registers[48]; + uint32_t m_ixbase,m_iybase; // Timers: 4 x 8-bit + 1 x 16-bit emu_timer *m_timer[4+1]; - UINT8 m_timer_value[4]; - UINT16 m_timer4_value; + uint8_t m_timer_value[4]; + uint16_t m_timer4_value; attotime m_timer_period; // Work registers - UINT8 m_op; + uint8_t m_op; e_mode m_mode1; - UINT16 m_r1,m_r1b; + uint16_t m_r1,m_r1b; e_mode m_mode2; - UINT16 m_r2,m_r2b; + uint16_t m_r2,m_r2b; int m_cyc_t,m_cyc_f; - UINT32 m_addr; - - inline UINT8 RM8 (UINT32 a); - inline UINT16 RM16(UINT32 a); - inline void WM8 (UINT32 a, UINT8 v); - inline void WM16(UINT32 a, UINT16 v); - inline UINT8 RX8 (UINT32 a, UINT32 base); - inline UINT16 RX16(UINT32 a, UINT32 base); - inline void WX8 (UINT32 a, UINT8 v, UINT32 base); - inline void WX16(UINT32 a, UINT16 v, UINT32 base); - inline UINT8 READ8(); - inline UINT16 READ16(); + uint32_t m_addr; + + inline uint8_t RM8 (uint32_t a); + inline uint16_t RM16(uint32_t a); + inline void WM8 (uint32_t a, uint8_t v); + inline void WM16(uint32_t a, uint16_t v); + inline uint8_t RX8 (uint32_t a, uint32_t base); + inline uint16_t RX16(uint32_t a, uint32_t base); + inline void WX8 (uint32_t a, uint8_t v, uint32_t base); + inline void WX16(uint32_t a, uint16_t v, uint32_t base); + inline uint8_t READ8(); + inline uint16_t READ16(); void decode(); - const char *internal_registers_names(UINT16 x); - int sprint_arg(char *buffer, UINT32 pc, const char *pre, const e_mode mode, const UINT16 r, const UINT16 rb); - inline UINT16 r8( const UINT16 r ); - inline void w8( const UINT16 r, UINT16 value ); - inline UINT16 r16( const UINT16 r ); - inline void w16( const UINT16 r, UINT16 value ); - inline UINT8 Read1_8(); - inline UINT16 Read1_16(); - inline UINT8 Read2_8(); - inline UINT16 Read2_16(); - inline void Write1_8( UINT8 value ); - inline void Write1_16( UINT16 value ); - inline void Write2_8( UINT8 value ); - inline void Write2_16( UINT16 value ); - inline int Test( UINT8 cond ); - inline void Push( UINT16 rr ); - inline void Pop( UINT16 rr ); + const char *internal_registers_names(uint16_t x); + int sprint_arg(char *buffer, uint32_t pc, const char *pre, const e_mode mode, const uint16_t r, const uint16_t rb); + inline uint16_t r8( const uint16_t r ); + inline void w8( const uint16_t r, uint16_t value ); + inline uint16_t r16( const uint16_t r ); + inline void w16( const uint16_t r, uint16_t value ); + inline uint8_t Read1_8(); + inline uint16_t Read1_16(); + inline uint8_t Read2_8(); + inline uint16_t Read2_16(); + inline void Write1_8( uint8_t value ); + inline void Write1_16( uint16_t value ); + inline void Write2_8( uint8_t value ); + inline void Write2_16( uint16_t value ); + inline int Test( uint8_t cond ); + inline void Push( uint16_t rr ); + inline void Pop( uint16_t rr ); inline void leave_halt(); void take_interrupt(tlcs90_e_irq irq); void check_interrupts(); @@ -147,7 +147,7 @@ class tmp90840_device : public tlcs90_device { public: // construction/destruction - tmp90840_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + tmp90840_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; @@ -155,7 +155,7 @@ class tmp90841_device : public tlcs90_device { public: // construction/destruction - tmp90841_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + tmp90841_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; @@ -163,14 +163,14 @@ class tmp90845_device : public tlcs90_device { public: // construction/destruction - tmp90845_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + tmp90845_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class tmp91640_device : public tlcs90_device { public: // construction/destruction - tmp91640_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + tmp91640_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; @@ -178,7 +178,7 @@ class tmp91641_device : public tlcs90_device { public: // construction/destruction - tmp91641_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + tmp91641_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; |