blob: 17dadf0d1425fe8e5a6451ba8eb2fc513242f901 (
plain) (
blame)
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
57
58
|
// license:BSD-3-Clause
// copyright-holders:Enik Land
/**********************************************************************
Sega FM Sound Unit emulation
**********************************************************************/
#pragma once
#ifndef __SEGA_FM_UNIT__
#define __SEGA_FM_UNIT__
#include "sound/ym2413.h"
#include "sound/sn76496.h"
#include "sg1000exp.h"
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
// ======================> sega_fm_unit_device
class sega_fm_unit_device : public device_t,
public device_sg1000_expansion_slot_interface
{
public:
// construction/destruction
sega_fm_unit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
virtual machine_config_constructor device_mconfig_additions() const override;
// device_sg1000_expansion_slot_interface overrides
virtual DECLARE_READ8_MEMBER(peripheral_r) override;
virtual DECLARE_WRITE8_MEMBER(peripheral_w) override;
virtual bool is_readable(uint8_t offset) override;
virtual bool is_writeable(uint8_t offset) override;
void set_audio_control(uint8_t data);
private:
required_device<ym2413_device> m_ym;
optional_device<segapsg_device> m_psg;
uint8_t m_audio_control;
};
// device type definition
extern const device_type SEGA_FM_UNIT;
#endif
|