mirror of
https://github.com/holub/mame
synced 2025-04-24 09:20:02 +03:00
fix maygay m1a lamping code to work with layouts (nw)
This commit is contained in:
parent
90032db52e
commit
48ce3c4bd8
@ -623,18 +623,9 @@ WRITE8_MEMBER( maygay1b_state::lamp_data_w )
|
||||
// Because of the nature of the lamping circuit, there is an element of persistance
|
||||
// As a consequence, the lamp column data can change before the input strobe without
|
||||
// causing the relevant lamps to black out.
|
||||
int bit_offset;
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
if(i < 4)
|
||||
{
|
||||
bit_offset = i + 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
bit_offset = i - 4;
|
||||
}
|
||||
output().set_lamp_value((8*m_lamp_strobe)+i, ((data & (1 << bit_offset)) !=0));
|
||||
output().set_lamp_value((8*m_lamp_strobe)+i, ((data & (1 << (i^4))) !=0));
|
||||
}
|
||||
|
||||
m_old_lamp_strobe = m_lamp_strobe;
|
||||
@ -663,10 +654,9 @@ WRITE8_MEMBER( maygay1b_state::lamp_data_2_w )
|
||||
// Because of the nature of the lamping circuit, there is an element of persistance
|
||||
// As a consequence, the lamp column data can change before the input strobe without
|
||||
// causing the relevant lamps to black out.
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
output().set_lamp_value((8*m_lamp_strobe2)+i+128, ((data & (1 << i)) !=0));
|
||||
output().set_lamp_value((8*m_lamp_strobe)+i+128, ((data & (1 << (i^4))) !=0));
|
||||
}
|
||||
|
||||
m_old_lamp_strobe2 = m_lamp_strobe2;
|
||||
@ -825,7 +815,7 @@ MACHINE_CONFIG_START( maygay_m1, maygay1b_state )
|
||||
MCFG_I8279_IN_RL_CB(READ8(maygay1b_state, kbd_r)) // kbd RL lines
|
||||
|
||||
#ifndef USE_MCU
|
||||
// there is no 2nd i8279, the 8051 handles this task!
|
||||
// on M1B there is a 2nd i8279, on M1 / M1A a 8051 handles this task!
|
||||
MCFG_DEVICE_ADD("i8279_2", I8279, M1_MASTER_CLOCK/4) // unknown clock
|
||||
MCFG_I8279_OUT_SL_CB(WRITE8(maygay1b_state, scanlines_2_w)) // scan SL lines
|
||||
MCFG_I8279_OUT_DISP_CB(WRITE8(maygay1b_state, lamp_data_2_w)) // display A&B
|
||||
|
Loading…
Reference in New Issue
Block a user