blob: b43968d468bf685b54c1bc3f52a955a86a5e2168 (
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
|
// license:BSD-3-Clause
// copyright-holders:Barry Rodewald
/*
* x68k_midi.h
*
* X68000 MIDI expansion card
*
*/
#ifndef MAME_BUS_X68K_X68K_MIDI_H
#define MAME_BUS_X68K_X68K_MIDI_H
#pragma once
#include "machine/ym3802.h"
#include "x68kexp.h"
#define MIDI_IRQ_VECTOR 0x80 // does not seem to use the YM3802's vector registers
class x68k_midi_device : public device_t,
public device_x68k_expansion_card_interface
{
public:
// construction/destruction
x68k_midi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// optional information overrides
virtual void device_add_mconfig(machine_config &config) override;
uint8_t x68k_midi_reg_r(offs_t offset);
void x68k_midi_reg_w(offs_t offset, uint8_t data);
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
// device_x68k_expansion_card_interface overrides
virtual uint8_t iack4() override;
private:
x68k_expansion_slot_device *m_slot;
required_device<ym3802_device> m_midi;
void irq_w(int state);
};
// device type definition
DECLARE_DEVICE_TYPE(X68K_MIDI, x68k_midi_device)
#endif // MAME_BUS_X68K_X68K_MIDI_H
|