blob: 61a37d40f8cd0b2df4b2f9997243f2ab1163ee0a (
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
59
60
61
|
// license:BSD-3-Clause
// copyright-holders:Acho A. Tang,R. Belmont
/*********************************************************
Irem GA20 PCM Sound Chip
*********************************************************/
#ifndef MAME_SOUND_IREMGA20_H
#define MAME_SOUND_IREMGA20_H
#pragma once
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
// ======================> iremga20_device
class iremga20_device : public device_t,
public device_sound_interface,
public device_rom_interface
{
public:
iremga20_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
void write(offs_t offset, uint8_t data);
uint8_t read(offs_t offset);
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
virtual void device_clock_changed() override;
// sound stream update overrides
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
// device_rom_interface overrides
virtual void rom_bank_updated() override;
private:
struct channel_def
{
uint32_t rate;
uint32_t pos;
uint32_t counter;
uint32_t end;
uint32_t volume;
uint32_t play;
};
sound_stream *m_stream;
uint8_t m_regs[0x20];
channel_def m_channel[4];
};
DECLARE_DEVICE_TYPE(IREMGA20, iremga20_device)
#endif // MAME_SOUND_IREMGA20_H
|