mirror of
https://github.com/holub/mame
synced 2025-06-24 21:34:43 +03:00
osi: removed anonymous timer
This commit is contained in:
parent
ac04c377a9
commit
5312d992b4
@ -827,6 +827,7 @@ void c1p_state::c1p(machine_config &config)
|
||||
m_discrete->set_intf(osi600c_discrete_interface);
|
||||
m_discrete->add_route(ALL_OUTPUTS, "mono", 0.50);
|
||||
BEEP(config, "beeper", 300).add_route(ALL_OUTPUTS, "mono", 0.50);
|
||||
TIMER(config, m_beep_timer).configure_generic(FUNC(c1p_state::beep_timer));
|
||||
|
||||
PIA6821(config, "pia_1", 0);
|
||||
PIA6821(config, "pia_2", 0);
|
||||
@ -922,22 +923,15 @@ ROM_END
|
||||
|
||||
/* Driver Initialization */
|
||||
|
||||
void c1p_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(c1p_state::beep_timer)
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case TIMER_SETUP_BEEP:
|
||||
m_beeper->set_state(0);
|
||||
m_beeper->set_clock(300);
|
||||
break;
|
||||
default:
|
||||
throw emu_fatalerror("Unknown id in c1p_state::device_timer");
|
||||
}
|
||||
}
|
||||
|
||||
void c1p_state::init_c1p()
|
||||
{
|
||||
timer_set(attotime::zero, TIMER_SETUP_BEEP);
|
||||
m_beep_timer->adjust(attotime::zero);
|
||||
}
|
||||
|
||||
|
||||
|
@ -101,25 +101,21 @@ public:
|
||||
c1p_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: sb2m600_state(mconfig, type, tag)
|
||||
, m_beeper(*this, "beeper")
|
||||
, m_beep_timer(*this, "beep_timer")
|
||||
{ }
|
||||
|
||||
void init_c1p();
|
||||
void c1p(machine_config &config);
|
||||
|
||||
protected:
|
||||
enum
|
||||
{
|
||||
TIMER_SETUP_BEEP
|
||||
};
|
||||
|
||||
virtual void machine_start() override;
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
|
||||
|
||||
void osi630_ctrl_w(uint8_t data);
|
||||
void osi630_sound_w(uint8_t data);
|
||||
void c1p_mem(address_map &map);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(beep_timer);
|
||||
|
||||
required_device<beep_device> m_beeper;
|
||||
required_device<timer_device> m_beep_timer;
|
||||
};
|
||||
|
||||
class c1pmf_state : public c1p_state
|
||||
|
Loading…
Reference in New Issue
Block a user