summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Nathan Woods <npwoods@mess.org>2017-03-25 18:55:52 -0400
committer Vas Crabb <cuavas@users.noreply.github.com>2017-03-26 11:32:54 +1100
commit68061e47aa1408f7cbaf3a252012ea25533714d8 (patch)
treed049067f49e89c48592a8f02d53514384ef9520f
parent323eb04ded6efbf03ff4355512201a0df0d443a7 (diff)
Fixed recently introduced order of operations issue, and changed to Vas' preferred style
-rw-r--r--src/devices/machine/6821pia.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/devices/machine/6821pia.cpp b/src/devices/machine/6821pia.cpp
index 1681c58da2d..354fec84a0f 100644
--- a/src/devices/machine/6821pia.cpp
+++ b/src/devices/machine/6821pia.cpp
@@ -1130,17 +1130,17 @@ bool pia6821_device::cb2_output_z()
// control byte wrappers
//-------------------------------------------------
-bool pia6821_device::irq1_enabled(uint8_t c) { return (c >> 0) & 0x01 ? true : false; }
-bool pia6821_device::c1_low_to_high(uint8_t c) { return (c >> 1) & 0x01 ? true : false; }
-bool pia6821_device::c1_high_to_low(uint8_t c) { return !(c >> 1) & 0x01 ? true : false; }
-bool pia6821_device::output_selected(uint8_t c) { return (c >> 2) & 0x01 ? true : false; }
-bool pia6821_device::irq2_enabled(uint8_t c) { return (c >> 3) & 0x01 ? true : false; }
-bool pia6821_device::strobe_e_reset(uint8_t c) { return (c >> 3) & 0x01 ? true : false; }
-bool pia6821_device::strobe_c1_reset(uint8_t c) { return !(c >> 3) & 0x01 ? true : false; }
-bool pia6821_device::c2_set(uint8_t c) { return (c >> 3) & 0x01 ? true : false; }
-bool pia6821_device::c2_low_to_high(uint8_t c) { return (c >> 4) & 0x01 ? true : false; }
-bool pia6821_device::c2_high_to_low(uint8_t c) { return !(c >> 4) & 0x01 ? true : false; }
-bool pia6821_device::c2_set_mode(uint8_t c) { return (c >> 4) & 0x01 ? true : false; }
-bool pia6821_device::c2_strobe_mode(uint8_t c) { return !(c >> 4) & 0x01 ? true : false; }
-bool pia6821_device::c2_output(uint8_t c) { return (c >> 5) & 0x01 ? true : false; }
-bool pia6821_device::c2_input(uint8_t c) { return !(c >> 5) & 0x01 ? true : false; }
+bool pia6821_device::irq1_enabled(uint8_t c) { return bool((c >> 0) & 0x01); }
+bool pia6821_device::c1_low_to_high(uint8_t c) { return bool((c >> 1) & 0x01); }
+bool pia6821_device::c1_high_to_low(uint8_t c) { return !bool((c >> 1) & 0x01); }
+bool pia6821_device::output_selected(uint8_t c) { return bool((c >> 2) & 0x01); }
+bool pia6821_device::irq2_enabled(uint8_t c) { return bool((c >> 3) & 0x01); }
+bool pia6821_device::strobe_e_reset(uint8_t c) { return bool((c >> 3) & 0x01); }
+bool pia6821_device::strobe_c1_reset(uint8_t c) { return !bool((c >> 3) & 0x01); }
+bool pia6821_device::c2_set(uint8_t c) { return bool((c >> 3) & 0x01); }
+bool pia6821_device::c2_low_to_high(uint8_t c) { return bool((c >> 4) & 0x01); }
+bool pia6821_device::c2_high_to_low(uint8_t c) { return !bool((c >> 4) & 0x01); }
+bool pia6821_device::c2_set_mode(uint8_t c) { return bool((c >> 4) & 0x01); }
+bool pia6821_device::c2_strobe_mode(uint8_t c) { return !bool((c >> 4) & 0x01); }
+bool pia6821_device::c2_output(uint8_t c) { return bool((c >> 5) & 0x01); }
+bool pia6821_device::c2_input(uint8_t c) { return !bool((c >> 5) & 0x01); }