mirror of
https://github.com/holub/mame
synced 2025-10-07 09:25:34 +03:00
multfish.cpp: convert to use hopper device (nw)
This commit is contained in:
parent
4e5146a016
commit
af20ff0088
@ -355,19 +355,6 @@ READ8_MEMBER(igrosoft_gamble_state::ray_r)
|
||||
return m_screen->vpos();
|
||||
}
|
||||
|
||||
CUSTOM_INPUT_MEMBER(igrosoft_gamble_state::igrosoft_gamble_hopper_r)
|
||||
{
|
||||
if ( m_hopper_motor != 0 )
|
||||
{
|
||||
m_hopper++;
|
||||
return m_hopper>>4;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(igrosoft_gamble_state::igrosoft_gamble_hopper_w)
|
||||
{
|
||||
/* Port 0x33
|
||||
@ -379,7 +366,7 @@ WRITE8_MEMBER(igrosoft_gamble_state::igrosoft_gamble_hopper_w)
|
||||
*/
|
||||
|
||||
|
||||
m_hopper_motor = data & 0x10;
|
||||
m_hopper->motor_w(data & 0x10);
|
||||
machine().bookkeeping().coin_lockout_w(0, data & 0x01);
|
||||
machine().bookkeeping().coin_lockout_w(1, data & 0x01);
|
||||
machine().bookkeeping().coin_lockout_w(2, data & 0x01);
|
||||
@ -397,7 +384,7 @@ WRITE8_MEMBER(igrosoft_gamble_state::rollfr_hopper_w)
|
||||
*/
|
||||
|
||||
|
||||
m_hopper_motor = data & 0x10;
|
||||
m_hopper->motor_w(data & 0x10);
|
||||
machine().bookkeeping().coin_lockout_w(0,~data & 0x01);
|
||||
machine().bookkeeping().coin_lockout_w(1,~data & 0x01);
|
||||
machine().bookkeeping().coin_lockout_w(2,~data & 0x01);
|
||||
@ -718,7 +705,7 @@ INPUT_PORTS_START( igrosoft_gamble )
|
||||
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) // unused?
|
||||
|
||||
PORT_START("IN1")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igrosoft_gamble_state,igrosoft_gamble_hopper_r, nullptr )// Hopper SW (22 B)
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("hopper", ticket_dispenser_device, line_r)
|
||||
PORT_DIPNAME( 0x02, 0x02, "BK Door (17 A)" )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
@ -811,7 +798,7 @@ static INPUT_PORTS_START( rollfr )
|
||||
PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("IN1")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igrosoft_gamble_state,igrosoft_gamble_hopper_r, nullptr )// Hopper SW (22 B)
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("hopper", ticket_dispenser_device, line_r)
|
||||
PORT_DIPNAME( 0x02, 0x02, "BK Door (17 A)" )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
@ -1022,8 +1009,6 @@ void igrosoft_gamble_state::machine_start()
|
||||
{
|
||||
save_item(NAME(m_disp_enable));
|
||||
save_item(NAME(m_rambk));
|
||||
save_item(NAME(m_hopper_motor));
|
||||
save_item(NAME(m_hopper));
|
||||
}
|
||||
|
||||
void igrosoft_gamble_state::machine_reset()
|
||||
@ -1033,8 +1018,6 @@ void igrosoft_gamble_state::machine_reset()
|
||||
|
||||
m_disp_enable = 0;
|
||||
m_rambk = 0;
|
||||
m_hopper_motor = 0;
|
||||
m_hopper = 0;
|
||||
}
|
||||
|
||||
MACHINE_CONFIG_START( igrosoft_gamble )
|
||||
@ -1064,6 +1047,7 @@ MACHINE_CONFIG_START( igrosoft_gamble )
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
|
||||
|
||||
MCFG_M48T35_ADD( "m48t35" )
|
||||
MCFG_HOPPER_ADD("hopper", attotime::from_msec(100), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
MACHINE_CONFIG_DERIVED( rollfr, igrosoft_gamble )
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "machine/timekpr.h"
|
||||
#include "machine/watchdog.h"
|
||||
#include "machine/ticket.h"
|
||||
#include "screen.h"
|
||||
|
||||
#define igrosoft_gamble_ROM_SIZE 0x80000
|
||||
@ -21,7 +22,8 @@ public:
|
||||
m_m48t35(*this, "m48t35" ),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_screen(*this, "screen"),
|
||||
m_palette(*this, "palette")
|
||||
m_palette(*this, "palette"),
|
||||
m_hopper(*this, "hopper")
|
||||
{
|
||||
}
|
||||
|
||||
@ -38,9 +40,6 @@ public:
|
||||
|
||||
uint8_t m_rambk;
|
||||
|
||||
uint8_t m_hopper_motor;
|
||||
uint8_t m_hopper;
|
||||
|
||||
uint8_t m_vid[igrosoft_gamble_VIDRAM_SIZE];
|
||||
DECLARE_WRITE8_MEMBER(igrosoft_gamble_vid_w);
|
||||
DECLARE_WRITE8_MEMBER(igrosoft_gamble_bank_w);
|
||||
@ -56,7 +55,6 @@ public:
|
||||
DECLARE_WRITE8_MEMBER(igrosoft_gamble_counters_w);
|
||||
DECLARE_WRITE8_MEMBER(igrosoft_gamble_f3_w);
|
||||
DECLARE_WRITE8_MEMBER(igrosoft_gamble_dispenable_w);
|
||||
DECLARE_CUSTOM_INPUT_MEMBER(igrosoft_gamble_hopper_r);
|
||||
DECLARE_READ8_MEMBER(igrosoft_gamble_timekeeper_r);
|
||||
DECLARE_WRITE8_MEMBER(igrosoft_gamble_timekeeper_w);
|
||||
DECLARE_DRIVER_INIT(customl);
|
||||
@ -92,6 +90,7 @@ public:
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<screen_device> m_screen;
|
||||
required_device<palette_device> m_palette;
|
||||
required_device<ticket_dispenser_device> m_hopper;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user