mirror of
https://github.com/holub/mame
synced 2025-05-31 18:11:50 +03:00
(MESS) msx.c: Internal ym2413s don't need the unlock sequence. (nw)
This commit is contained in:
parent
ee2e620553
commit
67f48e5fd7
@ -9,8 +9,6 @@ msx_slot_music_device::msx_slot_music_device(const machine_config &mconfig, cons
|
||||
: msx_slot_rom_device(mconfig, MSX_SLOT_MUSIC, "MSX Internal MSX-MUSIC", tag, owner, clock, "msx_slot_music", __FILE__)
|
||||
, m_ym2413(NULL)
|
||||
, m_ym2413_tag(NULL)
|
||||
, m_opll_active(false)
|
||||
, m_unlock(0)
|
||||
{
|
||||
}
|
||||
|
||||
@ -37,33 +35,14 @@ void msx_slot_music_device::device_start()
|
||||
}
|
||||
|
||||
|
||||
void msx_slot_music_device::device_reset()
|
||||
{
|
||||
m_opll_active = false;
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER(msx_slot_music_device::read)
|
||||
{
|
||||
return msx_slot_rom_device::read(space, offset);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(msx_slot_music_device::write)
|
||||
{
|
||||
if (m_unlock == 0xbe && data == 0x41)
|
||||
{
|
||||
m_opll_active = true;
|
||||
}
|
||||
m_unlock = data;
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(msx_slot_music_device::write_ym2413)
|
||||
{
|
||||
if (m_opll_active)
|
||||
{
|
||||
m_ym2413->write(space, offset & 1, data);
|
||||
}
|
||||
m_ym2413->write(space, offset & 1, data);
|
||||
}
|
||||
|
||||
|
@ -24,18 +24,14 @@ public:
|
||||
static void set_ym2413_tag(device_t &device, const char *tag) { dynamic_cast<msx_slot_music_device &>(device).m_ym2413_tag = tag; }
|
||||
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
virtual DECLARE_READ8_MEMBER(read);
|
||||
virtual DECLARE_WRITE8_MEMBER(write);
|
||||
|
||||
DECLARE_WRITE8_MEMBER(write_ym2413);
|
||||
|
||||
private:
|
||||
ym2413_device *m_ym2413;
|
||||
const char *m_ym2413_tag;
|
||||
bool m_opll_active;
|
||||
UINT8 m_unlock;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user