From 68061e47aa1408f7cbaf3a252012ea25533714d8 Mon Sep 17 00:00:00 2001 From: Nathan Woods Date: Sat, 25 Mar 2017 18:55:52 -0400 Subject: Fixed recently introduced order of operations issue, and changed to Vas' preferred style --- src/devices/machine/6821pia.cpp | 28 ++++++++++++++-------------- 1 file 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); } -- cgit v1.2.3