mirror of
https://github.com/holub/mame
synced 2025-06-24 13:26:36 +03:00
aristmk4.c: [Lord-Data]
- Option to raise outputs for physical meters to be used - Option to disable making sound effects for emulated meters - Option to disable virtual emulation of hopper/coin release system
This commit is contained in:
parent
34b11e6989
commit
a43c4c3f37
@ -87,6 +87,12 @@
|
|||||||
The AY8910 named ay1 has writes on PORT B to the ZN434 DA convertor.
|
The AY8910 named ay1 has writes on PORT B to the ZN434 DA convertor.
|
||||||
The AY8910 named ay2 has writes to lamps and the light tower on Port A and B. these are implemented via the layout
|
The AY8910 named ay2 has writes to lamps and the light tower on Port A and B. these are implemented via the layout
|
||||||
|
|
||||||
|
11/12/13 - Lord-Data
|
||||||
|
Added 3 DIP switch settings to configure behaviour:
|
||||||
|
Option to raise outputs for physical meters to be used
|
||||||
|
Option to disable making sound effects for emulated meters
|
||||||
|
Option to disable virtual emulation of hopper/coin release system
|
||||||
|
|
||||||
27/04/10 - FrasheR
|
27/04/10 - FrasheR
|
||||||
2 x Sound Chips connected to the 6522 VIA.
|
2 x Sound Chips connected to the 6522 VIA.
|
||||||
|
|
||||||
@ -615,8 +621,43 @@ WRITE8_MEMBER(aristmk4_state::mkiv_pia_outb)
|
|||||||
if(emet[i])
|
if(emet[i])
|
||||||
{
|
{
|
||||||
//logerror("Mechanical meter %d pulse: %02d\n",i+1, emet[i]);
|
//logerror("Mechanical meter %d pulse: %02d\n",i+1, emet[i]);
|
||||||
|
if ((ioport("OPMDIP")->read() & 0x01) == 1)
|
||||||
|
{
|
||||||
|
switch(i+1)
|
||||||
|
{
|
||||||
|
case 4:
|
||||||
|
output_set_value("creditspendmeter", emet[i]);
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
output_set_value("creditoutmeter", emet[i]);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
printf("Unhandled Mechanical meter %d pulse: %02d\n",i+1, emet[i]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if ((ioport("MeterSNDDIP")->read() & 0x01) == 1)
|
||||||
|
{
|
||||||
m_samples->start(i,0); // pulse sound for mechanical meters
|
m_samples->start(i,0); // pulse sound for mechanical meters
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if ((ioport("OPMDIP")->read() & 0x01) == 1)
|
||||||
|
{
|
||||||
|
//if there is not a value set, this meter is not active, reset output to 0
|
||||||
|
switch(i+1)
|
||||||
|
{
|
||||||
|
case 4:
|
||||||
|
output_set_value("creditspendmeter", 0);
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
output_set_value("creditoutmeter", 0);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -649,6 +690,9 @@ 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;
|
||||||
|
if ((ioport("HopperDIP")->read() & 0x01) != 1) {
|
||||||
|
output_set_value("hopper_motor", m_hopper_motor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Port A read (SW1)
|
// Port A read (SW1)
|
||||||
@ -705,14 +749,22 @@ READ8_MEMBER(aristmk4_state::via_b_r)
|
|||||||
switch(m_hopper_motor)
|
switch(m_hopper_motor)
|
||||||
{
|
{
|
||||||
case 0x00:
|
case 0x00:
|
||||||
|
m_hopper_motor=0x02;
|
||||||
|
if ((ioport("HopperDIP")->read() & 0x01) == 1)
|
||||||
|
{
|
||||||
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;
|
} else {
|
||||||
|
output_set_value("hopper_motor", m_hopper_motor);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 0x01:
|
case 0x01:
|
||||||
break; //default
|
break; //default
|
||||||
case 0x02:
|
case 0x02:
|
||||||
|
if ((ioport("HopperDIP")->read() & 0x01) == 1)
|
||||||
|
{
|
||||||
ret=ret^0x40;
|
ret=ret^0x40;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -831,6 +883,10 @@ WRITE8_MEMBER(aristmk4_state::via_cb2_w)
|
|||||||
m_hopper_motor=data;
|
m_hopper_motor=data;
|
||||||
else if (m_hopper_motor<0x02)
|
else if (m_hopper_motor<0x02)
|
||||||
m_hopper_motor=data;
|
m_hopper_motor=data;
|
||||||
|
|
||||||
|
if ((ioport("HopperDIP")->read() & 0x01) != 1) {
|
||||||
|
output_set_value("hopper_motor", m_hopper_motor); //stop motor
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lamp output
|
// Lamp output
|
||||||
@ -980,14 +1036,14 @@ INPUT PORTS
|
|||||||
static INPUT_PORTS_START(aristmk4)
|
static INPUT_PORTS_START(aristmk4)
|
||||||
|
|
||||||
PORT_START("via_port_b")
|
PORT_START("via_port_b")
|
||||||
PORT_DIPNAME( 0x10, 0x00, "1" )
|
PORT_DIPNAME( 0x10, 0x00, "1" ) // "COIN FAULT"
|
||||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||||
PORT_DIPSETTING( 0x10, DEF_STR( On ) ) PORT_DIPLOCATION("AY:1")
|
PORT_DIPSETTING( 0x10, DEF_STR( On ) ) PORT_DIPLOCATION("AY:1")
|
||||||
PORT_DIPNAME( 0x20, 0x00, "2" )
|
PORT_DIPNAME( 0x20, 0x00, "2" ) // "COIN FAULT"
|
||||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||||
PORT_DIPSETTING( 0x20, DEF_STR( On ) ) PORT_DIPLOCATION("AY:2")
|
PORT_DIPSETTING( 0x20, DEF_STR( On ) ) PORT_DIPLOCATION("AY:2")
|
||||||
PORT_DIPNAME( 0x40, 0x40, "HOPCO1" )
|
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Hopper Coin Release") PORT_CODE(KEYCODE_BACKSLASH) // "ILLEGAL COIN PAID"
|
||||||
PORT_DIPSETTING( 0x40, DEF_STR( On ) ) PORT_DIPLOCATION("AY:3")
|
|
||||||
PORT_DIPNAME( 0x80, 0x00, "CBOPT1" )
|
PORT_DIPNAME( 0x80, 0x00, "CBOPT1" )
|
||||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||||
PORT_DIPSETTING( 0x80, DEF_STR( On ) ) PORT_DIPLOCATION("AY:4")
|
PORT_DIPSETTING( 0x80, DEF_STR( On ) ) PORT_DIPLOCATION("AY:4")
|
||||||
@ -1001,8 +1057,9 @@ static INPUT_PORTS_START(aristmk4)
|
|||||||
PORT_DIPNAME( 0x04, 0x00, "HOPHI2") // hopper 2 full
|
PORT_DIPNAME( 0x04, 0x00, "HOPHI2") // hopper 2 full
|
||||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("5002:3")
|
PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("5002:3")
|
||||||
PORT_DIPSETTING( 0x04, DEF_STR( On ) )
|
PORT_DIPSETTING( 0x04, DEF_STR( On ) )
|
||||||
PORT_DIPNAME( 0x08, 0x00, "DOPTI") // photo optic door
|
PORT_DIPNAME( 0x08, 0x00, "DOPTI") // photo optic door DOOR OPEN SENSE SWITCH
|
||||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||||
|
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
|
||||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_NAME("Audit Key") PORT_TOGGLE PORT_CODE(KEYCODE_K) // AUDTSW
|
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_NAME("Audit Key") PORT_TOGGLE PORT_CODE(KEYCODE_K) // AUDTSW
|
||||||
PORT_DIPNAME( 0x20, 0x00, "HOPLO1") // hopper 1 low
|
PORT_DIPNAME( 0x20, 0x00, "HOPLO1") // hopper 1 low
|
||||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("5002:6")
|
PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("5002:6")
|
||||||
@ -1175,6 +1232,21 @@ static INPUT_PORTS_START(aristmk4)
|
|||||||
PORT_START("powerfail")
|
PORT_START("powerfail")
|
||||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Power Fail / Shutdown") PORT_CODE(KEYCODE_COMMA)
|
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Power Fail / Shutdown") PORT_CODE(KEYCODE_COMMA)
|
||||||
|
|
||||||
|
PORT_START("OPMDIP")
|
||||||
|
PORT_DIPNAME( 0x01, 0x00, "Output Physical Meters")
|
||||||
|
PORT_DIPSETTING( 0X00, DEF_STR( Off ) )
|
||||||
|
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
|
||||||
|
|
||||||
|
PORT_START("MeterSNDDIP")
|
||||||
|
PORT_DIPNAME( 0x01, 0x01, "Play Meter Sounds")
|
||||||
|
PORT_DIPSETTING( 0X00, DEF_STR( Off ) )
|
||||||
|
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
|
||||||
|
|
||||||
|
PORT_START("HopperDIP")
|
||||||
|
PORT_DIPNAME( 0x01, 0x01, "Emulate Hopper")
|
||||||
|
PORT_DIPSETTING( 0X00, DEF_STR( Off ) )
|
||||||
|
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
|
||||||
|
|
||||||
/************************************** LINKS ***************************************************************/
|
/************************************** LINKS ***************************************************************/
|
||||||
|
|
||||||
PORT_START("LK13")
|
PORT_START("LK13")
|
||||||
|
Loading…
Reference in New Issue
Block a user