mirror of
https://github.com/holub/mame
synced 2025-04-25 17:56:43 +03:00
modernize output_manager (nw)
This commit is contained in:
parent
3e5ad46410
commit
f9f908d48b
@ -588,14 +588,14 @@ WRITE8_MEMBER( abc99_device::z2_led_w )
|
||||
{
|
||||
if (m_led_en) return;
|
||||
|
||||
output_set_led_value(LED_1, BIT(data, 0));
|
||||
output_set_led_value(LED_2, BIT(data, 1));
|
||||
output_set_led_value(LED_3, BIT(data, 2));
|
||||
output_set_led_value(LED_4, BIT(data, 3));
|
||||
output_set_led_value(LED_5, BIT(data, 4));
|
||||
output_set_led_value(LED_6, BIT(data, 5));
|
||||
output_set_led_value(LED_7, BIT(data, 6));
|
||||
output_set_led_value(LED_8, BIT(data, 7));
|
||||
machine().output().set_led_value(LED_1, BIT(data, 0));
|
||||
machine().output().set_led_value(LED_2, BIT(data, 1));
|
||||
machine().output().set_led_value(LED_3, BIT(data, 2));
|
||||
machine().output().set_led_value(LED_4, BIT(data, 3));
|
||||
machine().output().set_led_value(LED_5, BIT(data, 4));
|
||||
machine().output().set_led_value(LED_6, BIT(data, 5));
|
||||
machine().output().set_led_value(LED_7, BIT(data, 6));
|
||||
machine().output().set_led_value(LED_8, BIT(data, 7));
|
||||
}
|
||||
|
||||
|
||||
@ -631,9 +631,9 @@ WRITE8_MEMBER( abc99_device::z2_p1_w )
|
||||
m_t1_z5 = BIT(data, 2);
|
||||
|
||||
// key LEDs
|
||||
output_set_led_value(LED_INS, BIT(data, 3));
|
||||
output_set_led_value(LED_ALT, BIT(data, 4));
|
||||
output_set_led_value(LED_CAPS_LOCK, BIT(data, 5));
|
||||
machine().output().set_led_value(LED_INS, BIT(data, 3));
|
||||
machine().output().set_led_value(LED_ALT, BIT(data, 4));
|
||||
machine().output().set_led_value(LED_CAPS_LOCK, BIT(data, 5));
|
||||
|
||||
// speaker output
|
||||
m_speaker->level_w(!BIT(data, 6));
|
||||
|
@ -722,7 +722,7 @@ WRITE8_MEMBER( c1541_base_t::via1_pb_w )
|
||||
m_ga->stp_w(data & 0x03);
|
||||
|
||||
// activity LED
|
||||
output_set_led_value(LED_ACT, BIT(data, 3));
|
||||
machine().output().set_led_value(LED_ACT, BIT(data, 3));
|
||||
|
||||
// density select
|
||||
m_ga->ds_w((data >> 5) & 0x03);
|
||||
|
@ -456,7 +456,7 @@ WRITE8_MEMBER( c1571_t::via1_pb_w )
|
||||
m_ga->stp_w(data & 0x03); // TODO actually STP1=0, STP0=!(PB0^PB1), Y0=PB1, Y2=!PB1
|
||||
|
||||
// activity LED
|
||||
output_set_led_value(LED_ACT, BIT(data, 3));
|
||||
machine().output().set_led_value(LED_ACT, BIT(data, 3));
|
||||
|
||||
// density select
|
||||
m_ga->ds_w((data >> 5) & 0x03);
|
||||
|
@ -169,10 +169,10 @@ WRITE8_MEMBER( c1581_t::cia_pa_w )
|
||||
m_floppy->mon_w(BIT(data, 2));
|
||||
|
||||
// power led
|
||||
output_set_led_value(LED_POWER, BIT(data, 5));
|
||||
machine().output().set_led_value(LED_POWER, BIT(data, 5));
|
||||
|
||||
// activity led
|
||||
output_set_led_value(LED_ACT, BIT(data, 6));
|
||||
machine().output().set_led_value(LED_ACT, BIT(data, 6));
|
||||
}
|
||||
|
||||
READ8_MEMBER( c1581_t::cia_pb_r )
|
||||
|
@ -295,7 +295,7 @@ WRITE8_MEMBER( epson_lx800_t::portc_w )
|
||||
logerror("%s: lx800_portc_w(%02x): %02x\n", machine().describe_context(), offset, data);
|
||||
logerror("--> err: %d, ack: %d, fire: %d, buzzer: %d\n", BIT(data, 4), BIT(data, 5), BIT(data, 6), BIT(data, 7));
|
||||
|
||||
output_set_value("online_led", !BIT(data, 2));
|
||||
machine().output().set_value("online_led", !BIT(data, 2));
|
||||
m_beep->set_state(!BIT(data, 7));
|
||||
}
|
||||
|
||||
@ -348,7 +348,7 @@ WRITE_LINE_MEMBER( epson_lx800_t::centronics_pe_w )
|
||||
WRITE_LINE_MEMBER( epson_lx800_t::paperempty_led_w )
|
||||
{
|
||||
logerror("setting paperout led: %d\n", state);
|
||||
output_set_value("paperout_led", state);
|
||||
machine().output().set_value("paperout_led", state);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( epson_lx800_t::reset_w )
|
||||
|
@ -502,7 +502,7 @@ WRITE8_MEMBER( epson_lx810l_t::portc_w )
|
||||
m_eeprom->clk_write(m_93c06_clk ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_eeprom->cs_write (m_93c06_cs ? ASSERT_LINE : CLEAR_LINE);
|
||||
|
||||
output_set_value("online_led", !BIT(data, 2));
|
||||
machine().output().set_value("online_led", !BIT(data, 2));
|
||||
}
|
||||
|
||||
|
||||
|
@ -236,8 +236,8 @@ WRITE8_MEMBER( dmv_k220_device::porta_w )
|
||||
// 74LS247 BCD-to-Seven-Segment Decoder
|
||||
static UINT8 bcd2hex[] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 0x58, 0x4c, 0x62, 0x69, 0x78, 0x00 };
|
||||
|
||||
output_set_digit_value(0, bcd2hex[(data >> 4) & 0x0f]);
|
||||
output_set_digit_value(1, bcd2hex[data & 0x0f]);
|
||||
machine().output().set_digit_value(0, bcd2hex[(data >> 4) & 0x0f]);
|
||||
machine().output().set_digit_value(1, bcd2hex[data & 0x0f]);
|
||||
}
|
||||
|
||||
|
||||
|
@ -563,7 +563,7 @@ WRITE8_MEMBER( e01_device::floppy_w )
|
||||
// TODO floppy test
|
||||
|
||||
// mode LED
|
||||
output_set_value("led_0", BIT(data, 7));
|
||||
machine().output().set_value("led_0", BIT(data, 7));
|
||||
}
|
||||
|
||||
|
||||
|
@ -259,7 +259,7 @@ WRITE8_MEMBER( c2031_device::via1_pb_w )
|
||||
m_ga->stp_w(data & 0x03);
|
||||
|
||||
// activity LED
|
||||
output_set_led_value(LED_ACT, BIT(data, 3));
|
||||
machine().output().set_led_value(LED_ACT, BIT(data, 3));
|
||||
|
||||
// density select
|
||||
m_ga->ds_w((data >> 5) & 0x03);
|
||||
|
@ -363,13 +363,13 @@ WRITE8_MEMBER( c2040_t::riot1_pb_w )
|
||||
*/
|
||||
|
||||
// activity led 1
|
||||
output_set_led_value(LED_ACT1, BIT(data, 3));
|
||||
machine().output().set_led_value(LED_ACT1, BIT(data, 3));
|
||||
|
||||
// activity led 0
|
||||
output_set_led_value(LED_ACT0, BIT(data, 4));
|
||||
machine().output().set_led_value(LED_ACT0, BIT(data, 4));
|
||||
|
||||
// error led
|
||||
output_set_led_value(LED_ERR, BIT(data, 5));
|
||||
machine().output().set_led_value(LED_ERR, BIT(data, 5));
|
||||
}
|
||||
|
||||
|
||||
|
@ -410,13 +410,13 @@ WRITE8_MEMBER( c8050_t::riot1_pb_w )
|
||||
*/
|
||||
|
||||
// activity led 1
|
||||
output_set_led_value(LED_ACT1, BIT(data, 3));
|
||||
machine().output().set_led_value(LED_ACT1, BIT(data, 3));
|
||||
|
||||
// activity led 0
|
||||
output_set_led_value(LED_ACT0, BIT(data, 4));
|
||||
machine().output().set_led_value(LED_ACT0, BIT(data, 4));
|
||||
|
||||
// error led
|
||||
output_set_led_value(LED_ERR, BIT(data, 5));
|
||||
machine().output().set_led_value(LED_ERR, BIT(data, 5));
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( c8050_t::via_pb_w )
|
||||
|
@ -266,13 +266,13 @@ WRITE8_MEMBER( c8280_t::riot1_pb_w )
|
||||
*/
|
||||
|
||||
// activity led 1
|
||||
output_set_led_value(LED_ACT1, BIT(data, 3));
|
||||
machine().output().set_led_value(LED_ACT1, BIT(data, 3));
|
||||
|
||||
// activity led 0
|
||||
output_set_led_value(LED_ACT0, BIT(data, 4));
|
||||
machine().output().set_led_value(LED_ACT0, BIT(data, 4));
|
||||
|
||||
// error led
|
||||
output_set_led_value(LED_ERR, BIT(data, 5));
|
||||
machine().output().set_led_value(LED_ERR, BIT(data, 5));
|
||||
}
|
||||
|
||||
static SLOT_INTERFACE_START( c8280_floppies )
|
||||
|
@ -302,13 +302,13 @@ WRITE8_MEMBER( d9060_base_t::riot1_pb_w )
|
||||
*/
|
||||
|
||||
// ready led
|
||||
output_set_led_value(LED_READY, BIT(data, 4));
|
||||
machine().output().set_led_value(LED_READY, BIT(data, 4));
|
||||
|
||||
// power led
|
||||
output_set_led_value(LED_POWER, BIT(data, 5));
|
||||
machine().output().set_led_value(LED_POWER, BIT(data, 5));
|
||||
|
||||
// error led
|
||||
output_set_led_value(LED_ERROR, !BIT(data, 5));
|
||||
machine().output().set_led_value(LED_ERROR, !BIT(data, 5));
|
||||
}
|
||||
|
||||
|
||||
|
@ -254,9 +254,9 @@ WRITE8_MEMBER( hardbox_device::ppi1_pc_w )
|
||||
|
||||
*/
|
||||
|
||||
output_set_led_value(LED_A, !BIT(data, 0));
|
||||
output_set_led_value(LED_B, !BIT(data, 1));
|
||||
output_set_led_value(LED_READY, !BIT(data, 2));
|
||||
machine().output().set_led_value(LED_A, !BIT(data, 0));
|
||||
machine().output().set_led_value(LED_B, !BIT(data, 1));
|
||||
machine().output().set_led_value(LED_READY, !BIT(data, 2));
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
|
@ -212,9 +212,9 @@ WRITE8_MEMBER( softbox_device::ppi1_pc_w )
|
||||
|
||||
*/
|
||||
|
||||
output_set_led_value(LED_A, !BIT(data, 0));
|
||||
output_set_led_value(LED_B, !BIT(data, 1));
|
||||
output_set_led_value(LED_READY, !BIT(data, 2));
|
||||
machine().output().set_led_value(LED_A, !BIT(data, 0));
|
||||
machine().output().set_led_value(LED_B, !BIT(data, 1));
|
||||
machine().output().set_led_value(LED_READY, !BIT(data, 2));
|
||||
}
|
||||
|
||||
static DEVICE_INPUT_DEFAULTS_START( terminal )
|
||||
|
@ -335,7 +335,7 @@ void msx_cart_disk_type1::set_control(UINT8 data)
|
||||
|
||||
if ((old_m_control ^ m_control) & 0x40)
|
||||
{
|
||||
set_led_status(machine(), 0, !(m_control & 0x40));
|
||||
machine().output().set_led_value(0, !(m_control & 0x40));
|
||||
}
|
||||
}
|
||||
|
||||
@ -495,7 +495,7 @@ void msx_cart_disk_type2::set_control(UINT8 data)
|
||||
|
||||
if ((old_m_control ^ m_control) & 0x40)
|
||||
{
|
||||
set_led_status(machine(), 0, !(m_control & 0x40));
|
||||
machine().output().set_led_value(0, !(m_control & 0x40));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -200,7 +200,7 @@ void msx_slot_disk1_device::set_control(UINT8 data)
|
||||
|
||||
if ((old_m_control ^ m_control) & 0x40)
|
||||
{
|
||||
set_led_status(machine(), 0, !(m_control & 0x40));
|
||||
machine().output().set_led_value(0, !(m_control & 0x40));
|
||||
}
|
||||
}
|
||||
|
||||
@ -349,7 +349,7 @@ void msx_slot_disk2_device::set_control(UINT8 data)
|
||||
|
||||
if ((old_m_control ^ m_control) & 0x40)
|
||||
{
|
||||
set_led_status(machine(), 0, !(m_control & 0x40));
|
||||
machine().output().set_led_value(0, !(m_control & 0x40));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -580,9 +580,9 @@ WRITE8_MEMBER( ibm_pc_at_84_keyboard_device::p2_w )
|
||||
|
||||
*/
|
||||
|
||||
output_set_led_value(LED_SCROLL, BIT(data, 0));
|
||||
output_set_led_value(LED_NUM, BIT(data, 1));
|
||||
output_set_led_value(LED_CAPS, BIT(data, 2));
|
||||
machine().output().set_led_value(LED_SCROLL, BIT(data, 0));
|
||||
machine().output().set_led_value(LED_NUM, BIT(data, 1));
|
||||
machine().output().set_led_value(LED_CAPS, BIT(data, 2));
|
||||
|
||||
m_pc_kbdc->data_write_from_kb(!BIT(data, 7));
|
||||
m_pc_kbdc->clock_write_from_kb(!BIT(data, 6));
|
||||
|
@ -108,7 +108,7 @@ WRITE8_MEMBER( c1551_t::port_w )
|
||||
m_ga->mtr_w(BIT(data, 2));
|
||||
|
||||
// activity LED
|
||||
output_set_led_value(LED_ACT, BIT(data, 3));
|
||||
machine().output().set_led_value(LED_ACT, BIT(data, 3));
|
||||
|
||||
// density select
|
||||
m_ga->ds_w((data >> 5) & 0x03);
|
||||
|
@ -432,13 +432,13 @@ void amiga_fdc::setup_leds()
|
||||
floppy == floppy_devices[2] ? 2 :
|
||||
3;
|
||||
|
||||
output_set_value("drive_0_led", drive == 0);
|
||||
output_set_value("drive_1_led", drive == 1);
|
||||
output_set_value("drive_2_led", drive == 2);
|
||||
output_set_value("drive_3_led", drive == 3);
|
||||
machine().output().set_value("drive_0_led", drive == 0);
|
||||
machine().output().set_value("drive_1_led", drive == 1);
|
||||
machine().output().set_value("drive_2_led", drive == 2);
|
||||
machine().output().set_value("drive_3_led", drive == 3);
|
||||
|
||||
set_led_status(machine(), 1, drive == 0); /* update internal drive led */
|
||||
set_led_status(machine(), 2, drive == 1); /* update external drive led */
|
||||
machine().output().set_led_value(1, drive == 0); /* update internal drive led */
|
||||
machine().output().set_led_value(2, drive == 1); /* update external drive led */
|
||||
}
|
||||
}
|
||||
|
||||
@ -471,7 +471,7 @@ WRITE8_MEMBER( amiga_fdc::ciaaprb_w )
|
||||
floppy->dir_w((data >> 1) & 1);
|
||||
floppy->stp_w(data & 1);
|
||||
floppy->mon_w((data >> 7) & 1);
|
||||
output_set_value("fdc_led", data & 0x80); // LED directly connected to FDC motor
|
||||
machine().output().set_value("fdc_led", data & 0x80); // LED directly connected to FDC motor
|
||||
}
|
||||
|
||||
if(floppy) {
|
||||
|
@ -563,18 +563,18 @@ WRITE8_MEMBER( pioneer_pr8210_device::i8049_pia_w )
|
||||
case 0x60:
|
||||
|
||||
// these 4 are direct-connect
|
||||
output_set_value("pr8210_audio1", (data & 0x01) != 0);
|
||||
output_set_value("pr8210_audio2", (data & 0x02) != 0);
|
||||
output_set_value("pr8210_clv", (data & 0x04) != 0);
|
||||
output_set_value("pr8210_cav", (data & 0x08) != 0);
|
||||
machine().output().set_value("pr8210_audio1", (data & 0x01) != 0);
|
||||
machine().output().set_value("pr8210_audio2", (data & 0x02) != 0);
|
||||
machine().output().set_value("pr8210_clv", (data & 0x04) != 0);
|
||||
machine().output().set_value("pr8210_cav", (data & 0x08) != 0);
|
||||
|
||||
// remaining 3 bits select one of 5 LEDs via a mux
|
||||
value = ((data & 0x40) >> 6) | ((data & 0x20) >> 4) | ((data & 0x10) >> 2);
|
||||
output_set_value("pr8210_srev", (value == 0));
|
||||
output_set_value("pr8210_sfwd", (value == 1));
|
||||
output_set_value("pr8210_play", (value == 2));
|
||||
output_set_value("pr8210_step", (value == 3));
|
||||
output_set_value("pr8210_pause", (value == 4));
|
||||
machine().output().set_value("pr8210_srev", (value == 0));
|
||||
machine().output().set_value("pr8210_sfwd", (value == 1));
|
||||
machine().output().set_value("pr8210_play", (value == 2));
|
||||
machine().output().set_value("pr8210_step", (value == 3));
|
||||
machine().output().set_value("pr8210_pause", (value == 4));
|
||||
|
||||
m_pia.portb = data;
|
||||
update_audio_squelch();
|
||||
@ -724,7 +724,7 @@ WRITE8_MEMBER( pioneer_pr8210_device::i8049_port2_w )
|
||||
m_i8049_cpu->set_input_line(MCS48_INPUT_IRQ, (data & 0x40) ? CLEAR_LINE : ASSERT_LINE);
|
||||
|
||||
// standby LED is set accordingl to bit 4
|
||||
output_set_value("pr8210_standby", (data & 0x10) != 0);
|
||||
machine().output().set_value("pr8210_standby", (data & 0x10) != 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -357,9 +357,9 @@ void pc_keyboard_device::device_reset()
|
||||
m_numlock = 0;
|
||||
m_on = true;
|
||||
/* set default led state */
|
||||
set_led_status(machine(), 2, 0);
|
||||
set_led_status(machine(), 0, 0);
|
||||
set_led_status(machine(), 1, 0);
|
||||
machine().output().set_led_value(2, 0);
|
||||
machine().output().set_led_value(0, 0);
|
||||
machine().output().set_led_value(1, 0);
|
||||
|
||||
m_head = m_tail = 0;
|
||||
queue_insert(0xaa);
|
||||
@ -832,9 +832,9 @@ WRITE8_MEMBER(at_keyboard_device::write)
|
||||
|
||||
/* led's in same order as my keyboard leds. */
|
||||
/* num lock, caps lock, scroll lock */
|
||||
set_led_status(machine(), 2, (data & 0x01));
|
||||
set_led_status(machine(), 0, ((data & 0x02)>>1));
|
||||
set_led_status(machine(), 1, ((data & 0x04)>>2));
|
||||
machine().output().set_led_value(2, (data & 0x01));
|
||||
machine().output().set_led_value(0, ((data & 0x02)>>1));
|
||||
machine().output().set_led_value(1, ((data & 0x04)>>2));
|
||||
|
||||
}
|
||||
break;
|
||||
|
@ -197,7 +197,7 @@ void rocvfd_t::update_display()
|
||||
for (int i =0; i<16; i++)
|
||||
{
|
||||
m_outputs[i] = set_display(m_chars[i]);
|
||||
output_set_indexed_value("vfd", (m_port_val*16) + i, m_outputs[i]);
|
||||
machine().output().set_indexed_value("vfd", (m_port_val*16) + i, m_outputs[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ device_output_interface::~device_output_interface()
|
||||
void device_output_interface::set_output_value(int value) const
|
||||
{
|
||||
if (m_output_name)
|
||||
output_set_value(m_output_name, value);
|
||||
device().machine().output().set_value(m_output_name, value);
|
||||
else
|
||||
fatalerror("Output name not set!");
|
||||
}
|
||||
@ -46,23 +46,23 @@ void device_output_interface::set_output_value(int value) const
|
||||
void device_output_interface::set_led_value(int value) const
|
||||
{
|
||||
if (m_output_name)
|
||||
output_set_value(m_output_name, value);
|
||||
device().machine().output().set_value(m_output_name, value);
|
||||
else
|
||||
output_set_led_value(m_output_index, value);
|
||||
device().machine().output().set_led_value(m_output_index, value);
|
||||
}
|
||||
|
||||
void device_output_interface::set_lamp_value(int value) const
|
||||
{
|
||||
if (m_output_name)
|
||||
output_set_value(m_output_name, value);
|
||||
device().machine().output().set_value(m_output_name, value);
|
||||
else
|
||||
output_set_lamp_value(m_output_index, value);
|
||||
device().machine().output().set_lamp_value(m_output_index, value);
|
||||
}
|
||||
|
||||
void device_output_interface::set_digit_value(int value) const
|
||||
{
|
||||
if (m_output_name)
|
||||
output_set_value(m_output_name, value);
|
||||
device().machine().output().set_value(m_output_name, value);
|
||||
else
|
||||
output_set_digit_value(m_output_index, value);
|
||||
device().machine().output().set_digit_value(m_output_index, value);
|
||||
}
|
||||
|
@ -331,7 +331,7 @@ void lua_engine::emu_hook_output(lua_State *L)
|
||||
hook_output_cb.set(L, 1);
|
||||
|
||||
if (!output_notifier_set) {
|
||||
output_set_notifier(nullptr, s_output_notifier, this);
|
||||
machine().output().set_notifier(nullptr, s_output_notifier, this);
|
||||
output_notifier_set = true;
|
||||
}
|
||||
}
|
||||
@ -357,7 +357,7 @@ void lua_engine::emu_set_hook(lua_State *L)
|
||||
if (strcmp(hookname, "output") == 0) {
|
||||
hook_output_cb.set(L, 1);
|
||||
if (!output_notifier_set) {
|
||||
output_set_notifier(nullptr, s_output_notifier, this);
|
||||
machine().output().set_notifier(nullptr, s_output_notifier, this);
|
||||
output_notifier_set = true;
|
||||
}
|
||||
} else if (strcmp(hookname, "frame") == 0) {
|
||||
|
@ -218,7 +218,7 @@ void running_machine::start()
|
||||
// initialize basic can't-fail systems here
|
||||
m_configuration = std::make_unique<configuration_manager>(*this);
|
||||
m_input = std::make_unique<input_manager>(*this);
|
||||
output_init(*this);
|
||||
m_output = std::make_unique<output_manager>(*this);
|
||||
m_render = std::make_unique<render_manager>(*this);
|
||||
m_bookkeeping = std::make_unique<bookkeeping_manager>(*this);
|
||||
|
||||
|
@ -88,6 +88,7 @@ class debug_view_manager;
|
||||
class network_manager;
|
||||
class bookkeeping_manager;
|
||||
class configuration_manager;
|
||||
class output_manager;
|
||||
class osd_interface;
|
||||
enum class config_type;
|
||||
|
||||
@ -169,6 +170,7 @@ public:
|
||||
network_manager &network() const { assert(m_network != nullptr); return *m_network; }
|
||||
bookkeeping_manager &bookkeeping() const { assert(m_network != nullptr); return *m_bookkeeping; }
|
||||
configuration_manager &configuration() const { assert(m_configuration != nullptr); return *m_configuration; }
|
||||
output_manager &output() const { assert(m_output != nullptr); return *m_output; }
|
||||
ui_manager &ui() const { assert(m_ui != nullptr); return *m_ui; }
|
||||
tilemap_manager &tilemap() const { assert(m_tilemap != nullptr); return *m_tilemap; }
|
||||
debug_view_manager &debug_view() const { assert(m_debug_view != nullptr); return *m_debug_view; }
|
||||
@ -287,6 +289,7 @@ private:
|
||||
std::unique_ptr<network_manager> m_network; // internal data from network.c
|
||||
std::unique_ptr<bookkeeping_manager> m_bookkeeping;// internal data from bookkeeping.c
|
||||
std::unique_ptr<configuration_manager> m_configuration; // internal data from config.c
|
||||
std::unique_ptr<output_manager> m_output; // internal data from output.c
|
||||
|
||||
// system state
|
||||
machine_phase m_current_phase; // current execution phase
|
||||
|
@ -10,93 +10,33 @@
|
||||
#include "emu.h"
|
||||
#include "coreutil.h"
|
||||
|
||||
/***************************************************************************
|
||||
CONSTANTS
|
||||
***************************************************************************/
|
||||
//**************************************************************************
|
||||
// OUTPUT MANAGER
|
||||
//**************************************************************************
|
||||
|
||||
#define HASH_SIZE 53
|
||||
//-------------------------------------------------
|
||||
// output_manager - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
TYPE DEFINITIONS
|
||||
***************************************************************************/
|
||||
|
||||
class output_notify
|
||||
output_manager::output_manager(running_machine &machine)
|
||||
: m_machine(machine),
|
||||
m_uniqueid(12345)
|
||||
{
|
||||
public:
|
||||
output_notify(output_notifier_func callback, void *param)
|
||||
: m_next(nullptr),
|
||||
m_notifier(callback),
|
||||
m_param(param) { }
|
||||
|
||||
output_notify *next() const { return m_next; }
|
||||
|
||||
output_notify * m_next; /* link to next item */
|
||||
output_notifier_func m_notifier; /* callback to call */
|
||||
void * m_param; /* parameter to pass the callback */
|
||||
};
|
||||
|
||||
|
||||
struct output_item
|
||||
{
|
||||
output_item * next; /* next item in list */
|
||||
std::string name; /* string name of the item */
|
||||
UINT32 hash; /* hash for this item name */
|
||||
UINT32 id; /* unique ID for this item */
|
||||
INT32 value; /* current value */
|
||||
simple_list<output_notify> notifylist; /* list of notifier callbacks */
|
||||
};
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
GLOBAL VARIABLES
|
||||
***************************************************************************/
|
||||
|
||||
static output_item *itemtable[HASH_SIZE];
|
||||
static simple_list<output_notify> global_notifylist;
|
||||
static UINT32 uniqueid = 12345;
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
FUNCTION PROTOTYPES
|
||||
***************************************************************************/
|
||||
|
||||
static void output_pause(running_machine &machine);
|
||||
static void output_resume(running_machine &machine);
|
||||
static void output_exit(running_machine &machine);
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
INLINE FUNCTIONS
|
||||
***************************************************************************/
|
||||
|
||||
/*-------------------------------------------------
|
||||
get_hash - return the hash of an output value
|
||||
-------------------------------------------------*/
|
||||
|
||||
static inline UINT32 get_hash(const char *string)
|
||||
{
|
||||
return core_crc32(0, (UINT8 *)string, (UINT32)strlen(string));
|
||||
/* add pause callback */
|
||||
machine.add_notifier(MACHINE_NOTIFY_PAUSE, machine_notify_delegate(FUNC(output_manager::pause), this));
|
||||
machine.add_notifier(MACHINE_NOTIFY_RESUME, machine_notify_delegate(FUNC(output_manager::resume), this));
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
find_item - find an item based on a string
|
||||
-------------------------------------------------*/
|
||||
|
||||
static inline output_item *find_item(const char *string)
|
||||
output_manager::output_item* output_manager::find_item(const char *string)
|
||||
{
|
||||
UINT32 hash = get_hash(string);
|
||||
output_item *item;
|
||||
|
||||
/* use the hash as a starting point and find an entry */
|
||||
for (item = itemtable[hash % HASH_SIZE]; item != nullptr; item = item->next)
|
||||
if (item->hash == hash && strcmp(string, item->name.c_str()) == 0)
|
||||
return item;
|
||||
for (auto &item : m_itemtable)
|
||||
if (strcmp(string, item.second.name.c_str()) == 0)
|
||||
return &item.second;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
@ -106,85 +46,32 @@ static inline output_item *find_item(const char *string)
|
||||
create_new_item - create a new item
|
||||
-------------------------------------------------*/
|
||||
|
||||
static inline output_item *create_new_item(const char *outname, INT32 value)
|
||||
output_manager::output_item *output_manager::create_new_item(const char *outname, INT32 value)
|
||||
{
|
||||
auto item = global_alloc(output_item);
|
||||
UINT32 hash = get_hash(outname);
|
||||
|
||||
output_item item;
|
||||
|
||||
/* fill in the data */
|
||||
item->next = itemtable[hash % HASH_SIZE];
|
||||
item->name.assign(outname);
|
||||
item->hash = hash;
|
||||
item->id = uniqueid++;
|
||||
item->value = value;
|
||||
item.name = outname;
|
||||
item.id = m_uniqueid++;
|
||||
item.value = value;
|
||||
|
||||
/* add us to the hash table */
|
||||
itemtable[hash % HASH_SIZE] = item;
|
||||
return item;
|
||||
m_itemtable.insert(std::pair<std::string, output_item>(outname, item));
|
||||
return &m_itemtable.find(outname)->second;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
CORE IMPLEMENTATION
|
||||
***************************************************************************/
|
||||
|
||||
/*-------------------------------------------------
|
||||
output_init - initialize everything
|
||||
-------------------------------------------------*/
|
||||
|
||||
void output_init(running_machine &machine)
|
||||
{
|
||||
/* add pause callback */
|
||||
machine.add_notifier(MACHINE_NOTIFY_PAUSE, machine_notify_delegate(FUNC(output_pause), &machine));
|
||||
machine.add_notifier(MACHINE_NOTIFY_RESUME, machine_notify_delegate(FUNC(output_resume), &machine));
|
||||
|
||||
/* get a callback when done */
|
||||
machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(output_exit), &machine));
|
||||
|
||||
/* reset the lists */
|
||||
memset(itemtable, 0, sizeof(itemtable));
|
||||
global_notifylist.reset();
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
output_pause - send pause message
|
||||
-------------------------------------------------*/
|
||||
|
||||
static void output_pause(running_machine &machine)
|
||||
void output_manager::pause()
|
||||
{
|
||||
output_set_value("pause", 1);
|
||||
set_value("pause", 1);
|
||||
}
|
||||
|
||||
static void output_resume(running_machine &machine)
|
||||
void output_manager::resume()
|
||||
{
|
||||
output_set_value("pause", 0);
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
output_exit - cleanup on exit
|
||||
-------------------------------------------------*/
|
||||
|
||||
static void output_exit(running_machine &machine)
|
||||
{
|
||||
output_item *item;
|
||||
int hash;
|
||||
|
||||
/* remove all items */
|
||||
for (hash = 0; hash < HASH_SIZE; hash++)
|
||||
for (item = itemtable[hash]; item != nullptr; )
|
||||
{
|
||||
output_item *next = item->next;
|
||||
|
||||
/* free the name and the item */
|
||||
global_free(item);
|
||||
item = next;
|
||||
}
|
||||
|
||||
/* remove all global notifiers */
|
||||
global_notifylist.reset();
|
||||
set_value("pause", 0);
|
||||
}
|
||||
|
||||
|
||||
@ -192,7 +79,7 @@ static void output_exit(running_machine &machine)
|
||||
output_set_value - set the value of an output
|
||||
-------------------------------------------------*/
|
||||
|
||||
void output_set_value(const char *outname, INT32 value)
|
||||
void output_manager::set_value(const char *outname, INT32 value)
|
||||
{
|
||||
output_item *item = find_item(outname);
|
||||
INT32 oldval;
|
||||
@ -215,12 +102,12 @@ void output_set_value(const char *outname, INT32 value)
|
||||
if (oldval != value)
|
||||
{
|
||||
/* call the local notifiers first */
|
||||
for (output_notify *notify = item->notifylist.first(); notify != nullptr; notify = notify->next())
|
||||
(*notify->m_notifier)(outname, value, notify->m_param);
|
||||
for (auto notify : item->notifylist)
|
||||
(*notify.m_notifier)(outname, value, notify.m_param);
|
||||
|
||||
/* call the global notifiers next */
|
||||
for (output_notify *notify = global_notifylist.first(); notify != nullptr; notify = notify->next())
|
||||
(*notify->m_notifier)(outname, value, notify->m_param);
|
||||
for (auto notify : m_global_notifylist)
|
||||
(*notify.m_notifier)(outname, value, notify.m_param);
|
||||
}
|
||||
}
|
||||
|
||||
@ -230,7 +117,7 @@ void output_set_value(const char *outname, INT32 value)
|
||||
indexed output
|
||||
-------------------------------------------------*/
|
||||
|
||||
void output_set_indexed_value(const char *basename, int index, int value)
|
||||
void output_manager::set_indexed_value(const char *basename, int index, int value)
|
||||
{
|
||||
char buffer[100];
|
||||
char *dest = buffer;
|
||||
@ -247,7 +134,7 @@ void output_set_indexed_value(const char *basename, int index, int value)
|
||||
*dest++ = 0;
|
||||
|
||||
/* set the value */
|
||||
output_set_value(buffer, value);
|
||||
set_value(buffer, value);
|
||||
}
|
||||
|
||||
|
||||
@ -256,7 +143,7 @@ void output_set_indexed_value(const char *basename, int index, int value)
|
||||
output
|
||||
-------------------------------------------------*/
|
||||
|
||||
INT32 output_get_value(const char *outname)
|
||||
INT32 output_manager::get_value(const char *outname)
|
||||
{
|
||||
output_item *item = find_item(outname);
|
||||
|
||||
@ -272,7 +159,7 @@ INT32 output_get_value(const char *outname)
|
||||
indexed output
|
||||
-------------------------------------------------*/
|
||||
|
||||
INT32 output_get_indexed_value(const char *basename, int index)
|
||||
INT32 output_manager::get_indexed_value(const char *basename, int index)
|
||||
{
|
||||
char buffer[100];
|
||||
char *dest = buffer;
|
||||
@ -289,7 +176,7 @@ INT32 output_get_indexed_value(const char *basename, int index)
|
||||
*dest++ = 0;
|
||||
|
||||
/* set the value */
|
||||
return output_get_value(buffer);
|
||||
return get_value(buffer);
|
||||
}
|
||||
|
||||
|
||||
@ -299,8 +186,9 @@ INT32 output_get_indexed_value(const char *basename, int index)
|
||||
if NULL is specified
|
||||
-------------------------------------------------*/
|
||||
|
||||
void output_set_notifier(const char *outname, output_notifier_func callback, void *param)
|
||||
void output_manager::set_notifier(const char *outname, output_notifier_func callback, void *param)
|
||||
{
|
||||
output_notify notify(callback, param);
|
||||
/* if an item is specified, find it */
|
||||
if (outname != nullptr)
|
||||
{
|
||||
@ -309,10 +197,11 @@ void output_set_notifier(const char *outname, output_notifier_func callback, voi
|
||||
/* if no item of that name, create a new one */
|
||||
if (item == nullptr)
|
||||
item = create_new_item(outname, 0);
|
||||
item->notifylist.append(*global_alloc(output_notify(callback, param)));
|
||||
|
||||
item->notifylist.push_back(notify);
|
||||
}
|
||||
else
|
||||
global_notifylist.append(*global_alloc(output_notify(callback, param)));
|
||||
m_global_notifylist.push_back(notify);
|
||||
}
|
||||
|
||||
|
||||
@ -321,15 +210,10 @@ void output_set_notifier(const char *outname, output_notifier_func callback, voi
|
||||
notifier for all outputs
|
||||
-------------------------------------------------*/
|
||||
|
||||
void output_notify_all(output_notifier_func callback, void *param)
|
||||
void output_manager::notify_all(output_notifier_func callback, void *param)
|
||||
{
|
||||
output_item *item;
|
||||
int hash;
|
||||
|
||||
/* remove all items */
|
||||
for (hash = 0; hash < HASH_SIZE; hash++)
|
||||
for (item = itemtable[hash]; item != nullptr; item = item->next)
|
||||
(*callback)(item->name.c_str(), item->value, param);
|
||||
for (auto &item : m_itemtable)
|
||||
(*callback)(item.second.name.c_str(), item.second.value, param);
|
||||
}
|
||||
|
||||
|
||||
@ -338,7 +222,7 @@ void output_notify_all(output_notifier_func callback, void *param)
|
||||
a given name
|
||||
-------------------------------------------------*/
|
||||
|
||||
UINT32 output_name_to_id(const char *outname)
|
||||
UINT32 output_manager::name_to_id(const char *outname)
|
||||
{
|
||||
output_item *item = find_item(outname);
|
||||
|
||||
@ -354,31 +238,12 @@ UINT32 output_name_to_id(const char *outname)
|
||||
to a given unique ID
|
||||
-------------------------------------------------*/
|
||||
|
||||
const char *output_id_to_name(UINT32 id)
|
||||
const char *output_manager::id_to_name(UINT32 id)
|
||||
{
|
||||
output_item *item;
|
||||
int hash;
|
||||
for (auto &item : m_itemtable)
|
||||
if (item.second.id == id)
|
||||
return item.second.name.c_str();
|
||||
|
||||
/* remove all items */
|
||||
for (hash = 0; hash < HASH_SIZE; hash++)
|
||||
for (item = itemtable[hash]; item != nullptr; item = item->next)
|
||||
if (item->id == id)
|
||||
return item->name.c_str();
|
||||
|
||||
/* nothing found, return NULL */
|
||||
/* nothing found, return nullptr */
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
LED CODE
|
||||
***************************************************************************/
|
||||
|
||||
/*-------------------------------------------------
|
||||
set_led_status - set the state of a given LED
|
||||
-------------------------------------------------*/
|
||||
|
||||
void set_led_status(running_machine &machine, int num, int on)
|
||||
{
|
||||
output_set_led_value(num, on);
|
||||
}
|
||||
|
||||
|
136
src/emu/output.h
136
src/emu/output.h
@ -23,77 +23,83 @@
|
||||
|
||||
typedef void (*output_notifier_func)(const char *outname, INT32 value, void *param);
|
||||
|
||||
// ======================> output_manager
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
FUNCTION PROTOTYPES
|
||||
***************************************************************************/
|
||||
|
||||
/* core initialization */
|
||||
void output_init(running_machine &machine);
|
||||
|
||||
/* set the value for a given output */
|
||||
void output_set_value(const char *outname, INT32 value);
|
||||
|
||||
/* set an indexed value for an output (concatenates basename + index) */
|
||||
void output_set_indexed_value(const char *basename, int index, int value);
|
||||
|
||||
/* return the current value for a given output */
|
||||
INT32 output_get_value(const char *outname);
|
||||
|
||||
/* return the current value for a given indexed output */
|
||||
INT32 output_get_indexed_value(const char *outname, int index);
|
||||
|
||||
/* set a notifier on a particular output, or globally if NULL */
|
||||
void output_set_notifier(const char *outname, output_notifier_func callback, void *param);
|
||||
|
||||
/* set a notifier on a particular output, or globally if NULL */
|
||||
void output_notify_all(output_notifier_func callback, void *param);
|
||||
|
||||
/* map a name to a unique ID */
|
||||
UINT32 output_name_to_id(const char *outname);
|
||||
|
||||
/* map a unique ID back to a name */
|
||||
const char *output_id_to_name(UINT32 id);
|
||||
|
||||
/* set the status of an LED */
|
||||
void set_led_status(running_machine &machine, int num, int value);
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
INLINES
|
||||
***************************************************************************/
|
||||
|
||||
static inline void output_set_led_value(int index, int value)
|
||||
class output_manager
|
||||
{
|
||||
output_set_indexed_value("led", index, value ? 1 : 0);
|
||||
}
|
||||
class output_notify
|
||||
{
|
||||
public:
|
||||
output_notify(output_notifier_func callback, void *param)
|
||||
: m_notifier(callback),
|
||||
m_param(param) { }
|
||||
|
||||
static inline void output_set_lamp_value(int index, int value)
|
||||
{
|
||||
output_set_indexed_value("lamp", index, value);
|
||||
}
|
||||
|
||||
static inline void output_set_digit_value(int index, int value)
|
||||
{
|
||||
output_set_indexed_value("digit", index, value);
|
||||
}
|
||||
output_notifier_func m_notifier; // callback to call
|
||||
void * m_param; // parameter to pass the callback
|
||||
};
|
||||
|
||||
|
||||
static inline INT32 output_get_led_value(int index)
|
||||
{
|
||||
return output_get_indexed_value("led", index);
|
||||
}
|
||||
class output_item
|
||||
{
|
||||
public:
|
||||
std::string name; // string name of the item
|
||||
UINT32 hash; // hash for this item name
|
||||
UINT32 id; // unique ID for this item
|
||||
INT32 value; // current value
|
||||
std::vector<output_notify> notifylist; // list of notifier callbacks
|
||||
};
|
||||
|
||||
static inline INT32 output_get_lamp_value(int index)
|
||||
{
|
||||
return output_get_indexed_value("lamp", index);
|
||||
}
|
||||
public:
|
||||
// construction/destruction
|
||||
output_manager(running_machine &machine);
|
||||
|
||||
static inline INT32 output_get_digit_value(int index)
|
||||
{
|
||||
return output_get_indexed_value("digit", index);
|
||||
}
|
||||
// getters
|
||||
running_machine &machine() const { return m_machine; }
|
||||
|
||||
// set the value for a given output
|
||||
void set_value(const char *outname, INT32 value);
|
||||
|
||||
// set an indexed value for an output (concatenates basename + index)
|
||||
void set_indexed_value(const char *basename, int index, int value);
|
||||
|
||||
// return the current value for a given output
|
||||
INT32 get_value(const char *outname);
|
||||
|
||||
// return the current value for a given indexed output
|
||||
INT32 get_indexed_value(const char *outname, int index);
|
||||
|
||||
// set a notifier on a particular output, or globally if NULL
|
||||
void set_notifier(const char *outname, output_notifier_func callback, void *param);
|
||||
|
||||
// set a notifier on a particular output, or globally if NULL
|
||||
void notify_all(output_notifier_func callback, void *param);
|
||||
|
||||
// map a name to a unique ID
|
||||
UINT32 name_to_id(const char *outname);
|
||||
|
||||
// map a unique ID back to a name
|
||||
const char *id_to_name(UINT32 id);
|
||||
|
||||
|
||||
#endif /* __OUTPUT_H__ */
|
||||
// helpers
|
||||
void set_led_value(int index, int value) { set_indexed_value("led", index, value ? 1 : 0); }
|
||||
void set_lamp_value(int index, int value) { set_indexed_value("lamp", index, value); }
|
||||
void set_digit_value(int index, int value) { set_indexed_value("digit", index, value); }
|
||||
INT32 get_led_value(int index) { return get_indexed_value("led", index); }
|
||||
INT32 get_lamp_value(int index) { return get_indexed_value("lamp", index); }
|
||||
INT32 get_digit_value(int index) { return get_indexed_value("digit", index); }
|
||||
|
||||
void pause();
|
||||
void resume();
|
||||
private:
|
||||
output_item *find_item(const char *string);
|
||||
output_item *create_new_item(const char *outname, INT32 value);
|
||||
|
||||
// internal state
|
||||
running_machine & m_machine; // reference to our machine
|
||||
std::unordered_map<std::string,output_item> m_itemtable;
|
||||
std::vector<output_notify> m_global_notifylist;
|
||||
UINT32 m_uniqueid;
|
||||
};
|
||||
|
||||
#endif // __OUTPUT_H__
|
||||
|
@ -2364,7 +2364,7 @@ layout_view::item::item(running_machine &machine, xml_data_node &itemnode, simpl
|
||||
}
|
||||
m_input_mask = xml_get_attribute_int_with_subst(machine, itemnode, "inputmask", 0);
|
||||
if (m_output_name[0] != 0 && m_element != nullptr)
|
||||
output_set_value(m_output_name.c_str(), m_element->default_state());
|
||||
machine.output().set_value(m_output_name.c_str(), m_element->default_state());
|
||||
parse_bounds(machine, xml_get_sibling(itemnode.child, "bounds"), m_rawbounds);
|
||||
parse_color(machine, xml_get_sibling(itemnode.child, "color"), m_color);
|
||||
parse_orientation(machine, xml_get_sibling(itemnode.child, "orientation"), m_orientation);
|
||||
@ -2420,7 +2420,7 @@ int layout_view::item::state() const
|
||||
|
||||
// if configured to an output, fetch the output value
|
||||
if (m_output_name[0] != 0)
|
||||
state = output_get_value(m_output_name.c_str());
|
||||
state = m_element->machine().output().get_value(m_output_name.c_str());
|
||||
|
||||
// if configured to an input, fetch the input value
|
||||
else if (m_input_tag[0] != 0)
|
||||
|
@ -164,7 +164,7 @@ video_manager::video_manager(running_machine &machine)
|
||||
{
|
||||
m_screenless_frame_timer = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(video_manager::screenless_update_callback), this));
|
||||
m_screenless_frame_timer->adjust(screen_device::DEFAULT_FRAME_PERIOD, 0, screen_device::DEFAULT_FRAME_PERIOD);
|
||||
output_set_notifier(nullptr, video_notifier_callback, this);
|
||||
machine.output().set_notifier(nullptr, video_notifier_callback, this);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -389,7 +389,7 @@ WRITE8_MEMBER(bzone_state::bzone_sounds_w)
|
||||
{
|
||||
m_discrete->write(space, BZ_INPUT, data);
|
||||
|
||||
output_set_value("startled", (data >> 6) & 1);
|
||||
machine().output().set_value("startled", (data >> 6) & 1);
|
||||
machine().sound().system_enable(data & 0x20);
|
||||
}
|
||||
|
||||
|
@ -266,7 +266,7 @@ void cinemat_state::speedfrk_sound_w(UINT8 sound_val, UINT8 bits_changed)
|
||||
m_samples->stop(0);
|
||||
|
||||
/* start LED is controlled by bit 0x02 */
|
||||
set_led_status(machine(), 0, ~sound_val & 0x02);
|
||||
machine().output().set_led_value(0, ~sound_val & 0x02);
|
||||
}
|
||||
|
||||
SOUND_RESET_MEMBER( cinemat_state, speedfrk )
|
||||
@ -476,7 +476,7 @@ void cinemat_state::tailg_sound_w(UINT8 sound_val, UINT8 bits_changed)
|
||||
m_samples->start(5, 5);
|
||||
|
||||
/* LED */
|
||||
set_led_status(machine(), 0, m_current_shift & 0x40);
|
||||
machine().output().set_led_value(0, m_current_shift & 0x40);
|
||||
|
||||
/* remember the previous value */
|
||||
m_last_shift = m_current_shift;
|
||||
|
@ -729,7 +729,7 @@ WRITE8_MEMBER(copsnrob_state::copsnrob_misc_w)
|
||||
|
||||
case 0x06:
|
||||
/* One Start */
|
||||
set_led_status(machine(), 0, !special_data);
|
||||
machine().output().set_led_value(0, !special_data);
|
||||
break;
|
||||
|
||||
case 0x07:
|
||||
|
@ -1006,7 +1006,7 @@ WRITE16_MEMBER( dcs_audio_device::dcs_data_bank_select_w )
|
||||
/* bit 11 = sound board led */
|
||||
#if 0
|
||||
if (m_rev != 15)
|
||||
set_led_status(machine(), 2, data & 0x800);
|
||||
machine().output().set_led_value(2, data & 0x800);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -336,7 +336,7 @@ WRITE8_MEMBER(m79amb_state::m79amb_8003_w)
|
||||
{
|
||||
/* Self Test goes low on reset and lights LED */
|
||||
/* LED goes off on pass */
|
||||
output_set_value("SELF_TEST", data & 0x01);
|
||||
machine().output().set_value("SELF_TEST", data & 0x01);
|
||||
m_discrete->write(space, M79AMB_MC_REV_EN, data & 0x02);
|
||||
m_discrete->write(space, M79AMB_MC_CONTROL_EN, data & 0x04);
|
||||
m_discrete->write(space, M79AMB_TANK_TRUCK_JEEP_EN, data & 0x08);
|
||||
|
@ -1272,7 +1272,7 @@ WRITE8_MEMBER(mw8080bw_state::desertgu_audio_2_w)
|
||||
|
||||
m_discrete->write(space, DESERTGU_TRIGGER_CLICK_EN, (data >> 1) & 0x01);
|
||||
|
||||
output_set_value("Player1_Gun_Recoil", (data >> 2) & 0x01);
|
||||
machine().output().set_value("Player1_Gun_Recoil", (data >> 2) & 0x01);
|
||||
|
||||
m_desertgun_controller_select = (data >> 3) & 0x01;
|
||||
|
||||
@ -1581,14 +1581,14 @@ WRITE8_MEMBER(mw8080bw_state::gmissile_audio_1_w)
|
||||
if (rising_bits & 0x10) m_samples2->start(0, 0);
|
||||
|
||||
/* if (data & 0x20) enable LEFT EXPLOSION sound (goes to left speaker) */
|
||||
output_set_value("L_EXP_LIGHT", (data >> 5) & 0x01);
|
||||
machine().output().set_value("L_EXP_LIGHT", (data >> 5) & 0x01);
|
||||
if (rising_bits & 0x20) m_samples1->start(0, 1);
|
||||
|
||||
/* if (data & 0x40) enable LEFT MISSILE sound (goes to left speaker) */
|
||||
if (rising_bits & 0x40) m_samples1->start(0, 0);
|
||||
|
||||
/* if (data & 0x80) enable RIGHT EXPLOSION sound (goes to right speaker) */
|
||||
output_set_value("R_EXP_LIGHT", (data >> 7) & 0x01);
|
||||
machine().output().set_value("R_EXP_LIGHT", (data >> 7) & 0x01);
|
||||
if (rising_bits & 0x80) m_samples2->start(0, 1);
|
||||
|
||||
m_port_1_last = data;
|
||||
@ -3242,7 +3242,7 @@ WRITE8_MEMBER(mw8080bw_state::spcenctr_audio_3_w)
|
||||
|
||||
m_spcenctr_strobe_state = (data >> 2) & 0x01;
|
||||
|
||||
output_set_value("LAMP", (data >> 3) & 0x01);
|
||||
machine().output().set_value("LAMP", (data >> 3) & 0x01);
|
||||
|
||||
m_discrete->write(space, SPCENCTR_BONUS_EN, (data >> 4) & 0x01);
|
||||
|
||||
@ -3309,7 +3309,7 @@ WRITE8_MEMBER(mw8080bw_state::phantom2_audio_2_w)
|
||||
/* if (data & 0x08) enable EXPLOSION sound */
|
||||
if (rising_bits & 0x08) m_samples->start(1, 1);
|
||||
|
||||
output_set_value("EXPLAMP", (data >> 4) & 0x01);
|
||||
machine().output().set_value("EXPLAMP", (data >> 4) & 0x01);
|
||||
|
||||
/* set JET SOUND FREQ((data >> 5) & 0x07) 0, if no jet sound */
|
||||
|
||||
|
@ -297,7 +297,7 @@ WRITE8_MEMBER(skyraid_state::skyraid_sound_w)
|
||||
m_discrete->write(space, SKYRAID_PLANE_SWEEP_EN, data & 0x01);
|
||||
m_discrete->write(space, SKYRAID_MISSILE_EN, data & 0x02);
|
||||
m_discrete->write(space, SKYRAID_EXPLOSION_EN, data & 0x04);
|
||||
set_led_status(machine(), 0, !(data & 0x08));
|
||||
machine().output().set_led_value(0, !(data & 0x08));
|
||||
m_discrete->write(space, SKYRAID_PLANE_ON_EN, data & 0x10);
|
||||
m_discrete->write(space, SKYRAID_ATTRACT_EN, data & 0x20);
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ WRITE8_MEMBER(turbo_state::turbo_sound_b_w)
|
||||
|
||||
/* ACC0-ACC5 */
|
||||
m_turbo_accel = data & 0x3f;
|
||||
output_set_value("tachometer", m_turbo_accel);
|
||||
machine().output().set_value("tachometer", m_turbo_accel);
|
||||
|
||||
/* /AMBU: channel 4 */
|
||||
if ((diff & 0x40) && !(data & 0x40) && !m_samples->playing(4)) m_samples->start(4, 8, true);
|
||||
@ -152,7 +152,7 @@ WRITE8_MEMBER(turbo_state::turbo_sound_c_w)
|
||||
m_turbo_bsel = (data >> 2) & 3;
|
||||
|
||||
/* SPEED0-3 */
|
||||
output_set_value("speed", (data >> 4) & 0x0f);
|
||||
machine().output().set_value("speed", (data >> 4) & 0x0f);
|
||||
|
||||
/* update any samples */
|
||||
turbo_update_samples();
|
||||
|
@ -118,7 +118,7 @@ WRITE8_MEMBER(midcoin24cdjuke_state::digit_w)
|
||||
|
||||
char_data = BITSWAP16(char_data, 13,11,9,15,14,10,12,8,7,6,5,4,3,2,1,0);
|
||||
|
||||
output_set_digit_value(offset, char_data ^ 0xffff);
|
||||
machine().output().set_digit_value(offset, char_data ^ 0xffff);
|
||||
}
|
||||
|
||||
|
||||
|
@ -80,21 +80,21 @@ static const UINT8 led_map[16] =
|
||||
|
||||
WRITE8_MEMBER(namco_30test_state::namco_30test_led_w)
|
||||
{
|
||||
output_set_digit_value(0 + offset * 2, led_map[(data & 0xf0) >> 4]);
|
||||
output_set_digit_value(1 + offset * 2, led_map[(data & 0x0f) >> 0]);
|
||||
machine().output().set_digit_value(0 + offset * 2, led_map[(data & 0xf0) >> 4]);
|
||||
machine().output().set_digit_value(1 + offset * 2, led_map[(data & 0x0f) >> 0]);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(namco_30test_state::namco_30test_led_rank_w)
|
||||
{
|
||||
output_set_digit_value(64 + offset * 2, led_map[(data & 0xf0) >> 4]);
|
||||
output_set_digit_value(65 + offset * 2, led_map[(data & 0x0f) >> 0]);
|
||||
machine().output().set_digit_value(64 + offset * 2, led_map[(data & 0xf0) >> 4]);
|
||||
machine().output().set_digit_value(65 + offset * 2, led_map[(data & 0x0f) >> 0]);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(namco_30test_state::namco_30test_lamps_w)
|
||||
{
|
||||
// d0-d5: ranking, d6: game over, d7: assume marquee lamp
|
||||
for (int i = 0; i < 8; i++)
|
||||
output_set_lamp_value(i, data >> i & 1);
|
||||
machine().output().set_lamp_value(i, data >> i & 1);
|
||||
}
|
||||
|
||||
READ8_MEMBER(namco_30test_state::namco_30test_mux_r)
|
||||
|
@ -61,12 +61,12 @@ UINT8 nixieclock_state::nixie_to_num(UINT16 val)
|
||||
|
||||
inline void nixieclock_state::output_set_nixie_value(int index, int value)
|
||||
{
|
||||
output_set_indexed_value("nixie", index, value);
|
||||
machine().output().set_indexed_value("nixie", index, value);
|
||||
}
|
||||
|
||||
inline void nixieclock_state::output_set_neon_value(int index, int value)
|
||||
{
|
||||
output_set_indexed_value("neon", index, value);
|
||||
machine().output().set_indexed_value("neon", index, value);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(nixieclock_state::nixie_w)
|
||||
|
@ -274,7 +274,7 @@ WRITE8_MEMBER(acefruit_state::acefruit_lamp_w)
|
||||
|
||||
for( i = 0; i < 8; i++ )
|
||||
{
|
||||
output_set_lamp_value( ( offset * 8 ) + i, ( data >> i ) & 1 );
|
||||
machine().output().set_lamp_value( ( offset * 8 ) + i, ( data >> i ) & 1 );
|
||||
}
|
||||
}
|
||||
|
||||
@ -284,7 +284,7 @@ WRITE8_MEMBER(acefruit_state::acefruit_solenoid_w)
|
||||
|
||||
for( i = 0; i < 8; i++ )
|
||||
{
|
||||
output_set_indexed_value( "solenoid", i, ( data >> i ) & 1 );
|
||||
machine().output().set_indexed_value( "solenoid", i, ( data >> i ) & 1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ public:
|
||||
{
|
||||
if (m_led_strobe != m_input_strobe)
|
||||
{
|
||||
output_set_digit_value(m_input_strobe,data);
|
||||
machine().output().set_digit_value(m_input_strobe,data);
|
||||
m_led_strobe = m_input_strobe;
|
||||
}
|
||||
}
|
||||
@ -122,7 +122,7 @@ public:
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
output_set_lamp_value((8*m_input_strobe)+i, ((data & (1 << i)) !=0));
|
||||
machine().output().set_lamp_value((8*m_input_strobe)+i, ((data & (1 << i)) !=0));
|
||||
}
|
||||
m_lamp_strobe = m_input_strobe;
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ WRITE8_MEMBER( acrnsys1_state::acrnsys1_led_segment_w )
|
||||
{
|
||||
UINT8 key_line = m_ttl74145->read();
|
||||
|
||||
output_set_digit_value(key_line, data);
|
||||
machine().output().set_digit_value(key_line, data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -44,15 +44,15 @@ READ8_MEMBER( alesis_state::kb_r )
|
||||
|
||||
WRITE8_MEMBER( alesis_state::led_w )
|
||||
{
|
||||
output_set_value("patt_led", data & 0x01 ? 1 : 0);
|
||||
output_set_value("song_led", data & 0x01 ? 0 : 1);
|
||||
output_set_value("play_led", data & 0x02 ? 0 : 1);
|
||||
output_set_value("record_led",data & 0x04 ? 0 : 1);
|
||||
output_set_value("voice_led", data & 0x08 ? 0 : 1);
|
||||
output_set_value("tune_led", data & 0x10 ? 0 : 1);
|
||||
output_set_value("mix_led", data & 0x20 ? 0 : 1);
|
||||
output_set_value("tempo_led", data & 0x40 ? 0 : 1);
|
||||
output_set_value("midi_led", data & 0x80 ? 0 : 1);
|
||||
machine().output().set_value("patt_led", data & 0x01 ? 1 : 0);
|
||||
machine().output().set_value("song_led", data & 0x01 ? 0 : 1);
|
||||
machine().output().set_value("play_led", data & 0x02 ? 0 : 1);
|
||||
machine().output().set_value("record_led",data & 0x04 ? 0 : 1);
|
||||
machine().output().set_value("voice_led", data & 0x08 ? 0 : 1);
|
||||
machine().output().set_value("tune_led", data & 0x10 ? 0 : 1);
|
||||
machine().output().set_value("mix_led", data & 0x20 ? 0 : 1);
|
||||
machine().output().set_value("tempo_led", data & 0x40 ? 0 : 1);
|
||||
machine().output().set_value("midi_led", data & 0x80 ? 0 : 1);
|
||||
}
|
||||
|
||||
READ8_MEMBER( alesis_state::p3_r )
|
||||
@ -76,13 +76,13 @@ WRITE8_MEMBER( alesis_state::sr16_lcd_w )
|
||||
|
||||
WRITE8_MEMBER( alesis_state::mmt8_led_w )
|
||||
{
|
||||
output_set_value("play_led", data & 0x01 ? 0 : 1);
|
||||
output_set_value("record_led" , data & 0x02 ? 0 : 1);
|
||||
output_set_value("part_led", data & 0x04 ? 0 : 1);
|
||||
output_set_value("edit_led", data & 0x08 ? 0 : 1);
|
||||
output_set_value("song_led", data & 0x10 ? 0 : 1);
|
||||
output_set_value("echo_led", data & 0x20 ? 0 : 1);
|
||||
output_set_value("loop_led", data & 0x40 ? 0 : 1);
|
||||
machine().output().set_value("play_led", data & 0x01 ? 0 : 1);
|
||||
machine().output().set_value("record_led" , data & 0x02 ? 0 : 1);
|
||||
machine().output().set_value("part_led", data & 0x04 ? 0 : 1);
|
||||
machine().output().set_value("edit_led", data & 0x08 ? 0 : 1);
|
||||
machine().output().set_value("song_led", data & 0x10 ? 0 : 1);
|
||||
machine().output().set_value("echo_led", data & 0x20 ? 0 : 1);
|
||||
machine().output().set_value("loop_led", data & 0x40 ? 0 : 1);
|
||||
|
||||
m_leds = data;
|
||||
}
|
||||
@ -95,7 +95,7 @@ READ8_MEMBER( alesis_state::mmt8_led_r )
|
||||
WRITE8_MEMBER( alesis_state::track_led_w )
|
||||
{
|
||||
for (int i=0; i<8; i++)
|
||||
output_set_indexed_value("track_led", i + 1, BIT(data, i));
|
||||
machine().output().set_indexed_value("track_led", i + 1, BIT(data, i));
|
||||
}
|
||||
|
||||
READ8_MEMBER( alesis_state::mmt8_p3_r )
|
||||
|
@ -408,34 +408,34 @@ WRITE8_MEMBER( allied_state::ic4_b_w )
|
||||
{
|
||||
if (!BIT(data, i+4))
|
||||
{
|
||||
output_set_digit_value(i*10, patterns[0]);
|
||||
machine().output().set_digit_value(i*10, patterns[0]);
|
||||
segment = (m_player_score[i] >> 0) & 15;
|
||||
output_set_digit_value(i*10+1, patterns[segment]);
|
||||
machine().output().set_digit_value(i*10+1, patterns[segment]);
|
||||
segment = (m_player_score[i] >> 4) & 15;
|
||||
output_set_digit_value(i*10+2, patterns[segment]);
|
||||
machine().output().set_digit_value(i*10+2, patterns[segment]);
|
||||
segment = (m_player_score[i] >> 8) & 15;
|
||||
output_set_digit_value(i*10+3, patterns[segment]);
|
||||
machine().output().set_digit_value(i*10+3, patterns[segment]);
|
||||
segment = (m_player_score[i] >> 12) & 15;
|
||||
output_set_digit_value(i*10+4, patterns[segment]);
|
||||
machine().output().set_digit_value(i*10+4, patterns[segment]);
|
||||
segment = (m_player_score[i] >> 16) & 15;
|
||||
output_set_digit_value(i*10+5, patterns[segment]);
|
||||
machine().output().set_digit_value(i*10+5, patterns[segment]);
|
||||
}
|
||||
else
|
||||
{
|
||||
output_set_digit_value(i*10, 0);
|
||||
output_set_digit_value(i*10+1, 0);
|
||||
output_set_digit_value(i*10+2, 0);
|
||||
output_set_digit_value(i*10+3, 0);
|
||||
output_set_digit_value(i*10+4, 0);
|
||||
output_set_digit_value(i*10+5, 0);
|
||||
machine().output().set_digit_value(i*10, 0);
|
||||
machine().output().set_digit_value(i*10+1, 0);
|
||||
machine().output().set_digit_value(i*10+2, 0);
|
||||
machine().output().set_digit_value(i*10+3, 0);
|
||||
machine().output().set_digit_value(i*10+4, 0);
|
||||
machine().output().set_digit_value(i*10+5, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// doesn't seem to be a strobe for the credits display
|
||||
segment = (m_player_score[4] >> 0) & 15;
|
||||
output_set_digit_value(40, patterns[segment]);
|
||||
machine().output().set_digit_value(40, patterns[segment]);
|
||||
segment = (m_player_score[4] >> 4) & 15;
|
||||
output_set_digit_value(41, patterns[segment]);
|
||||
machine().output().set_digit_value(41, patterns[segment]);
|
||||
|
||||
// PB0-3 - player 1-4 LED - to do
|
||||
}
|
||||
@ -569,12 +569,12 @@ WRITE8_MEMBER( allied_state::ic8_a_w )
|
||||
// PB0-4 = ball 1-5 LED; PB5 = shoot again lamp
|
||||
WRITE8_MEMBER( allied_state::ic8_b_w )
|
||||
{
|
||||
output_set_value("led1", !BIT(data, 0));
|
||||
output_set_value("led2", !BIT(data, 1));
|
||||
output_set_value("led3", !BIT(data, 2));
|
||||
output_set_value("led4", !BIT(data, 3));
|
||||
output_set_value("led5", !BIT(data, 4));
|
||||
output_set_value("led6", !BIT(data, 5));
|
||||
machine().output().set_value("led1", !BIT(data, 0));
|
||||
machine().output().set_value("led2", !BIT(data, 1));
|
||||
machine().output().set_value("led3", !BIT(data, 2));
|
||||
machine().output().set_value("led4", !BIT(data, 3));
|
||||
machine().output().set_value("led5", !BIT(data, 4));
|
||||
machine().output().set_value("led6", !BIT(data, 5));
|
||||
}
|
||||
|
||||
// this line not emulated in PinMAME, maybe it isn't needed
|
||||
@ -604,7 +604,7 @@ void allied_state::machine_reset()
|
||||
m_ic6a2 = 0;
|
||||
m_ic6b4 = 0;
|
||||
m_ic6b7 = 0;
|
||||
output_set_value("led0", 1); //1=off
|
||||
machine().output().set_value("led0", 1); //1=off
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( allied, allied_state )
|
||||
|
@ -594,10 +594,10 @@ WRITE8_MEMBER(amaticmg_state::out_a_w)
|
||||
-x-- ---- HOLD4
|
||||
*/
|
||||
|
||||
output_set_lamp_value(0, (data >> 3) & 1); /* START */
|
||||
output_set_lamp_value(1, (data >> 4) & 1); /* BET */
|
||||
output_set_lamp_value(2, (data >> 5) & 1); /* HOLD3 */
|
||||
output_set_lamp_value(3, (data >> 6) & 1); /* HOLD4 */
|
||||
machine().output().set_lamp_value(0, (data >> 3) & 1); /* START */
|
||||
machine().output().set_lamp_value(1, (data >> 4) & 1); /* BET */
|
||||
machine().output().set_lamp_value(2, (data >> 5) & 1); /* HOLD3 */
|
||||
machine().output().set_lamp_value(3, (data >> 6) & 1); /* HOLD4 */
|
||||
|
||||
logerror("port A: %2X\n", data);
|
||||
}
|
||||
@ -615,9 +615,9 @@ WRITE8_MEMBER(amaticmg_state::out_c_w)
|
||||
x--- ---- Hopper motor
|
||||
--x- x--- (unknown)
|
||||
*/
|
||||
output_set_lamp_value(4, (data >> 1) & 1); /* HOLD1 */
|
||||
output_set_lamp_value(5, (data >> 4) & 1); /* HOLD2 */
|
||||
output_set_lamp_value(6, (data >> 6) & 1); /* CANCEL */
|
||||
machine().output().set_lamp_value(4, (data >> 1) & 1); /* HOLD1 */
|
||||
machine().output().set_lamp_value(5, (data >> 4) & 1); /* HOLD2 */
|
||||
machine().output().set_lamp_value(6, (data >> 6) & 1); /* CANCEL */
|
||||
|
||||
// machine().bookkeeping().coin_counter_w(0, data & 0x04); /* Coin In */
|
||||
// machine().bookkeeping().coin_counter_w(1, data & 0x01); /* Coin Out */
|
||||
|
@ -106,7 +106,7 @@ TIMER_CALLBACK_MEMBER(amico2k_state::led_refresh)
|
||||
{
|
||||
if (m_ls145_p > 3)
|
||||
{
|
||||
output_set_digit_value(m_ls145_p - 4, m_segment);
|
||||
machine().output().set_digit_value(m_ls145_p - 4, m_segment);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -909,7 +909,7 @@ WRITE8_MEMBER( cd32_state::akiko_cia_0_port_a_write )
|
||||
m_cdda->set_output_gain(0, BIT(data, 0) ? 0.0 : 1.0);
|
||||
|
||||
// bit 1, power led
|
||||
set_led_status(machine(), 0, BIT(data, 1) ? 0 : 1);
|
||||
machine().output().set_led_value(0, BIT(data, 1) ? 0 : 1);
|
||||
|
||||
handle_cd32_joystick_cia(machine(), data, m_cia_0->read(space, 2));
|
||||
}
|
||||
|
@ -479,10 +479,10 @@ WRITE8_MEMBER(ampoker2_state::ampoker2_port31_w)
|
||||
BIT 4 = TWL_YELL ;Tower Light YELLOW
|
||||
--------------------------------------------------*/
|
||||
{
|
||||
output_set_lamp_value(1, ((data >> 1) & 1)); /* Lamp 1 - BET/RED */
|
||||
output_set_lamp_value(6, ((data >> 2) & 1)); /* Lamp 6 - HOLD 4 */
|
||||
output_set_lamp_value(4, ((data >> 3) & 1)); /* Lamp 4 - HOLD 2 */
|
||||
output_set_lamp_value(8, ((data >> 4) & 1)); /* Lamp 8 - TWR.YELLOW */
|
||||
machine().output().set_lamp_value(1, ((data >> 1) & 1)); /* Lamp 1 - BET/RED */
|
||||
machine().output().set_lamp_value(6, ((data >> 2) & 1)); /* Lamp 6 - HOLD 4 */
|
||||
machine().output().set_lamp_value(4, ((data >> 3) & 1)); /* Lamp 4 - HOLD 2 */
|
||||
machine().output().set_lamp_value(8, ((data >> 4) & 1)); /* Lamp 8 - TWR.YELLOW */
|
||||
}
|
||||
|
||||
|
||||
@ -497,7 +497,7 @@ WRITE8_MEMBER(ampoker2_state::ampoker2_port32_w)
|
||||
BIT 4 =
|
||||
--------------------------------------------------*/
|
||||
{
|
||||
output_set_lamp_value(5, ((data >> 3) & 1)); /* Lamp 5 - HOLD 3 */
|
||||
machine().output().set_lamp_value(5, ((data >> 3) & 1)); /* Lamp 5 - HOLD 3 */
|
||||
}
|
||||
|
||||
|
||||
@ -526,7 +526,7 @@ WRITE8_MEMBER(ampoker2_state::ampoker2_port34_w)
|
||||
BIT 4 = LAMP_2 ;Lamp 3 (BLACK)
|
||||
--------------------------------------------------*/
|
||||
{
|
||||
output_set_lamp_value(2, ((data >> 4) & 1)); /* Lamp 2 - BLACK */
|
||||
machine().output().set_lamp_value(2, ((data >> 4) & 1)); /* Lamp 2 - BLACK */
|
||||
}
|
||||
|
||||
|
||||
@ -555,10 +555,10 @@ WRITE8_MEMBER(ampoker2_state::ampoker2_port36_w)
|
||||
BIT 4 = LAMP_3 ;Lamp 3 (HOLD1)
|
||||
--------------------------------------------------*/
|
||||
{
|
||||
output_set_lamp_value(9, (data & 1)); /* Lamp 9 - TWR.GREEN */
|
||||
output_set_lamp_value(7, ((data >> 2) & 1)); /* Lamp 7 - HOLD 5 */
|
||||
output_set_lamp_value(0, ((data >> 3) & 1)); /* Lamp 0 - DEAL */
|
||||
output_set_lamp_value(3, ((data >> 4) & 1)); /* Lamp 3 - HOLD 1 */
|
||||
machine().output().set_lamp_value(9, (data & 1)); /* Lamp 9 - TWR.GREEN */
|
||||
machine().output().set_lamp_value(7, ((data >> 2) & 1)); /* Lamp 7 - HOLD 5 */
|
||||
machine().output().set_lamp_value(0, ((data >> 3) & 1)); /* Lamp 0 - DEAL */
|
||||
machine().output().set_lamp_value(3, ((data >> 4) & 1)); /* Lamp 3 - HOLD 1 */
|
||||
}
|
||||
|
||||
|
||||
|
@ -540,8 +540,8 @@ READ8_MEMBER(aristmk4_state::u3_p2)
|
||||
int u3_p2_ret= ioport("5002")->read();
|
||||
int u3_p3_ret= ioport("5003")->read();
|
||||
|
||||
output_set_lamp_value(19, (u3_p2_ret >> 4) & 1); //auditkey light
|
||||
output_set_lamp_value(20, (u3_p3_ret >> 2) & 1); //jackpotkey light
|
||||
machine().output().set_lamp_value(19, (u3_p2_ret >> 4) & 1); //auditkey light
|
||||
machine().output().set_lamp_value(20, (u3_p3_ret >> 2) & 1); //jackpotkey light
|
||||
|
||||
if (m_u3_p0_w&0x20) // DOPTE on
|
||||
{
|
||||
@ -695,10 +695,10 @@ WRITE8_MEMBER(aristmk4_state::mkiv_pia_outb)
|
||||
switch(i+1)
|
||||
{
|
||||
case 4:
|
||||
output_set_value("creditspendmeter", emet[i]);
|
||||
machine().output().set_value("creditspendmeter", emet[i]);
|
||||
break;
|
||||
case 5:
|
||||
output_set_value("creditoutmeter", emet[i]);
|
||||
machine().output().set_value("creditoutmeter", emet[i]);
|
||||
break;
|
||||
default:
|
||||
printf("Unhandled Mechanical meter %d pulse: %02d\n",i+1, emet[i]);
|
||||
@ -713,10 +713,10 @@ WRITE8_MEMBER(aristmk4_state::mkiv_pia_outb)
|
||||
switch(i+1)
|
||||
{
|
||||
case 4:
|
||||
output_set_value("creditspendmeter", 0);
|
||||
machine().output().set_value("creditspendmeter", 0);
|
||||
break;
|
||||
case 5:
|
||||
output_set_value("creditoutmeter", 0);
|
||||
machine().output().set_value("creditoutmeter", 0);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -748,7 +748,7 @@ TIMER_CALLBACK_MEMBER(aristmk4_state::coin_input_reset)
|
||||
TIMER_CALLBACK_MEMBER(aristmk4_state::hopper_reset)
|
||||
{
|
||||
m_hopper_motor = 0x01;
|
||||
output_set_value("hopper_motor", m_hopper_motor);
|
||||
machine().output().set_value("hopper_motor", m_hopper_motor);
|
||||
}
|
||||
|
||||
// Port A read (SW1)
|
||||
@ -808,7 +808,7 @@ READ8_MEMBER(aristmk4_state::via_b_r)
|
||||
ret=ret^0x40;
|
||||
machine().scheduler().timer_set(attotime::from_msec(175), timer_expired_delegate(FUNC(aristmk4_state::hopper_reset),this));
|
||||
m_hopper_motor=0x02;
|
||||
output_set_value("hopper_motor", m_hopper_motor);
|
||||
machine().output().set_value("hopper_motor", m_hopper_motor);
|
||||
break;
|
||||
case 0x01:
|
||||
break; //default
|
||||
@ -918,42 +918,42 @@ WRITE_LINE_MEMBER(aristmk4_state::via_cb2_w)
|
||||
else if (m_hopper_motor<0x02)
|
||||
m_hopper_motor=state;
|
||||
|
||||
output_set_value("hopper_motor", m_hopper_motor); // stop motor
|
||||
machine().output().set_value("hopper_motor", m_hopper_motor); // stop motor
|
||||
}
|
||||
|
||||
// Lamp output
|
||||
|
||||
WRITE8_MEMBER(aristmk4_state::pblp_out)
|
||||
{
|
||||
output_set_lamp_value(1, (data) & 1);
|
||||
output_set_lamp_value(5, (data >> 1) & 1);
|
||||
output_set_lamp_value(9, (data >> 2) & 1);
|
||||
output_set_lamp_value(11,(data >> 3) & 1);
|
||||
output_set_lamp_value(3, (data >> 4) & 1);
|
||||
output_set_lamp_value(4, (data >> 5) & 1);
|
||||
output_set_lamp_value(2, (data >> 6) & 1);
|
||||
output_set_lamp_value(10,(data >> 7) & 1);
|
||||
machine().output().set_lamp_value(1, (data) & 1);
|
||||
machine().output().set_lamp_value(5, (data >> 1) & 1);
|
||||
machine().output().set_lamp_value(9, (data >> 2) & 1);
|
||||
machine().output().set_lamp_value(11,(data >> 3) & 1);
|
||||
machine().output().set_lamp_value(3, (data >> 4) & 1);
|
||||
machine().output().set_lamp_value(4, (data >> 5) & 1);
|
||||
machine().output().set_lamp_value(2, (data >> 6) & 1);
|
||||
machine().output().set_lamp_value(10,(data >> 7) & 1);
|
||||
//logerror("Lights port A %02X\n",data);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(aristmk4_state::pbltlp_out)
|
||||
{
|
||||
output_set_lamp_value(8, (data) & 1);
|
||||
output_set_lamp_value(12, (data >> 1) & 1);
|
||||
output_set_lamp_value(6, (data >> 2) & 1);
|
||||
output_set_lamp_value(7, (data >> 3) & 1);
|
||||
output_set_lamp_value(14, (data >> 4) & 1); // light tower
|
||||
output_set_lamp_value(15, (data >> 5) & 1); // light tower
|
||||
output_set_lamp_value(16, (data >> 6) & 1); // light tower
|
||||
output_set_lamp_value(17, (data >> 7) & 1); // light tower
|
||||
machine().output().set_lamp_value(8, (data) & 1);
|
||||
machine().output().set_lamp_value(12, (data >> 1) & 1);
|
||||
machine().output().set_lamp_value(6, (data >> 2) & 1);
|
||||
machine().output().set_lamp_value(7, (data >> 3) & 1);
|
||||
machine().output().set_lamp_value(14, (data >> 4) & 1); // light tower
|
||||
machine().output().set_lamp_value(15, (data >> 5) & 1); // light tower
|
||||
machine().output().set_lamp_value(16, (data >> 6) & 1); // light tower
|
||||
machine().output().set_lamp_value(17, (data >> 7) & 1); // light tower
|
||||
//logerror("Lights port B: %02X\n",data);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(aristmk4_state::mlamps)
|
||||
{
|
||||
/* TAKE WIN AND GAMBLE LAMPS */
|
||||
output_set_lamp_value(18, (data >> 5) & 1);
|
||||
output_set_lamp_value(13, (data >> 6) & 1);
|
||||
machine().output().set_lamp_value(18, (data >> 5) & 1);
|
||||
machine().output().set_lamp_value(13, (data >> 6) & 1);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(aristmk4_state::zn434_w)
|
||||
|
@ -226,7 +226,7 @@ WRITE8_MEMBER(asteroid_state::llander_led_w)
|
||||
};
|
||||
|
||||
for (int i = 0; i < 5; i++)
|
||||
output_set_value(lampname[i], (data >> (4 - i)) & 1);
|
||||
machine().output().set_value(lampname[i], (data >> (4 - i)) & 1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -224,17 +224,17 @@ WRITE16_MEMBER(astrocorp_state::showhand_outputs_w)
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
machine().bookkeeping().coin_counter_w(0, (data & 0x0004)); // coin counter
|
||||
set_led_status(machine(), 0, (data & 0x0008)); // you win
|
||||
machine().output().set_led_value(0, (data & 0x0008)); // you win
|
||||
if ((data & 0x0010)) machine().bookkeeping().increment_dispensed_tickets(1); // coin out
|
||||
set_led_status(machine(), 1, (data & 0x0020)); // coin/hopper jam
|
||||
machine().output().set_led_value(1, (data & 0x0020)); // coin/hopper jam
|
||||
}
|
||||
if (ACCESSING_BITS_8_15)
|
||||
{
|
||||
set_led_status(machine(), 2, (data & 0x0100)); // bet
|
||||
set_led_status(machine(), 3, (data & 0x0800)); // start
|
||||
set_led_status(machine(), 4, (data & 0x1000)); // ? select/choose
|
||||
set_led_status(machine(), 5, (data & 0x2000)); // ? select/choose
|
||||
set_led_status(machine(), 6, (data & 0x4000)); // look
|
||||
machine().output().set_led_value(2, (data & 0x0100)); // bet
|
||||
machine().output().set_led_value(3, (data & 0x0800)); // start
|
||||
machine().output().set_led_value(4, (data & 0x1000)); // ? select/choose
|
||||
machine().output().set_led_value(5, (data & 0x2000)); // ? select/choose
|
||||
machine().output().set_led_value(6, (data & 0x4000)); // look
|
||||
}
|
||||
// popmessage("%04X",data);
|
||||
}
|
||||
@ -264,18 +264,18 @@ WRITE16_MEMBER(astrocorp_state::skilldrp_outputs_w)
|
||||
machine().bookkeeping().coin_counter_w(1, (data & 0x0004)); // key out |
|
||||
machine().device<ticket_dispenser_device>("hopper")->write(space, 0, (data & 0x0008)<<4); // hopper motor?
|
||||
// (data & 0x0010) // hopper?
|
||||
set_led_status(machine(), 0, (data & 0x0020)); // error lamp (coin/hopper jam: "call attendant")
|
||||
machine().output().set_led_value(0, (data & 0x0020)); // error lamp (coin/hopper jam: "call attendant")
|
||||
machine().device<ticket_dispenser_device>("ticket")->write(space, 0, data & 0x0080); // ticket motor?
|
||||
}
|
||||
if (ACCESSING_BITS_8_15)
|
||||
{
|
||||
// lamps:
|
||||
set_led_status(machine(), 1, (data & 0x0100)); // select
|
||||
set_led_status(machine(), 2, (data & 0x0400)); // take
|
||||
set_led_status(machine(), 3, (data & 0x0800)); // bet
|
||||
set_led_status(machine(), 4, (data & 0x1000)); // start
|
||||
set_led_status(machine(), 5, (data & 0x4000)); // win / test
|
||||
set_led_status(machine(), 6, (data & 0x8000)); // ticket?
|
||||
machine().output().set_led_value(1, (data & 0x0100)); // select
|
||||
machine().output().set_led_value(2, (data & 0x0400)); // take
|
||||
machine().output().set_led_value(3, (data & 0x0800)); // bet
|
||||
machine().output().set_led_value(4, (data & 0x1000)); // start
|
||||
machine().output().set_led_value(5, (data & 0x4000)); // win / test
|
||||
machine().output().set_led_value(6, (data & 0x8000)); // ticket?
|
||||
}
|
||||
|
||||
// popmessage("%04X",data);
|
||||
|
@ -170,13 +170,13 @@ WRITE8_MEMBER(astrocde_state::seawolf2_lamps_w)
|
||||
/* ------x- torpedo 3 available */
|
||||
/* -------x torpedo 4 available */
|
||||
|
||||
output_set_lamp_value((offset ^ 1) * 7 + 0, ( data >> 5) & 1); /* 0/7 = hit lamp */
|
||||
output_set_lamp_value((offset ^ 1) * 7 + 1, (~data >> 4) & 1); /* 1/8 = reload lamp */
|
||||
output_set_lamp_value((offset ^ 1) * 7 + 2, ( data >> 4) & 1); /* 2/9 = ready lamp */
|
||||
output_set_lamp_value((offset ^ 1) * 7 + 3, ( data >> 3) & 1); /* 3/10 = torpedo 1 lamp */
|
||||
output_set_lamp_value((offset ^ 1) * 7 + 4, ( data >> 2) & 1); /* 4/11 = torpedo 2 lamp */
|
||||
output_set_lamp_value((offset ^ 1) * 7 + 5, ( data >> 1) & 1); /* 5/12 = torpedo 3 lamp */
|
||||
output_set_lamp_value((offset ^ 1) * 7 + 6, ( data >> 0) & 1); /* 6/13 = torpedo 4 lamp */
|
||||
machine().output().set_lamp_value((offset ^ 1) * 7 + 0, ( data >> 5) & 1); /* 0/7 = hit lamp */
|
||||
machine().output().set_lamp_value((offset ^ 1) * 7 + 1, (~data >> 4) & 1); /* 1/8 = reload lamp */
|
||||
machine().output().set_lamp_value((offset ^ 1) * 7 + 2, ( data >> 4) & 1); /* 2/9 = ready lamp */
|
||||
machine().output().set_lamp_value((offset ^ 1) * 7 + 3, ( data >> 3) & 1); /* 3/10 = torpedo 1 lamp */
|
||||
machine().output().set_lamp_value((offset ^ 1) * 7 + 4, ( data >> 2) & 1); /* 4/11 = torpedo 2 lamp */
|
||||
machine().output().set_lamp_value((offset ^ 1) * 7 + 5, ( data >> 1) & 1); /* 5/12 = torpedo 3 lamp */
|
||||
machine().output().set_lamp_value((offset ^ 1) * 7 + 6, ( data >> 0) & 1); /* 6/13 = torpedo 4 lamp */
|
||||
}
|
||||
|
||||
|
||||
@ -330,12 +330,12 @@ READ8_MEMBER(astrocde_state::gorf_io_2_r)
|
||||
|
||||
switch ((offset >> 9) & 7)
|
||||
{
|
||||
case 0: output_set_lamp_value(0, data); break;
|
||||
case 1: output_set_lamp_value(1, data); break;
|
||||
case 2: output_set_lamp_value(2, data); break;
|
||||
case 3: output_set_lamp_value(3, data); break;
|
||||
case 4: output_set_lamp_value(4, data); break;
|
||||
case 5: output_set_lamp_value(5, data); break;
|
||||
case 0: machine().output().set_lamp_value(0, data); break;
|
||||
case 1: machine().output().set_lamp_value(1, data); break;
|
||||
case 2: machine().output().set_lamp_value(2, data); break;
|
||||
case 3: machine().output().set_lamp_value(3, data); break;
|
||||
case 4: machine().output().set_lamp_value(4, data); break;
|
||||
case 5: machine().output().set_lamp_value(5, data); break;
|
||||
case 6: /* n/c */ break;
|
||||
case 7: osd_printf_debug("io_2:%d\n", data); break;
|
||||
}
|
||||
@ -359,8 +359,8 @@ READ8_MEMBER(astrocde_state::robby_io_r)
|
||||
case 0: machine().bookkeeping().coin_counter_w(0, data); break;
|
||||
case 1: machine().bookkeeping().coin_counter_w(1, data); break;
|
||||
case 2: machine().bookkeeping().coin_counter_w(2, data); break;
|
||||
case 6: set_led_status(machine(), 0, data); break;
|
||||
case 7: set_led_status(machine(), 1, data); break;
|
||||
case 6: machine().output().set_led_value(0, data); break;
|
||||
case 7: machine().output().set_led_value(1, data); break;
|
||||
}
|
||||
return 0xff;
|
||||
}
|
||||
@ -377,20 +377,20 @@ READ8_MEMBER(astrocde_state::profpac_io_1_r)
|
||||
{
|
||||
machine().bookkeeping().coin_counter_w(0, (offset >> 8) & 1);
|
||||
machine().bookkeeping().coin_counter_w(1, (offset >> 9) & 1);
|
||||
set_led_status(machine(), 0, (offset >> 10) & 1);
|
||||
set_led_status(machine(), 1, (offset >> 11) & 1);
|
||||
machine().output().set_led_value(0, (offset >> 10) & 1);
|
||||
machine().output().set_led_value(1, (offset >> 11) & 1);
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER(astrocde_state::profpac_io_2_r)
|
||||
{
|
||||
output_set_lamp_value(0, (offset >> 8) & 1); /* left lamp A */
|
||||
output_set_lamp_value(1, (offset >> 9) & 1); /* left lamp B */
|
||||
output_set_lamp_value(2, (offset >> 10) & 1); /* left lamp C */
|
||||
output_set_lamp_value(3, (offset >> 12) & 1); /* right lamp A */
|
||||
output_set_lamp_value(4, (offset >> 13) & 1); /* right lamp B */
|
||||
output_set_lamp_value(5, (offset >> 14) & 1); /* right lamp C */
|
||||
machine().output().set_lamp_value(0, (offset >> 8) & 1); /* left lamp A */
|
||||
machine().output().set_lamp_value(1, (offset >> 9) & 1); /* left lamp B */
|
||||
machine().output().set_lamp_value(2, (offset >> 10) & 1); /* left lamp C */
|
||||
machine().output().set_lamp_value(3, (offset >> 12) & 1); /* right lamp A */
|
||||
machine().output().set_lamp_value(4, (offset >> 13) & 1); /* right lamp B */
|
||||
machine().output().set_lamp_value(5, (offset >> 14) & 1); /* right lamp C */
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
@ -431,8 +431,8 @@ READ8_MEMBER(astrocde_state::demndrgn_io_r)
|
||||
{
|
||||
machine().bookkeeping().coin_counter_w(0, (offset >> 8) & 1);
|
||||
machine().bookkeeping().coin_counter_w(1, (offset >> 9) & 1);
|
||||
set_led_status(machine(), 0, (offset >> 10) & 1);
|
||||
set_led_status(machine(), 1, (offset >> 11) & 1);
|
||||
machine().output().set_led_value(0, (offset >> 10) & 1);
|
||||
machine().output().set_led_value(1, (offset >> 11) & 1);
|
||||
m_input_select = (offset >> 12) & 1;
|
||||
return 0xff;
|
||||
}
|
||||
@ -472,19 +472,19 @@ WRITE8_MEMBER(astrocde_state::tenpindx_lamp_w)
|
||||
/* lamps */
|
||||
if (offset == 0)
|
||||
{
|
||||
output_set_lamp_value(0, (data >> 2) & 1);
|
||||
output_set_lamp_value(1, (data >> 3) & 1);
|
||||
output_set_lamp_value(2, (data >> 4) & 1);
|
||||
output_set_lamp_value(3, (data >> 5) & 1);
|
||||
output_set_lamp_value(4, (data >> 6) & 1);
|
||||
output_set_lamp_value(5, (data >> 7) & 1);
|
||||
machine().output().set_lamp_value(0, (data >> 2) & 1);
|
||||
machine().output().set_lamp_value(1, (data >> 3) & 1);
|
||||
machine().output().set_lamp_value(2, (data >> 4) & 1);
|
||||
machine().output().set_lamp_value(3, (data >> 5) & 1);
|
||||
machine().output().set_lamp_value(4, (data >> 6) & 1);
|
||||
machine().output().set_lamp_value(5, (data >> 7) & 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
output_set_lamp_value(6, (data >> 0) & 1);
|
||||
output_set_lamp_value(7, (data >> 1) & 1);
|
||||
output_set_lamp_value(8, (data >> 2) & 1);
|
||||
output_set_lamp_value(9, (data >> 3) & 1);
|
||||
machine().output().set_lamp_value(6, (data >> 0) & 1);
|
||||
machine().output().set_lamp_value(7, (data >> 1) & 1);
|
||||
machine().output().set_lamp_value(8, (data >> 2) & 1);
|
||||
machine().output().set_lamp_value(9, (data >> 3) & 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -501,15 +501,15 @@ WRITE8_MEMBER(astrocde_state::tenpindx_lights_w)
|
||||
/* "flashlights" */
|
||||
int which = data >> 4;
|
||||
|
||||
output_set_lamp_value(10, (which == 1));
|
||||
output_set_lamp_value(11, (which == 2));
|
||||
output_set_lamp_value(12, (which == 3));
|
||||
output_set_lamp_value(13, (which == 4));
|
||||
output_set_lamp_value(14, (which == 5));
|
||||
output_set_lamp_value(15, (which == 6));
|
||||
output_set_lamp_value(16, (which == 7));
|
||||
output_set_lamp_value(17, (which == 8));
|
||||
output_set_lamp_value(18, (which == 9));
|
||||
machine().output().set_lamp_value(10, (which == 1));
|
||||
machine().output().set_lamp_value(11, (which == 2));
|
||||
machine().output().set_lamp_value(12, (which == 3));
|
||||
machine().output().set_lamp_value(13, (which == 4));
|
||||
machine().output().set_lamp_value(14, (which == 5));
|
||||
machine().output().set_lamp_value(15, (which == 6));
|
||||
machine().output().set_lamp_value(16, (which == 7));
|
||||
machine().output().set_lamp_value(17, (which == 8));
|
||||
machine().output().set_lamp_value(18, (which == 9));
|
||||
}
|
||||
|
||||
|
||||
|
@ -372,13 +372,13 @@ TIMER_DEVICE_CALLBACK_MEMBER( atari_s1_state::nmi )
|
||||
// Player number
|
||||
char wordnum[8];
|
||||
sprintf(wordnum,"text%d",m_out_offs>>2);
|
||||
output_set_value(wordnum, !BIT(patterns[m_p_ram[m_out_offs]&15], 6)); // uses 'g' segment
|
||||
machine().output().set_value(wordnum, !BIT(patterns[m_p_ram[m_out_offs]&15], 6)); // uses 'g' segment
|
||||
}
|
||||
else
|
||||
{
|
||||
// Digits
|
||||
output_set_digit_value(m_out_offs << 1, patterns[m_p_ram[m_out_offs]>>4]);
|
||||
output_set_digit_value((m_out_offs << 1)+1, patterns[m_p_ram[m_out_offs]&15]);
|
||||
machine().output().set_digit_value(m_out_offs << 1, patterns[m_p_ram[m_out_offs]>>4]);
|
||||
machine().output().set_digit_value((m_out_offs << 1)+1, patterns[m_p_ram[m_out_offs]&15]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -350,7 +350,7 @@ WRITE8_MEMBER( atari_s2_state::display_w )
|
||||
{
|
||||
data &= 7;
|
||||
for (UINT8 i = 0; i < 7; i++)
|
||||
output_set_digit_value(i * 10 + data, m_segment[i]);
|
||||
machine().output().set_digit_value(i * 10 + data, m_segment[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -623,7 +623,7 @@ WRITE8_MEMBER( st_state::ikbd_port3_w )
|
||||
*/
|
||||
|
||||
// caps lock led
|
||||
set_led_status(machine(), 1, BIT(data, 0));
|
||||
machine().output().set_led_value(1, BIT(data, 0));
|
||||
|
||||
// keyboard row select
|
||||
m_ikbd_keylatch = (m_ikbd_keylatch & 0xff00) | data;
|
||||
|
@ -415,7 +415,7 @@ READ8_MEMBER(atarisy1_state::via_pb_r)
|
||||
|
||||
WRITE8_MEMBER(atarisy1_state::led_w)
|
||||
{
|
||||
set_led_status(machine(), offset, ~data & 1);
|
||||
machine().output().set_led_value(offset, ~data & 1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -338,8 +338,8 @@ READ8_MEMBER(atarisy2_state::switch_6502_r)
|
||||
|
||||
WRITE8_MEMBER(atarisy2_state::switch_6502_w)
|
||||
{
|
||||
set_led_status(machine(), 0, data & 0x04);
|
||||
set_led_status(machine(), 1, data & 0x08);
|
||||
machine().output().set_led_value(0, data & 0x04);
|
||||
machine().output().set_led_value(1, data & 0x08);
|
||||
if (m_has_tms5220)
|
||||
{
|
||||
data = 12 | ((data >> 5) & 1);
|
||||
|
@ -97,17 +97,17 @@ WRITE8_MEMBER(avalnche_state::catch_coin_counter_w)
|
||||
|
||||
WRITE8_MEMBER(avalnche_state::avalance_credit_1_lamp_w)
|
||||
{
|
||||
set_led_status(machine(), 0, data & 1);
|
||||
machine().output().set_led_value(0, data & 1);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(avalnche_state::avalance_credit_2_lamp_w)
|
||||
{
|
||||
set_led_status(machine(), 1, data & 1);
|
||||
machine().output().set_led_value(1, data & 1);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(avalnche_state::avalance_start_lamp_w)
|
||||
{
|
||||
set_led_status(machine(), 2, data & 1);
|
||||
machine().output().set_led_value(2, data & 1);
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, avalnche_state )
|
||||
|
@ -161,7 +161,7 @@ WRITE8_MEMBER( babbage_state::pio1_b_w )
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
sprintf(ledname,"led%d",i);
|
||||
output_set_value(ledname, BIT(data, i));
|
||||
machine().output().set_value(ledname, BIT(data, i));
|
||||
}
|
||||
}
|
||||
|
||||
@ -182,7 +182,7 @@ WRITE8_MEMBER( babbage_state::pio2_b_w )
|
||||
m_step = true;
|
||||
}
|
||||
else
|
||||
output_set_digit_value(data, m_segment);
|
||||
machine().output().set_digit_value(data, m_segment);
|
||||
}
|
||||
|
||||
static const z80_daisy_config babbage_daisy_chain[] =
|
||||
|
@ -150,8 +150,8 @@ READ8_MEMBER(baraduke_state::inputport_r)
|
||||
|
||||
WRITE8_MEMBER(baraduke_state::baraduke_lamps_w)
|
||||
{
|
||||
set_led_status(machine(), 0,data & 0x08);
|
||||
set_led_status(machine(), 1,data & 0x10);
|
||||
machine().output().set_led_value(0,data & 0x08);
|
||||
machine().output().set_led_value(1,data & 0x10);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(baraduke_state::baraduke_irq_ack_w)
|
||||
|
@ -53,6 +53,8 @@ public:
|
||||
DECLARE_WRITE8_MEMBER(port0_w);
|
||||
DECLARE_WRITE8_MEMBER(port2_w);
|
||||
DECLARE_READ8_MEMBER(port2_r);
|
||||
void fpga_send(unsigned char cmd);
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<dac_device> m_dac;
|
||||
private:
|
||||
@ -153,26 +155,27 @@ const char* mode_strings[] = {
|
||||
"Set counter values"
|
||||
};
|
||||
|
||||
static void fpga_send(device_t *device, unsigned char cmd){
|
||||
void barata_state::fpga_send(unsigned char cmd)
|
||||
{
|
||||
static unsigned char byte = 0;
|
||||
static unsigned char mode = FPGA_WAITING_FOR_NEW_CMD;
|
||||
static unsigned char lamp_data = 0;
|
||||
|
||||
device->logerror("FPGA CMD: %d\n", cmd);
|
||||
logerror("FPGA CMD: %d\n", cmd);
|
||||
|
||||
if (mode == FPGA_WAITING_FOR_NEW_CMD){
|
||||
if (cmd < FPGA_WAITING_FOR_NEW_CMD){
|
||||
mode = cmd;
|
||||
byte=1;
|
||||
device->logerror("SET FPGA MODE: %s\n", mode_strings[mode]);
|
||||
logerror("SET FPGA MODE: %s\n", mode_strings[mode]);
|
||||
|
||||
if (mode == FPGA_PLAY_BGM){
|
||||
device->logerror("PLAY_BGM.\n");
|
||||
logerror("PLAY_BGM.\n");
|
||||
mode = FPGA_WAITING_FOR_NEW_CMD;
|
||||
}
|
||||
|
||||
if (mode == FPGA_STOP_BGM){
|
||||
device->logerror("STOP_BGM.\n");
|
||||
logerror("STOP_BGM.\n");
|
||||
mode = FPGA_WAITING_FOR_NEW_CMD;
|
||||
}
|
||||
}
|
||||
@ -195,10 +198,10 @@ static void fpga_send(device_t *device, unsigned char cmd){
|
||||
if (erase_all){
|
||||
// logerror("LED: ERASE ALL\n");
|
||||
for (int i=0; i<16; i++){
|
||||
output_set_led_value(i, 1);
|
||||
machine().output().set_led_value(i, 1);
|
||||
}
|
||||
} else {
|
||||
output_set_led_value(lamp_index, state ? 0 : 1);
|
||||
machine().output().set_led_value(lamp_index, state ? 0 : 1);
|
||||
}
|
||||
default:
|
||||
mode = FPGA_WAITING_FOR_NEW_CMD;
|
||||
@ -226,11 +229,11 @@ static void fpga_send(device_t *device, unsigned char cmd){
|
||||
counter_data = (counter_data << 3) | cmd;
|
||||
|
||||
if (counter_state){
|
||||
output_set_digit_value(2*counter_bank, 0);
|
||||
output_set_digit_value(2*counter_bank+1, 0);
|
||||
machine().output().set_digit_value(2*counter_bank, 0);
|
||||
machine().output().set_digit_value(2*counter_bank+1, 0);
|
||||
} else {
|
||||
output_set_digit_value(2*counter_bank, dec_7seg(counter_data/10));
|
||||
output_set_digit_value(2*counter_bank+1, dec_7seg(counter_data%10));
|
||||
machine().output().set_digit_value(2*counter_bank, dec_7seg(counter_data/10));
|
||||
machine().output().set_digit_value(2*counter_bank+1, dec_7seg(counter_data%10));
|
||||
}
|
||||
default:
|
||||
mode = FPGA_WAITING_FOR_NEW_CMD;
|
||||
@ -248,7 +251,7 @@ static void fpga_send(device_t *device, unsigned char cmd){
|
||||
break;
|
||||
case 2:
|
||||
sample_index = (sample_index << 3) | cmd;
|
||||
device->logerror("PLAY_SAMPLE #%d.\n", sample_index);
|
||||
logerror("PLAY_SAMPLE #%d.\n", sample_index);
|
||||
default:
|
||||
mode = FPGA_WAITING_FOR_NEW_CMD;
|
||||
break;
|
||||
@ -263,7 +266,7 @@ WRITE8_MEMBER(barata_state::fpga_w)
|
||||
static unsigned char old_data = 0;
|
||||
if (!BIT(old_data, 5) && BIT(data, 5)){
|
||||
//process the command sent to the FPGA
|
||||
fpga_send(this, (data >> 2) & 7);
|
||||
fpga_send((data >> 2) & 7);
|
||||
}
|
||||
old_data = data;
|
||||
}
|
||||
|
@ -292,15 +292,15 @@ WRITE16_MEMBER(bbusters_state::gun_select_w)
|
||||
|
||||
WRITE16_MEMBER(bbusters_state::two_gun_output_w)
|
||||
{
|
||||
output_set_value("Player1_Gun_Recoil",(data & 0x01));
|
||||
output_set_value("Player2_Gun_Recoil",(data & 0x02)>>1);
|
||||
machine().output().set_value("Player1_Gun_Recoil",(data & 0x01));
|
||||
machine().output().set_value("Player2_Gun_Recoil",(data & 0x02)>>1);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(bbusters_state::three_gun_output_w)
|
||||
{
|
||||
output_set_value("Player1_Gun_Recoil",(data & 0x01));
|
||||
output_set_value("Player2_Gun_Recoil",(data & 0x02)>>1);
|
||||
output_set_value("Player3_Gun_Recoil",(data & 0x04)>>2);
|
||||
machine().output().set_value("Player1_Gun_Recoil",(data & 0x01));
|
||||
machine().output().set_value("Player2_Gun_Recoil",(data & 0x02)>>1);
|
||||
machine().output().set_value("Player3_Gun_Recoil",(data & 0x04)>>2);
|
||||
}
|
||||
|
||||
READ16_MEMBER(bbusters_state::kludge_r)
|
||||
|
@ -124,7 +124,7 @@ static const UINT8 nmi_trigger_v256s [NMIS_PER_FRAME] = { 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
READ8_MEMBER(berzerk_state::led_on_r)
|
||||
{
|
||||
set_led_status(machine(), 0, 1);
|
||||
machine().output().set_led_value(0, 1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -132,13 +132,13 @@ READ8_MEMBER(berzerk_state::led_on_r)
|
||||
|
||||
WRITE8_MEMBER(berzerk_state::led_on_w)
|
||||
{
|
||||
set_led_status(machine(), 0, 1);
|
||||
machine().output().set_led_value(0, 1);
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER(berzerk_state::led_off_r)
|
||||
{
|
||||
set_led_status(machine(), 0, 0);
|
||||
machine().output().set_led_value(0, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -146,7 +146,7 @@ READ8_MEMBER(berzerk_state::led_off_r)
|
||||
|
||||
WRITE8_MEMBER(berzerk_state::led_off_w)
|
||||
{
|
||||
set_led_status(machine(), 0, 0);
|
||||
machine().output().set_led_value(0, 0);
|
||||
}
|
||||
|
||||
|
||||
@ -355,7 +355,7 @@ void berzerk_state::machine_reset()
|
||||
{
|
||||
m_irq_enabled = 0;
|
||||
m_nmi_enabled = 0;
|
||||
set_led_status(machine(), 0, 0);
|
||||
machine().output().set_led_value(0, 0);
|
||||
m_magicram_control = 0;
|
||||
|
||||
start_irq_timer();
|
||||
|
@ -155,7 +155,7 @@ TIMER_CALLBACK_MEMBER(beta_state::led_refresh)
|
||||
{
|
||||
if (m_ls145_p < 6)
|
||||
{
|
||||
output_set_digit_value(m_ls145_p, m_segment);
|
||||
machine().output().set_digit_value(m_ls145_p, m_segment);
|
||||
}
|
||||
}
|
||||
|
||||
@ -253,10 +253,10 @@ WRITE8_MEMBER( beta_state::riot_pb_w )
|
||||
m_speaker->level_w(!BIT(data, 4));
|
||||
|
||||
/* address led */
|
||||
output_set_led_value(0, BIT(data, 5));
|
||||
machine().output().set_led_value(0, BIT(data, 5));
|
||||
|
||||
/* data led */
|
||||
output_set_led_value(1, !BIT(data, 5));
|
||||
machine().output().set_led_value(1, !BIT(data, 5));
|
||||
|
||||
/* EPROM address shift */
|
||||
if (!BIT(m_old_data, 5) && BIT(data, 5))
|
||||
|
@ -297,8 +297,8 @@ WRITE8_MEMBER(bfm_sc1_state::reel12_w)
|
||||
m_reel0->update((data>>4)&0x0f);
|
||||
m_reel1->update( data &0x0f);
|
||||
}
|
||||
awp_draw_reel("reel1", m_reel0);
|
||||
awp_draw_reel("reel2", m_reel1);
|
||||
awp_draw_reel(machine(),"reel1", m_reel0);
|
||||
awp_draw_reel(machine(),"reel2", m_reel1);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@ -314,8 +314,8 @@ WRITE8_MEMBER(bfm_sc1_state::reel34_w)
|
||||
m_reel2->update((data>>4)&0x0f);
|
||||
m_reel3->update( data &0x0f);
|
||||
}
|
||||
awp_draw_reel("reel3", m_reel2);
|
||||
awp_draw_reel("reel4", m_reel3);
|
||||
awp_draw_reel(machine(),"reel3", m_reel2);
|
||||
awp_draw_reel(machine(),"reel4", m_reel3);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@ -325,8 +325,8 @@ WRITE8_MEMBER(bfm_sc1_state::reel56_w)
|
||||
m_reel4->update((data>>4)&0x0f);
|
||||
m_reel5->update( data &0x0f);
|
||||
|
||||
awp_draw_reel("reel5", m_reel4);
|
||||
awp_draw_reel("reel6", m_reel5);
|
||||
awp_draw_reel(machine(),"reel5", m_reel4);
|
||||
awp_draw_reel(machine(),"reel6", m_reel5);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@ -459,8 +459,8 @@ WRITE8_MEMBER(bfm_sc1_state::mux1latch_w)
|
||||
|
||||
for ( i = 0; i < 8; i++ )
|
||||
{
|
||||
output_set_lamp_value(BFM_strcnv[offset ], (m_mux1_datalo & pattern?1:0) );
|
||||
output_set_lamp_value(BFM_strcnv[offset+8], (m_mux1_datahi & pattern?1:0) );
|
||||
machine().output().set_lamp_value(BFM_strcnv[offset ], (m_mux1_datalo & pattern?1:0) );
|
||||
machine().output().set_lamp_value(BFM_strcnv[offset+8], (m_mux1_datahi & pattern?1:0) );
|
||||
pattern<<=1;
|
||||
offset++;
|
||||
}
|
||||
@ -532,8 +532,8 @@ WRITE8_MEMBER(bfm_sc1_state::mux2latch_w)
|
||||
|
||||
for ( i = 0; i < 8; i++ )
|
||||
{
|
||||
output_set_lamp_value(BFM_strcnv[offset ], (m_mux2_datalo & pattern?1:0) );
|
||||
output_set_lamp_value(BFM_strcnv[offset+8], (m_mux2_datahi & pattern?1:0) );
|
||||
machine().output().set_lamp_value(BFM_strcnv[offset ], (m_mux2_datalo & pattern?1:0) );
|
||||
machine().output().set_lamp_value(BFM_strcnv[offset+8], (m_mux2_datahi & pattern?1:0) );
|
||||
pattern<<=1;
|
||||
offset++;
|
||||
}
|
||||
|
@ -554,8 +554,8 @@ WRITE8_MEMBER(bfm_sc2_state::reel12_w)
|
||||
m_reel0->update( data &0x0f);
|
||||
m_reel1->update((data>>4)&0x0f);
|
||||
|
||||
awp_draw_reel("reel1", m_reel0);
|
||||
awp_draw_reel("reel2", m_reel1);
|
||||
awp_draw_reel(machine(),"reel1", m_reel0);
|
||||
awp_draw_reel(machine(),"reel2", m_reel1);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(bfm_sc2_state::reel34_w)
|
||||
@ -565,8 +565,8 @@ WRITE8_MEMBER(bfm_sc2_state::reel34_w)
|
||||
m_reel2->update( data &0x0f);
|
||||
m_reel3->update((data>>4)&0x0f);
|
||||
|
||||
awp_draw_reel("reel3", m_reel2);
|
||||
awp_draw_reel("reel4", m_reel3);
|
||||
awp_draw_reel(machine(),"reel3", m_reel2);
|
||||
awp_draw_reel(machine(),"reel4", m_reel3);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@ -578,8 +578,8 @@ WRITE8_MEMBER(bfm_sc2_state::reel56_w)
|
||||
m_reel4->update( data &0x0f);
|
||||
m_reel5->update((data>>4)&0x0f);
|
||||
|
||||
awp_draw_reel("reel5", m_reel4);
|
||||
awp_draw_reel("reel6", m_reel5);
|
||||
awp_draw_reel(machine(),"reel5", m_reel4);
|
||||
awp_draw_reel(machine(),"reel6", m_reel5);
|
||||
}
|
||||
|
||||
|
||||
@ -617,7 +617,7 @@ WRITE8_MEMBER(bfm_sc2_state::mux_output_w)
|
||||
int off = offset<<3;
|
||||
|
||||
for (i=0; i<8; i++)
|
||||
output_set_lamp_value(off+i, ((data & (1 << i)) != 0));
|
||||
machine().output().set_lamp_value(off+i, ((data & (1 << i)) != 0));
|
||||
|
||||
}
|
||||
|
||||
|
@ -255,10 +255,10 @@ WRITE8_MEMBER(bfm_sc45_state::mux_output_w)
|
||||
int off = offset<<3;
|
||||
|
||||
for (i=0; i<8; i++)
|
||||
output_set_lamp_value(off+i, ((data & (1 << i)) != 0));
|
||||
machine().output().set_lamp_value(off+i, ((data & (1 << i)) != 0));
|
||||
|
||||
|
||||
output_set_indexed_value("matrix", off+i, ((data & (1 << i)) != 0));
|
||||
machine().output().set_indexed_value("matrix", off+i, ((data & (1 << i)) != 0));
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(bfm_sc45_state::mux_output2_w)
|
||||
@ -269,14 +269,14 @@ WRITE8_MEMBER(bfm_sc45_state::mux_output2_w)
|
||||
// some games use this as a matrix port (luckb etc.)
|
||||
for (i=0; i<8; i++)
|
||||
{
|
||||
output_set_indexed_value("matrix", off+i, ((data & (1 << i)) != 0));
|
||||
machine().output().set_indexed_value("matrix", off+i, ((data & (1 << i)) != 0));
|
||||
}
|
||||
|
||||
// others drive 7-segs with it.. so rendering it there as well in our debug layouts
|
||||
|
||||
// todo: reorder properly!
|
||||
UINT8 bf7segdata = BITSWAP8(data,7,6,5,4,3,2,1,0);
|
||||
output_set_digit_value(offset, bf7segdata);
|
||||
machine().output().set_digit_value(offset, bf7segdata);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(sc4_state::sc4_mem_w)
|
||||
@ -518,13 +518,13 @@ void sc4_state::bfm_sc4_68307_porta_w(address_space &space, bool dedicated, UINT
|
||||
if(m_reel1)
|
||||
{
|
||||
m_reel1->update( data &0x0f);
|
||||
awp_draw_reel("reel1", m_reel1);
|
||||
awp_draw_reel(machine(),"reel1", m_reel1);
|
||||
}
|
||||
|
||||
if (m_reel2)
|
||||
{
|
||||
m_reel2->update((data>>4)&0x0f);
|
||||
awp_draw_reel("reel2", m_reel2);
|
||||
awp_draw_reel(machine(),"reel2", m_reel2);
|
||||
}
|
||||
}
|
||||
|
||||
@ -535,7 +535,7 @@ WRITE8_MEMBER( sc4_state::bfm_sc4_reel3_w )
|
||||
if(m_reel3)
|
||||
{
|
||||
m_reel3->update( data &0x0f);
|
||||
awp_draw_reel("reel3", m_reel3);
|
||||
awp_draw_reel(machine(),"reel3", m_reel3);
|
||||
}
|
||||
}
|
||||
|
||||
@ -546,7 +546,7 @@ WRITE8_MEMBER( sc4_state::bfm_sc4_reel4_w )
|
||||
if(m_reel4)
|
||||
{
|
||||
m_reel4->update( data &0x0f);
|
||||
awp_draw_reel("reel4", m_reel4);
|
||||
awp_draw_reel(machine(),"reel4", m_reel4);
|
||||
}
|
||||
}
|
||||
|
||||
@ -640,13 +640,13 @@ WRITE8_MEMBER(sc4_state::bfm_sc4_duart_output_w)
|
||||
if(m_reel5)
|
||||
{
|
||||
m_reel5->update( data &0x0f);
|
||||
awp_draw_reel("reel5", m_reel5);
|
||||
awp_draw_reel(machine(),"reel5", m_reel5);
|
||||
}
|
||||
|
||||
if (m_reel6)
|
||||
{
|
||||
m_reel6->update((data>>4)&0x0f);
|
||||
awp_draw_reel("reel6", m_reel6);
|
||||
awp_draw_reel(machine(),"reel6", m_reel6);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -211,8 +211,8 @@ WRITE8_MEMBER(bfmsys85_state::reel12_w)
|
||||
m_reel0->update((data>>4)&0x0f);
|
||||
m_reel1->update( data &0x0f);
|
||||
|
||||
awp_draw_reel("reel1", m_reel0);
|
||||
awp_draw_reel("reel2", m_reel1);
|
||||
awp_draw_reel(machine(),"reel1", m_reel0);
|
||||
awp_draw_reel(machine(),"reel2", m_reel1);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@ -222,8 +222,8 @@ WRITE8_MEMBER(bfmsys85_state::reel34_w)
|
||||
m_reel2->update((data>>4)&0x0f);
|
||||
m_reel3->update( data &0x0f);
|
||||
|
||||
awp_draw_reel("reel3", m_reel2);
|
||||
awp_draw_reel("reel4", m_reel3);
|
||||
awp_draw_reel(machine(),"reel3", m_reel2);
|
||||
awp_draw_reel(machine(),"reel4", m_reel3);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@ -312,7 +312,7 @@ WRITE8_MEMBER(bfmsys85_state::mux_data_w)
|
||||
|
||||
for ( i = 0; i < 8; i++ )
|
||||
{
|
||||
output_set_lamp_value(off, (data & pattern ? 1 : 0));
|
||||
machine().output().set_lamp_value(off, (data & pattern ? 1 : 0));
|
||||
pattern <<= 1;
|
||||
off++;
|
||||
}
|
||||
|
@ -69,8 +69,8 @@ WRITE8_MEMBER(bladestl_state::bladestl_bankswitch_w)
|
||||
machine().bookkeeping().coin_counter_w(1,data & 0x02);
|
||||
|
||||
/* bits 2 & 3 = lamps */
|
||||
set_led_status(machine(), 0,data & 0x04);
|
||||
set_led_status(machine(), 1,data & 0x08);
|
||||
machine().output().set_led_value(0,data & 0x04);
|
||||
machine().output().set_led_value(1,data & 0x08);
|
||||
|
||||
/* bit 4 = relay (???) */
|
||||
|
||||
|
@ -419,11 +419,11 @@ WRITE8_MEMBER(blitz_state::mux_w)
|
||||
|
||||
WRITE8_MEMBER(blitz_state::lamps_a_w)
|
||||
{
|
||||
// output_set_lamp_value(0, 1 - ((data) & 1)); /* Lamp 0 */
|
||||
// output_set_lamp_value(1, 1 - ((data >> 1) & 1)); /* Lamp 1 */
|
||||
// output_set_lamp_value(2, 1 - ((data >> 2) & 1)); /* Lamp 2 */
|
||||
// output_set_lamp_value(3, 1 - ((data >> 3) & 1)); /* Lamp 3 */
|
||||
// output_set_lamp_value(4, 1 - ((data >> 4) & 1)); /* Lamp 4 */
|
||||
// machine().output().set_lamp_value(0, 1 - ((data) & 1)); /* Lamp 0 */
|
||||
// machine().output().set_lamp_value(1, 1 - ((data >> 1) & 1)); /* Lamp 1 */
|
||||
// machine().output().set_lamp_value(2, 1 - ((data >> 2) & 1)); /* Lamp 2 */
|
||||
// machine().output().set_lamp_value(3, 1 - ((data >> 3) & 1)); /* Lamp 3 */
|
||||
// machine().output().set_lamp_value(4, 1 - ((data >> 4) & 1)); /* Lamp 4 */
|
||||
|
||||
// popmessage("written : %02X", data);
|
||||
// machine().bookkeeping().coin_counter_w(0, data & 0x40); /* counter1 */
|
||||
|
@ -843,13 +843,13 @@ WRITE16_MEMBER(blitz68k_state::cjffruit_leds1_w)
|
||||
if (ACCESSING_BITS_8_15)
|
||||
{
|
||||
machine().bookkeeping().coin_counter_w(0, data & 0x0100); // coin in
|
||||
set_led_status(machine(), 0, data & 0x0200); // win???
|
||||
machine().output().set_led_value(0, data & 0x0200); // win???
|
||||
// 1 data & 0x0400 // win???
|
||||
set_led_status(machine(), 2, data & 0x0800); // small
|
||||
set_led_status(machine(), 3, data & 0x1000); // big
|
||||
set_led_status(machine(), 4, data & 0x2000); // take
|
||||
set_led_status(machine(), 5, data & 0x4000); // double up
|
||||
set_led_status(machine(), 6, data & 0x8000); // cancel
|
||||
machine().output().set_led_value(2, data & 0x0800); // small
|
||||
machine().output().set_led_value(3, data & 0x1000); // big
|
||||
machine().output().set_led_value(4, data & 0x2000); // take
|
||||
machine().output().set_led_value(5, data & 0x4000); // double up
|
||||
machine().output().set_led_value(6, data & 0x8000); // cancel
|
||||
show_leds123();
|
||||
}
|
||||
}
|
||||
@ -859,14 +859,14 @@ WRITE16_MEMBER(blitz68k_state::cjffruit_leds2_w)
|
||||
data = COMBINE_DATA(m_leds1);
|
||||
if (ACCESSING_BITS_8_15)
|
||||
{
|
||||
set_led_status(machine(), 7, data & 0x0100); // start
|
||||
set_led_status(machine(), 8, data & 0x0200); // bet
|
||||
set_led_status(machine(), 9, data & 0x0400); // hold 5
|
||||
set_led_status(machine(), 10, data & 0x0800); // hold 4
|
||||
set_led_status(machine(), 11, data & 0x1000); // hold 3
|
||||
set_led_status(machine(), 12, data & 0x2000); // hold 2
|
||||
set_led_status(machine(), 13, data & 0x4000); // collect
|
||||
set_led_status(machine(), 14, data & 0x8000); // call attendant
|
||||
machine().output().set_led_value( 7, data & 0x0100); // start
|
||||
machine().output().set_led_value( 8, data & 0x0200); // bet
|
||||
machine().output().set_led_value( 9, data & 0x0400); // hold 5
|
||||
machine().output().set_led_value(10, data & 0x0800); // hold 4
|
||||
machine().output().set_led_value(11, data & 0x1000); // hold 3
|
||||
machine().output().set_led_value(12, data & 0x2000); // hold 2
|
||||
machine().output().set_led_value(13, data & 0x4000); // collect
|
||||
machine().output().set_led_value(14, data & 0x8000); // call attendant
|
||||
show_leds123();
|
||||
}
|
||||
}
|
||||
@ -876,8 +876,8 @@ WRITE16_MEMBER(blitz68k_state::cjffruit_leds3_w)
|
||||
data = COMBINE_DATA(m_leds2);
|
||||
if (ACCESSING_BITS_8_15)
|
||||
{
|
||||
set_led_status(machine(), 15, data & 0x0100); // hopper coins?
|
||||
set_led_status(machine(), 16, data & 0x0400); // coin out?
|
||||
machine().output().set_led_value(15, data & 0x0100); // hopper coins?
|
||||
machine().output().set_led_value(16, data & 0x0400); // coin out?
|
||||
show_leds123();
|
||||
}
|
||||
}
|
||||
@ -983,13 +983,13 @@ WRITE16_MEMBER(blitz68k_state::deucesw2_leds1_w)
|
||||
if (ACCESSING_BITS_8_15)
|
||||
{
|
||||
machine().bookkeeping().coin_counter_w(0, data & 0x0100); // coin in
|
||||
set_led_status(machine(), 0, data & 0x0200); // win???
|
||||
machine().output().set_led_value(0, data & 0x0200); // win???
|
||||
// 1 data & 0x0400 // win???
|
||||
set_led_status(machine(), 2, data & 0x0800); // small
|
||||
set_led_status(machine(), 3, data & 0x1000); // big
|
||||
set_led_status(machine(), 4, data & 0x2000); // take
|
||||
set_led_status(machine(), 5, data & 0x4000); // double up
|
||||
set_led_status(machine(), 6, data & 0x8000); // cancel
|
||||
machine().output().set_led_value(2, data & 0x0800); // small
|
||||
machine().output().set_led_value(3, data & 0x1000); // big
|
||||
machine().output().set_led_value(4, data & 0x2000); // take
|
||||
machine().output().set_led_value(5, data & 0x4000); // double up
|
||||
machine().output().set_led_value(6, data & 0x8000); // cancel
|
||||
show_leds123();
|
||||
}
|
||||
}
|
||||
@ -999,14 +999,14 @@ WRITE16_MEMBER(blitz68k_state::deucesw2_leds2_w)
|
||||
data = COMBINE_DATA(m_leds1);
|
||||
if (ACCESSING_BITS_8_15)
|
||||
{
|
||||
set_led_status(machine(), 7, data & 0x0100); // start
|
||||
set_led_status(machine(), 8, data & 0x0200); // bet
|
||||
set_led_status(machine(), 9, data & 0x0400); // hold 5
|
||||
set_led_status(machine(), 10, data & 0x0800); // hold 4
|
||||
set_led_status(machine(), 11, data & 0x1000); // hold 3
|
||||
set_led_status(machine(), 12, data & 0x2000); // hold 2
|
||||
set_led_status(machine(), 13, data & 0x4000); // hold 1
|
||||
set_led_status(machine(), 14, data & 0x8000); // call attendant
|
||||
machine().output().set_led_value( 7, data & 0x0100); // start
|
||||
machine().output().set_led_value( 8, data & 0x0200); // bet
|
||||
machine().output().set_led_value( 9, data & 0x0400); // hold 5
|
||||
machine().output().set_led_value(10, data & 0x0800); // hold 4
|
||||
machine().output().set_led_value(11, data & 0x1000); // hold 3
|
||||
machine().output().set_led_value(12, data & 0x2000); // hold 2
|
||||
machine().output().set_led_value(13, data & 0x4000); // hold 1
|
||||
machine().output().set_led_value(14, data & 0x8000); // call attendant
|
||||
show_leds123();
|
||||
}
|
||||
}
|
||||
@ -1016,8 +1016,8 @@ WRITE16_MEMBER(blitz68k_state::deucesw2_leds3_w)
|
||||
data = COMBINE_DATA(m_leds2);
|
||||
if (ACCESSING_BITS_8_15)
|
||||
{
|
||||
set_led_status(machine(), 15, data & 0x0100); // hopper coins?
|
||||
set_led_status(machine(), 16, data & 0x0400); // coin out?
|
||||
machine().output().set_led_value(15, data & 0x0100); // hopper coins?
|
||||
machine().output().set_led_value(16, data & 0x0400); // coin out?
|
||||
show_leds123();
|
||||
}
|
||||
}
|
||||
@ -1182,7 +1182,7 @@ WRITE16_MEMBER(blitz68k_state::hermit_leds2_w)
|
||||
data = COMBINE_DATA(m_leds1);
|
||||
if (ACCESSING_BITS_8_15)
|
||||
{
|
||||
set_led_status(machine(), 7, data & 0x0100); // button
|
||||
machine().output().set_led_value( 7, data & 0x0100); // button
|
||||
show_leds12();
|
||||
}
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ READ8_MEMBER(bob85_state::bob85_keyboard_r)
|
||||
|
||||
WRITE8_MEMBER(bob85_state::bob85_7seg_w)
|
||||
{
|
||||
output_set_digit_value(offset, BITSWAP8( data,3,2,1,0,7,6,5,4 ));
|
||||
machine().output().set_digit_value(offset, BITSWAP8( data,3,2,1,0,7,6,5,4 ));
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( bob85_mem, AS_PROGRAM, 8, bob85_state )
|
||||
|
@ -322,8 +322,8 @@ WRITE8_MEMBER(boxer_state::boxer_crowd_w)
|
||||
|
||||
WRITE8_MEMBER(boxer_state::boxer_led_w)
|
||||
{
|
||||
set_led_status(machine(), 1, !(data & 1));
|
||||
set_led_status(machine(), 0, !(data & 2));
|
||||
machine().output().set_led_value(1, !(data & 1));
|
||||
machine().output().set_led_value(0, !(data & 2));
|
||||
}
|
||||
|
||||
|
||||
|
@ -123,7 +123,7 @@ void bw12_state::ls259_w(int address, int data)
|
||||
break;
|
||||
|
||||
case 4: /* CAP LOCK */
|
||||
output_set_led_value(0, data);
|
||||
machine().output().set_led_value(0, data);
|
||||
break;
|
||||
|
||||
case 5: /* MOTOR 0 */
|
||||
|
@ -333,8 +333,8 @@ WRITE8_MEMBER(bwidow_state::bwidow_misc_w)
|
||||
*/
|
||||
|
||||
if (data == m_lastdata) return;
|
||||
set_led_status(machine(), 0,~data & 0x10);
|
||||
set_led_status(machine(), 1,~data & 0x20);
|
||||
machine().output().set_led_value(0,~data & 0x10);
|
||||
machine().output().set_led_value(1,~data & 0x20);
|
||||
machine().bookkeeping().coin_counter_w(0, data & 0x01);
|
||||
machine().bookkeeping().coin_counter_w(1, data & 0x02);
|
||||
m_lastdata = data;
|
||||
@ -343,8 +343,8 @@ WRITE8_MEMBER(bwidow_state::bwidow_misc_w)
|
||||
WRITE8_MEMBER(bwidow_state::spacduel_coin_counter_w)
|
||||
{
|
||||
if (data == m_lastdata) return;
|
||||
set_led_status(machine(), 0, !BIT(data,5)); // start lamp
|
||||
set_led_status(machine(), 1, !BIT(data,4)); // select lamp
|
||||
machine().output().set_led_value(0, !BIT(data,5)); // start lamp
|
||||
machine().output().set_led_value(1, !BIT(data,4)); // select lamp
|
||||
machine().bookkeeping().coin_lockout_w(0, !BIT(data,3));
|
||||
machine().bookkeeping().coin_lockout_w(1, !BIT(data,3));
|
||||
machine().bookkeeping().coin_lockout_w(2, !BIT(data,3));
|
||||
|
@ -533,11 +533,11 @@ WRITE_LINE_MEMBER( by17_state::u10_ca2_w )
|
||||
|
||||
for (digit=1; digit<=8; digit++)
|
||||
{
|
||||
output_set_digit_value(10+digit, 0);
|
||||
output_set_digit_value(20+digit, 0);
|
||||
output_set_digit_value(30+digit, 0);
|
||||
output_set_digit_value(40+digit, 0);
|
||||
output_set_digit_value(50+digit, 0);
|
||||
machine().output().set_digit_value(10+digit, 0);
|
||||
machine().output().set_digit_value(20+digit, 0);
|
||||
machine().output().set_digit_value(30+digit, 0);
|
||||
machine().output().set_digit_value(40+digit, 0);
|
||||
machine().output().set_digit_value(50+digit, 0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -557,7 +557,7 @@ WRITE_LINE_MEMBER( by17_state::u10_cb2_w )
|
||||
|
||||
WRITE_LINE_MEMBER( by17_state::u11_ca2_w )
|
||||
{
|
||||
output_set_value("led0", state);
|
||||
machine().output().set_value("led0", state);
|
||||
}
|
||||
|
||||
READ_LINE_MEMBER( by17_state::u11_ca1_r )
|
||||
@ -605,10 +605,10 @@ WRITE8_MEMBER( by17_state::u10_a_w )
|
||||
{
|
||||
if ((m_lamp_decode & 0x0f) < 0x0f)
|
||||
{
|
||||
if (output_get_indexed_value("lamp", ((m_lamp_decode & 0x0f)+00) ) ==0 ) output_set_indexed_value("lamp", ((m_lamp_decode & 0x0f)+00), ((data & 0x10) ? FALSE : TRUE));
|
||||
if (output_get_indexed_value("lamp", ((m_lamp_decode & 0x0f)+15) ) ==0 ) output_set_indexed_value("lamp", ((m_lamp_decode & 0x0f)+15), ((data & 0x20) ? FALSE : TRUE));
|
||||
if (output_get_indexed_value("lamp", ((m_lamp_decode & 0x0f)+30) ) ==0 ) output_set_indexed_value("lamp", ((m_lamp_decode & 0x0f)+30), ((data & 0x40) ? FALSE : TRUE));
|
||||
if (output_get_indexed_value("lamp", ((m_lamp_decode & 0x0f)+45) ) ==0 ) output_set_indexed_value("lamp", ((m_lamp_decode & 0x0f)+45), ((data & 0x80) ? FALSE : TRUE));
|
||||
if (machine().output().get_indexed_value("lamp", ((m_lamp_decode & 0x0f)+00) ) ==0 ) machine().output().set_indexed_value("lamp", ((m_lamp_decode & 0x0f)+00), ((data & 0x10) ? FALSE : TRUE));
|
||||
if (machine().output().get_indexed_value("lamp", ((m_lamp_decode & 0x0f)+15) ) ==0 ) machine().output().set_indexed_value("lamp", ((m_lamp_decode & 0x0f)+15), ((data & 0x20) ? FALSE : TRUE));
|
||||
if (machine().output().get_indexed_value("lamp", ((m_lamp_decode & 0x0f)+30) ) ==0 ) machine().output().set_indexed_value("lamp", ((m_lamp_decode & 0x0f)+30), ((data & 0x40) ? FALSE : TRUE));
|
||||
if (machine().output().get_indexed_value("lamp", ((m_lamp_decode & 0x0f)+45) ) ==0 ) machine().output().set_indexed_value("lamp", ((m_lamp_decode & 0x0f)+45), ((data & 0x80) ? FALSE : TRUE));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -698,11 +698,11 @@ WRITE8_MEMBER( by17_state::u11_a_w )
|
||||
{
|
||||
static const UINT8 patterns[16] = { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0,0,0,0,0,0 }; // MC14543 - BCD to 7 Segment Display Decoder
|
||||
|
||||
output_set_digit_value(10+m_digit, patterns[m_segment[1]]);
|
||||
output_set_digit_value(20+m_digit, patterns[m_segment[2]]);
|
||||
output_set_digit_value(30+m_digit, patterns[m_segment[3]]);
|
||||
output_set_digit_value(40+m_digit, patterns[m_segment[4]]);
|
||||
output_set_digit_value(50+m_digit, patterns[m_segment[5]]);
|
||||
machine().output().set_digit_value(10+m_digit, patterns[m_segment[1]]);
|
||||
machine().output().set_digit_value(20+m_digit, patterns[m_segment[2]]);
|
||||
machine().output().set_digit_value(30+m_digit, patterns[m_segment[3]]);
|
||||
machine().output().set_digit_value(40+m_digit, patterns[m_segment[4]]);
|
||||
machine().output().set_digit_value(50+m_digit, patterns[m_segment[5]]);
|
||||
|
||||
}
|
||||
|
||||
@ -715,7 +715,7 @@ WRITE8_MEMBER( by17_state::u11_b_w )
|
||||
{
|
||||
if ((data & 0x0f) < 0x0f) // Momentary Solenoids
|
||||
{
|
||||
output_set_indexed_value( "solenoid", (data & 0x0f), TRUE);
|
||||
machine().output().set_indexed_value( "solenoid", (data & 0x0f), TRUE);
|
||||
|
||||
if (m_solenoid_features[(data & 0x0f)][3]) // Reset/release relevant switch after firing Solenoid
|
||||
m_io_hold_x[(m_solenoid_features[(data & 0x0f)][2])] &= (m_solenoid_features[(data & 0x0f)][3]);
|
||||
@ -727,7 +727,7 @@ WRITE8_MEMBER( by17_state::u11_b_w )
|
||||
{
|
||||
for (int i=0; i<15; i++)
|
||||
{
|
||||
output_set_indexed_value( "solenoid", i, FALSE);
|
||||
machine().output().set_indexed_value( "solenoid", i, FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -735,49 +735,49 @@ WRITE8_MEMBER( by17_state::u11_b_w )
|
||||
|
||||
if ((m_u11b & 0x10) && ((data & 0x10)==0))
|
||||
{
|
||||
output_set_value("solenoid16", TRUE);
|
||||
machine().output().set_value("solenoid16", TRUE);
|
||||
if (m_solenoid_features[16][0] != 0xff)
|
||||
m_samples->start(m_solenoid_features[16][0], m_solenoid_features[16][1]);
|
||||
}
|
||||
else if ((data & 0x10) && ((m_u11b & 0x10)==0))
|
||||
{
|
||||
output_set_value("solenoid16", FALSE);
|
||||
machine().output().set_value("solenoid16", FALSE);
|
||||
if (m_solenoid_features[16][0] != 0xff)
|
||||
m_samples->start(m_solenoid_features[16][0], m_solenoid_features[16][2]);
|
||||
}
|
||||
if ((m_u11b & 0x20) && ((data & 0x20)==0))
|
||||
{
|
||||
output_set_value("solenoid17", TRUE); // Coin Lockout Coil engage
|
||||
machine().output().set_value("solenoid17", TRUE); // Coin Lockout Coil engage
|
||||
if (m_solenoid_features[17][0] != 0xff)
|
||||
m_samples->start(m_solenoid_features[17][0], m_solenoid_features[17][1]);
|
||||
}
|
||||
else if ((data & 0x20) && ((m_u11b & 0x20)==0))
|
||||
{
|
||||
output_set_value("solenoid17", FALSE); // Coin Lockout Coil release
|
||||
machine().output().set_value("solenoid17", FALSE); // Coin Lockout Coil release
|
||||
if (m_solenoid_features[17][0] != 0xff)
|
||||
m_samples->start(m_solenoid_features[17][0], m_solenoid_features[17][2]);
|
||||
}
|
||||
if ((m_u11b & 0x40) && ((data & 0x40)==0))
|
||||
{
|
||||
output_set_value("solenoid18", TRUE); // Flipper Enable Relay engage
|
||||
machine().output().set_value("solenoid18", TRUE); // Flipper Enable Relay engage
|
||||
if (m_solenoid_features[18][0] != 0xff)
|
||||
m_samples->start(m_solenoid_features[18][0], m_solenoid_features[18][1]);
|
||||
}
|
||||
else if ((data & 0x40) && ((m_u11b & 0x40)==0))
|
||||
{
|
||||
output_set_value("solenoid18", FALSE); // Flipper Enable Relay release
|
||||
machine().output().set_value("solenoid18", FALSE); // Flipper Enable Relay release
|
||||
if (m_solenoid_features[18][0] != 0xff)
|
||||
m_samples->start(m_solenoid_features[18][0], m_solenoid_features[18][2]);
|
||||
}
|
||||
if ((m_u11b & 0x80) && ((data & 0x80)==0))
|
||||
{
|
||||
output_set_value("solenoid19", TRUE);
|
||||
machine().output().set_value("solenoid19", TRUE);
|
||||
if (m_solenoid_features[19][0] != 0xff)
|
||||
m_samples->start(m_solenoid_features[19][0], m_solenoid_features[19][1]);
|
||||
}
|
||||
else if ((data & 0x80) && ((m_u11b & 0x80)==0))
|
||||
{
|
||||
output_set_value("solenoid19", FALSE);
|
||||
machine().output().set_value("solenoid19", FALSE);
|
||||
if (m_solenoid_features[19][0] != 0xff)
|
||||
m_samples->start(m_solenoid_features[19][0], m_solenoid_features[19][2]);
|
||||
}
|
||||
@ -809,7 +809,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( by17_state::timer_z_freq )
|
||||
|
||||
for (int i=0; i<60; i++)
|
||||
{
|
||||
output_set_indexed_value( "lamp", i, 0 );
|
||||
machine().output().set_indexed_value( "lamp", i, 0 );
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -521,11 +521,11 @@ WRITE_LINE_MEMBER( by35_state::u10_ca2_w )
|
||||
|
||||
for (digit=1; digit<=8; digit++)
|
||||
{
|
||||
output_set_digit_value(10+digit, 0);
|
||||
output_set_digit_value(20+digit, 0);
|
||||
output_set_digit_value(30+digit, 0);
|
||||
output_set_digit_value(40+digit, 0);
|
||||
output_set_digit_value(50+digit, 0);
|
||||
machine().output().set_digit_value(10+digit, 0);
|
||||
machine().output().set_digit_value(20+digit, 0);
|
||||
machine().output().set_digit_value(30+digit, 0);
|
||||
machine().output().set_digit_value(40+digit, 0);
|
||||
machine().output().set_digit_value(50+digit, 0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -545,7 +545,7 @@ WRITE_LINE_MEMBER( by35_state::u10_cb2_w )
|
||||
|
||||
WRITE_LINE_MEMBER( by35_state::u11_ca2_w )
|
||||
{
|
||||
output_set_value("led0", state);
|
||||
machine().output().set_value("led0", state);
|
||||
}
|
||||
|
||||
READ_LINE_MEMBER( by35_state::u11_ca1_r )
|
||||
@ -609,10 +609,10 @@ WRITE8_MEMBER( by35_state::u10_a_w )
|
||||
{
|
||||
if ((m_lamp_decode & 0x0f) < 0x0f)
|
||||
{
|
||||
if (output_get_indexed_value("lamp", ((m_lamp_decode & 0x0f)+00) ) ==0 ) output_set_indexed_value("lamp", ((m_lamp_decode & 0x0f)+00), ((data & 0x10) ? FALSE : TRUE));
|
||||
if (output_get_indexed_value("lamp", ((m_lamp_decode & 0x0f)+15) ) ==0 ) output_set_indexed_value("lamp", ((m_lamp_decode & 0x0f)+15), ((data & 0x20) ? FALSE : TRUE));
|
||||
if (output_get_indexed_value("lamp", ((m_lamp_decode & 0x0f)+30) ) ==0 ) output_set_indexed_value("lamp", ((m_lamp_decode & 0x0f)+30), ((data & 0x40) ? FALSE : TRUE));
|
||||
if (output_get_indexed_value("lamp", ((m_lamp_decode & 0x0f)+45) ) ==0 ) output_set_indexed_value("lamp", ((m_lamp_decode & 0x0f)+45), ((data & 0x80) ? FALSE : TRUE));
|
||||
if (machine().output().get_indexed_value("lamp", ((m_lamp_decode & 0x0f)+00) ) ==0 ) machine().output().set_indexed_value("lamp", ((m_lamp_decode & 0x0f)+00), ((data & 0x10) ? FALSE : TRUE));
|
||||
if (machine().output().get_indexed_value("lamp", ((m_lamp_decode & 0x0f)+15) ) ==0 ) machine().output().set_indexed_value("lamp", ((m_lamp_decode & 0x0f)+15), ((data & 0x20) ? FALSE : TRUE));
|
||||
if (machine().output().get_indexed_value("lamp", ((m_lamp_decode & 0x0f)+30) ) ==0 ) machine().output().set_indexed_value("lamp", ((m_lamp_decode & 0x0f)+30), ((data & 0x40) ? FALSE : TRUE));
|
||||
if (machine().output().get_indexed_value("lamp", ((m_lamp_decode & 0x0f)+45) ) ==0 ) machine().output().set_indexed_value("lamp", ((m_lamp_decode & 0x0f)+45), ((data & 0x80) ? FALSE : TRUE));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -705,11 +705,11 @@ WRITE8_MEMBER( by35_state::u11_a_w )
|
||||
{
|
||||
static const UINT8 patterns[16] = { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0,0,0,0,0,0 }; // MC14543 - BCD to 7 Segment Display Decoder
|
||||
|
||||
output_set_digit_value(10+m_digit, patterns[m_segment[1]]);
|
||||
output_set_digit_value(20+m_digit, patterns[m_segment[2]]);
|
||||
output_set_digit_value(30+m_digit, patterns[m_segment[3]]);
|
||||
output_set_digit_value(40+m_digit, patterns[m_segment[4]]);
|
||||
output_set_digit_value(50+m_digit, patterns[m_segment[5]]);
|
||||
machine().output().set_digit_value(10+m_digit, patterns[m_segment[1]]);
|
||||
machine().output().set_digit_value(20+m_digit, patterns[m_segment[2]]);
|
||||
machine().output().set_digit_value(30+m_digit, patterns[m_segment[3]]);
|
||||
machine().output().set_digit_value(40+m_digit, patterns[m_segment[4]]);
|
||||
machine().output().set_digit_value(50+m_digit, patterns[m_segment[5]]);
|
||||
|
||||
}
|
||||
|
||||
@ -723,11 +723,11 @@ WRITE8_MEMBER( by35_state::u11_b_w )
|
||||
if ((data & 0x0f) < 0x0f) // Momentary Solenoids
|
||||
{
|
||||
if (m_solenoid_features[(data & 0x0f)][0] != 0xff) { // Play solenoid audio sample
|
||||
if (output_get_indexed_value("solenoid", (data & 0x0f)) == FALSE)
|
||||
if (machine().output().get_indexed_value("solenoid", (data & 0x0f)) == FALSE)
|
||||
m_samples->start(m_solenoid_features[(data & 0x0f)][0], m_solenoid_features[(data & 0x0f)][1]);
|
||||
}
|
||||
|
||||
output_set_indexed_value( "solenoid", (data & 0x0f), TRUE);
|
||||
machine().output().set_indexed_value( "solenoid", (data & 0x0f), TRUE);
|
||||
|
||||
if (m_solenoid_features[(data & 0x0f)][3]) // Reset/release relevant switch after firing Solenoid
|
||||
m_io_hold_x[(m_solenoid_features[(data & 0x0f)][2])] &= (m_solenoid_features[(data & 0x0f)][3]);
|
||||
@ -736,7 +736,7 @@ WRITE8_MEMBER( by35_state::u11_b_w )
|
||||
{
|
||||
for (int i=0; i<15; i++)
|
||||
{
|
||||
output_set_indexed_value( "solenoid", i, FALSE);
|
||||
machine().output().set_indexed_value( "solenoid", i, FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -744,49 +744,49 @@ WRITE8_MEMBER( by35_state::u11_b_w )
|
||||
|
||||
if ((m_u11b & 0x10) && ((data & 0x10)==0))
|
||||
{
|
||||
output_set_value("solenoid16", TRUE);
|
||||
machine().output().set_value("solenoid16", TRUE);
|
||||
if (m_solenoid_features[16][0] != 0xff)
|
||||
m_samples->start(m_solenoid_features[16][0], m_solenoid_features[16][1]);
|
||||
}
|
||||
else if ((data & 0x10) && ((m_u11b & 0x10)==0))
|
||||
{
|
||||
output_set_value("solenoid16", FALSE);
|
||||
machine().output().set_value("solenoid16", FALSE);
|
||||
if (m_solenoid_features[16][0] != 0xff)
|
||||
m_samples->start(m_solenoid_features[16][0], m_solenoid_features[16][2]);
|
||||
}
|
||||
if ((m_u11b & 0x20) && ((data & 0x20)==0))
|
||||
{
|
||||
output_set_value("solenoid17", TRUE); // Coin Lockout Coil engage
|
||||
machine().output().set_value("solenoid17", TRUE); // Coin Lockout Coil engage
|
||||
if (m_solenoid_features[17][0] != 0xff)
|
||||
m_samples->start(m_solenoid_features[17][0], m_solenoid_features[17][1]);
|
||||
}
|
||||
else if ((data & 0x20) && ((m_u11b & 0x20)==0))
|
||||
{
|
||||
output_set_value("solenoid17", FALSE); // Coin Lockout Coil release
|
||||
machine().output().set_value("solenoid17", FALSE); // Coin Lockout Coil release
|
||||
if (m_solenoid_features[17][0] != 0xff)
|
||||
m_samples->start(m_solenoid_features[17][0], m_solenoid_features[17][2]);
|
||||
}
|
||||
if ((m_u11b & 0x40) && ((data & 0x40)==0))
|
||||
{
|
||||
output_set_value("solenoid18", TRUE); // Flipper Enable Relay engage
|
||||
machine().output().set_value("solenoid18", TRUE); // Flipper Enable Relay engage
|
||||
if (m_solenoid_features[18][0] != 0xff)
|
||||
m_samples->start(m_solenoid_features[18][0], m_solenoid_features[18][1]);
|
||||
}
|
||||
else if ((data & 0x40) && ((m_u11b & 0x40)==0))
|
||||
{
|
||||
output_set_value("solenoid18", FALSE); // Flipper Enable Relay release
|
||||
machine().output().set_value("solenoid18", FALSE); // Flipper Enable Relay release
|
||||
if (m_solenoid_features[18][0] != 0xff)
|
||||
m_samples->start(m_solenoid_features[18][0], m_solenoid_features[18][2]);
|
||||
}
|
||||
if ((m_u11b & 0x80) && ((data & 0x80)==0))
|
||||
{
|
||||
output_set_value("solenoid19", TRUE);
|
||||
machine().output().set_value("solenoid19", TRUE);
|
||||
if (m_solenoid_features[19][0] != 0xff)
|
||||
m_samples->start(m_solenoid_features[19][0], m_solenoid_features[19][1]);
|
||||
}
|
||||
else if ((data & 0x80) && ((m_u11b & 0x80)==0))
|
||||
{
|
||||
output_set_value("solenoid19", FALSE);
|
||||
machine().output().set_value("solenoid19", FALSE);
|
||||
if (m_solenoid_features[19][0] != 0xff)
|
||||
m_samples->start(m_solenoid_features[19][0], m_solenoid_features[19][2]);
|
||||
}
|
||||
@ -823,7 +823,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( by35_state::timer_z_freq )
|
||||
|
||||
for (int i=0; i<60; i++)
|
||||
{
|
||||
output_set_indexed_value( "lamp", i, 0 );
|
||||
machine().output().set_indexed_value( "lamp", i, 0 );
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -186,7 +186,7 @@ READ8_MEMBER( by6803_state::port2_r )
|
||||
WRITE8_MEMBER( by6803_state::port2_w )
|
||||
{
|
||||
m_port2 = data;
|
||||
output_set_value("led0", BIT(data, 2)); // P22 drives LED
|
||||
machine().output().set_value("led0", BIT(data, 2)); // P22 drives LED
|
||||
}
|
||||
|
||||
// display latch strobes; display blanking
|
||||
@ -222,19 +222,19 @@ WRITE8_MEMBER( by6803_state::pia0_a_w )
|
||||
switch (m_pia0_a)
|
||||
{
|
||||
case 0x10: // wrong
|
||||
output_set_digit_value(m_digit, m_segment);
|
||||
machine().output().set_digit_value(m_digit, m_segment);
|
||||
break;
|
||||
case 0x1d:
|
||||
output_set_digit_value(8+m_digit, m_segment);
|
||||
machine().output().set_digit_value(8+m_digit, m_segment);
|
||||
break;
|
||||
case 0x1b:
|
||||
output_set_digit_value(16+m_digit, m_segment);
|
||||
machine().output().set_digit_value(16+m_digit, m_segment);
|
||||
break;
|
||||
case 0x07:
|
||||
output_set_digit_value(24+m_digit, m_segment);
|
||||
machine().output().set_digit_value(24+m_digit, m_segment);
|
||||
break;
|
||||
case 0x0f:
|
||||
output_set_digit_value(32+m_digit, m_segment);
|
||||
machine().output().set_digit_value(32+m_digit, m_segment);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -202,7 +202,7 @@ WRITE8_MEMBER( c80_state::pio1_pb_w )
|
||||
|
||||
if (!m_pio1_a5)
|
||||
{
|
||||
output_set_digit_value(m_digit, data);
|
||||
machine().output().set_digit_value(m_digit, data);
|
||||
}
|
||||
|
||||
m_keylatch = data;
|
||||
|
@ -159,7 +159,7 @@ WRITE8_MEMBER(cabaret_state::cabaret_nmi_and_coins_w)
|
||||
machine().bookkeeping().coin_counter_w(2, data & 0x08); // key in
|
||||
machine().bookkeeping().coin_counter_w(3, data & 0x10); // coin m_out mech
|
||||
|
||||
set_led_status(machine(), 6, data & 0x40); // led for coin m_out / hopper active
|
||||
machine().output().set_led_value(6, data & 0x40); // led for coin m_out / hopper active
|
||||
|
||||
m_nmi_enable = data; // data & 0x80 // nmi enable?
|
||||
|
||||
|
@ -784,33 +784,33 @@ WRITE8_MEMBER(calomega_state::pia1_bout_w)
|
||||
WRITE8_MEMBER(calomega_state::lamps_903a_w)
|
||||
{
|
||||
/* First 5 bits of PIA0 port B */
|
||||
output_set_lamp_value(1, 1-((data) & 1)); /* L1 (Hold 1) */
|
||||
output_set_lamp_value(2, 1-((data >> 1) & 1)); /* L2 (Hold 2) */
|
||||
output_set_lamp_value(3, 1-((data >> 2) & 1)); /* L3 (Hold 3) */
|
||||
output_set_lamp_value(4, 1-((data >> 3) & 1)); /* L4 (Hold 4) */
|
||||
output_set_lamp_value(5, 1-((data >> 4) & 1)); /* L5 (Hold 5) */
|
||||
machine().output().set_lamp_value(1, 1-((data) & 1)); /* L1 (Hold 1) */
|
||||
machine().output().set_lamp_value(2, 1-((data >> 1) & 1)); /* L2 (Hold 2) */
|
||||
machine().output().set_lamp_value(3, 1-((data >> 2) & 1)); /* L3 (Hold 3) */
|
||||
machine().output().set_lamp_value(4, 1-((data >> 3) & 1)); /* L4 (Hold 4) */
|
||||
machine().output().set_lamp_value(5, 1-((data >> 4) & 1)); /* L5 (Hold 5) */
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(calomega_state::lamps_903b_w)
|
||||
{
|
||||
/* First 4 bits of PIA1 port A */
|
||||
output_set_lamp_value(6, 1-((data) & 1)); /* L6 (Cancel) */
|
||||
output_set_lamp_value(7, 1-((data >> 1) & 1)); /* L7 (Bet) */
|
||||
output_set_lamp_value(8, 1-((data >> 2) & 1)); /* L8 (Take) */
|
||||
output_set_lamp_value(9, 1-((data >> 3) & 1)); /* L9 (Door?) */
|
||||
machine().output().set_lamp_value(6, 1-((data) & 1)); /* L6 (Cancel) */
|
||||
machine().output().set_lamp_value(7, 1-((data >> 1) & 1)); /* L7 (Bet) */
|
||||
machine().output().set_lamp_value(8, 1-((data >> 2) & 1)); /* L8 (Take) */
|
||||
machine().output().set_lamp_value(9, 1-((data >> 3) & 1)); /* L9 (Door?) */
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(calomega_state::lamps_905_w)
|
||||
{
|
||||
/* Whole 8 bits of PIA0 port B */
|
||||
output_set_lamp_value(1, 1-((data) & 1)); /* L1 (Hold 1) */
|
||||
output_set_lamp_value(2, 1-((data >> 1) & 1)); /* L2 (Hold 2) */
|
||||
output_set_lamp_value(3, 1-((data >> 2) & 1)); /* L3 (Hold 3) */
|
||||
output_set_lamp_value(4, 1-((data >> 3) & 1)); /* L4 (Hold 4) */
|
||||
output_set_lamp_value(5, 1-((data >> 4) & 1)); /* L5 (Hold 5) */
|
||||
output_set_lamp_value(6, 1-((data >> 5) & 1)); /* L6 (unknown) */
|
||||
output_set_lamp_value(7, 1-((data >> 6) & 1)); /* L7 (unknown) */
|
||||
output_set_lamp_value(8, 1-((data >> 7) & 1)); /* L8 (unknown) */
|
||||
machine().output().set_lamp_value(1, 1-((data) & 1)); /* L1 (Hold 1) */
|
||||
machine().output().set_lamp_value(2, 1-((data >> 1) & 1)); /* L2 (Hold 2) */
|
||||
machine().output().set_lamp_value(3, 1-((data >> 2) & 1)); /* L3 (Hold 3) */
|
||||
machine().output().set_lamp_value(4, 1-((data >> 3) & 1)); /* L4 (Hold 4) */
|
||||
machine().output().set_lamp_value(5, 1-((data >> 4) & 1)); /* L5 (Hold 5) */
|
||||
machine().output().set_lamp_value(6, 1-((data >> 5) & 1)); /* L6 (unknown) */
|
||||
machine().output().set_lamp_value(7, 1-((data >> 6) & 1)); /* L7 (unknown) */
|
||||
machine().output().set_lamp_value(8, 1-((data >> 7) & 1)); /* L8 (unknown) */
|
||||
}
|
||||
|
||||
|
||||
|
@ -95,7 +95,7 @@ READ8_MEMBER(canyon_state::canyon_options_r)
|
||||
|
||||
WRITE8_MEMBER(canyon_state::canyon_led_w)
|
||||
{
|
||||
set_led_status(machine(), offset & 0x01, offset & 0x02);
|
||||
machine().output().set_led_value(offset & 0x01, offset & 0x02);
|
||||
}
|
||||
|
||||
|
||||
|
@ -196,14 +196,14 @@ READ8_MEMBER(cardline_state::hsync_r)
|
||||
WRITE8_MEMBER(cardline_state::lamps_w)
|
||||
{
|
||||
/* button lamps 1-8 (collect, card 1-5, bet, start) */
|
||||
output_set_lamp_value(5,(data >> 0) & 1);
|
||||
output_set_lamp_value(0,(data >> 1) & 1);
|
||||
output_set_lamp_value(1,(data >> 2) & 1);
|
||||
output_set_lamp_value(2,(data >> 3) & 1);
|
||||
output_set_lamp_value(3,(data >> 4) & 1);
|
||||
output_set_lamp_value(4,(data >> 5) & 1);
|
||||
output_set_lamp_value(6,(data >> 6) & 1);
|
||||
output_set_lamp_value(7,(data >> 7) & 1);
|
||||
machine().output().set_lamp_value(5,(data >> 0) & 1);
|
||||
machine().output().set_lamp_value(0,(data >> 1) & 1);
|
||||
machine().output().set_lamp_value(1,(data >> 2) & 1);
|
||||
machine().output().set_lamp_value(2,(data >> 3) & 1);
|
||||
machine().output().set_lamp_value(3,(data >> 4) & 1);
|
||||
machine().output().set_lamp_value(4,(data >> 5) & 1);
|
||||
machine().output().set_lamp_value(6,(data >> 6) & 1);
|
||||
machine().output().set_lamp_value(7,(data >> 7) & 1);
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( mem_prg, AS_PROGRAM, 8, cardline_state )
|
||||
|
@ -179,11 +179,11 @@ WRITE8_MEMBER(caswin_state::vvillage_lamps_w)
|
||||
---- --x- lamp button 2
|
||||
---- ---x lamp button 1
|
||||
*/
|
||||
set_led_status(machine(), 0, data & 0x01);
|
||||
set_led_status(machine(), 1, data & 0x02);
|
||||
set_led_status(machine(), 2, data & 0x04);
|
||||
set_led_status(machine(), 3, data & 0x08);
|
||||
set_led_status(machine(), 4, data & 0x10);
|
||||
machine().output().set_led_value(0, data & 0x01);
|
||||
machine().output().set_led_value(1, data & 0x02);
|
||||
machine().output().set_led_value(2, data & 0x04);
|
||||
machine().output().set_led_value(3, data & 0x08);
|
||||
machine().output().set_led_value(4, data & 0x10);
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( vvillage_mem, AS_PROGRAM, 8, caswin_state )
|
||||
|
@ -640,10 +640,10 @@ WRITE16_MEMBER(cave_state::korokoro_leds_w)
|
||||
{
|
||||
COMBINE_DATA(&m_leds[0]);
|
||||
|
||||
set_led_status(machine(), 0, data & 0x8000);
|
||||
set_led_status(machine(), 1, data & 0x4000);
|
||||
set_led_status(machine(), 2, data & 0x1000); // square button
|
||||
set_led_status(machine(), 3, data & 0x0800); // round button
|
||||
machine().output().set_led_value(0, data & 0x8000);
|
||||
machine().output().set_led_value(1, data & 0x4000);
|
||||
machine().output().set_led_value(2, data & 0x1000); // square button
|
||||
machine().output().set_led_value(3, data & 0x0800); // round button
|
||||
// machine().bookkeeping().coin_lockout_w(1, ~data & 0x0200); // coin lockouts?
|
||||
// machine().bookkeeping().coin_lockout_w(0, ~data & 0x0100);
|
||||
|
||||
@ -651,10 +651,10 @@ WRITE16_MEMBER(cave_state::korokoro_leds_w)
|
||||
// machine().bookkeeping().coin_counter_w(1, data & 0x0020);
|
||||
machine().bookkeeping().coin_counter_w(0, data & 0x0010);
|
||||
|
||||
set_led_status(machine(), 5, data & 0x0008);
|
||||
set_led_status(machine(), 6, data & 0x0004);
|
||||
set_led_status(machine(), 7, data & 0x0002);
|
||||
set_led_status(machine(), 8, data & 0x0001);
|
||||
machine().output().set_led_value(5, data & 0x0008);
|
||||
machine().output().set_led_value(6, data & 0x0004);
|
||||
machine().output().set_led_value(7, data & 0x0002);
|
||||
machine().output().set_led_value(8, data & 0x0001);
|
||||
|
||||
show_leds();
|
||||
}
|
||||
@ -845,17 +845,17 @@ WRITE16_MEMBER(cave_state::ppsatan_out_w)
|
||||
{
|
||||
machine().bookkeeping().coin_counter_w(0, data & 0x0001);
|
||||
|
||||
set_led_status(machine(), 0, data & 0x0010);
|
||||
set_led_status(machine(), 1, data & 0x0020);
|
||||
set_led_status(machine(), 2, data & 0x0040);
|
||||
set_led_status(machine(), 3, data & 0x0080);
|
||||
machine().output().set_led_value(0, data & 0x0010);
|
||||
machine().output().set_led_value(1, data & 0x0020);
|
||||
machine().output().set_led_value(2, data & 0x0040);
|
||||
machine().output().set_led_value(3, data & 0x0080);
|
||||
}
|
||||
if (ACCESSING_BITS_8_15)
|
||||
{
|
||||
set_led_status(machine(), 4, data & 0x0100);
|
||||
set_led_status(machine(), 5, data & 0x0200);
|
||||
set_led_status(machine(), 6, data & 0x0400); // not tested in service mode
|
||||
set_led_status(machine(), 7, data & 0x0800); // not tested in service mode
|
||||
machine().output().set_led_value(4, data & 0x0100);
|
||||
machine().output().set_led_value(5, data & 0x0200);
|
||||
machine().output().set_led_value(6, data & 0x0400); // not tested in service mode
|
||||
machine().output().set_led_value(7, data & 0x0800); // not tested in service mode
|
||||
|
||||
m_oki->set_bank_base((data & 0x8000) ? 0x40000 : 0);
|
||||
}
|
||||
@ -1027,14 +1027,14 @@ WRITE16_MEMBER(cave_state::tjumpman_leds_w)
|
||||
{
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
set_led_status(machine(), 0, data & 0x0001); // suru
|
||||
set_led_status(machine(), 1, data & 0x0002); // shinai
|
||||
set_led_status(machine(), 2, data & 0x0004); // payout
|
||||
set_led_status(machine(), 3, data & 0x0008); // go
|
||||
set_led_status(machine(), 4, data & 0x0010); // 1 bet
|
||||
set_led_status(machine(), 5, data & 0x0020); // medal
|
||||
machine().output().set_led_value(0, data & 0x0001); // suru
|
||||
machine().output().set_led_value(1, data & 0x0002); // shinai
|
||||
machine().output().set_led_value(2, data & 0x0004); // payout
|
||||
machine().output().set_led_value(3, data & 0x0008); // go
|
||||
machine().output().set_led_value(4, data & 0x0010); // 1 bet
|
||||
machine().output().set_led_value(5, data & 0x0020); // medal
|
||||
m_hopper = data & 0x0040; // hopper
|
||||
set_led_status(machine(), 6, data & 0x0080); // 3 bet
|
||||
machine().output().set_led_value(6, data & 0x0080); // 3 bet
|
||||
}
|
||||
|
||||
// popmessage("led %04X", data);
|
||||
@ -1073,12 +1073,12 @@ WRITE16_MEMBER(cave_state::pacslot_leds_w)
|
||||
{
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
set_led_status(machine(), 0, data & 0x0001); // pac-man
|
||||
set_led_status(machine(), 1, data & 0x0002); // ms. pac-man
|
||||
set_led_status(machine(), 2, data & 0x0004); // payout
|
||||
set_led_status(machine(), 3, data & 0x0008); // start
|
||||
set_led_status(machine(), 4, data & 0x0010); // bet
|
||||
set_led_status(machine(), 5, data & 0x0020); // medal
|
||||
machine().output().set_led_value(0, data & 0x0001); // pac-man
|
||||
machine().output().set_led_value(1, data & 0x0002); // ms. pac-man
|
||||
machine().output().set_led_value(2, data & 0x0004); // payout
|
||||
machine().output().set_led_value(3, data & 0x0008); // start
|
||||
machine().output().set_led_value(4, data & 0x0010); // bet
|
||||
machine().output().set_led_value(5, data & 0x0020); // medal
|
||||
m_hopper = data & 0x0040; // hopper
|
||||
}
|
||||
|
||||
|
@ -195,7 +195,7 @@ void cc40_state::update_lcd_indicator(UINT8 y, UINT8 x, int state)
|
||||
// ---- raw lcd screen here ----
|
||||
// under | ERROR v v v v v v _LOW
|
||||
// output# | 60 61 62 63 50 51 52 53
|
||||
output_set_lamp_value(y * 10 + x, state);
|
||||
machine().output().set_lamp_value(y * 10 + x, state);
|
||||
}
|
||||
|
||||
static HD44780_PIXEL_UPDATE(cc40_pixel_update)
|
||||
|
@ -249,7 +249,7 @@ WRITE8_MEMBER(ccastles_state::irq_ack_w)
|
||||
|
||||
WRITE8_MEMBER(ccastles_state::led_w)
|
||||
{
|
||||
set_led_status(machine(), offset, ~data & 1);
|
||||
machine().output().set_led_value(offset, ~data & 1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -617,7 +617,7 @@ READ8_MEMBER(centiped_state::bullsdrt_data_port_r)
|
||||
|
||||
WRITE8_MEMBER(centiped_state::led_w)
|
||||
{
|
||||
set_led_status(machine(), offset, ~data & 0x80);
|
||||
machine().output().set_led_value(offset, ~data & 0x80);
|
||||
}
|
||||
|
||||
|
||||
|
@ -168,13 +168,13 @@ WRITE8_MEMBER(chance32_state::muxout_w)
|
||||
if (data & 1) // bit 0 is the mux selector.
|
||||
|
||||
{
|
||||
output_set_lamp_value(0, (data >> 1) & 1); /* Lamp 0 - Small / Big */
|
||||
output_set_lamp_value(1, (data >> 2) & 1); /* Lamp 1 - Big / Small */
|
||||
output_set_lamp_value(2, (data >> 3) & 1); /* Lamp 2 - Hold 5 */
|
||||
output_set_lamp_value(3, (data >> 4) & 1); /* Lamp 3 - Hold 4 */
|
||||
output_set_lamp_value(4, (data >> 5) & 1); /* Lamp 4 - Hold 3 */
|
||||
output_set_lamp_value(5, (data >> 6) & 1); /* Lamp 5 - Hold 2 */
|
||||
output_set_lamp_value(6, (data >> 7) & 1); /* Lamp 6 - Hold 1 */
|
||||
machine().output().set_lamp_value(0, (data >> 1) & 1); /* Lamp 0 - Small / Big */
|
||||
machine().output().set_lamp_value(1, (data >> 2) & 1); /* Lamp 1 - Big / Small */
|
||||
machine().output().set_lamp_value(2, (data >> 3) & 1); /* Lamp 2 - Hold 5 */
|
||||
machine().output().set_lamp_value(3, (data >> 4) & 1); /* Lamp 3 - Hold 4 */
|
||||
machine().output().set_lamp_value(4, (data >> 5) & 1); /* Lamp 4 - Hold 3 */
|
||||
machine().output().set_lamp_value(5, (data >> 6) & 1); /* Lamp 5 - Hold 2 */
|
||||
machine().output().set_lamp_value(6, (data >> 7) & 1); /* Lamp 6 - Hold 1 */
|
||||
|
||||
logerror("Lamps A: %02x\n", data);
|
||||
}
|
||||
@ -182,12 +182,12 @@ WRITE8_MEMBER(chance32_state::muxout_w)
|
||||
else
|
||||
{
|
||||
// bit 1 is unknown...
|
||||
output_set_lamp_value(7, (data >> 2) & 1); /* Lamp 7 - Fever! */
|
||||
output_set_lamp_value(8, (data >> 3) & 1); /* Lamp 8 - Cancel */
|
||||
output_set_lamp_value(9, (data >> 4) & 1); /* Lamp 9 - D-Up / Take */
|
||||
output_set_lamp_value(10, (data >> 5) & 1); /* Lamp 10 - Take / D-Up */
|
||||
output_set_lamp_value(11, (data >> 6) & 1); /* Lamp 11 - Deal */
|
||||
output_set_lamp_value(12, (data >> 7) & 1); /* Lamp 12 - Bet */
|
||||
machine().output().set_lamp_value(7, (data >> 2) & 1); /* Lamp 7 - Fever! */
|
||||
machine().output().set_lamp_value(8, (data >> 3) & 1); /* Lamp 8 - Cancel */
|
||||
machine().output().set_lamp_value(9, (data >> 4) & 1); /* Lamp 9 - D-Up / Take */
|
||||
machine().output().set_lamp_value(10, (data >> 5) & 1); /* Lamp 10 - Take / D-Up */
|
||||
machine().output().set_lamp_value(11, (data >> 6) & 1); /* Lamp 11 - Deal */
|
||||
machine().output().set_lamp_value(12, (data >> 7) & 1); /* Lamp 12 - Bet */
|
||||
|
||||
logerror("Lamps B: %02x\n", data);
|
||||
}
|
||||
|
@ -170,25 +170,25 @@ WRITE8_MEMBER( chessmst_state::pio1_port_a_w )
|
||||
for (int row=1; row<=8; row++)
|
||||
{
|
||||
if (m_led_sel & 0x01)
|
||||
output_set_indexed_value("led_a", row, BIT(data, 8-row));
|
||||
machine().output().set_indexed_value("led_a", row, BIT(data, 8-row));
|
||||
if (m_led_sel & 0x02)
|
||||
output_set_indexed_value("led_b", row, BIT(data, 8-row));
|
||||
machine().output().set_indexed_value("led_b", row, BIT(data, 8-row));
|
||||
if (m_led_sel & 0x04)
|
||||
output_set_indexed_value("led_c", row, BIT(data, 8-row));
|
||||
machine().output().set_indexed_value("led_c", row, BIT(data, 8-row));
|
||||
if (m_led_sel & 0x08)
|
||||
output_set_indexed_value("led_d", row, BIT(data, 8-row));
|
||||
machine().output().set_indexed_value("led_d", row, BIT(data, 8-row));
|
||||
if (m_led_sel & 0x10)
|
||||
output_set_indexed_value("led_e", row, BIT(data, 8-row));
|
||||
machine().output().set_indexed_value("led_e", row, BIT(data, 8-row));
|
||||
if (m_led_sel & 0x20)
|
||||
output_set_indexed_value("led_f", row, BIT(data, 8-row));
|
||||
machine().output().set_indexed_value("led_f", row, BIT(data, 8-row));
|
||||
if (m_led_sel & 0x40)
|
||||
output_set_indexed_value("led_g", row, BIT(data, 8-row));
|
||||
machine().output().set_indexed_value("led_g", row, BIT(data, 8-row));
|
||||
if (m_led_sel & 0x80)
|
||||
output_set_indexed_value("led_h", row, BIT(data, 8-row));
|
||||
machine().output().set_indexed_value("led_h", row, BIT(data, 8-row));
|
||||
if (m_led_sel & 0x100)
|
||||
output_set_indexed_value("led_i", row, BIT(data, 8-row));
|
||||
machine().output().set_indexed_value("led_i", row, BIT(data, 8-row));
|
||||
if (m_led_sel & 0x200)
|
||||
output_set_indexed_value("led_j", row, BIT(data, 8-row));
|
||||
machine().output().set_indexed_value("led_j", row, BIT(data, 8-row));
|
||||
}
|
||||
|
||||
m_led_sel = 0;
|
||||
|
@ -66,13 +66,13 @@ WRITE8_MEMBER( chesstrv_state::display_w )
|
||||
UINT8 seg_data = BITSWAP8(data,0,1,2,3,4,5,6,7);
|
||||
|
||||
if(!(m_matrix & 0x01))
|
||||
output_set_digit_value( 3, seg_data );
|
||||
machine().output().set_digit_value( 3, seg_data );
|
||||
if(!(m_matrix & 0x02))
|
||||
output_set_digit_value( 2, seg_data );
|
||||
machine().output().set_digit_value( 2, seg_data );
|
||||
if(!(m_matrix & 0x04))
|
||||
output_set_digit_value( 1, seg_data );
|
||||
machine().output().set_digit_value( 1, seg_data );
|
||||
if(!(m_matrix & 0x08))
|
||||
output_set_digit_value( 0, seg_data );
|
||||
machine().output().set_digit_value( 0, seg_data );
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( chesstrv_state::matrix_w )
|
||||
@ -98,7 +98,7 @@ READ8_MEMBER( chesstrv_state::keypad_r )
|
||||
|
||||
WRITE8_MEMBER( chesstrv_state::diplomat_display_w )
|
||||
{
|
||||
output_set_digit_value( m_matrix & 7, data ^ 0xff );
|
||||
machine().output().set_digit_value( m_matrix & 7, data ^ 0xff );
|
||||
}
|
||||
|
||||
READ8_MEMBER( chesstrv_state::diplomat_keypad_r )
|
||||
|
@ -133,16 +133,16 @@ WRITE_LINE_MEMBER(chexx_state::via_cb2_out)
|
||||
// 7segs (score)
|
||||
static const UINT8 patterns[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7c, 0x07, 0x7f, 0x67, 0, 0, 0, 0, 0, 0 }; // 4511
|
||||
|
||||
output_set_digit_value(0, patterns[(m_shift >> (16+4)) & 0xf]);
|
||||
output_set_digit_value(1, patterns[(m_shift >> (16+0)) & 0xf]);
|
||||
machine().output().set_digit_value(0, patterns[(m_shift >> (16+4)) & 0xf]);
|
||||
machine().output().set_digit_value(1, patterns[(m_shift >> (16+0)) & 0xf]);
|
||||
|
||||
output_set_digit_value(2, patterns[(m_shift >> (8+4)) & 0xf]);
|
||||
output_set_digit_value(3, patterns[(m_shift >> (8+0)) & 0xf]);
|
||||
machine().output().set_digit_value(2, patterns[(m_shift >> (8+4)) & 0xf]);
|
||||
machine().output().set_digit_value(3, patterns[(m_shift >> (8+0)) & 0xf]);
|
||||
|
||||
// Leds (period being played)
|
||||
output_set_led_value(0, BIT(m_shift,2));
|
||||
output_set_led_value(1, BIT(m_shift,1));
|
||||
output_set_led_value(2, BIT(m_shift,0));
|
||||
machine().output().set_led_value(0, BIT(m_shift,2));
|
||||
machine().output().set_led_value(1, BIT(m_shift,1));
|
||||
machine().output().set_led_value(2, BIT(m_shift,0));
|
||||
|
||||
// logerror("%s: VIA write CB2 = %02X\n", machine().describe_context(), state);
|
||||
}
|
||||
@ -178,8 +178,8 @@ ADDRESS_MAP_END
|
||||
WRITE8_MEMBER(chexx_state::lamp_w)
|
||||
{
|
||||
m_lamp = data;
|
||||
output_set_lamp_value(0, BIT(m_lamp,0));
|
||||
output_set_lamp_value(1, BIT(m_lamp,1));
|
||||
machine().output().set_lamp_value(0, BIT(m_lamp,0));
|
||||
machine().output().set_lamp_value(1, BIT(m_lamp,1));
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(chexx_state::ay_w)
|
||||
|
@ -138,11 +138,11 @@ WRITE8_MEMBER( chsuper_state::chsuper_vram_w )
|
||||
WRITE8_MEMBER( chsuper_state::chsuper_outporta_w ) // Port EEh
|
||||
{
|
||||
machine().bookkeeping().coin_counter_w(0, data & 0x01); // Coin counter
|
||||
output_set_lamp_value(0, (data >> 1) & 1); // Hold 1 / Black (Nero) lamp.
|
||||
machine().output().set_lamp_value(0, (data >> 1) & 1); // Hold 1 / Black (Nero) lamp.
|
||||
machine().bookkeeping().coin_counter_w(1, data & 0x04); // Payout / Ticket Out pulse
|
||||
output_set_lamp_value(1, (data >> 3) & 1); // Hold 2 / Low (Bassa) lamp.
|
||||
machine().output().set_lamp_value(1, (data >> 3) & 1); // Hold 2 / Low (Bassa) lamp.
|
||||
// D4: unused...
|
||||
output_set_lamp_value(5, (data >> 5) & 1); // BET lamp
|
||||
machine().output().set_lamp_value(5, (data >> 5) & 1); // BET lamp
|
||||
// D6: ticket motor...
|
||||
// D7: unused...
|
||||
|
||||
@ -153,11 +153,11 @@ WRITE8_MEMBER( chsuper_state::chsuper_outporta_w ) // Port EEh
|
||||
|
||||
if ((m_blacklamp == 1) & (m_redlamp == 1)) // if both are ON...
|
||||
{
|
||||
output_set_lamp_value(2, 1); // HOLD 3 ON
|
||||
machine().output().set_lamp_value(2, 1); // HOLD 3 ON
|
||||
}
|
||||
else
|
||||
{
|
||||
output_set_lamp_value(2, 0); // otherwise HOLD 3 OFF
|
||||
machine().output().set_lamp_value(2, 0); // otherwise HOLD 3 OFF
|
||||
}
|
||||
}
|
||||
|
||||
@ -165,11 +165,11 @@ WRITE8_MEMBER( chsuper_state::chsuper_outportb_w ) // Port EFh
|
||||
{
|
||||
// D0: unknown...
|
||||
// D1: unused...
|
||||
output_set_lamp_value(3, (data >> 2) & 1); // Hold 4 / High (Alta) lamp.
|
||||
machine().output().set_lamp_value(3, (data >> 2) & 1); // Hold 4 / High (Alta) lamp.
|
||||
// D3: unused...
|
||||
// D4: unused...
|
||||
output_set_lamp_value(4, (data >> 5) & 1); // Hold 5 / Red (Rosso) / Gamble (Raddoppio) lamp.
|
||||
output_set_lamp_value(6, (data >> 6) & 1); // Start / Gamble (Raddoppio) lamp.
|
||||
machine().output().set_lamp_value(4, (data >> 5) & 1); // Hold 5 / Red (Rosso) / Gamble (Raddoppio) lamp.
|
||||
machine().output().set_lamp_value(6, (data >> 6) & 1); // Start / Gamble (Raddoppio) lamp.
|
||||
// D7: unused...
|
||||
|
||||
/* Workaround to get the HOLD 3 lamp line active,
|
||||
@ -179,11 +179,11 @@ WRITE8_MEMBER( chsuper_state::chsuper_outportb_w ) // Port EFh
|
||||
|
||||
if ((m_blacklamp == 1) & (m_redlamp == 1)) // if both are ON...
|
||||
{
|
||||
output_set_lamp_value(2, 1); // Hold 3 ON
|
||||
machine().output().set_lamp_value(2, 1); // Hold 3 ON
|
||||
}
|
||||
else
|
||||
{
|
||||
output_set_lamp_value(2, 0); // Hold 3 OFF
|
||||
machine().output().set_lamp_value(2, 0); // Hold 3 OFF
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -113,9 +113,9 @@ WRITE8_MEMBER( cidelsa_state::altair_out1_w )
|
||||
7 CONT. M1
|
||||
*/
|
||||
|
||||
set_led_status(machine(), 0, data & 0x08); // 1P
|
||||
set_led_status(machine(), 1, data & 0x10); // 2P
|
||||
set_led_status(machine(), 2, data & 0x20); // FIRE
|
||||
machine().output().set_led_value(0, data & 0x08); // 1P
|
||||
machine().output().set_led_value(1, data & 0x10); // 2P
|
||||
machine().output().set_led_value(2, data & 0x20); // FIRE
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( draco_state::out1_w )
|
||||
|
@ -384,15 +384,15 @@ WRITE16_MEMBER(cischeat_state::scudhamm_leds_w)
|
||||
{
|
||||
if (ACCESSING_BITS_8_15)
|
||||
{
|
||||
set_led_status(machine(), 0, data & 0x0100); // 3 buttons
|
||||
set_led_status(machine(), 1, data & 0x0200);
|
||||
set_led_status(machine(), 2, data & 0x0400);
|
||||
machine().output().set_led_value(0, data & 0x0100); // 3 buttons
|
||||
machine().output().set_led_value(1, data & 0x0200);
|
||||
machine().output().set_led_value(2, data & 0x0400);
|
||||
}
|
||||
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
// set_led_status(machine(), 3, data & 0x0010); // if we had more leds..
|
||||
// set_led_status(machine(), 4, data & 0x0020);
|
||||
// machine().output().set_led_value(3, data & 0x0010); // if we had more leds..
|
||||
// machine().output().set_led_value(4, data & 0x0020);
|
||||
}
|
||||
}
|
||||
|
||||
@ -483,10 +483,10 @@ WRITE16_MEMBER(cischeat_state::armchmp2_leds_w)
|
||||
{
|
||||
if (ACCESSING_BITS_8_15)
|
||||
{
|
||||
set_led_status(machine(), 0, data & 0x0100);
|
||||
set_led_status(machine(), 1, data & 0x1000);
|
||||
set_led_status(machine(), 2, data & 0x2000);
|
||||
set_led_status(machine(), 3, data & 0x4000);
|
||||
machine().output().set_led_value(0, data & 0x0100);
|
||||
machine().output().set_led_value(1, data & 0x1000);
|
||||
machine().output().set_led_value(2, data & 0x2000);
|
||||
machine().output().set_led_value(3, data & 0x4000);
|
||||
}
|
||||
|
||||
if (ACCESSING_BITS_0_7)
|
||||
@ -526,9 +526,9 @@ WRITE16_MEMBER(cischeat_state::captflag_leds_w)
|
||||
if (ACCESSING_BITS_8_15)
|
||||
{
|
||||
machine().bookkeeping().coin_counter_w(1, data & 0x0100); // coin 2
|
||||
set_led_status(machine(), 0, data & 0x0200); // decide
|
||||
machine().output().set_led_value(0, data & 0x0200); // decide
|
||||
machine().bookkeeping().coin_counter_w(0, data & 0x0400); // coin 1
|
||||
set_led_status(machine(), 1, data & 0x2000); // select
|
||||
machine().output().set_led_value(1, data & 0x2000); // select
|
||||
|
||||
int power = (data & 0x1000);
|
||||
m_captflag_hopper->write(space, 0, power ? 0x80 : 0x00); // prize motor
|
||||
@ -621,7 +621,7 @@ void cischeat_state::captflag_motor_move(int side, UINT16 data)
|
||||
dev.reset();
|
||||
}
|
||||
|
||||
output_set_value((side == RIGHT) ? "right" : "left", pos);
|
||||
machine().output().set_value((side == RIGHT) ? "right" : "left", pos);
|
||||
}
|
||||
|
||||
CUSTOM_INPUT_MEMBER(cischeat_state::captflag_motor_pos_r)
|
||||
|
@ -128,7 +128,7 @@ public:
|
||||
|
||||
WRITE8_MEMBER(cliffhgr_state::cliff_test_led_w)
|
||||
{
|
||||
set_led_status(machine(), 0, offset ^ 1);
|
||||
machine().output().set_led_value(0, offset ^ 1);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(cliffhgr_state::cliff_port_bank_w)
|
||||
|
@ -130,7 +130,7 @@
|
||||
|
||||
WRITE8_MEMBER(cloak_state::cloak_led_w)
|
||||
{
|
||||
set_led_status(machine(), 1 - offset, ~data & 0x80);
|
||||
machine().output().set_led_value(1 - offset, ~data & 0x80);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(cloak_state::cloak_coin_counter_w)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user