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
|
// license:BSD-3-Clause
// copyright-holders:Curt Coder
/**********************************************************************
Shugart SA1403D Winchester Disk Controller emulation
**********************************************************************/
#include "sa1403d.h"
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
const device_type SA1403D = &device_creator<sa1403d_device>;
//-------------------------------------------------
// ROM( sa1403d )
//-------------------------------------------------
ROM_START( sa1403d )
ROM_REGION( 0x4000, "sa1403d", 0 )
ROM_DEFAULT_BIOS( "as31" )
ROM_SYSTEM_BIOS( 0, "as30", "AS30" )
ROMX_LOAD( "i", 0x0000, 0x1000, NO_DUMP, ROM_BIOS(1) )
ROMX_LOAD( "ii", 0x1000, 0x1000, NO_DUMP, ROM_BIOS(1) )
ROMX_LOAD( "iii", 0x2000, 0x1000, NO_DUMP, ROM_BIOS(1) )
ROMX_LOAD( "iv", 0x3000, 0x1000, NO_DUMP, ROM_BIOS(1) )
ROM_SYSTEM_BIOS( 1, "as31", "AS31" )
ROMX_LOAD( "i", 0x0000, 0x1000, NO_DUMP, ROM_BIOS(2) )
ROMX_LOAD( "ii", 0x1000, 0x1000, NO_DUMP, ROM_BIOS(2) )
ROMX_LOAD( "iii", 0x2000, 0x1000, NO_DUMP, ROM_BIOS(2) )
ROMX_LOAD( "iv", 0x3000, 0x1000, NO_DUMP, ROM_BIOS(2) )
ROM_SYSTEM_BIOS( 2, "u50", "Diagnostic PROM set 12668" )
ROMX_LOAD( "i", 0x0000, 0x1000, NO_DUMP, ROM_BIOS(3) )
ROMX_LOAD( "ii", 0x1000, 0x1000, NO_DUMP, ROM_BIOS(3) )
ROMX_LOAD( "iii", 0x2000, 0x1000, NO_DUMP, ROM_BIOS(3) )
ROMX_LOAD( "iv", 0x3000, 0x1000, NO_DUMP, ROM_BIOS(3) )
ROM_END
//-------------------------------------------------
// rom_region - device-specific ROM region
//-------------------------------------------------
const rom_entry *sa1403d_device::device_rom_region() const
{
return ROM_NAME( sa1403d );
}
//-------------------------------------------------
// MACHINE_DRIVER( sa1403d )
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( sa1403d )
MCFG_HARDDISK_ADD("image")
MACHINE_CONFIG_END
//-------------------------------------------------
// machine_config_additions - device-specific
// machine configurations
//-------------------------------------------------
machine_config_constructor sa1403d_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME( sa1403d );
}
//-------------------------------------------------
// INPUT_PORTS( sa1403d )
//-------------------------------------------------
INPUT_PORTS_START( sa1403d )
PORT_INCLUDE(scsihle)
PORT_START("2H")
PORT_DIPNAME( 0xc0, 0x40, "LUN 0 Drive Type" ) PORT_DIPLOCATION("2H:7,8")
PORT_DIPSETTING( 0x00, "SA1002" ) // 2 heads, 256 cylinders
PORT_DIPSETTING( 0x40, "SA1004" ) // 4 heads, 256 cylinders
PORT_DIPSETTING( 0x80, "SA800" ) // 1 head, 77 cylinders
PORT_DIPSETTING( 0xc0, "SA850" ) // 2 heads, 77 cylinders
PORT_DIPNAME( 0x30, 0x30, "LUN 1 Drive Type" ) PORT_DIPLOCATION("2H:5,6")
PORT_DIPSETTING( 0x00, "SA1002" )
PORT_DIPSETTING( 0x10, "SA1004" )
PORT_DIPSETTING( 0x20, "SA800" )
PORT_DIPSETTING( 0x30, "SA850" )
PORT_DIPNAME( 0x0c, 0x0c, "LUN 2 Drive Type" ) PORT_DIPLOCATION("2H:3,4")
PORT_DIPSETTING( 0x00, "SA1002" )
PORT_DIPSETTING( 0x04, "SA1004" )
PORT_DIPSETTING( 0x08, "SA800" )
PORT_DIPSETTING( 0x0c, "SA850" )
PORT_DIPNAME( 0x03, 0x03, "LUN 3 Drive Type" ) PORT_DIPLOCATION("2H:1,2")
PORT_DIPSETTING( 0x00, "SA1002" )
PORT_DIPSETTING( 0x01, "SA1004" )
PORT_DIPSETTING( 0x02, "SA800" )
PORT_DIPSETTING( 0x03, "SA850" )
INPUT_PORTS_END
//-------------------------------------------------
// input_ports - device-specific input ports
//-------------------------------------------------
ioport_constructor sa1403d_device::device_input_ports() const
{
return INPUT_PORTS_NAME( sa1403d );
}
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
//-------------------------------------------------
// sa1403d_device - constructor
//-------------------------------------------------
sa1403d_device::sa1403d_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: scsihd_device(mconfig, SA1403D, "Shugart SA1403D", tag, owner, clock, "sa1403d", __FILE__)
{
}
void sa1403d_device::ExecCommand()
{
switch( command[ 0 ] )
{
default:
scsihd_device::ExecCommand();
break;
}
}
void sa1403d_device::WriteData( UINT8 *data, int dataLength )
{
switch( command[ 0 ] )
{
default:
scsihd_device::WriteData( data, dataLength );
break;
}
}
|