Previous 199869 Revisions Next

r23661 Wednesday 12th June, 2013 at 23:01:05 UTC by Curt Coder
(MESS) Added skeleton for IMI 5000H hard disk controller. [Curt Coder, Al Kossow]
[src/mess]mess.mak
[src/mess/machine]imi5000h.c* imi5000h.h*

trunk/src/mess/mess.mak
r23660r23661
734734   $(MESS_MACHINE)/hd63450.o   \
735735   $(MESS_MACHINE)/i8271.o     \
736736   $(MESS_MACHINE)/ieee488.o   \
737   $(MESS_MACHINE)/imi5000h.o  \
737738   $(MESS_MACHINE)/isa.o       \
738739   $(MESS_MACHINE)/kb3600.o    \
739740   $(MESS_MACHINE)/keyboard.o  \
trunk/src/mess/machine/imi5000h.c
r0r23661
1/**********************************************************************
2
3    IMI 5000H 5.25" Winchester Hard Disk Controller emulation
4
5    Used in Corvus Systems H-Series drives (Model 6/11/20)
6
7    Copyright MESS Team.
8    Visit http://mamedev.org for licensing and usage restrictions.
9
10**********************************************************************/
11
12#include "imi5000h.h"
13
14
15
16//**************************************************************************
17//  MACROS / CONSTANTS
18//**************************************************************************
19
20#define Z80_TAG         "u70"
21#define Z80CTC_TAG      "u45"
22#define Z80PIO_0_TAG   "u25"
23#define Z80PIO_2_TAG   "u64"
24#define Z80PIO_3_TAG   "u73"
25
26
27
28//**************************************************************************
29//  DEVICE DEFINITIONS
30//**************************************************************************
31
32const device_type IMI5000H = &device_creator<imi5000h_device>;
33
34
35//-------------------------------------------------
36//  ROM( imi5000h )
37//-------------------------------------------------
38
39ROM_START( imi5000h )
40   ROM_REGION( 0x1000, Z80_TAG, 0 )
41   ROM_LOAD( "c 7.63.u62", 0x0000, 0x1000, CRC(822aac68) SHA1(ab3ad7726ab20dd1041cb754d266e2f191fa3ec3) )
42
43   ROM_REGION( 0x320, "proms", 0 )
44   ROM_LOAD( "8152323-2a.u52", 0x000, 0x100, CRC(b36bc7e1) SHA1(de00b5bc17ff86b66af3e974dfd9b53245de12bd) )
45   ROM_LOAD( "8152323-4a.u53", 0x100, 0x100, CRC(016fe2f7) SHA1(909f815a61e759fdf998674ee383512ecd8fee65) )
46   ROM_LOAD( "8152323-1a.u54", 0x200, 0x100, CRC(512f1f39) SHA1(50c68289a19fdfca3665dbb0e98373608458c5d8) )
47   ROM_LOAD( "8152323-3a.u71", 0x300, 0x020, CRC(b1092f02) SHA1(646c5a3e951535a80d24d9ce8764a3f373c508db) )
48ROM_END
49
50
51//-------------------------------------------------
52//  rom_region - device-specific ROM region
53//-------------------------------------------------
54
55const rom_entry *imi5000h_device::device_rom_region() const
56{
57   return ROM_NAME( imi5000h );
58}
59
60
61//-------------------------------------------------
62//  ADDRESS_MAP( imi5000h_mem )
63//-------------------------------------------------
64
65static ADDRESS_MAP_START( imi5000h_mem, AS_PROGRAM, 8, imi5000h_device )
66   ADDRESS_MAP_UNMAP_HIGH
67   AM_RANGE(0x0000, 0x0fff) AM_MIRROR(0x1000) AM_ROM AM_REGION(Z80_TAG, 0)
68   AM_RANGE(0x4000, 0x47ff) AM_MIRROR(0x1800) AM_RAM
69   AM_RANGE(0x6000, 0x63ff) AM_MIRROR(0x1c00) AM_RAM
70   AM_RANGE(0x8000, 0x83ff) AM_MIRROR(0x1c00) AM_RAM
71   AM_RANGE(0xa000, 0xa3ff) AM_MIRROR(0x1c00) AM_RAM
72ADDRESS_MAP_END
73
74
75//-------------------------------------------------
76//  ADDRESS_MAP( imi5000h_io )
77//-------------------------------------------------
78
79static ADDRESS_MAP_START( imi5000h_io, AS_IO, 8, imi5000h_device )
80   ADDRESS_MAP_UNMAP_HIGH
81   ADDRESS_MAP_GLOBAL_MASK(0x9f)
82   AM_RANGE(0x00, 0x03) AM_DEVREADWRITE(Z80PIO_0_TAG, z80pio_device, read, write)
83   AM_RANGE(0x08, 0x0b) AM_DEVREADWRITE(Z80PIO_2_TAG, z80pio_device, read, write)
84   AM_RANGE(0x0c, 0x0f) AM_DEVREADWRITE(Z80PIO_3_TAG, z80pio_device, read, write)
85   AM_RANGE(0x10, 0x13) AM_MIRROR(0x03) // BEGRDY
86   AM_RANGE(0x14, 0x14) AM_MIRROR(0x03) // HSXCLR
87   AM_RANGE(0x18, 0x18) AM_MIRROR(0x03) // XFERSTB
88   AM_RANGE(0x1c, 0x1f) AM_DEVREADWRITE(Z80CTC_TAG, z80ctc_device, read, write)
89ADDRESS_MAP_END
90
91
92//-------------------------------------------------
93//  z80_daisy_config z80_daisy_chain
94//-------------------------------------------------
95
96static const z80_daisy_config z80_daisy_chain[] =
97{
98   { Z80PIO_0_TAG },
99   { Z80CTC_TAG },
100   { Z80PIO_2_TAG },
101   { NULL }
102};
103
104
105//-------------------------------------------------
106//  Z80CTC_INTERFACE( ctc_intf )
107//-------------------------------------------------
108
109static Z80CTC_INTERFACE( ctc_intf )
110{
111   DEVCB_CPU_INPUT_LINE(Z80_TAG, INPUT_LINE_IRQ0),
112   DEVCB_NULL,
113   DEVCB_NULL,
114   DEVCB_NULL
115};
116
117
118//-------------------------------------------------
119//  Z80PIO_INTERFACE( pio0_intf )
120//-------------------------------------------------
121
122static Z80PIO_INTERFACE( pio0_intf )
123{
124   DEVCB_CPU_INPUT_LINE(Z80_TAG, INPUT_LINE_IRQ0),
125   DEVCB_NULL,
126   DEVCB_NULL,
127   DEVCB_NULL,
128   DEVCB_NULL,
129   DEVCB_NULL,
130   DEVCB_NULL
131};
132
133
134//-------------------------------------------------
135//  Z80PIO_INTERFACE( pio2_intf )
136//-------------------------------------------------
137
138static Z80PIO_INTERFACE( pio2_intf )
139{
140   DEVCB_CPU_INPUT_LINE(Z80_TAG, INPUT_LINE_IRQ0),
141   DEVCB_NULL,
142   DEVCB_NULL,
143   DEVCB_NULL,
144   DEVCB_NULL,
145   DEVCB_NULL,
146   DEVCB_NULL
147};
148
149
150//-------------------------------------------------
151//  Z80PIO_INTERFACE( pio3_intf )
152//-------------------------------------------------
153
154static Z80PIO_INTERFACE( pio3_intf )
155{
156   DEVCB_NULL,
157   DEVCB_NULL,
158   DEVCB_NULL,
159   DEVCB_NULL,
160   DEVCB_NULL,
161   DEVCB_NULL,
162   DEVCB_NULL
163};
164
165
166//-------------------------------------------------
167//  MACHINE_DRIVER( imi5000h )
168//-------------------------------------------------
169
170static MACHINE_CONFIG_FRAGMENT( imi5000h )
171   MCFG_CPU_ADD(Z80_TAG, Z80, 4000000)
172   MCFG_CPU_CONFIG(z80_daisy_chain)
173   MCFG_CPU_PROGRAM_MAP(imi5000h_mem)
174   MCFG_CPU_IO_MAP(imi5000h_io)
175
176   MCFG_Z80CTC_ADD(Z80CTC_TAG, 4000000, ctc_intf)
177   MCFG_Z80PIO_ADD(Z80PIO_0_TAG, 4000000, pio0_intf)
178   MCFG_Z80PIO_ADD(Z80PIO_2_TAG, 4000000, pio2_intf)
179   MCFG_Z80PIO_ADD(Z80PIO_3_TAG, 4000000, pio3_intf)
180MACHINE_CONFIG_END
181
182
183//-------------------------------------------------
184//  machine_config_additions - device-specific
185//  machine configurations
186//-------------------------------------------------
187
188machine_config_constructor imi5000h_device::device_mconfig_additions() const
189{
190   return MACHINE_CONFIG_NAME( imi5000h );
191}
192
193
194//-------------------------------------------------
195//  INPUT_PORTS( imi5000h )
196//-------------------------------------------------
197
198static INPUT_PORTS_START( imi5000h )
199   PORT_START("UB4")
200   PORT_DIPUNKNOWN_DIPLOC( 0x01, IP_ACTIVE_LOW, "UB4:1" )
201   PORT_DIPUNKNOWN_DIPLOC( 0x02, IP_ACTIVE_LOW, "UB4:2" )
202   PORT_DIPUNKNOWN_DIPLOC( 0x04, IP_ACTIVE_LOW, "UB4:3" )
203   PORT_DIPUNKNOWN_DIPLOC( 0x08, IP_ACTIVE_LOW, "UB4:4" )
204   PORT_DIPUNKNOWN_DIPLOC( 0x10, IP_ACTIVE_LOW, "UB4:5" )
205   PORT_DIPUNKNOWN_DIPLOC( 0x20, IP_ACTIVE_LOW, "UB4:6" )
206   PORT_DIPUNKNOWN_DIPLOC( 0x40, IP_ACTIVE_LOW, "UB4:7" )
207   PORT_DIPUNKNOWN_DIPLOC( 0x80, IP_ACTIVE_LOW, "UB4:8" )
208INPUT_PORTS_END
209
210
211//-------------------------------------------------
212//  input_ports - device-specific input ports
213//-------------------------------------------------
214
215ioport_constructor imi5000h_device::device_input_ports() const
216{
217   return INPUT_PORTS_NAME( imi5000h );
218}
219
220
221
222//**************************************************************************
223//  LIVE DEVICE
224//**************************************************************************
225
226//-------------------------------------------------
227//  imi5000h_device - constructor
228//-------------------------------------------------
229
230imi5000h_device::imi5000h_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
231   : device_t(mconfig, IMI5000H, "IMI 5000H", tag, owner, clock, "imi5000h", __FILE__),
232      m_maincpu(*this, Z80_TAG),
233      m_ub4(*this, "UB4")
234{
235}
236
237
238//-------------------------------------------------
239//  device_start - device-specific startup
240//-------------------------------------------------
241
242void imi5000h_device::device_start()
243{
244}
Property changes on: trunk/src/mess/machine/imi5000h.c
Added: svn:eol-style
   + native
