mirror of
https://github.com/holub/mame
synced 2025-05-07 06:44:51 +03:00
-output: Removed legacy output handlers from aristmk4, aristmk5. [Ryan Holtz]
This commit is contained in:
parent
22e7581a2b
commit
7f4adf84ab
@ -363,7 +363,12 @@ public:
|
|||||||
m_samples(*this, "samples"),
|
m_samples(*this, "samples"),
|
||||||
m_mkiv_vram(*this, "mkiv_vram"),
|
m_mkiv_vram(*this, "mkiv_vram"),
|
||||||
m_gfxdecode(*this, "gfxdecode"),
|
m_gfxdecode(*this, "gfxdecode"),
|
||||||
m_palette(*this, "palette") { }
|
m_palette(*this, "palette"),
|
||||||
|
m_credit_spend_meter(*this, "creditspendmeter"),
|
||||||
|
m_credit_out_meter(*this, "creditoutmeter"),
|
||||||
|
m_hopper_motor_out(*this, "hopper_motor"),
|
||||||
|
m_lamps(*this, "lamp%u", 0U)
|
||||||
|
{ }
|
||||||
|
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
required_device<mc146818_device> m_rtc;
|
required_device<mc146818_device> m_rtc;
|
||||||
@ -375,6 +380,11 @@ public:
|
|||||||
required_device<gfxdecode_device> m_gfxdecode;
|
required_device<gfxdecode_device> m_gfxdecode;
|
||||||
required_device<palette_device> m_palette;
|
required_device<palette_device> m_palette;
|
||||||
|
|
||||||
|
output_finder<> m_credit_spend_meter;
|
||||||
|
output_finder<> m_credit_out_meter;
|
||||||
|
output_finder<> m_hopper_motor_out;
|
||||||
|
output_finder<21> m_lamps;
|
||||||
|
|
||||||
int m_rtc_address_strobe;
|
int m_rtc_address_strobe;
|
||||||
int m_rtc_data_strobe;
|
int m_rtc_data_strobe;
|
||||||
uint8_t *m_shapeRomPtr;
|
uint8_t *m_shapeRomPtr;
|
||||||
@ -555,8 +565,8 @@ READ8_MEMBER(aristmk4_state::u3_p2)
|
|||||||
int u3_p2_ret= ioport("5002")->read();
|
int u3_p2_ret= ioport("5002")->read();
|
||||||
int u3_p3_ret= ioport("5003")->read();
|
int u3_p3_ret= ioport("5003")->read();
|
||||||
|
|
||||||
output().set_lamp_value(19, (u3_p2_ret >> 4) & 1); //auditkey light
|
m_lamps[19] = BIT(u3_p2_ret, 4);
|
||||||
output().set_lamp_value(20, (u3_p3_ret >> 2) & 1); //jackpotkey light
|
m_lamps[20] = BIT(u3_p3_ret, 2);
|
||||||
|
|
||||||
if (m_u3_p0_w&0x20) // DOPTE on
|
if (m_u3_p0_w&0x20) // DOPTE on
|
||||||
{
|
{
|
||||||
@ -710,10 +720,10 @@ WRITE8_MEMBER(aristmk4_state::mkiv_pia_outb)
|
|||||||
switch(i+1)
|
switch(i+1)
|
||||||
{
|
{
|
||||||
case 4:
|
case 4:
|
||||||
output().set_value("creditspendmeter", emet[i]);
|
m_credit_spend_meter = emet[i];
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
output().set_value("creditoutmeter", emet[i]);
|
m_credit_out_meter = emet[i];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
printf("Unhandled Mechanical meter %d pulse: %02d\n",i+1, emet[i]);
|
printf("Unhandled Mechanical meter %d pulse: %02d\n",i+1, emet[i]);
|
||||||
@ -728,10 +738,10 @@ WRITE8_MEMBER(aristmk4_state::mkiv_pia_outb)
|
|||||||
switch(i+1)
|
switch(i+1)
|
||||||
{
|
{
|
||||||
case 4:
|
case 4:
|
||||||
output().set_value("creditspendmeter", 0);
|
m_credit_spend_meter = 0;
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
output().set_value("creditoutmeter", 0);
|
m_credit_out_meter = 0;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -763,7 +773,7 @@ TIMER_CALLBACK_MEMBER(aristmk4_state::coin_input_reset)
|
|||||||
TIMER_CALLBACK_MEMBER(aristmk4_state::hopper_reset)
|
TIMER_CALLBACK_MEMBER(aristmk4_state::hopper_reset)
|
||||||
{
|
{
|
||||||
m_hopper_motor = 0x01;
|
m_hopper_motor = 0x01;
|
||||||
output().set_value("hopper_motor", m_hopper_motor);
|
m_hopper_motor_out = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Port A read (SW1)
|
// Port A read (SW1)
|
||||||
@ -822,8 +832,8 @@ READ8_MEMBER(aristmk4_state::via_b_r)
|
|||||||
case 0x00:
|
case 0x00:
|
||||||
ret=ret^0x40;
|
ret=ret^0x40;
|
||||||
machine().scheduler().timer_set(attotime::from_msec(175), timer_expired_delegate(FUNC(aristmk4_state::hopper_reset),this));
|
machine().scheduler().timer_set(attotime::from_msec(175), timer_expired_delegate(FUNC(aristmk4_state::hopper_reset),this));
|
||||||
m_hopper_motor=0x02;
|
m_hopper_motor = 0x02;
|
||||||
output().set_value("hopper_motor", m_hopper_motor);
|
m_hopper_motor_out = 2;
|
||||||
break;
|
break;
|
||||||
case 0x01:
|
case 0x01:
|
||||||
break; //default
|
break; //default
|
||||||
@ -928,47 +938,47 @@ WRITE_LINE_MEMBER(aristmk4_state::via_cb2_w)
|
|||||||
// when it goes to 0, we're expecting to coins to be paid out, handled in via_b_r
|
// when it goes to 0, we're expecting to coins to be paid out, handled in via_b_r
|
||||||
// as soon as it is 1, HOPCO1 to remain 'ON'
|
// as soon as it is 1, HOPCO1 to remain 'ON'
|
||||||
|
|
||||||
if (state==0x01)
|
if (state == 0x01)
|
||||||
m_hopper_motor=state;
|
m_hopper_motor = state;
|
||||||
else if (m_hopper_motor<0x02)
|
else if (m_hopper_motor < 0x02)
|
||||||
m_hopper_motor=state;
|
m_hopper_motor = state;
|
||||||
|
|
||||||
output().set_value("hopper_motor", m_hopper_motor); // stop motor
|
m_hopper_motor_out = m_hopper_motor;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lamp output
|
// Lamp output
|
||||||
|
|
||||||
WRITE8_MEMBER(aristmk4_state::pblp_out)
|
WRITE8_MEMBER(aristmk4_state::pblp_out)
|
||||||
{
|
{
|
||||||
output().set_lamp_value(1, (data) & 1);
|
m_lamps[ 1] = BIT(data, 0);
|
||||||
output().set_lamp_value(5, (data >> 1) & 1);
|
m_lamps[ 5] = BIT(data, 1);
|
||||||
output().set_lamp_value(9, (data >> 2) & 1);
|
m_lamps[ 9] = BIT(data, 2);
|
||||||
output().set_lamp_value(11,(data >> 3) & 1);
|
m_lamps[11] = BIT(data, 3);
|
||||||
output().set_lamp_value(3, (data >> 4) & 1);
|
m_lamps[ 3] = BIT(data, 4);
|
||||||
output().set_lamp_value(4, (data >> 5) & 1);
|
m_lamps[ 4] = BIT(data, 5);
|
||||||
output().set_lamp_value(2, (data >> 6) & 1);
|
m_lamps[ 2] = BIT(data, 6);
|
||||||
output().set_lamp_value(10,(data >> 7) & 1);
|
m_lamps[10] = BIT(data, 7);
|
||||||
//logerror("Lights port A %02X\n",data);
|
//logerror("Lights port A %02X\n",data);
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE8_MEMBER(aristmk4_state::pbltlp_out)
|
WRITE8_MEMBER(aristmk4_state::pbltlp_out)
|
||||||
{
|
{
|
||||||
output().set_lamp_value(8, (data) & 1);
|
m_lamps[ 8] = BIT(data, 0);
|
||||||
output().set_lamp_value(12, (data >> 1) & 1);
|
m_lamps[12] = BIT(data, 1);
|
||||||
output().set_lamp_value(6, (data >> 2) & 1);
|
m_lamps[ 6] = BIT(data, 2);
|
||||||
output().set_lamp_value(7, (data >> 3) & 1);
|
m_lamps[ 7] = BIT(data, 3);
|
||||||
output().set_lamp_value(14, (data >> 4) & 1); // light tower
|
m_lamps[14] = BIT(data, 4); // light tower
|
||||||
output().set_lamp_value(15, (data >> 5) & 1); // light tower
|
m_lamps[15] = BIT(data, 5); // light tower
|
||||||
output().set_lamp_value(16, (data >> 6) & 1); // light tower
|
m_lamps[16] = BIT(data, 6); // light tower
|
||||||
output().set_lamp_value(17, (data >> 7) & 1); // light tower
|
m_lamps[17] = BIT(data, 7); // light tower
|
||||||
//logerror("Lights port B: %02X\n",data);
|
//logerror("Lights port B: %02X\n",data);
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE8_MEMBER(aristmk4_state::mlamps)
|
WRITE8_MEMBER(aristmk4_state::mlamps)
|
||||||
{
|
{
|
||||||
/* TAKE WIN AND GAMBLE LAMPS */
|
/* TAKE WIN AND GAMBLE LAMPS */
|
||||||
output().set_lamp_value(18, (data >> 5) & 1);
|
m_lamps[18] = BIT(data, 5);
|
||||||
output().set_lamp_value(13, (data >> 6) & 1);
|
m_lamps[13] = BIT(data, 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE8_MEMBER(aristmk4_state::zn434_w)
|
WRITE8_MEMBER(aristmk4_state::zn434_w)
|
||||||
@ -1712,6 +1722,10 @@ DRIVER_INIT_MEMBER(aristmk4_state,aristmk4)
|
|||||||
void aristmk4_state::machine_start()
|
void aristmk4_state::machine_start()
|
||||||
{
|
{
|
||||||
save_pointer(NAME(m_nvram.get()), 0x1000); // m_nvram
|
save_pointer(NAME(m_nvram.get()), 0x1000); // m_nvram
|
||||||
|
m_credit_spend_meter.resolve();
|
||||||
|
m_credit_out_meter.resolve();
|
||||||
|
m_hopper_motor_out.resolve();
|
||||||
|
m_lamps.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
void aristmk4_state::machine_reset()
|
void aristmk4_state::machine_reset()
|
||||||
|
@ -480,6 +480,7 @@ public:
|
|||||||
, m_p1(*this, "P1")
|
, m_p1(*this, "P1")
|
||||||
, m_p2(*this, "P2")
|
, m_p2(*this, "P2")
|
||||||
, m_extra_ports(*this, "EXTRA")
|
, m_extra_ports(*this, "EXTRA")
|
||||||
|
, m_lamps(*this, "lamp%u", 0U)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
DECLARE_WRITE32_MEMBER(Ns5w48);
|
DECLARE_WRITE32_MEMBER(Ns5w48);
|
||||||
@ -543,6 +544,8 @@ private:
|
|||||||
required_ioport m_p2;
|
required_ioport m_p2;
|
||||||
required_ioport m_extra_ports;
|
required_ioport m_extra_ports;
|
||||||
|
|
||||||
|
output_finder<64> m_lamps;
|
||||||
|
|
||||||
emu_timer * m_mk5_2KHz_timer;
|
emu_timer * m_mk5_2KHz_timer;
|
||||||
emu_timer * m_mk5_VSYNC_timer;
|
emu_timer * m_mk5_VSYNC_timer;
|
||||||
emu_timer * m_spi_timer;
|
emu_timer * m_spi_timer;
|
||||||
@ -575,7 +578,9 @@ WRITE8_MEMBER(aristmk5_state::spi_mux_w)
|
|||||||
|
|
||||||
case 2: // Mechanical meters
|
case 2: // Mechanical meters
|
||||||
for(int i = 0; i < 4; i++)
|
for(int i = 0; i < 4; i++)
|
||||||
output().set_lamp_value(32 + i, BIT(m_spi_data[m_spi_mux], 1 + i)); // Tower Lamps
|
{
|
||||||
|
m_lamps[32+i] = BIT(m_spi_data[m_spi_mux], 1 + i); // Tower Lamps
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4: // Door inputs
|
case 4: // Door inputs
|
||||||
@ -584,7 +589,9 @@ WRITE8_MEMBER(aristmk5_state::spi_mux_w)
|
|||||||
|
|
||||||
case 5: // Door outputs
|
case 5: // Door outputs
|
||||||
for(int i = 0; i < 32; i++)
|
for(int i = 0; i < 32; i++)
|
||||||
output().set_lamp_value(i, BIT(m_spi_data[m_spi_mux], i));
|
{
|
||||||
|
m_lamps[i] = BIT(m_spi_data[m_spi_mux], i);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6: // Main board slow I/O
|
case 6: // Main board slow I/O
|
||||||
@ -895,19 +902,19 @@ WRITE8_MEMBER(aristmk5_state::sram_banksel_w)
|
|||||||
WRITE8_MEMBER(aristmk5_state::buttons_lamps_w)
|
WRITE8_MEMBER(aristmk5_state::buttons_lamps_w)
|
||||||
{
|
{
|
||||||
for(int i = 0; i < 8; i++)
|
for(int i = 0; i < 8; i++)
|
||||||
output().set_lamp_value((offset >> 2) * 8 + i, BIT(data, i));
|
m_lamps[(offset >> 2) * 8 + i] = BIT(data, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE8_MEMBER(aristmk5_state::other_lamps_w)
|
WRITE8_MEMBER(aristmk5_state::other_lamps_w)
|
||||||
{
|
{
|
||||||
for(int i = 0; i < 8; i++)
|
for(int i = 0; i < 8; i++)
|
||||||
output().set_lamp_value(16 + i, BIT(data, i));
|
m_lamps[16 + i] = BIT(data, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE8_MEMBER(aristmk5_state::bill_acceptor_lamps_w)
|
WRITE8_MEMBER(aristmk5_state::bill_acceptor_lamps_w)
|
||||||
{
|
{
|
||||||
for(int i = 0; i < 8; i++)
|
for(int i = 0; i < 8; i++)
|
||||||
output().set_lamp_value(24 + i, BIT(data, i));
|
m_lamps[24 + i] = BIT(data, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
void aristmk5_state::aristmk5_map(address_map &map)
|
void aristmk5_state::aristmk5_map(address_map &map)
|
||||||
@ -1987,6 +1994,8 @@ void aristmk5_state::machine_start()
|
|||||||
m_mk5_2KHz_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(aristmk5_state::mk5_2KHz_callback),this));
|
m_mk5_2KHz_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(aristmk5_state::mk5_2KHz_callback),this));
|
||||||
m_mk5_VSYNC_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(aristmk5_state::mk5_VSYNC_callback),this));
|
m_mk5_VSYNC_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(aristmk5_state::mk5_VSYNC_callback),this));
|
||||||
m_spi_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(aristmk5_state::spi_timer), this));
|
m_spi_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(aristmk5_state::spi_timer), this));
|
||||||
|
|
||||||
|
m_lamps.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
void aristmk5_state::machine_reset()
|
void aristmk5_state::machine_reset()
|
||||||
|
Loading…
Reference in New Issue
Block a user