diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2020-07-29 17:16:15 -0400 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2020-07-29 17:16:15 -0400 |
commit | b5bbf672f0c765b6b79aa9b06b7756c198a8f9f5 (patch) | |
tree | b4e8630d798a8fe0b5d97444d328e043bb053c1f /src/devices/machine | |
parent | 5de0896497c87f7240cda43a90192d50035f38db (diff) |
Use swapendian_int16/int32 in more devices
Diffstat (limited to 'src/devices/machine')
-rw-r--r-- | src/devices/machine/dp8390.cpp | 2 | ||||
-rw-r--r-- | src/devices/machine/gayle.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/devices/machine/dp8390.cpp b/src/devices/machine/dp8390.cpp index c238801122b..75217661215 100644 --- a/src/devices/machine/dp8390.cpp +++ b/src/devices/machine/dp8390.cpp @@ -3,7 +3,7 @@ #include "emu.h" #include "dp8390.h" -#define DP8390_BYTE_ORDER(w) ((m_regs.dcr & 3) == 3 ? ((data << 8) | (data >> 8)) : data) +#define DP8390_BYTE_ORDER(w) ((m_regs.dcr & 3) == 3 ? swapendian_int16(data) : data) #define LOOPBACK (!(m_regs.dcr & 8) && (m_regs.tcr & 6)) DEFINE_DEVICE_TYPE(DP8390D, dp8390d_device, "dp8390d", "DP8390D NIC") diff --git a/src/devices/machine/gayle.cpp b/src/devices/machine/gayle.cpp index 1f048a83e30..0e55fcd2bb6 100644 --- a/src/devices/machine/gayle.cpp +++ b/src/devices/machine/gayle.cpp @@ -86,7 +86,7 @@ uint16_t gayle_device::gayle_r(offs_t offset, uint16_t mem_mask) offset <<= 1; // swap - mem_mask = (mem_mask << 8) | (mem_mask >> 8); + mem_mask = swapendian_int16(mem_mask); if (BIT(offset, 15)) { @@ -113,7 +113,7 @@ uint16_t gayle_device::gayle_r(offs_t offset, uint16_t mem_mask) logerror("gayle_r(%06x): %04x & %04x\n", offset, data, mem_mask); // swap data - data = (data << 8) | (data >> 8); + data = swapendian_int16(data); return data; } @@ -123,8 +123,8 @@ void gayle_device::gayle_w(offs_t offset, uint16_t data, uint16_t mem_mask) offset <<= 1; // swap - mem_mask = (mem_mask << 8) | (mem_mask >> 8); - data = ((data << 8) | (data >> 8)) & mem_mask; + mem_mask = swapendian_int16(mem_mask); + data = swapendian_int16(data) & mem_mask; if (VERBOSE) logerror("gayle_w(%06x): %04x & %04x\n", offset, data, mem_mask); |