Tidied up some recent changes, and more use of BIT helper.

This commit is contained in:
Vas Crabb 2023-08-24 16:39:46 +10:00
parent c082f87846
commit 38fd821b64
8 changed files with 20 additions and 19 deletions

View file

@ -31,7 +31,7 @@ protected:
virtual uint8_t get_instruction() = 0;
heath_intr_socket * const m_socket;
heath_intr_socket *const m_socket;
friend heath_intr_socket;
};
@ -116,9 +116,9 @@ public:
void raise_irq(int state) { m_irq_line(state); }
void set_irq(int state) { if (m_cntrl) { m_cntrl->set_irq(state); }}
void set_drq(int state) { if (m_cntrl) { m_cntrl->set_drq(state); }}
void block_interrupts(uint8_t data) { if (m_cntrl) { m_cntrl->block_interrupts(data); }}
void set_irq(int state) { if (m_cntrl) { m_cntrl->set_irq(state); } }
void set_drq(int state) { if (m_cntrl) { m_cntrl->set_drq(state); } }
void block_interrupts(uint8_t data) { if (m_cntrl) { m_cntrl->block_interrupts(data); } }
protected:

View file

@ -17,6 +17,7 @@
#include "machine/mm5740.h"
#include "sound/beep.h"
#include "video/mc6845.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
@ -40,7 +41,7 @@ protected:
// construction/destruction
device_heath_tlb_card_interface(const machine_config &mconfig, device_t &device);
heath_tlb_connector * const m_slot;
heath_tlb_connector *const m_slot;
};

View file

@ -832,7 +832,7 @@ void captflag_state::motor_move(int side, uint16_t data)
dev.reset();
}
(side == RIGHT) ? (m_motor_right_output = pos) : (m_motor_left_output = pos) ;
((side == RIGHT) ? m_motor_right_output : m_motor_left_output) = pos;
}
template <int N>

View file

@ -565,10 +565,10 @@ void namcos11_state::lightgun_w(offs_t offset, uint16_t data, uint16_t mem_mask)
switch( offset )
{
case 0:
m_led[0] = !( data & 0x08 );
m_led[1] = !( data & 0x04 );
m_recoil[0] = !( data & 0x02 );
m_recoil[1] = !( data & 0x01 );
m_led[0] = BIT(~data, 3);
m_led[1] = BIT(~data, 2);
m_recoil[0] = BIT(~data, 1);
m_recoil[1] = BIT(~data, 0);
verboselog(1, "lightgun_w: outputs (%08x %08x)\n", data, mem_mask );
break;

View file

@ -120,7 +120,7 @@ void portrait_state::ctrl_w(uint8_t data)
m_lamps[1] = BIT(data, 6);
/* shows the black and white photo from the camera */
m_photo = (data >> 7) & 1;
m_photo = BIT(data, 7);
}
// $9235-$9236 raw scroll values up to 511

View file

@ -199,7 +199,7 @@ void grchamp_state::cpu0_outputs_w(offs_t offset, uint8_t data)
/* bit 5: Game Over lamp */
/* bit 6-7: n/c */
machine().bookkeeping().coin_lockout_global_w((data >> 4) & 1);
m_led0 = (~data >> 5) & 1;
m_led0 = BIT(~data, 5);
break;
case 0x0a: /* OUT10 */

View file

@ -342,15 +342,15 @@ void othunder_state::eeprom_w(u8 data)
x0000000 eeprom out data */
/* Recoil Piston Motor Status */
m_recoil_piston[0] = data & 0x1;
m_recoil_piston[1] = (data & 0x2) >> 1;
m_recoil_piston[0] = BIT(data, 0);
m_recoil_piston[1] = BIT(data, 1);
if (data & 4)
popmessage("OBPRI SET!");
m_eeprom->di_write((data & 0x40) >> 6);
m_eeprom->clk_write((data & 0x20) ? ASSERT_LINE : CLEAR_LINE);
m_eeprom->cs_write((data & 0x10) ? ASSERT_LINE : CLEAR_LINE);
m_eeprom->di_write(BIT(data, 6));
m_eeprom->clk_write(BIT(data, 5));
m_eeprom->cs_write(BIT(data, 4));
}
void othunder_state::coins_w(u8 data)