blob: 450001659bce96c0e6346ce0a437d1a8b11aef0c (
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
|
// license:BSD-3-Clause
// copyright-holders:Olivier Galibert
#ifndef MAME_MACHINE_K054321_H
#define MAME_MACHINE_K054321_H
#pragma once
#include "machine/gen_latch.h"
class k054321_device : public device_t
{
public:
template<typename T, typename U>
k054321_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&left, U &&right) :
k054321_device(mconfig, tag, owner)
{
m_left.set_tag(std::forward<T>(left));
m_right.set_tag(std::forward<U>(right));
}
k054321_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL());
void main_map(address_map &map);
void sound_map(address_map &map);
protected:
void device_start() override;
void device_reset() override;
virtual void device_add_mconfig(machine_config &config) override;
private:
required_device<device_sound_interface> m_left;
required_device<device_sound_interface> m_right;
required_device_array<generic_latch_8_device, 3> m_soundlatch;
std::unique_ptr<float[]> m_left_gains;
std::unique_ptr<float[]> m_right_gains;
u8 m_volume;
u8 m_active;
void propagate_volume();
void volume_reset_w(u8 data);
void volume_up_w(u8 data);
void active_w(u8 data);
u8 busy_r();
void dummy_w(u8 data);
};
DECLARE_DEVICE_TYPE(K054321, k054321_device)
#endif // MAME_MACHINE_K054321_H
|