mirror of
https://github.com/holub/mame
synced 2025-04-26 02:07:14 +03:00
Don't rely on macro expansion to supply parentheses around condition for if statement
This commit is contained in:
parent
c0a7f97169
commit
9cda2a26f4
@ -382,7 +382,7 @@ WRITE_LINE_MEMBER( allied_state::ic2_cb2_w )
|
||||
if ((m_display) && (!state))
|
||||
{
|
||||
m_bit_counter++;
|
||||
if BIT(m_bit_counter, 0)
|
||||
if (BIT(m_bit_counter, 0))
|
||||
m_player_score[m_display-1] = (m_player_score[m_display-1] << 1) | m_disp_data;
|
||||
if (m_bit_counter == 15)
|
||||
m_bit_counter = 0;
|
||||
|
@ -175,7 +175,7 @@ MC6845_UPDATE_ROW( alphatro_state::crtc_update_row )
|
||||
bg = (palette) ? 8 : attr & 7; // amber or RGB
|
||||
fg = (palette) ? 0 : (attr & 0x38) >> 3;
|
||||
|
||||
if BIT(attr, 7) // reverse video
|
||||
if (BIT(attr, 7)) // reverse video
|
||||
{
|
||||
inv ^= 1;
|
||||
chr &= 0x7f;
|
||||
|
@ -145,7 +145,7 @@ private:
|
||||
|
||||
READ8_MEMBER( apf_state::videoram_r )
|
||||
{
|
||||
if BIT(m_pad_data, 7) // AG line
|
||||
if (BIT(m_pad_data, 7)) // AG line
|
||||
{
|
||||
// Need the cpu and crtc to be locked together for proper graphics
|
||||
// This is a hack to fix Rocket Patrol and Blackjack
|
||||
|
@ -390,10 +390,10 @@ TIMER_DEVICE_CALLBACK_MEMBER( atari_s2_state::timer_s )
|
||||
m_timer_s[1] = m_sound1; // set to preset value
|
||||
m_timer_s[2]++;
|
||||
offs_t offs = (m_timer_s[2] & 31) | ((m_sound0 & 15) << 5);
|
||||
if BIT(m_sound0, 6)
|
||||
if (BIT(m_sound0, 6))
|
||||
m_dac->write_unsigned8(m_p_prom[offs]<< 4);
|
||||
// noise
|
||||
if BIT(m_sound0, 7)
|
||||
if (BIT(m_sound0, 7))
|
||||
{
|
||||
bool ab0 = BIT(m_timer_s[3], 0) ^ BIT(m_timer_s[4], 6);
|
||||
bool ab1 = !BIT(m_timer_s[3], 1);
|
||||
@ -418,7 +418,7 @@ WRITE8_MEMBER( atari_s2_state::sound0_w )
|
||||
{
|
||||
m_sound0 = data;
|
||||
offs_t offs = (m_timer_s[2] & 31) | ((m_sound0 & 15) << 5);
|
||||
if BIT(m_sound0, 6)
|
||||
if (BIT(m_sound0, 6))
|
||||
m_dac->write_unsigned8(m_p_prom[offs]<< 4);
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ READ8_MEMBER( bcs3_state::keyboard_r )
|
||||
offset ^= 0x3ff;
|
||||
|
||||
for (i = 0; i < 10; i++)
|
||||
if BIT(offset, i)
|
||||
if (BIT(offset, i))
|
||||
data |= m_io_keyboard[i]->read();
|
||||
|
||||
return data;
|
||||
|
@ -338,10 +338,10 @@ WRITE8_MEMBER( bigbord2_state::portcc_w )
|
||||
|
||||
/* drive select */
|
||||
m_floppy = nullptr;
|
||||
if BIT(data, 7) m_floppy = m_floppy0->get_device();
|
||||
if BIT(data, 6) m_floppy = m_floppy1->get_device();
|
||||
//if BIT(data, 5) m_floppy = m_floppy2->get_device();
|
||||
//if BIT(data, 4) m_floppy = m_floppy3->get_device();
|
||||
if (BIT(data, 7)) m_floppy = m_floppy0->get_device();
|
||||
if (BIT(data, 6)) m_floppy = m_floppy1->get_device();
|
||||
//if (BIT(data, 5)) m_floppy = m_floppy2->get_device();
|
||||
//if (BIT(data, 4)) m_floppy = m_floppy3->get_device();
|
||||
|
||||
m_fdc->set_floppy(m_floppy);
|
||||
|
||||
@ -546,11 +546,11 @@ UINT8 bigbord2_state::crt8002(UINT8 ac_ra, UINT8 ac_chr, UINT8 ac_attr, UINT16 a
|
||||
gfx = 0xff;
|
||||
if (BIT(ac_attr, 6) & BIT(ac_cnt, 13)) // flash
|
||||
gfx = 0;
|
||||
if BIT(ac_attr, 5) // blank
|
||||
if (BIT(ac_attr, 5)) // blank
|
||||
gfx = 0;
|
||||
if (ac_curs && BIT(ac_cnt, 14)) // cursor
|
||||
gfx ^= 0xff;
|
||||
if BIT(ac_attr, 4) // reverse video
|
||||
if (BIT(ac_attr, 4)) // reverse video
|
||||
gfx ^= 0xff;
|
||||
return gfx;
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ READ8_MEMBER( brandt8641_state::port08_r )
|
||||
UINT8 i, data = 7;
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
if BIT(m_port09, i)
|
||||
if (BIT(m_port09, i))
|
||||
data &= m_io_keyboard[i]->read();
|
||||
|
||||
return data | m_port08;
|
||||
|
@ -673,25 +673,19 @@ WRITE8_MEMBER( by17_state::u11_a_w )
|
||||
|
||||
m_digit = 0;
|
||||
|
||||
if BIT(data, 7)
|
||||
if (BIT(data, 7))
|
||||
m_digit = 1;
|
||||
else
|
||||
if BIT(data, 6)
|
||||
else if (BIT(data, 6))
|
||||
m_digit = 2;
|
||||
else
|
||||
if BIT(data, 5)
|
||||
else if (BIT(data, 5))
|
||||
m_digit = 3;
|
||||
else
|
||||
if BIT(data, 4)
|
||||
else if (BIT(data, 4))
|
||||
m_digit = 4;
|
||||
else
|
||||
if BIT(data, 3)
|
||||
else if (BIT(data, 3))
|
||||
m_digit = 5;
|
||||
else
|
||||
if BIT(data, 2)
|
||||
else if (BIT(data, 2))
|
||||
m_digit = 6;
|
||||
else
|
||||
if (BIT(data, 2) && BIT(data, 3)) // Aftermarket 7th digit strobe for 6 digit games
|
||||
else if (BIT(data, 2) && BIT(data, 3)) // Aftermarket 7th digit strobe for 6 digit games
|
||||
m_digit = 7;
|
||||
|
||||
if ((m_u10_ca2==0) && m_digit)
|
||||
|
@ -677,28 +677,21 @@ WRITE8_MEMBER( by35_state::u11_a_w )
|
||||
|
||||
m_digit = 0;
|
||||
|
||||
if BIT(data, 7)
|
||||
if (BIT(data, 7))
|
||||
m_digit = 1;
|
||||
else
|
||||
if BIT(data, 6)
|
||||
else if (BIT(data, 6))
|
||||
m_digit = 2;
|
||||
else
|
||||
if BIT(data, 5)
|
||||
else if (BIT(data, 5))
|
||||
m_digit = 3;
|
||||
else
|
||||
if BIT(data, 4)
|
||||
else if (BIT(data, 4))
|
||||
m_digit = 4;
|
||||
else
|
||||
if BIT(data, 3)
|
||||
else if (BIT(data, 3))
|
||||
m_digit = 5;
|
||||
else
|
||||
if BIT(data, 2)
|
||||
else if (BIT(data, 2))
|
||||
m_digit = 6;
|
||||
else
|
||||
if (BIT(data, 2) && BIT(data, 3)) // Aftermarket 7th digit strobe for 6 digit games
|
||||
else if (BIT(data, 2) && BIT(data, 3)) // Aftermarket 7th digit strobe for 6 digit games
|
||||
m_digit = 7;
|
||||
else
|
||||
if (BIT(data, 1) && m_7d)
|
||||
else if (BIT(data, 1) && m_7d)
|
||||
m_digit = 7;
|
||||
|
||||
if ((m_u10_ca2==0) && m_digit)
|
||||
|
@ -112,7 +112,7 @@ UINT32 c10_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, con
|
||||
// if ((chr < 0x80) && (framecnt & 0x08))
|
||||
// chr |= 0x80;
|
||||
|
||||
if BIT(chr, 7) // ignore attribute bytes
|
||||
if (BIT(chr, 7)) // ignore attribute bytes
|
||||
x--;
|
||||
else
|
||||
gfx = m_p_chargen[(chr<<4) | ra ];
|
||||
|
@ -202,7 +202,7 @@ UINT8 c128_state::read_memory(address_space &space, offs_t offset, offs_t vma, i
|
||||
break;
|
||||
|
||||
case 2: // CS8563
|
||||
if BIT(offset, 0)
|
||||
if (BIT(offset, 0))
|
||||
{
|
||||
data = m_vdc->register_r(space, 0);
|
||||
}
|
||||
@ -286,7 +286,7 @@ void c128_state::write_memory(address_space &space, offs_t offset, offs_t vma, U
|
||||
break;
|
||||
|
||||
case 2: // CS8563
|
||||
if BIT(offset, 0)
|
||||
if (BIT(offset, 0))
|
||||
{
|
||||
m_vdc->register_w(space, 0, data);
|
||||
}
|
||||
|
@ -315,7 +315,7 @@ d0 = read from bank 4 */
|
||||
m_wbyte = BITSWAP8(data, 0, 0, 0, 0, 4, 5, 6, 7) & 0x0f; // rearrange to 1,2,3,4
|
||||
// do reads
|
||||
UINT8 rbyte = BITSWAP8(data, 0, 0, 0, 0, 0, 1, 2, 3) & 0x0f; // rearrange to 0,1,2,4
|
||||
if BIT(rbyte, 1)
|
||||
if (BIT(rbyte, 1))
|
||||
rbyte &= 0x07; // remove 4 if 1 selected (AND gate in IC82)
|
||||
//printf("%s:%X:%X:%X\n", machine().describe_context(), data, rbyte, m_wbyte);
|
||||
switch (rbyte)
|
||||
@ -569,7 +569,7 @@ INPUT_CHANGED_MEMBER( camplynx_state::brk_key )
|
||||
|
||||
WRITE8_MEMBER( camplynx_state::bank1_w )
|
||||
{
|
||||
if BIT(m_wbyte, 0)
|
||||
if (BIT(m_wbyte, 0))
|
||||
m_p_ram[offset+0x10000] = data;
|
||||
if ((m_wbyte & 0x22) == 0x02)
|
||||
m_p_ram[offset+0x20000] = data;
|
||||
@ -581,7 +581,7 @@ WRITE8_MEMBER( camplynx_state::bank1_w )
|
||||
|
||||
WRITE8_MEMBER( camplynx_state::bank6_w )
|
||||
{
|
||||
if BIT(m_wbyte, 0)
|
||||
if (BIT(m_wbyte, 0))
|
||||
m_p_ram[offset+0x10000] = data;
|
||||
|
||||
offset &= 0x5fff;
|
||||
@ -607,7 +607,7 @@ READ8_MEMBER( camplynx_state::port80_r )
|
||||
{
|
||||
UINT8 data = ioport("LINE0")->read();
|
||||
// when reading tape, bit 0 becomes cass-in signal
|
||||
if BIT(m_port80, 1)
|
||||
if (BIT(m_port80, 1))
|
||||
{
|
||||
data &= 0xfe;
|
||||
data |= (m_cass->input() > +0.02) ? 0 : 1;
|
||||
@ -640,7 +640,7 @@ WRITE8_MEMBER( camplynx_state::port80_w )
|
||||
|
||||
WRITE8_MEMBER( camplynx_state::port84_w )
|
||||
{
|
||||
if BIT(m_port80, (m_is_128k) ? 3 : 1) // for 128k, bit 2 might be ok too
|
||||
if (BIT(m_port80, (m_is_128k) ? 3 : 1)) // for 128k, bit 2 might be ok too
|
||||
{
|
||||
// Sine wave output
|
||||
//float t = (float)(unsigned)data - 32.0f;
|
||||
@ -690,7 +690,7 @@ MC6845_UPDATE_ROW( camplynx_state::lynx48k_update_row )
|
||||
UINT16 mem = ((ma << 2) + (ra << 5)) & 0x1fff;
|
||||
|
||||
// determine green bank
|
||||
if BIT(m_port80, 4)
|
||||
if (BIT(m_port80, 4))
|
||||
green_bank = 0x38000+mem; // alt green
|
||||
else
|
||||
green_bank = 0x3c000+mem; // normal green
|
||||
@ -718,7 +718,7 @@ MC6845_UPDATE_ROW( camplynx_state::lynx128k_update_row )
|
||||
UINT32 green_bank, *p = &bitmap.pix32(y);
|
||||
UINT16 mem = ((ma << 2) + (ra << 6)) & 0x3fff;
|
||||
// determine green bank
|
||||
if BIT(m_port80, 4)
|
||||
if (BIT(m_port80, 4))
|
||||
green_bank = 0x2c000+mem; // alt green
|
||||
else
|
||||
green_bank = 0x28000+mem; // normal green
|
||||
|
@ -143,13 +143,13 @@ READ8_MEMBER( dauphin_state::port07_r )
|
||||
keyin = ioport("X0")->read();
|
||||
if (keyin != 0xff)
|
||||
for (i = 0; i < 8; i++)
|
||||
if BIT(~keyin, i)
|
||||
if (BIT(~keyin, i))
|
||||
data = i | 0xc0;
|
||||
|
||||
keyin = ioport("X1")->read();
|
||||
if (keyin != 0xff)
|
||||
for (i = 0; i < 8; i++)
|
||||
if BIT(~keyin, i)
|
||||
if (BIT(~keyin, i))
|
||||
data = i | 0xc8;
|
||||
|
||||
if (data == m_last_key)
|
||||
|
@ -221,7 +221,7 @@ READ8_MEMBER( eti660_state::pia_pa_r )
|
||||
UINT8 i, data = 0xff;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
if BIT(m_keylatch, i)
|
||||
if (BIT(m_keylatch, i))
|
||||
return m_io_keyboard[i]->read();
|
||||
|
||||
return data;
|
||||
|
@ -360,9 +360,9 @@ WRITE8_MEMBER( excali64_state::port70_w )
|
||||
{
|
||||
m_sys_status = data;
|
||||
m_crtc->set_unscaled_clock(BIT(data, 2) ? 2e6 : 1e6);
|
||||
if BIT(data, 1)
|
||||
if (BIT(data, 1))
|
||||
{
|
||||
// select 64k ram
|
||||
// select 64k ram
|
||||
membank("bankr1")->set_entry(0);
|
||||
membank("bankr2")->set_entry(0);
|
||||
membank("bankr3")->set_entry(0);
|
||||
@ -371,10 +371,9 @@ WRITE8_MEMBER( excali64_state::port70_w )
|
||||
membank("bankw3")->set_entry(0);
|
||||
membank("bankw4")->set_entry(0);
|
||||
}
|
||||
else
|
||||
if BIT(data, 0)
|
||||
else if (BIT(data, 0))
|
||||
{
|
||||
// select videoram and hiresram
|
||||
// select videoram and hiresram
|
||||
membank("bankr1")->set_entry(1);
|
||||
membank("bankr2")->set_entry(2);
|
||||
membank("bankr3")->set_entry(2);
|
||||
@ -385,7 +384,7 @@ WRITE8_MEMBER( excali64_state::port70_w )
|
||||
}
|
||||
else
|
||||
{
|
||||
// select rom, videoram, and main ram
|
||||
// select rom, videoram, and main ram
|
||||
membank("bankr1")->set_entry(1);
|
||||
membank("bankr2")->set_entry(1);
|
||||
membank("bankr3")->set_entry(1);
|
||||
@ -515,7 +514,7 @@ MC6845_UPDATE_ROW( excali64_state::update_row )
|
||||
fg = col_base + (col >> 4);
|
||||
bg = 32 + ((col >> 1) & 7);
|
||||
|
||||
if BIT(col, 0)
|
||||
if (BIT(col, 0))
|
||||
{
|
||||
UINT8 h = m_p_videoram[mem+0x1000] - 4;
|
||||
if (h > 5)
|
||||
|
@ -141,7 +141,7 @@ MC6845_UPDATE_ROW( fp1100_state::fp1100_update_row )
|
||||
UINT16 mem,x;
|
||||
UINT32 *p = &bitmap.pix32(y);
|
||||
|
||||
if BIT(m_upd7801.porta, 4)
|
||||
if (BIT(m_upd7801.porta, 4))
|
||||
{ // green screen
|
||||
for (x = 0; x < x_count; x++)
|
||||
{
|
||||
@ -263,7 +263,7 @@ WRITE8_MEMBER( fp1100_state::colour_control_w )
|
||||
|
||||
m_col_border = data & 7;
|
||||
|
||||
if BIT(data, 7)
|
||||
if (BIT(data, 7))
|
||||
m_col_display = (data >> 4) & 7;
|
||||
else
|
||||
m_col_cursor = data >> 4;
|
||||
@ -310,7 +310,7 @@ WRITE8_MEMBER( fp1100_state::porta_w )
|
||||
{
|
||||
m_upd7801.porta = data;
|
||||
|
||||
if BIT(data, 5)
|
||||
if (BIT(data, 5))
|
||||
memset(m_p_videoram, 0, 0xc000);
|
||||
}
|
||||
|
||||
@ -340,7 +340,7 @@ d6 - Centronics strobe
|
||||
*/
|
||||
WRITE8_MEMBER( fp1100_state::portc_w )
|
||||
{
|
||||
if BIT(m_irq_mask, 4)
|
||||
if (BIT(m_irq_mask, 4))
|
||||
m_maincpu->set_input_line_and_vector(0, BIT(data, 3) ? CLEAR_LINE : HOLD_LINE, 0xf0);
|
||||
if (LOG) printf("%s: PortC:%X\n",machine().describe_context(),data);
|
||||
m_upd7801.portc = data;
|
||||
@ -596,7 +596,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( fp1100_state::timer_c )
|
||||
|
||||
INTERRUPT_GEN_MEMBER(fp1100_state::fp1100_vblank_irq)
|
||||
{
|
||||
// if BIT(m_irq_mask, 4)
|
||||
// if (BIT(m_irq_mask, 4))
|
||||
// m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xf8);
|
||||
}
|
||||
|
||||
|
@ -229,7 +229,7 @@ WRITE8_MEMBER( gts3_state::u4b_w )
|
||||
bool clk_bit = BIT(data, 6);
|
||||
if ((!m_dispclk) && clk_bit) // 0->1 is valid
|
||||
{
|
||||
if BIT(data, 5)
|
||||
if (BIT(data, 5))
|
||||
m_digit = 0;
|
||||
else
|
||||
m_digit++;
|
||||
@ -239,7 +239,7 @@ WRITE8_MEMBER( gts3_state::u4b_w )
|
||||
clk_bit = BIT(data, 1);
|
||||
if ((!m_lampclk) && clk_bit) // 0->1 is valid
|
||||
{
|
||||
if BIT(data, 0)
|
||||
if (BIT(data, 0))
|
||||
m_row = 0;
|
||||
else
|
||||
m_row++;
|
||||
|
@ -238,7 +238,7 @@ WRITE8_MEMBER( gts3a_state::u4b_w )
|
||||
bool clk_bit = BIT(data, 6);
|
||||
if ((!m_dispclk) && clk_bit) // 0->1 is valid
|
||||
{
|
||||
if BIT(data, 5)
|
||||
if (BIT(data, 5))
|
||||
m_digit = 0;
|
||||
else
|
||||
m_digit++;
|
||||
@ -248,7 +248,7 @@ WRITE8_MEMBER( gts3a_state::u4b_w )
|
||||
clk_bit = BIT(data, 1);
|
||||
if ((!m_lampclk) && clk_bit) // 0->1 is valid
|
||||
{
|
||||
if BIT(data, 0)
|
||||
if (BIT(data, 0))
|
||||
m_row = 0;
|
||||
else
|
||||
m_row++;
|
||||
|
@ -302,9 +302,9 @@ WRITE8_MEMBER( gts80b_state::port1b_w )
|
||||
WRITE8_MEMBER( gts80b_state::port2a_w )
|
||||
{
|
||||
m_port2a = data;
|
||||
if BIT(data, 4)
|
||||
if (BIT(data, 4))
|
||||
m_dispcmd = (m_dispcmd & 0xf0) | m_port2b;
|
||||
if BIT(data, 5)
|
||||
if (BIT(data, 5))
|
||||
m_dispcmd = (m_dispcmd & 0x0f) | (m_port2b << 4);
|
||||
}
|
||||
|
||||
|
@ -255,22 +255,17 @@ WRITE8_MEMBER( hankin_state::ic10_a_w )
|
||||
|
||||
if (!m_ic11_ca2)
|
||||
{
|
||||
if BIT(data, 2)
|
||||
if (BIT(data, 2))
|
||||
m_digit = 5;
|
||||
else
|
||||
if BIT(data, 3)
|
||||
else if (BIT(data, 3))
|
||||
m_digit = 4;
|
||||
else
|
||||
if BIT(data, 4)
|
||||
else if (BIT(data, 4))
|
||||
m_digit = 3;
|
||||
else
|
||||
if BIT(data, 5)
|
||||
else if (BIT(data, 5))
|
||||
m_digit = 2;
|
||||
else
|
||||
if BIT(data, 6)
|
||||
else if (BIT(data, 6))
|
||||
m_digit = 1;
|
||||
else
|
||||
if BIT(data, 7)
|
||||
else if (BIT(data, 7))
|
||||
m_digit = 0;
|
||||
|
||||
// This machine has a 10-segment display, however the only
|
||||
|
@ -1137,22 +1137,22 @@ WRITE8_MEMBER( inder_state::sol_brvteam_w )
|
||||
{
|
||||
if ((data & 0xee) && BIT(data, 4)) // solenoid selected & activated
|
||||
{
|
||||
if BIT(data, 1)
|
||||
if (BIT(data, 1))
|
||||
m_samples->start(0, 7); // left sling near bumpers "canon izq"
|
||||
|
||||
if BIT(data, 2)
|
||||
if (BIT(data, 2))
|
||||
m_samples->start(1, 7); // right sling near bumpers "canon der"
|
||||
|
||||
if BIT(data, 3)
|
||||
if (BIT(data, 3))
|
||||
m_samples->start(0, 5); // outhole
|
||||
|
||||
if BIT(data, 5)
|
||||
if (BIT(data, 5))
|
||||
m_samples->start(2, 0); // left bumper
|
||||
|
||||
if BIT(data, 6)
|
||||
if (BIT(data, 6))
|
||||
m_samples->start(3, 0); // right bumper
|
||||
|
||||
if BIT(data, 7)
|
||||
if (BIT(data, 7))
|
||||
m_samples->start(4, 0); // middle bumper
|
||||
}
|
||||
}
|
||||
@ -1162,16 +1162,16 @@ WRITE8_MEMBER( inder_state::sol_canasta_w )
|
||||
{
|
||||
if ((data & 0xee) && BIT(data, 4)) // solenoid selected & activated
|
||||
{
|
||||
if BIT(data, 3)
|
||||
if (BIT(data, 3))
|
||||
m_samples->start(0, 5); // outhole
|
||||
|
||||
if BIT(data, 5)
|
||||
if (BIT(data, 5))
|
||||
m_samples->start(2, 0); // left bumper
|
||||
|
||||
if BIT(data, 6)
|
||||
if (BIT(data, 6))
|
||||
m_samples->start(3, 0); // right bumper
|
||||
|
||||
if BIT(data, 7)
|
||||
if (BIT(data, 7))
|
||||
m_samples->start(4, 0); // middle bumper
|
||||
}
|
||||
}
|
||||
@ -1195,7 +1195,7 @@ WRITE8_MEMBER( inder_state::ppi60a_w )
|
||||
{
|
||||
if (data)
|
||||
for (UINT8 i = 0; i < 8; i++)
|
||||
if BIT(data, i)
|
||||
if (BIT(data, i))
|
||||
m_row = i;
|
||||
}
|
||||
|
||||
@ -1204,7 +1204,7 @@ WRITE8_MEMBER( inder_state::ppi60b_w )
|
||||
{
|
||||
if (data & 7)
|
||||
for (UINT8 i = 0; i < 3; i++)
|
||||
if BIT(data, i)
|
||||
if (BIT(data, i))
|
||||
m_row = i+8;
|
||||
}
|
||||
|
||||
@ -1212,7 +1212,7 @@ WRITE8_MEMBER( inder_state::ppi64c_w )
|
||||
{
|
||||
UINT8 i;
|
||||
data &= 15;
|
||||
if BIT(data, 3) // 8 to 15
|
||||
if (BIT(data, 3)) // 8 to 15)
|
||||
{
|
||||
data ^= 15; // now 7 to 0
|
||||
for (i = 0; i < 5; i++)
|
||||
|
@ -107,7 +107,7 @@ WRITE8_MEMBER( instruct_state::port_w )
|
||||
// cassette port
|
||||
WRITE8_MEMBER( instruct_state::portf8_w )
|
||||
{
|
||||
if BIT(data, 4)
|
||||
if (BIT(data, 4))
|
||||
m_cass->output(BIT(data, 3) ? -1.0 : +1.0);
|
||||
else
|
||||
m_cass->output(0.0);
|
||||
@ -179,14 +179,14 @@ INTERRUPT_GEN_MEMBER( instruct_state::t2l_int )
|
||||
UINT8 hwkeys = ioport("HW")->read();
|
||||
|
||||
// check RST key
|
||||
if BIT(hwkeys, 3)
|
||||
if (BIT(hwkeys, 3))
|
||||
{
|
||||
m_maincpu->set_state_int(S2650_PC, 0);
|
||||
return;
|
||||
}
|
||||
else
|
||||
// check MON key
|
||||
if BIT(hwkeys, 2)
|
||||
if (BIT(hwkeys, 2))
|
||||
{
|
||||
m_maincpu->set_state_int(S2650_PC, 0x1800);
|
||||
return;
|
||||
@ -199,7 +199,7 @@ INTERRUPT_GEN_MEMBER( instruct_state::t2l_int )
|
||||
UINT8 vector = BIT(switches, 0) ? 0x87 : 0x07;
|
||||
|
||||
// Check INT sw & key
|
||||
if BIT(switches, 1)
|
||||
if (BIT(switches, 1))
|
||||
device.execute().set_input_line_and_vector(0, BIT(hwkeys, 1) ? ASSERT_LINE : CLEAR_LINE, vector);
|
||||
else
|
||||
// process ac input
|
||||
|
@ -280,7 +280,7 @@ WRITE8_MEMBER(irisha_state::irisha_8255_portc_w)
|
||||
{
|
||||
//logerror("irisha_8255_portc_w %02x\n",data);
|
||||
|
||||
if BIT(data, 6)
|
||||
if (BIT(data, 6))
|
||||
m_pit->write_gate2((BIT(m_ppi_porta, 5) && !BIT(data, 5)) ? 1 : 0);
|
||||
|
||||
m_ppi_portc = data;
|
||||
|
@ -117,7 +117,7 @@ WRITE8_MEMBER( jeutel_state::ppi0a_w )
|
||||
UINT16 segment;
|
||||
bool blank = !BIT(data, 7);
|
||||
|
||||
if BIT(data, 6)
|
||||
if (BIT(data, 6))
|
||||
{
|
||||
output().set_digit_value(40+m_digit, 0x3f); //patterns[data&15];
|
||||
return;
|
||||
@ -142,12 +142,11 @@ WRITE8_MEMBER( jeutel_state::ppi0a_w )
|
||||
default:
|
||||
segment = 0x3f; //patterns[data & 0x0f];
|
||||
}
|
||||
if BIT(data, 4)
|
||||
if (BIT(data, 4))
|
||||
{
|
||||
output().set_digit_value(m_digit, (blank) ? 0 : segment);
|
||||
}
|
||||
else
|
||||
if BIT(data, 5)
|
||||
else if (BIT(data, 5))
|
||||
{
|
||||
output().set_digit_value(20+m_digit, (blank) ? 0 : segment);
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ WRITE8_MEMBER( jp_state::disp_w )
|
||||
m_disp_data = (m_disp_data << 1) | BIT(data, 0);
|
||||
}
|
||||
|
||||
if BIT(data, 2)
|
||||
if (BIT(data, 2))
|
||||
{
|
||||
UINT8 segment, t = (m_disp_data >> 24) & 15;
|
||||
if (t == 8)
|
||||
@ -209,7 +209,7 @@ WRITE8_MEMBER( jp_state::disp_w )
|
||||
segment = 1 << (6-t);
|
||||
|
||||
for (i = 0; i < 32; i++)
|
||||
if BIT(m_disp_data, i)
|
||||
if (BIT(m_disp_data, i))
|
||||
output().set_digit_value(i, (output().get_digit_value(i) & ~segment));
|
||||
else
|
||||
output().set_digit_value(i, (output().get_digit_value(i) | segment));
|
||||
|
@ -121,7 +121,7 @@ UINT32 modellot_state::screen_update_modellot(screen_device &screen, bitmap_ind1
|
||||
|
||||
chr = m_p_videoram[x+ma];
|
||||
|
||||
if BIT(chr, 7) inv = 0xff;
|
||||
if (BIT(chr, 7)) inv = 0xff;
|
||||
|
||||
chr &= 0x7f; // cursor
|
||||
|
||||
|
@ -318,14 +318,14 @@ WRITE8_MEMBER(nanos_state::nanos_port_b_w)
|
||||
|
||||
UINT8 nanos_state::row_number(UINT8 code)
|
||||
{
|
||||
if BIT(code,0) return 0;
|
||||
if BIT(code,1) return 1;
|
||||
if BIT(code,2) return 2;
|
||||
if BIT(code,3) return 3;
|
||||
if BIT(code,4) return 4;
|
||||
if BIT(code,5) return 5;
|
||||
if BIT(code,6) return 6;
|
||||
if BIT(code,7) return 7;
|
||||
if (BIT(code, 0)) return 0;
|
||||
if (BIT(code, 1)) return 1;
|
||||
if (BIT(code, 2)) return 2;
|
||||
if (BIT(code, 3)) return 3;
|
||||
if (BIT(code, 4)) return 4;
|
||||
if (BIT(code, 5)) return 5;
|
||||
if (BIT(code, 6)) return 6;
|
||||
if (BIT(code, 7)) return 7;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -219,13 +219,13 @@ READ8_MEMBER( pasopia_state::rombank_r )
|
||||
READ8_MEMBER( pasopia_state::keyb_r )
|
||||
{
|
||||
UINT8 i,j,res = 0;
|
||||
for(j=0;j<3;j++)
|
||||
for (j=0; j<3; j++)
|
||||
{
|
||||
if BIT(m_mux_data, 4+j)
|
||||
if (BIT(m_mux_data, 4+j))
|
||||
{
|
||||
for(i=0;i<4;i++)
|
||||
for (i=0; i<4; i++)
|
||||
{
|
||||
if BIT(m_mux_data, i)
|
||||
if (BIT(m_mux_data, i))
|
||||
res |= m_keyboard[j*4+i]->read();
|
||||
}
|
||||
}
|
||||
|
@ -736,13 +736,13 @@ GFXDECODE_END
|
||||
READ8_MEMBER( pasopia7_state::keyb_r )
|
||||
{
|
||||
UINT8 i,j,res = 0;
|
||||
for(j=0;j<3;j++)
|
||||
for (j=0; j<3; j++)
|
||||
{
|
||||
if BIT(m_mux_data, 4+j)
|
||||
if (BIT(m_mux_data, 4+j))
|
||||
{
|
||||
for(i=0;i<4;i++)
|
||||
for (i=0; i<4; i++)
|
||||
{
|
||||
if BIT(m_mux_data, i)
|
||||
if (BIT(m_mux_data, i))
|
||||
res |= m_keyboard[j*4+i]->read();
|
||||
}
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ READ8_MEMBER( pegasus_state::pegasus_keyboard_r )
|
||||
if (!BIT(m_kbd_row, i)) data &= m_io_keyboard[i]->read();
|
||||
|
||||
m_kbd_irq = (data == 0xff) ? 1 : 0;
|
||||
if BIT(m_control_bits, 3)
|
||||
if (BIT(m_control_bits, 3))
|
||||
data<<=4;
|
||||
return data;
|
||||
}
|
||||
@ -169,7 +169,7 @@ READ8_MEMBER( pegasus_state::pegasus_pcg_r )
|
||||
|
||||
WRITE8_MEMBER( pegasus_state::pegasus_pcg_w )
|
||||
{
|
||||
// if BIT(m_control_bits, 1)
|
||||
// if (BIT(m_control_bits, 1))
|
||||
{
|
||||
UINT8 code = m_p_videoram[offset] & 0x7f;
|
||||
m_p_pcgram[(code << 4) | (~m_kbd_row & 15)] = data;
|
||||
|
@ -262,7 +262,7 @@ INPUT_PORTS_END
|
||||
|
||||
READ8_MEMBER( phc25_state::video_ram_r )
|
||||
{
|
||||
if BIT(m_port40, 7) // graphics
|
||||
if (BIT(m_port40, 7)) // graphics
|
||||
{
|
||||
return m_video_ram[offset];
|
||||
}
|
||||
|
@ -203,12 +203,12 @@ WRITE8_MEMBER( play_1_state::port01_w )
|
||||
static const UINT8 patterns[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7c, 0x07, 0x7f, 0x67, 0, 0, 0, 0, 0, 0 }; // 4511
|
||||
// d0-1 via 4013 to match-game board
|
||||
// d4-7 via 4511 to match-game board
|
||||
if BIT(data, 0)
|
||||
if (BIT(data, 0))
|
||||
output().set_digit_value(40, patterns[1]);
|
||||
else
|
||||
output().set_digit_value(40, 0);
|
||||
|
||||
if BIT(data, 1)
|
||||
if (BIT(data, 1))
|
||||
output().set_digit_value(45, patterns[0]);
|
||||
else
|
||||
output().set_digit_value(45, 0);
|
||||
@ -232,16 +232,13 @@ WRITE8_MEMBER( play_1_state::port03_w )
|
||||
{
|
||||
case 1:
|
||||
// a combination of bits could set higher frequencies, but that isn't documented
|
||||
if BIT(m_segment, 0)
|
||||
if (BIT(m_segment, 0))
|
||||
m_monotone->set_unscaled_clock(523);
|
||||
else
|
||||
if BIT(m_segment, 1)
|
||||
else if (BIT(m_segment, 1))
|
||||
m_monotone->set_unscaled_clock(659);
|
||||
else
|
||||
if BIT(m_segment, 2)
|
||||
else if (BIT(m_segment, 2))
|
||||
m_monotone->set_unscaled_clock(784);
|
||||
else
|
||||
if BIT(m_segment, 3)
|
||||
else if (BIT(m_segment, 3))
|
||||
m_monotone->set_unscaled_clock(988);
|
||||
else
|
||||
m_monotone->set_unscaled_clock(0);
|
||||
|
@ -195,7 +195,7 @@ WRITE8_MEMBER( play_2_state::port01_w )
|
||||
{
|
||||
m_disp_sw = 0;
|
||||
for (UINT8 j = 0; j < 6; j++)
|
||||
if BIT(m_kbdrow, j)
|
||||
if (BIT(m_kbdrow, j))
|
||||
for (UINT8 i = 0; i < 5; i++)
|
||||
output().set_digit_value(j*10 + i, m_segment[i]);
|
||||
}
|
||||
@ -208,7 +208,7 @@ WRITE8_MEMBER( play_2_state::port06_w )
|
||||
|
||||
WRITE8_MEMBER( play_2_state::port03_w )
|
||||
{
|
||||
if BIT(data, 6)
|
||||
if (BIT(data, 6))
|
||||
m_audiocpu->ef1_w(1); // inverted
|
||||
}
|
||||
|
||||
@ -216,7 +216,7 @@ READ8_MEMBER( play_2_state::port04_r )
|
||||
{
|
||||
if (m_kbdrow & 0x3f)
|
||||
for (UINT8 i = 0; i < 6; i++)
|
||||
if BIT(m_kbdrow, i)
|
||||
if (BIT(m_kbdrow, i))
|
||||
return m_keyboard[i]->read();
|
||||
|
||||
return 0;
|
||||
|
@ -228,7 +228,7 @@ WRITE8_MEMBER( play_5_state::port01_w )
|
||||
{
|
||||
m_disp_sw = 0;
|
||||
for (UINT8 j = 0; j < 6; j++)
|
||||
if BIT(m_kbdrow, j)
|
||||
if (BIT(m_kbdrow, j))
|
||||
for (UINT8 i = 0; i < 5; i++)
|
||||
{
|
||||
output().set_digit_value(j*10 + i, m_segment[i] & 0x7f);
|
||||
@ -246,7 +246,7 @@ WRITE8_MEMBER( play_5_state::port02_w )
|
||||
|
||||
WRITE8_MEMBER( play_5_state::port03_w )
|
||||
{
|
||||
if BIT(data, 6)
|
||||
if (BIT(data, 6))
|
||||
m_audiocpu->ef1_w(1); // inverted
|
||||
}
|
||||
|
||||
@ -254,7 +254,7 @@ READ8_MEMBER( play_5_state::port04_r )
|
||||
{
|
||||
if (m_kbdrow & 0x3f)
|
||||
for (UINT8 i = 0; i < 6; i++)
|
||||
if BIT(m_kbdrow, i)
|
||||
if (BIT(m_kbdrow, i))
|
||||
return m_keyboard[i]->read();
|
||||
|
||||
return 0;
|
||||
@ -263,9 +263,9 @@ READ8_MEMBER( play_5_state::port04_r )
|
||||
READ8_MEMBER( play_5_state::port05_r )
|
||||
{
|
||||
UINT8 data = 0, key8 = m_keyboard[8]->read() & 0x0f;
|
||||
if BIT(m_kbdrow, 0)
|
||||
if (BIT(m_kbdrow, 0))
|
||||
data |= m_keyboard[6]->read();
|
||||
if BIT(m_kbdrow, 1)
|
||||
if (BIT(m_kbdrow, 1))
|
||||
data |= m_keyboard[7]->read();
|
||||
return (data & 0xf0) | key8;
|
||||
}
|
||||
|
@ -147,13 +147,13 @@ READ8_MEMBER( ravens_state::port17_r )
|
||||
keyin = ioport("X0")->read();
|
||||
if (keyin != 0xff)
|
||||
for (i = 0; i < 8; i++)
|
||||
if BIT(~keyin, i)
|
||||
if (BIT(~keyin, i))
|
||||
return i | 0x80;
|
||||
|
||||
keyin = ioport("X1")->read();
|
||||
if (keyin != 0xff)
|
||||
for (i = 0; i < 8; i++)
|
||||
if BIT(~keyin, i)
|
||||
if (BIT(~keyin, i))
|
||||
return i | 0x88;
|
||||
|
||||
keyin = ioport("X2")->read();
|
||||
@ -161,7 +161,7 @@ READ8_MEMBER( ravens_state::port17_r )
|
||||
m_maincpu->reset();
|
||||
if (keyin != 0xff)
|
||||
for (i = 0; i < 8; i++)
|
||||
if BIT(~keyin, i)
|
||||
if (BIT(~keyin, i))
|
||||
return (i<<4) | 0x80;
|
||||
|
||||
return 0;
|
||||
|
@ -379,7 +379,7 @@ WRITE8_MEMBER( spinb_state::ppi60a_w )
|
||||
{
|
||||
if (data)
|
||||
for (UINT8 i = 0; i < 8; i++)
|
||||
if BIT(data, i)
|
||||
if (BIT(data, i))
|
||||
m_row = i;
|
||||
}
|
||||
|
||||
@ -388,7 +388,7 @@ WRITE8_MEMBER( spinb_state::ppi60b_w )
|
||||
{
|
||||
if (data & 7)
|
||||
for (UINT8 i = 0; i < 3; i++)
|
||||
if BIT(data, i)
|
||||
if (BIT(data, i))
|
||||
m_row = i+8;
|
||||
}
|
||||
|
||||
@ -403,11 +403,9 @@ WRITE8_MEMBER( spinb_state::sndbank_a_w )
|
||||
|
||||
if (!BIT(data, 6))
|
||||
m_sound_addr_a |= (1<<19);
|
||||
else
|
||||
if (!BIT(data, 5))
|
||||
else if (!BIT(data, 5))
|
||||
m_sound_addr_a |= (2<<19);
|
||||
else
|
||||
if BIT(data, 7)
|
||||
else if (BIT(data, 7))
|
||||
m_sndbank_a = 0xff;
|
||||
}
|
||||
|
||||
@ -418,11 +416,9 @@ WRITE8_MEMBER( spinb_state::sndbank_m_w )
|
||||
|
||||
if (!BIT(data, 6))
|
||||
m_sound_addr_m |= (1<<19);
|
||||
else
|
||||
if (!BIT(data, 5))
|
||||
else if (!BIT(data, 5))
|
||||
m_sound_addr_m |= (2<<19);
|
||||
else
|
||||
if BIT(data, 7)
|
||||
else if (BIT(data, 7))
|
||||
m_sndbank_m = 0xff;
|
||||
}
|
||||
|
||||
|
@ -595,22 +595,17 @@ WRITE8_MEMBER( st_mp100_state::u11_a_w )
|
||||
|
||||
if (!m_u10_ca2)
|
||||
{
|
||||
if BIT(data, 2)
|
||||
if (BIT(data, 2))
|
||||
m_digit = 5;
|
||||
else
|
||||
if BIT(data, 3)
|
||||
else if (BIT(data, 3))
|
||||
m_digit = 4;
|
||||
else
|
||||
if BIT(data, 4)
|
||||
else if (BIT(data, 4))
|
||||
m_digit = 3;
|
||||
else
|
||||
if BIT(data, 5)
|
||||
else if (BIT(data, 5))
|
||||
m_digit = 2;
|
||||
else
|
||||
if BIT(data, 6)
|
||||
else if (BIT(data, 6))
|
||||
m_digit = 1;
|
||||
else
|
||||
if BIT(data, 7)
|
||||
else if (BIT(data, 7))
|
||||
m_digit = 0;
|
||||
|
||||
if (BIT(data, 0) && (m_counter > 8))
|
||||
|
@ -335,14 +335,13 @@ WRITE_LINE_MEMBER( st_mp200_state::u11_ca2_w )
|
||||
|
||||
if (m_s14001a && state)
|
||||
{
|
||||
if BIT(m_u10a, 7)
|
||||
if (BIT(m_u10a, 7))
|
||||
{
|
||||
m_s14001a->data_w(generic_space(), 0, m_u10a & 0x3f);
|
||||
m_s14001a->start_w(1);
|
||||
m_s14001a->start_w(0);
|
||||
}
|
||||
else
|
||||
if BIT(m_u10a, 6)
|
||||
else if (BIT(m_u10a, 6))
|
||||
{
|
||||
m_s14001a->force_update();
|
||||
m_s14001a->set_output_gain(0, ((m_u10a >> 3 & 0xf) + 1) / 16.0);
|
||||
@ -440,33 +439,19 @@ WRITE8_MEMBER( st_mp200_state::u11_a_w )
|
||||
if (!m_u10_ca2)
|
||||
{
|
||||
if (m_7d && BIT(data, 1))
|
||||
{
|
||||
m_digit = 6;
|
||||
}
|
||||
else if BIT(data, 2)
|
||||
{
|
||||
else if (BIT(data, 2))
|
||||
m_digit = 5;
|
||||
}
|
||||
else if BIT(data, 3)
|
||||
{
|
||||
else if (BIT(data, 3))
|
||||
m_digit = 4;
|
||||
}
|
||||
else if BIT(data, 4)
|
||||
{
|
||||
else if (BIT(data, 4))
|
||||
m_digit = 3;
|
||||
}
|
||||
else if BIT(data, 5)
|
||||
{
|
||||
else if (BIT(data, 5))
|
||||
m_digit = 2;
|
||||
}
|
||||
else if BIT(data, 6)
|
||||
{
|
||||
else if (BIT(data, 6))
|
||||
m_digit = 1;
|
||||
}
|
||||
else if BIT(data, 7)
|
||||
{
|
||||
else if (BIT(data, 7))
|
||||
m_digit = 0;
|
||||
}
|
||||
|
||||
if (BIT(data, 0) && (m_counter > 8))
|
||||
{
|
||||
|
@ -92,13 +92,13 @@ READ8_MEMBER( zapcomp_state::keyboard_r )
|
||||
UINT8 special = ioport("X1")->read();
|
||||
UINT16 hex_keys = ioport("X0")->read();
|
||||
|
||||
if BIT(special, 2) /* "SHIFT" key is pressed */
|
||||
if (BIT(special, 2)) /* "SHIFT" key is pressed */
|
||||
retval |= 0x40; /* turn on the SHIFT bit but DO NOT turn on the strobe bit */
|
||||
|
||||
if BIT(special, 1) /* "NEXT" key is pressed */
|
||||
if (BIT(special, 1)) /* "NEXT" key is pressed */
|
||||
retval |= 0xA0; /* turn on the strobe & NEXT bits */
|
||||
|
||||
if BIT(special, 0) /* "EXEC" key is pressed */
|
||||
if (BIT(special, 0)) /* "EXEC" key is pressed */
|
||||
retval |= 0x90; /* turn on the strobe & EXEC bit */
|
||||
|
||||
for (int i=0; i<16; i++)
|
||||
|
@ -229,7 +229,7 @@ MC6845_UPDATE_ROW( zrt80_state::crtc_update_row )
|
||||
mem = (ma + x) & 0x1fff;
|
||||
chr = m_p_videoram[mem];
|
||||
|
||||
if BIT(chr, 7)
|
||||
if (BIT(chr, 7))
|
||||
{
|
||||
inv ^= 0xff;
|
||||
chr &= 0x7f;
|
||||
|
@ -38,22 +38,22 @@ ie15_keyboard_device::ie15_keyboard_device(const machine_config &mconfig, const
|
||||
|
||||
UINT8 ie15_keyboard_device::row_number(UINT32 code)
|
||||
{
|
||||
if BIT(code,0) return 0;
|
||||
if BIT(code,1) return 1;
|
||||
if BIT(code,2) return 2;
|
||||
if BIT(code,3) return 3;
|
||||
if BIT(code,4) return 4;
|
||||
if BIT(code,5) return 5;
|
||||
if BIT(code,6) return 6;
|
||||
if BIT(code,7) return 7;
|
||||
if BIT(code,8) return 8;
|
||||
if BIT(code,9) return 9;
|
||||
if BIT(code,10) return 10;
|
||||
if BIT(code,11) return 11;
|
||||
if BIT(code,12) return 12;
|
||||
if BIT(code,13) return 13;
|
||||
if BIT(code,14) return 14;
|
||||
if BIT(code,15) return 15;
|
||||
if (BIT(code,0)) return 0;
|
||||
if (BIT(code,1)) return 1;
|
||||
if (BIT(code,2)) return 2;
|
||||
if (BIT(code,3)) return 3;
|
||||
if (BIT(code,4)) return 4;
|
||||
if (BIT(code,5)) return 5;
|
||||
if (BIT(code,6)) return 6;
|
||||
if (BIT(code,7)) return 7;
|
||||
if (BIT(code,8)) return 8;
|
||||
if (BIT(code,9)) return 9;
|
||||
if (BIT(code,10)) return 10;
|
||||
if (BIT(code,11)) return 11;
|
||||
if (BIT(code,12)) return 12;
|
||||
if (BIT(code,13)) return 13;
|
||||
if (BIT(code,14)) return 14;
|
||||
if (BIT(code,15)) return 15;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -48,14 +48,14 @@ WRITE8_MEMBER(poly88_state::poly88_baud_rate_w)
|
||||
}
|
||||
|
||||
UINT8 poly88_state::row_number(UINT8 code) {
|
||||
if BIT(code,0) return 0;
|
||||
if BIT(code,1) return 1;
|
||||
if BIT(code,2) return 2;
|
||||
if BIT(code,3) return 3;
|
||||
if BIT(code,4) return 4;
|
||||
if BIT(code,5) return 5;
|
||||
if BIT(code,6) return 6;
|
||||
if BIT(code,7) return 7;
|
||||
if (BIT(code,0)) return 0;
|
||||
if (BIT(code,1)) return 1;
|
||||
if (BIT(code,2)) return 2;
|
||||
if (BIT(code,3)) return 3;
|
||||
if (BIT(code,4)) return 4;
|
||||
if (BIT(code,5)) return 5;
|
||||
if (BIT(code,6)) return 6;
|
||||
if (BIT(code,7)) return 7;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -187,7 +187,7 @@ WRITE8_MEMBER(pp01_state::pp01_8255_portb_w)
|
||||
|
||||
WRITE8_MEMBER(pp01_state::pp01_8255_portc_w)
|
||||
{
|
||||
if BIT(data, 4)
|
||||
if (BIT(data, 4))
|
||||
m_key_line = data & 0x0f;
|
||||
else
|
||||
m_speaker->level_w(BIT(data, 0));
|
||||
|
@ -121,7 +121,7 @@ static const UINT16 key_table[256]=
|
||||
#endif
|
||||
|
||||
|
||||
static const UINT8 bitswap[16][16] =
|
||||
static const UINT8 spi_bitswap[16][16] =
|
||||
{
|
||||
{ 15,14,13,12,11,10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, },
|
||||
{ 7, 6, 5,14, 0,15, 4, 3, 2, 8, 9,10,11,12,13, 1, },
|
||||
@ -170,7 +170,7 @@ void seibuspi_sprite_decrypt(UINT8 *src, int rom_size)
|
||||
|
||||
|
||||
/* first of all, permutate 16 of the 48 bits */
|
||||
bs = bitswap[key_table[addr & 0xff]&0xf];
|
||||
bs = spi_bitswap[key_table[addr & 0xff]&0xf];
|
||||
y3 = BITSWAP16(y3, bs[0],bs[1],bs[2],bs[3],bs[4],bs[5],bs[6],bs[7],
|
||||
bs[8],bs[9],bs[10],bs[11],bs[12],bs[13],bs[14],bs[15]);
|
||||
|
||||
|
@ -18,7 +18,7 @@ TIMER_CALLBACK_MEMBER(sorcerer_state::sorcerer_serial_tc)
|
||||
Transmit and receive clocks are connected to the same clock. */
|
||||
|
||||
/* if rs232 is disabled, receive clock is linked to cassette hardware */
|
||||
if BIT(m_fe, 7)
|
||||
if (BIT(m_fe, 7))
|
||||
{
|
||||
/* connect to rs232 */
|
||||
m_rs232->write_txd(m_uart->get_output_pin(AY31015_SO));
|
||||
|
@ -55,7 +55,7 @@ READ8_MEMBER( special_state::specialist_8255_portb_r )
|
||||
if ((m_specialist_8255_portc & 0x08)==0) dat &= m_io_line11->read();
|
||||
|
||||
// shift key
|
||||
if BIT(~m_io_line12->read(), 0)
|
||||
if (BIT(~m_io_line12->read(), 0))
|
||||
dat &= 0xfd;
|
||||
|
||||
// cassette
|
||||
@ -86,7 +86,7 @@ READ8_MEMBER( special_state::specimx_8255_portb_r )
|
||||
if ((m_specialist_8255_portc & 0x08)==0) dat &= m_io_line11->read();
|
||||
|
||||
// shift key
|
||||
if BIT(~m_io_line12->read(), 0)
|
||||
if (BIT(~m_io_line12->read(), 0))
|
||||
dat &= 0xfd;
|
||||
|
||||
// cassette
|
||||
|
@ -43,7 +43,7 @@ void super80_state::super80_cassette_motor( bool motor_state )
|
||||
m_cassette->change_state(CASSETTE_MOTOR_ENABLED,CASSETTE_MASK_MOTOR);
|
||||
|
||||
/* does user want to hear the sound? */
|
||||
if BIT(m_io_config->read(), 3)
|
||||
if (BIT(m_io_config->read(), 3))
|
||||
m_cassette->change_state(CASSETTE_SPEAKER_ENABLED,CASSETTE_MASK_SPEAKER);
|
||||
else
|
||||
m_cassette->change_state(CASSETTE_SPEAKER_MUTED,CASSETTE_MASK_SPEAKER);
|
||||
@ -247,7 +247,7 @@ QUICKLOAD_LOAD_MEMBER( super80_state, super80 )
|
||||
/* is this file executable? */
|
||||
if (exec_addr != 0xffff)
|
||||
/* check to see if autorun is on */
|
||||
if BIT(m_io_config->read(), 0)
|
||||
if (BIT(m_io_config->read(), 0))
|
||||
m_maincpu->set_pc(exec_addr);
|
||||
|
||||
return image_init_result::PASS;
|
||||
|
@ -45,9 +45,9 @@ WRITE8_MEMBER( aussiebyte_state::port35_w )
|
||||
|
||||
READ8_MEMBER( aussiebyte_state::port36_r )
|
||||
{
|
||||
if BIT(m_port34, 5)
|
||||
if (BIT(m_port34, 5))
|
||||
{
|
||||
if BIT(m_p_attribram[m_alpha_address & 0x7ff], 7)
|
||||
if (BIT(m_p_attribram[m_alpha_address & 0x7ff], 7))
|
||||
return m_p_videoram[m_alpha_address];
|
||||
else
|
||||
return m_p_videoram[m_graph_address];
|
||||
@ -85,9 +85,9 @@ WRITE8_MEMBER( aussiebyte_state::address_w )
|
||||
m_alpha_address &= 0x3fff;
|
||||
m_graph_address = (m_alpha_address << 4) | (m_port34 & 15);
|
||||
|
||||
if BIT(m_port34, 5)
|
||||
if (BIT(m_port34, 5))
|
||||
{
|
||||
if BIT(m_p_attribram[m_alpha_address & 0x7ff], 7)
|
||||
if (BIT(m_p_attribram[m_alpha_address & 0x7ff], 7))
|
||||
m_p_videoram[m_alpha_address] = m_port35;
|
||||
else
|
||||
m_p_videoram[m_graph_address] = m_port35;
|
||||
@ -154,11 +154,11 @@ UINT8 aussiebyte_state::crt8002(UINT8 ac_ra, UINT8 ac_chr, UINT8 ac_attr, UINT16
|
||||
gfx = 0xff;
|
||||
if (BIT(ac_attr, 6) & BIT(ac_cnt, 13)) // flash
|
||||
gfx = 0;
|
||||
if BIT(ac_attr, 5) // blank
|
||||
if (BIT(ac_attr, 5)) // blank
|
||||
gfx = 0;
|
||||
if (ac_curs && BIT(ac_cnt, 14)) // cursor
|
||||
gfx ^= 0xff;
|
||||
if BIT(ac_attr, 4) // reverse video
|
||||
if (BIT(ac_attr, 4)) // reverse video
|
||||
gfx ^= 0xff;
|
||||
return gfx;
|
||||
}
|
||||
@ -176,7 +176,7 @@ MC6845_UPDATE_ROW( aussiebyte_state::crtc_update_row )
|
||||
{
|
||||
mem = ma + x;
|
||||
attr = m_p_attribram[mem & 0x7ff];
|
||||
if BIT(attr, 7)
|
||||
if (BIT(attr, 7))
|
||||
chr = m_p_videoram[mem & 0x3fff]; // alpha
|
||||
else
|
||||
chr = m_p_videoram[(mem << 4) | ra]; // gfx
|
||||
|
@ -3007,7 +3007,7 @@ UINT32 cps_state::screen_update_cps1(screen_device &screen, bitmap_ind16 &bitmap
|
||||
|
||||
if (m_cps_version == 1)
|
||||
{
|
||||
if BIT(m_game_config->bootleg_kludge, 7)
|
||||
if (BIT(m_game_config->bootleg_kludge, 7))
|
||||
cps1_build_palette(cps1_base(CPS1_PALETTE_BASE, m_palette_align));
|
||||
|
||||
cps1_render_layer(screen, bitmap, cliprect, l0, 0);
|
||||
|
@ -116,7 +116,7 @@ READ8_MEMBER( mbee_state::video_low_r )
|
||||
|
||||
WRITE8_MEMBER( mbee_state::video_low_w )
|
||||
{
|
||||
if BIT(m_1c, 4)
|
||||
if (BIT(m_1c, 4))
|
||||
{
|
||||
// non-premium attribute writes are discarded
|
||||
if (m_is_premium && BIT(m_1c, 7))
|
||||
@ -128,7 +128,7 @@ WRITE8_MEMBER( mbee_state::video_low_w )
|
||||
|
||||
READ8_MEMBER( mbee_state::video_high_r )
|
||||
{
|
||||
if BIT(m_08, 6)
|
||||
if (BIT(m_08, 6))
|
||||
return m_p_colorram[offset];
|
||||
else
|
||||
return m_p_gfxram[(((m_1c & 15) + 1) << 11) | offset];
|
||||
@ -203,31 +203,27 @@ void mbee_state::oldkb_matrix_r(UINT16 offs)
|
||||
{
|
||||
if ((port == 0) || (port == 2) || (port == 3))
|
||||
extra = m_io_x7->read();
|
||||
else
|
||||
if (port == 7)
|
||||
else if (port == 7)
|
||||
extra = data;
|
||||
|
||||
if (extra)
|
||||
{
|
||||
if BIT(extra, 0) // cursor up
|
||||
if (BIT(extra, 0)) // cursor up
|
||||
{
|
||||
if( port == 7 && bit == 1 ) keydown = 1;
|
||||
if( port == 0 && bit == 5 ) keydown = 1; // control E
|
||||
}
|
||||
else
|
||||
if BIT(extra, 2) // cursor down
|
||||
else if (BIT(extra, 2)) // cursor down
|
||||
{
|
||||
if( port == 7 && bit == 1 ) keydown = 1;
|
||||
if( port == 3 && bit == 0 ) keydown = 1; // control X
|
||||
}
|
||||
else
|
||||
if BIT(extra, 3) // cursor left
|
||||
else if (BIT(extra, 3)) // cursor left
|
||||
{
|
||||
if( port == 7 && bit == 1 ) keydown = 1;
|
||||
if( port == 2 && bit == 3 ) keydown = 1; // control S
|
||||
}
|
||||
else
|
||||
if BIT(extra, 6) // cursor right
|
||||
else if (BIT(extra, 6)) // cursor right
|
||||
{
|
||||
if( port == 7 && bit == 1 ) keydown = 1;
|
||||
if( port == 0 && bit == 4 ) keydown = 1; // control D
|
||||
@ -353,14 +349,14 @@ MC6845_UPDATE_ROW( mbee_state::crtc_update_row )
|
||||
mem = (ma + x) & 0x7ff;
|
||||
chr = m_p_videoram[mem];
|
||||
|
||||
if BIT(m_1c, 7) // premium graphics enabled?
|
||||
if (BIT(m_1c, 7)) // premium graphics enabled?
|
||||
{
|
||||
attr = m_p_attribram[mem];
|
||||
|
||||
if BIT(chr, 7)
|
||||
if (BIT(chr, 7))
|
||||
chr += ((attr & 15) << 7); // bump chr to its particular pcg definition
|
||||
|
||||
if BIT(attr, 6)
|
||||
if (BIT(attr, 6))
|
||||
inv ^= 0xff; // inverse attribute
|
||||
|
||||
if (BIT(attr, 7) & BIT(m_framecnt, 4)) // flashing attribute
|
||||
|
@ -75,7 +75,7 @@ UINT32 super80_state::screen_update_super80(screen_device &screen, bitmap_ind16
|
||||
|
||||
if (screen_on)
|
||||
{
|
||||
if BIT(options, 5)
|
||||
if (BIT(options, 5))
|
||||
fg = 15; /* b&w */
|
||||
else
|
||||
fg = 5; /* green */
|
||||
@ -129,7 +129,7 @@ UINT32 super80_state::screen_update_super80d(screen_device &screen, bitmap_ind16
|
||||
|
||||
if (screen_on)
|
||||
{
|
||||
if BIT(options, 5)
|
||||
if (BIT(options, 5))
|
||||
fg = 15; /* b&w */
|
||||
else
|
||||
fg = 5; /* green */
|
||||
@ -177,7 +177,7 @@ UINT32 super80_state::screen_update_super80e(screen_device &screen, bitmap_ind16
|
||||
|
||||
if (screen_on)
|
||||
{
|
||||
if BIT(options, 5)
|
||||
if (BIT(options, 5))
|
||||
fg = 15; /* b&w */
|
||||
else
|
||||
fg = 5; /* green */
|
||||
@ -228,7 +228,7 @@ UINT32 super80_state::screen_update_super80m(screen_device &screen, bitmap_ind16
|
||||
|
||||
if (screen_on)
|
||||
{
|
||||
if BIT(options, 5)
|
||||
if (BIT(options, 5))
|
||||
fg = 15; /* b&w */
|
||||
else
|
||||
fg = 5; /* green */
|
||||
@ -299,7 +299,7 @@ static const UINT8 mc6845_mask[32]={0xff,0xff,0xff,0x0f,0x7f,0x1f,0x7f,0x7f,3,0x
|
||||
|
||||
READ8_MEMBER( super80_state::super80v_low_r )
|
||||
{
|
||||
if BIT(m_portf0, 2)
|
||||
if (BIT(m_portf0, 2))
|
||||
return m_p_videoram[offset];
|
||||
else
|
||||
return m_p_colorram[offset];
|
||||
@ -307,7 +307,7 @@ READ8_MEMBER( super80_state::super80v_low_r )
|
||||
|
||||
WRITE8_MEMBER( super80_state::super80v_low_w )
|
||||
{
|
||||
if BIT(m_portf0, 2)
|
||||
if (BIT(m_portf0, 2))
|
||||
m_p_videoram[offset] = data;
|
||||
else
|
||||
m_p_colorram[offset] = data;
|
||||
@ -318,7 +318,7 @@ READ8_MEMBER( super80_state::super80v_high_r )
|
||||
if (!BIT(m_portf0, 2))
|
||||
return m_p_colorram[0x800 | offset];
|
||||
else
|
||||
if BIT(m_portf0, 4)
|
||||
if (BIT(m_portf0, 4))
|
||||
return m_p_pcgram[0x800 | offset];
|
||||
else
|
||||
return m_p_pcgram[offset];
|
||||
@ -332,7 +332,7 @@ WRITE8_MEMBER( super80_state::super80v_high_w )
|
||||
{
|
||||
m_p_videoram[0x800 | offset] = data;
|
||||
|
||||
if BIT(m_portf0, 4)
|
||||
if (BIT(m_portf0, 4))
|
||||
m_p_pcgram[0x800 | offset] = data;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user