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/mcs96/i8x9x.cpp | |
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/mcs96/i8x9x.cpp')
-rw-r--r-- | src/devices/cpu/mcs96/i8x9x.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/devices/cpu/mcs96/i8x9x.cpp b/src/devices/cpu/mcs96/i8x9x.cpp index a0616c0b223..f75fdec4f8c 100644 --- a/src/devices/cpu/mcs96/i8x9x.cpp +++ b/src/devices/cpu/mcs96/i8x9x.cpp @@ -11,14 +11,14 @@ #include "emu.h" #include "i8x9x.h" -i8x9x_device::i8x9x_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) : +i8x9x_device::i8x9x_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) : mcs96_device(mconfig, type, name, tag, owner, clock, 8, "i8x9x", __FILE__), io_config("io", ENDIANNESS_LITTLE, 16, 16, -1), io(nullptr), base_timer2(0), ad_done(0), hso_command(0), ad_command(0), hso_time(0), ad_result(0), ios0(0), ios1(0), ioc0(0), ioc1(0), sbuf(0), sp_stat(0), serial_send_buf(0), serial_send_timer(0) { } -offs_t i8x9x_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) +offs_t i8x9x_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) { return disasm_generic(buffer, pc, oprom, opram, options, disasm_entries); } @@ -67,14 +67,14 @@ void i8x9x_device::commit_hso_cam() hso_cam_hold.time = hso_time; } -void i8x9x_device::ad_start(UINT64 current_time) +void i8x9x_device::ad_start(uint64_t current_time) { ad_result = (io->read_word(2*((ad_command & 7) + A0)) << 6) | 8 | (ad_command & 7); ad_done = current_time + 88; internal_update(current_time); } -void i8x9x_device::serial_send(UINT8 data) +void i8x9x_device::serial_send(uint8_t data) { serial_send_buf = data; serial_send_timer = total_cycles() + 9600; @@ -89,7 +89,7 @@ void i8x9x_device::serial_send_done() check_irq(); } -void i8x9x_device::io_w8(UINT8 adr, UINT8 data) +void i8x9x_device::io_w8(uint8_t adr, uint8_t data) { switch(adr) { case 0x02: @@ -154,7 +154,7 @@ void i8x9x_device::io_w8(UINT8 adr, UINT8 data) return; } -void i8x9x_device::io_w16(UINT8 adr, UINT16 data) +void i8x9x_device::io_w16(uint8_t adr, uint16_t data) { switch(adr) { case 0: @@ -171,7 +171,7 @@ void i8x9x_device::io_w16(UINT8 adr, UINT16 data) return; } -UINT8 i8x9x_device::io_r8(UINT8 adr) +uint8_t i8x9x_device::io_r8(uint8_t adr) { switch(adr) { case 0x00: @@ -224,7 +224,7 @@ UINT8 i8x9x_device::io_r8(UINT8 adr) case 0x10: return io->read_word(P2*2); case 0x11: { - UINT8 res = sp_stat; + uint8_t res = sp_stat; sp_stat &= 0x80; logerror("%s: read sp stat %02x (%04x)\n", tag(), res, PPC); return res; @@ -233,7 +233,7 @@ UINT8 i8x9x_device::io_r8(UINT8 adr) logerror("%s: read ios 0 %02x (%04x)\n", tag(), ios0, PPC); return ios0; case 0x16: { - UINT8 res = ios1; + uint8_t res = ios1; ios1 = ios1 & 0xc0; return res; } @@ -243,7 +243,7 @@ UINT8 i8x9x_device::io_r8(UINT8 adr) } } -UINT16 i8x9x_device::io_r16(UINT8 adr) +uint16_t i8x9x_device::io_r16(uint8_t adr) { switch(adr) { case 0x00: @@ -267,7 +267,7 @@ void i8x9x_device::do_exec_partial() { } -void i8x9x_device::serial_w(UINT8 val) +void i8x9x_device::serial_w(uint8_t val) { sbuf = val; sp_stat |= 0x40; @@ -275,24 +275,24 @@ void i8x9x_device::serial_w(UINT8 val) check_irq(); } -UINT16 i8x9x_device::timer_value(int timer, UINT64 current_time) const +uint16_t i8x9x_device::timer_value(int timer, uint64_t current_time) const { if(timer == 2) current_time -= base_timer2; return current_time >> 3; } -UINT64 i8x9x_device::timer_time_until(int timer, UINT64 current_time, UINT16 timer_value) const +uint64_t i8x9x_device::timer_time_until(int timer, uint64_t current_time, uint16_t timer_value) const { - UINT64 timer_base = timer == 2 ? base_timer2 : 0; - UINT64 delta = (current_time - timer_base) >> 3; - UINT32 tdelta = UINT16(timer_value - delta); + uint64_t timer_base = timer == 2 ? base_timer2 : 0; + uint64_t delta = (current_time - timer_base) >> 3; + uint32_t tdelta = uint16_t(timer_value - delta); if(!tdelta) tdelta = 0x10000; return timer_base + ((delta + tdelta) << 3); } -void i8x9x_device::trigger_cam(int id, UINT64 current_time) +void i8x9x_device::trigger_cam(int id, uint64_t current_time) { hso_cam_entry &cam = hso_info[id]; cam.active = false; @@ -309,15 +309,15 @@ void i8x9x_device::trigger_cam(int id, UINT64 current_time) } } -void i8x9x_device::internal_update(UINT64 current_time) +void i8x9x_device::internal_update(uint64_t current_time) { - UINT16 current_timer1 = timer_value(1, current_time); - UINT16 current_timer2 = timer_value(2, current_time); + uint16_t current_timer1 = timer_value(1, current_time); + uint16_t current_timer2 = timer_value(2, current_time); for(int i=0; i<8; i++) if(hso_info[i].active) { - UINT8 cmd = hso_info[i].command; - UINT16 t = hso_info[i].time; + uint8_t cmd = hso_info[i].command; + uint16_t t = hso_info[i].time; if(((cmd & 0x40) && t == current_timer2) || (!(cmd & 0x40) && t == current_timer1)) { if(cmd != 0x18 && cmd != 0x19) @@ -335,7 +335,7 @@ void i8x9x_device::internal_update(UINT64 current_time) if(current_time == serial_send_timer) serial_send_done(); - UINT64 event_time = 0; + uint64_t event_time = 0; for(int i=0; i<8; i++) { if(!hso_info[i].active && hso_cam_hold.active) { hso_info[i] = hso_cam_hold; @@ -343,7 +343,7 @@ void i8x9x_device::internal_update(UINT64 current_time) logerror("%s: hso cam %02x %04x in slot %d from hold\n", tag(), hso_cam_hold.command, hso_cam_hold.time, i); } if(hso_info[i].active) { - UINT64 new_time = timer_time_until(hso_info[i].command & 0x40 ? 2 : 1, current_time, hso_info[i].time); + uint64_t new_time = timer_time_until(hso_info[i].command & 0x40 ? 2 : 1, current_time, hso_info[i].time); if(!event_time || new_time < event_time) event_time = new_time; } @@ -358,12 +358,12 @@ void i8x9x_device::internal_update(UINT64 current_time) recompute_bcount(event_time); } -c8095_device::c8095_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +c8095_device::c8095_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : i8x9x_device(mconfig, C8095, "C8095", tag, owner, clock, "c8095", __FILE__) { } -p8098_device::p8098_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +p8098_device::p8098_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : i8x9x_device(mconfig, P8098, "P8098", tag, owner, clock, "p8098", __FILE__) { } |