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/alto2/a2ether.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/alto2/a2ether.cpp')
-rw-r--r-- | src/devices/cpu/alto2/a2ether.cpp | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/src/devices/cpu/alto2/a2ether.cpp b/src/devices/cpu/alto2/a2ether.cpp index 3a360f8854e..97d2fe6399e 100644 --- a/src/devices/cpu/alto2/a2ether.cpp +++ b/src/devices/cpu/alto2/a2ether.cpp @@ -58,7 +58,7 @@ static const prom_load_t pl_enet_a41 = /* shift */ 0, /* dmap */ DMAP_DEFAULT, /* dand */ ZERO, - /* type */ sizeof(UINT8) + /* type */ sizeof(uint8_t) }; static const prom_load_t pl_enet_a42 = @@ -75,7 +75,7 @@ static const prom_load_t pl_enet_a42 = /* shift */ 0, /* dmap */ DMAP_DEFAULT, /* dand */ ZERO, - /* type */ sizeof(UINT8) + /* type */ sizeof(uint8_t) }; /** @@ -117,7 +117,7 @@ static const prom_load_t pl_enet_a49 = /* shift */ 0, /* dmap */ DMAP_DEFAULT, /* dand */ ZERO, - /* type */ sizeof(UINT8) + /* type */ sizeof(uint8_t) }; #define GET_ETH_WLF(st) X_BIT(st,16,4) //!< hardware status: write latch full/filled (? set by EODFCT) @@ -164,7 +164,7 @@ static const prom_load_t pl_enet_a49 = #define BREATHLEN ALTO2_ETHER_PACKET_SIZE //!< ethernet packet length #define BREATHADDR (0377<<8) //!< destination (0377) and source (0000) #define BREATHTYPE 0602 //!< ethernet packet type -static const UINT16 breath_of_life_data[BREATHLEN] = +static const uint16_t breath_of_life_data[BREATHLEN] = { BREATHADDR, /* 3MB destination and source */ BREATHTYPE, /* ether packet type */ @@ -207,7 +207,7 @@ static const UINT16 breath_of_life_data[BREATHLEN] = }; #if DEBUG_PACKETS -static void dump_ascii(device_t *device, const UINT16 *src, size_t size) +static void dump_ascii(device_t *device, const uint16_t *src, size_t size) { device->logerror(" ["); for (size_t offs = 0; offs < size; offs++) { @@ -219,11 +219,11 @@ static void dump_ascii(device_t *device, const UINT16 *src, size_t size) device->logerror("]\n"); } -static void dump_packet(device_t *device, const char* name, const UINT16 *src, size_t addr, size_t size) +static void dump_packet(device_t *device, const char* name, const uint16_t *src, size_t addr, size_t size) { size_t offs; for (offs = 0; offs < size; offs++) { - UINT16 word = src[offs]; + uint16_t word = src[offs]; if (offs % 8) { device->logerror(" %06o", word); } else { @@ -247,7 +247,7 @@ void alto2_cpu_device::eth_wakeup() { int st = m_eth.status; LOG((this,LOG_ETH,0,"IBUSY=%d OBUSY=%d ", GET_ETH_IBUSY(st), GET_ETH_OBUSY(st))); - UINT8 busy = GET_ETH_IBUSY(st) | GET_ETH_OBUSY(st); + uint8_t busy = GET_ETH_IBUSY(st) | GET_ETH_OBUSY(st); if (0 == busy) { // if not busy, reset the FIFO read and write counters m_eth.fifo_rd = 0; @@ -312,11 +312,11 @@ void alto2_cpu_device::eth_wakeup() * ************************************************************ */ - UINT8 a49 = m_ether_a49[16 * m_eth.fifo_wr + m_eth.fifo_rd]; - UINT8 ETAC = m_task == task_ether ? 0 : 1; - UINT8 i1 = ~(BNE(a49) & ETAC); - UINT8 i2 = ~(~BNNE(a49) & i1); - UINT8 IDR = ~(GET_ETH_IBUSY(st) & i2); + uint8_t a49 = m_ether_a49[16 * m_eth.fifo_wr + m_eth.fifo_rd]; + uint8_t ETAC = m_task == task_ether ? 0 : 1; + uint8_t i1 = ~(BNE(a49) & ETAC); + uint8_t i2 = ~(~BNNE(a49) & i1); + uint8_t IDR = ~(GET_ETH_IBUSY(st) & i2); if (0 == IDR) { m_task_wakeup |= 1 << task_ether; LOG((this,LOG_ETH,0,"IDR (input data ready)\n")); @@ -346,8 +346,8 @@ void alto2_cpu_device::eth_wakeup() * ************************************************************ */ - UINT8 o1 = ~(~GET_ETH_WLF(st) & BF(a49)); - UINT8 ODR = ~(GET_ETH_OBUSY(st) & ~GET_ETH_OEOT(st) & o1); + uint8_t o1 = ~(~GET_ETH_WLF(st) & BF(a49)); + uint8_t ODR = ~(GET_ETH_OBUSY(st) & ~GET_ETH_OEOT(st) & o1); if (0 == ODR) { m_task_wakeup |= 1 << task_ether; LOG((this,LOG_ETH,0,"ODR (output data ready)\n")); @@ -467,9 +467,9 @@ void alto2_cpu_device::eth_wakeup() * @param data 16 bit data * @return new CRC value after 16 bits */ -UINT32 f9401_7(UINT32 crc, UINT32 data) +uint32_t f9401_7(uint32_t crc, uint32_t data) { - static const UINT32 XOR = (1 << 10) | (1 << 3) | (1 << 0); + static const uint32_t XOR = (1 << 10) | (1 << 3) | (1 << 0); crc ^= data; for (int i = 0; i < 16; i++) crc = (crc >> 1) ^ ((crc & 1) ? XOR : 0); @@ -482,9 +482,9 @@ UINT32 f9401_7(UINT32 crc, UINT32 data) * This is probably lacking the updates to one or more of * the status flip flops. */ -void alto2_cpu_device::rx_breath_of_life(void* ptr, INT32 arg) +void alto2_cpu_device::rx_breath_of_life(void* ptr, int32_t arg) { - UINT32 data; + uint32_t data; if (arg == 0) { // on the first word set the IBUSY flip flop @@ -506,7 +506,7 @@ void alto2_cpu_device::rx_breath_of_life(void* ptr, INT32 arg) PUT_ETH_IT(m_eth.status, 1); // set IT (input shift register full ...)? - UINT8 a49 = m_ether_a49[16 * m_eth.fifo_wr + m_eth.fifo_rd]; + uint8_t a49 = m_ether_a49[16 * m_eth.fifo_wr + m_eth.fifo_rd]; if (0 == BF(a49)) PUT_ETH_IDL(m_eth.status, 1); // fifo is overrun: set input data late flip flop @@ -532,9 +532,9 @@ void alto2_cpu_device::rx_breath_of_life(void* ptr, INT32 arg) * @param ptr unused pointer * @param arg word count if >= 0, -1 if CRC is to be transmitted (last word) */ -void alto2_cpu_device::tx_packet(void* ptr, INT32 arg) +void alto2_cpu_device::tx_packet(void* ptr, int32_t arg) { - UINT32 data; + uint32_t data; // the last word sent is the CRC if (-1 == arg) { @@ -551,7 +551,7 @@ void alto2_cpu_device::tx_packet(void* ptr, INT32 arg) m_eth.tx_crc = f9401_7(m_eth.tx_crc, data); m_eth.fifo_rd = (m_eth.fifo_rd + 1) % ALTO2_ETHER_FIFO_SIZE; - UINT8 a49 = m_ether_a49[16 * m_eth.fifo_wr + m_eth.fifo_rd]; + uint8_t a49 = m_ether_a49[16 * m_eth.fifo_wr + m_eth.fifo_rd]; if (0 == BE(a49)) { // the FIFO is empty now: clear the OBUSY and WLF flip flops PUT_ETH_OBUSY(m_eth.status, 0); @@ -590,7 +590,7 @@ void alto2_cpu_device::eth_startf() */ void alto2_cpu_device::bs_early_eidfct() { - UINT16 r = m_eth.fifo[m_eth.fifo_rd]; + uint16_t r = m_eth.fifo[m_eth.fifo_rd]; LOG((this,LOG_ETH,3, " <-EIDFCT; pull %06o from FIFO[%02o]\n", r, m_eth.fifo_rd)); m_eth.fifo_rd = (m_eth.fifo_rd + 1) % ALTO2_ETHER_FIFO_SIZE; m_bus &= r; @@ -624,7 +624,7 @@ void alto2_cpu_device::f1_early_eth_block() */ void alto2_cpu_device::f1_early_eilfct() { - UINT16 r = m_eth.fifo[m_eth.fifo_rd]; + uint16_t r = m_eth.fifo[m_eth.fifo_rd]; LOG((this,LOG_ETH,3, " <-EILFCT; %06o at FIFO[%02o]\n", r, m_eth.fifo_rd)); m_bus &= r; } @@ -645,8 +645,8 @@ void alto2_cpu_device::f1_early_eilfct() */ void alto2_cpu_device::f1_early_epfct() { - UINT16 r = 0177777; - UINT16 st = m_eth.status; + uint16_t r = 0177777; + uint16_t st = m_eth.status; m_eth.status = 0; m_eth.tx_count = 0; @@ -718,7 +718,7 @@ void alto2_cpu_device::f2_late_eodfct() PUT_ETH_OBUSY(m_eth.status, 1); // set OBUSY (output busy) eth_wakeup(); // if the FIFO is full, stop wakeup and kick off the timer - UINT8 a49 = m_ether_a49[16 * m_eth.fifo_wr + m_eth.fifo_rd]; + uint8_t a49 = m_ether_a49[16 * m_eth.fifo_wr + m_eth.fifo_rd]; if (0 == BF(a49)) { m_task_wakeup &= ~(1 << task_ether); m_eth.tx_timer->adjust(attotime::from_usec(5.44), 0); @@ -753,7 +753,7 @@ void alto2_cpu_device::f2_late_eosfct() */ void alto2_cpu_device::f2_late_erbfct() { - UINT16 r = 0; + uint16_t r = 0; X_WRBITS(r,10,6,6,GET_ETH_ICMD(m_eth.status)); X_WRBITS(r,10,7,7,GET_ETH_OCMD(m_eth.status)); LOG((this,LOG_ETH,3, " ERBFCT; NEXT[6-7] = ICMD,OCMD (%#o | %#o)\n", m_next2, r)); @@ -789,7 +789,7 @@ void alto2_cpu_device::f2_late_eefct() */ void alto2_cpu_device::f2_late_ebfct() { - UINT16 r = 0; + uint16_t r = 0; X_WRBITS(r,10,6,6, GET_ETH_COLL(m_eth.status)); X_WRBITS(r,10,7,7, GET_ETH_IDL(m_eth.status) | @@ -809,8 +809,8 @@ void alto2_cpu_device::f2_late_ebfct() */ void alto2_cpu_device::f2_late_ecbfct() { - UINT16 r = 0; - UINT8 a49 = m_ether_a49[16 * m_eth.fifo_wr + m_eth.fifo_rd]; + uint16_t r = 0; + uint8_t a49 = m_ether_a49[16 * m_eth.fifo_wr + m_eth.fifo_rd]; X_WRBITS(r,10,7,7,~BE(a49)); LOG((this,LOG_ETH,3, " ECBFCT; NEXT[7] = FIFO %sempty (%#o | %#o)\n", r ? "not " : "is ", m_next2, r)); m_next2 |= r; @@ -846,7 +846,7 @@ void alto2_cpu_device::activate_eth() */ void alto2_cpu_device::update_sysclk(int sysclk) { - UINT8 s0, s1; + uint8_t s0, s1; /* * JK flip-flop 35a (SIO' and SYSCLK clocked) @@ -926,10 +926,10 @@ void alto2_cpu_device::update_sysclk(int sysclk) * 3Y RR * 4Y WLL' */ - UINT8 WLLOAD; - UINT8 RDCNT0; - UINT8 RR; - UINT8 WLL0; + uint8_t WLLOAD; + uint8_t RDCNT0; + uint8_t RR; + uint8_t WLL0; if (m_eth.ff_10a & JKFF_Q) { WLLOAD = ~(sysclk & (f2() == f2_ether_eodfct)) & 1; RDCNT0 = m_eth.ff_52b & JKFF_Q ? 1 : 0; @@ -1167,7 +1167,7 @@ void alto2_cpu_device::update_sysclk(int sysclk) */ void alto2_cpu_device::update_rclk(int rclk) { - UINT8 s0, s1; + uint8_t s0, s1; /* * JK flip-flop 70a IMID (Sheet 14) @@ -1221,7 +1221,7 @@ void alto2_cpu_device::update_rclk(int rclk) */ void alto2_cpu_device::update_tclk(int tclk) { - UINT8 s0, s1; + uint8_t s0, s1; /* * JK flip-flop 52b OSLOAD (Sheet 17) @@ -1321,8 +1321,8 @@ void alto2_cpu_device::init_ether(int task) m_ether_a42 = prom_load(machine(), &pl_enet_a42, memregion("ether_a42")->base()); m_ether_a49 = prom_load(machine(), &pl_enet_a49, memregion("ether_a49")->base()); - m_eth.rx_packet = std::make_unique<UINT16[]>(sizeof(UINT16)*ALTO2_ETHER_PACKET_SIZE); - m_eth.tx_packet = std::make_unique<UINT16[]>(sizeof(UINT16)*ALTO2_ETHER_PACKET_SIZE); + m_eth.rx_packet = std::make_unique<uint16_t[]>(sizeof(uint16_t)*ALTO2_ETHER_PACKET_SIZE); + m_eth.tx_packet = std::make_unique<uint16_t[]>(sizeof(uint16_t)*ALTO2_ETHER_PACKET_SIZE); m_eth.tx_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(alto2_cpu_device::tx_packet),this)); m_eth.tx_timer->reset(); |