Added: svn:mime-type
   + text/plain
trunk/src/mess/machine/imi5000h.h
r0r23661
1/**********************************************************************
2
3    IMI 5000H 5.25" Winchester Hard Disk Controller emulation
4
5    Used in Corvus Systems H-Series drives (Model 6/11/20)
6
7    Copyright MESS Team.
8    Visit http://mamedev.org for licensing and usage restrictions.
9
10**********************************************************************/
11
12#pragma once
13
14#ifndef __IMI5000H__
15#define __IMI5000H__
16
17#include "emu.h"
18#include "cpu/z80/z80.h"
19#include "cpu/z80/z80daisy.h"
20#include "machine/z80ctc.h"
21#include "machine/z80pio.h"
22
23
24
25//**************************************************************************
26//  INTERFACE CONFIGURATION MACROS
27//**************************************************************************
28
29#define MCFG_IMI5000H_ADD(_tag) \
30   MCFG_DEVICE_ADD(_tag, IMI5000H, 0)
31
32
33
34//**************************************************************************
35//  TYPE DEFINITIONS
36//**************************************************************************
37
38// ======================> imi5000h_device
39
40class imi5000h_device :  public device_t
41{
42public:
43   // construction/destruction
44   imi5000h_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
45
46   // optional information overrides
47   virtual const rom_entry *device_rom_region() const;
48   virtual machine_config_constructor device_mconfig_additions() const;
49   virtual ioport_constructor device_input_ports() const;
50
51protected:
52   // device-level overrides
53   virtual void device_start();
54
55private:
56   required_device<cpu_device> m_maincpu;
57   required_ioport m_ub4;
58};
59
60
61// device type definition
62extern const device_type IMI5000H;
63
64
65
66#endif
Property changes on: trunk/src/mess/machine/imi5000h.h
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native

Previous 199869 Revisions Next


© 1997-2024 The MAME Team