1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
// license:BSD-3-Clause
// copyright-holders:Aaron Giles
#ifndef MAME_SOUND_YMOPM_H
#define MAME_SOUND_YMOPM_H
#pragma once
#include "ymfm_mame.h"
#include "ymfm/src/ymfm_opm.h"
// ======================> ym2151_device
DECLARE_DEVICE_TYPE(YM2151, ym2151_device);
class ym2151_device : public ymfm_device_base<ymfm::ym2151>
{
using parent = ymfm_device_base<ymfm::ym2151>;
public:
// constructor
ym2151_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// configuration helpers, handled by the interface
auto port_write_handler() { return io_write_handler(); }
// write access, handled by the chip implementation
virtual void write(offs_t offset, u8 data) override;
virtual void address_w(u8 data) override;
virtual void data_w(u8 data) override;
// reset line, active LOW
DECLARE_WRITE_LINE_MEMBER(reset_w);
protected:
// internal state
uint8_t m_reset_state; // reset line state
};
// ======================> ym2164_device
DECLARE_DEVICE_TYPE(YM2164, ym2164_device);
class ym2164_device : public ymfm_device_base<ymfm::ym2164>
{
public:
// constructor
ym2164_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// configuration helpers, handled by the interface
auto port_write_handler() { return io_write_handler(); }
};
#endif // MAME_SOUND_YMOPM_H
|