blob: 259de01eae6e5a4a7a9fbd554cc988bcafeffddd (
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
62
63
|
// license:BSD-3-Clause
// copyright-holders:Olivier Galibert, hap
/***************************************************************************
Taito Zoom ZSG-2 sound board
***************************************************************************/
#ifndef MAME_AUDIO_TAITO_ZM_H
#define MAME_AUDIO_TAITO_ZM_H
#pragma once
#include "cpu/mn10200/mn10200.h"
#include "cpu/tms57002/tms57002.h"
#include "sound/zsg2.h"
class taito_zoom_device : public device_t
{
public:
taito_zoom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_WRITE16_MEMBER(sound_irq_w);
DECLARE_READ16_MEMBER(sound_irq_r);
DECLARE_WRITE16_MEMBER(reg_data_w);
DECLARE_WRITE16_MEMBER(reg_address_w);
DECLARE_READ8_MEMBER(shared_ram_r);
DECLARE_WRITE8_MEMBER(shared_ram_w);
DECLARE_READ8_MEMBER(tms_ctrl_r);
DECLARE_WRITE8_MEMBER(tms_ctrl_w);
void set_use_flash() { m_use_flash = true; }
void taitozoom_mn_map(address_map &map);
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
virtual void device_add_mconfig(machine_config &config) override;
private:
// inherited devices/pointers
required_device<mn10200_device> m_soundcpu;
required_device<zsg2_device> m_zsg2;
// internal state
uint16_t m_reg_address;
uint8_t m_tms_ctrl;
bool m_use_flash;
std::unique_ptr<uint8_t[]> m_snd_shared_ram;
};
DECLARE_DEVICE_TYPE(TAITO_ZOOM, taito_zoom_device)
#define MCFG_TAITO_ZOOM_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, TAITO_ZOOM, 0)
#define MCFG_TAITO_ZOOM_USE_FLASH \
downcast<taito_zoom_device *>(device)->set_use_flash();
#endif // MAME_AUDIO_TAITO_ZM_H
|