mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
subs.cpp: Eliminate set_led_value by binding outputs directly to callbacks (nw)
This commit is contained in:
parent
461654b076
commit
42a7f3d96c
@ -215,8 +215,8 @@ MACHINE_CONFIG_START(subs_state::subs)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
|
||||
|
||||
MCFG_DEVICE_ADD("latch", LS259, 0) // C9
|
||||
MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(subs_state, lamp1_w))
|
||||
MCFG_ADDRESSABLE_LATCH_Q1_OUT_CB(WRITELINE(subs_state, lamp2_w))
|
||||
MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(OUTPUT("led0")) MCFG_DEVCB_INVERT // START LAMP 1
|
||||
MCFG_ADDRESSABLE_LATCH_Q1_OUT_CB(OUTPUT("led1")) MCFG_DEVCB_INVERT // START LAMP 2
|
||||
MCFG_ADDRESSABLE_LATCH_Q2_OUT_CB(DEVWRITELINE("discrete", discrete_device, write_line<SUBS_SONAR2_EN>))
|
||||
MCFG_ADDRESSABLE_LATCH_Q3_OUT_CB(DEVWRITELINE("discrete", discrete_device, write_line<SUBS_SONAR1_EN>))
|
||||
// Schematics show crash and explode reversed. But this is proper.
|
||||
|
@ -49,8 +49,6 @@ public:
|
||||
DECLARE_READ8_MEMBER(control_r);
|
||||
DECLARE_READ8_MEMBER(coin_r);
|
||||
DECLARE_READ8_MEMBER(options_r);
|
||||
DECLARE_WRITE_LINE_MEMBER(lamp1_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(lamp2_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(invert1_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(invert2_w);
|
||||
DECLARE_WRITE8_MEMBER(noise_reset_w);
|
||||
|
@ -175,19 +175,3 @@ READ8_MEMBER(subs_state::options_r)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
lamp1_w
|
||||
***************************************************************************/
|
||||
WRITE_LINE_MEMBER(subs_state::lamp1_w)
|
||||
{
|
||||
output().set_led_value(0, !state);
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
lamp2_w
|
||||
***************************************************************************/
|
||||
WRITE_LINE_MEMBER(subs_state::lamp2_w)
|
||||
{
|
||||
output().set_led_value(1, !state);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user