summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/abcbus/unidisk.cpp
blob: c0ec9a8b63b020f153a86ee10feed69a67687c59 (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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
// license:BSD-3-Clause
// copyright-holders:Curt Coder
/**********************************************************************

    MyAB UNI DISK floppy disk controller emulation

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

#include "emu.h"
#include "unidisk.h"



//**************************************************************************
//  MACROS / CONSTANTS
//**************************************************************************

#define TMS9995_TAG "maincpu"


//**************************************************************************
//  DEVICE DEFINITIONS
//**************************************************************************

DEFINE_DEVICE_TYPE(UNIDISK, unidisk_t, "unidisk", "MyAB UNI DISK")


//-------------------------------------------------
//  ROM( unidisk )
//-------------------------------------------------

ROM_START( unidisk )
	ROM_REGION( 0x1000, TMS9995_TAG, 0 )
	ROM_SYSTEM_BIOS( 0, "5d", "5\" D PROM" )
	ROMX_LOAD("unidisk5d.bin", 0x0000, 0x1000, CRC(569dd60c) SHA1(47b810bcb5a063ffb3034fd7138dc5e15d243676), ROM_BIOS(1))
	ROM_SYSTEM_BIOS( 1, "5h", "5\" H PROM" )
	ROMX_LOAD("unidisk5h.bin", 0x0000, 0x1000, CRC(5079ad85) SHA1(42bb91318f13929c3a440de3fa1f0491a0b90863), ROM_BIOS(2))
	ROM_SYSTEM_BIOS( 2, "8", "8\" PROM" )
	ROMX_LOAD("unidisk8.bin", 0x0000, 0x1000, CRC(d04e6a43) SHA1(8db504d46ff0355c72bd58fd536abeb17425c532), ROM_BIOS(3))
ROM_END


//-------------------------------------------------
//  rom_region - device-specific ROM region
//-------------------------------------------------

const tiny_rom_entry *unidisk_t::device_rom_region() const
{
	return ROM_NAME( unidisk );
}


//-------------------------------------------------
//  ADDRESS_MAP( unidisk_mem )
//-------------------------------------------------

void unidisk_t::unidisk_mem(address_map &map)
{
	map(0x0000, 0x0fff).rom().region(TMS9995_TAG, 0);
}


//-------------------------------------------------
//  ADDRESS_MAP( unidisk_io )
//-------------------------------------------------

void unidisk_t::unidisk_io(address_map &map)
{
}


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

MACHINE_CONFIG_START(unidisk_t::device_add_mconfig)
	MCFG_TMS99xx_ADD(TMS9995_TAG, TMS9995, 12000000, unidisk_mem, unidisk_io)
MACHINE_CONFIG_END


//-------------------------------------------------
//  INPUT_PORTS( unidisk )
//-------------------------------------------------

INPUT_PORTS_START( unidisk )
INPUT_PORTS_END


//-------------------------------------------------
//  input_ports - device-specific input ports
//-------------------------------------------------

ioport_constructor unidisk_t::device_input_ports() const
{
	return INPUT_PORTS_NAME( unidisk );
}



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

//-------------------------------------------------
//  unidisk_t - constructor
//-------------------------------------------------

unidisk_t::unidisk_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
	device_t(mconfig, UNIDISK, tag, owner, clock),
	device_abcbus_card_interface(mconfig, *this),
	m_maincpu(*this, TMS9995_TAG)
{
}


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

void unidisk_t::device_start()
{
}


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

void unidisk_t::device_reset()
{
	m_cs = false;
}



//**************************************************************************
//  ABC BUS INTERFACE
//**************************************************************************

//-------------------------------------------------
//  abcbus_cs -
//-------------------------------------------------

void unidisk_t::abcbus_cs(uint8_t data)
{
}


//-------------------------------------------------
//  abcbus_stat -
//-------------------------------------------------

uint8_t unidisk_t::abcbus_stat()
{
	uint8_t data = 0xff;

	if (m_cs)
	{
	}

	return data;
}


//-------------------------------------------------
//  abcbus_inp -
//-------------------------------------------------

uint8_t unidisk_t::abcbus_inp()
{
	uint8_t data = 0xff;

	if (m_cs)
	{
	}

	return data;
}


//-------------------------------------------------
//  abcbus_out -
//-------------------------------------------------

void unidisk_t::abcbus_out(uint8_t data)
{
	if (!m_cs) return;
}


//-------------------------------------------------
//  abcbus_c1 -
//-------------------------------------------------

void unidisk_t::abcbus_c1(uint8_t data)
{
	if (m_cs)
	{
	}
}


//-------------------------------------------------
//  abcbus_c3 -
//-------------------------------------------------

void unidisk_t::abcbus_c3(uint8_t data)
{
	if (m_cs)
	{
		m_maincpu->reset();
	}
}