summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/cbus/mpu_pc98.cpp
blob: 9b464c2a27fc27498c9e6a3d4a01a6e0edb1b3e7 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// license:BSD-3-Clause
// copyright-holders:R. Belmont,Kevin Horton
/***************************************************************************

    MPU-401 MIDI device interface

***************************************************************************/

#include "emu.h"
#include "mpu_pc98.h"
#include "machine/pic8259.h"

#define MPU_CORE_TAG "mpu401"


/*
DIP-SWs
1-2-3-4
         0xc0d0
      1  0xc4d0
    1    0xc8d0
...
1        0xe0d0 (default)
...
1 1 1 1  0xfcd0

5-6-7-8
1        irq12
  1      irq6 (default)
    1    irq5
      1  irq3
*/

WRITE_LINE_MEMBER( mpu_pc98_device::mpu_irq_out )
{
}

//**************************************************************************
//  GLOBAL VARIABLES
//**************************************************************************

DEFINE_DEVICE_TYPE(MPU_PC98, mpu_pc98_device, "mpu_pc98", "Roland MPU-401 MIDI Interface (CBUS)")

//-------------------------------------------------
//  device_add_mconfig - add device configuration
//-------------------------------------------------

MACHINE_CONFIG_START(mpu_pc98_device::device_add_mconfig)
	MCFG_MPU401_ADD(MPU_CORE_TAG, WRITELINE(mpu_pc98_device, mpu_irq_out))
MACHINE_CONFIG_END


//**************************************************************************
//  LIVE DEVICE
//**************************************************************************

mpu_pc98_device::mpu_pc98_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
	: device_t(mconfig, MPU_PC98, tag, owner, clock)
	, m_bus(*this, DEVICE_SELF_OWNER)
	, m_mpu401(*this, MPU_CORE_TAG)
{
}

ADDRESS_MAP_START(mpu_pc98_device::map)
	AM_RANGE(0, 3) AM_DEVREADWRITE8(MPU_CORE_TAG, mpu401_device, mpu_r, mpu_w, 0xff)
ADDRESS_MAP_END

//-------------------------------------------------
//  device_start - device-specific startup
//-------------------------------------------------

void mpu_pc98_device::device_start()
{
	address_space &iospace = m_bus->io_space();
	iospace.install_device(0xe0d0, 0xe0d3, *this, &mpu_pc98_device::map);
}

//-------------------------------------------------
//  device_reset - device-specific reset
//-------------------------------------------------

void mpu_pc98_device::device_reset()
{
}