Previous 199869 Revisions Next

r33465 Thursday 20th November, 2014 at 15:29:27 UTC by Dirk Best
pcd: create omti5100 sasi controller skeleton device
[src/emu/machine]machine.mak omti5100.c* omti5100.h*
[src/mess]mess.mak
[src/mess/drivers]pcd.c

trunk/src/emu/machine/machine.mak
r241976r241977
12211221
12221222#-------------------------------------------------
12231223#
1224#@src/emu/machine/omti5100.h,MACHINES += OMTI5100
1225#-------------------------------------------------
1226
1227ifneq ($(filter OMTI5100,$(MACHINES)),)
1228MACHINEOBJS += $(MACHINEOBJ)/omti5100.o
1229endif
1230
1231#-------------------------------------------------
1232#
12241233#@src/emu/machine/pcf8593.h,MACHINES += PCF8593
12251234#-------------------------------------------------
12261235
trunk/src/emu/machine/omti5100.c
r0r241977
1/***************************************************************************
2
3    SMS OMTI 5100
4
5    license: MAME, GPL-2.0+
6    copyright-holders: Dirk Best
7
8    SCSI/SASI Intelligent Data Controller
9
10    Note: - Skeleton device
11          - Supports up to two ST-506/412 hard drives
12          - Z8681 (Z8)
13          - 8 KB RAM
14          - 2 KB Buffer RAM
15
16***************************************************************************/
17
18#include "omti5100.h"
19
20
21//**************************************************************************
22//  CONSTANTS
23//**************************************************************************
24
25#define VERBOSE 1
26
27
28//**************************************************************************
29//  DEVICE DEFINITIONS
30//**************************************************************************
31
32const device_type OMTI5100 = &device_creator<omti5100_device>;
33
34//-------------------------------------------------
35//  rom_region - device-specific ROM region
36//-------------------------------------------------
37
38ROM_START( omti5100_firmware )
39   ROM_REGION(0x2000, "firmware", 0)
40   ROM_LOAD("1002401-n.7a", 0x0000, 0x2000, CRC(d531e25c) SHA1(22e4762a70841b80e843a5d76175c1fdb6838e18))
41ROM_END
42
43const rom_entry *omti5100_device::device_rom_region() const
44{
45   return ROM_NAME( omti5100_firmware );
46}
47
48//-------------------------------------------------
49//  machine_config_additions - device-specific
50//  machine configurations
51//-------------------------------------------------
52
53static MACHINE_CONFIG_FRAGMENT( omti5100_z8 )
54//   MCFG_CPU_ADD("z8", Z8681, XTAL_20MHz / 3 /* ??? */)
55MACHINE_CONFIG_END
56
57machine_config_constructor omti5100_device::device_mconfig_additions() const
58{
59   return MACHINE_CONFIG_NAME( omti5100_z8 );
60}
61
62
63//**************************************************************************
64//  LIVE DEVICE
65//**************************************************************************
66
67//-------------------------------------------------
68//  omti5100_device - constructor
69//-------------------------------------------------
70
71omti5100_device::omti5100_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
72   device_t(mconfig, OMTI5100, "OMTI 5100 SCSI/SASI Controller", tag, owner, clock, "omti5100", __FILE__),
73//   m_cpu(*this, "z8"),
74   m_bsy_w(*this),
75   m_cd_w(*this),
76   m_io_w(*this),
77   m_req_w(*this),
78   m_msg_w(*this)
79{
80}
81
82//-------------------------------------------------
83//  device_start - device-specific startup
84//-------------------------------------------------
85
86void omti5100_device::device_start()
87{
88   // resolve callbacks
89   m_bsy_w.resolve_safe();
90   m_cd_w.resolve_safe();
91   m_io_w.resolve_safe();
92   m_req_w.resolve_safe();
93   m_msg_w.resolve_safe();
94}
95
96//-------------------------------------------------
97//  device_reset - device-specific reset
98//-------------------------------------------------
99
100void omti5100_device::device_reset()
101{
102}
103
104
105//**************************************************************************
106//  IMPLEMENTATION
107//**************************************************************************
108
109READ8_MEMBER( omti5100_device::data_r )
110{
111   if (VERBOSE)
112      logerror("%s: data_r\n", tag());
113
114   return 0xff;
115}
116
117WRITE8_MEMBER( omti5100_device::data_w )
118{
119   if (VERBOSE)
120      logerror("%s: rst_w: %02x\n", tag(), data);
121}
122
123READ_LINE_MEMBER( omti5100_device::parity_r )
124{
125   if (VERBOSE)
126      logerror("%s: parity_r\n", tag());
127
128   return 1;
129}
130
131WRITE_LINE_MEMBER( omti5100_device::parity_w )
132{
133   if (VERBOSE)
134      logerror("%s: parity_w: %d\n", tag(), state);
135}
136
137WRITE_LINE_MEMBER( omti5100_device::rst_w )
138{
139   if (VERBOSE)
140      logerror("%s: rst_w: %d\n", tag(), state);
141}
142
143WRITE_LINE_MEMBER( omti5100_device::sel_w )
144{
145   if (VERBOSE)
146      logerror("%s: sel_w: %d\n", tag(), state);
147}
148
149WRITE_LINE_MEMBER( omti5100_device::ack_w )
150{
151   if (VERBOSE)
152      logerror("%s: ack_w: %d\n", tag(), state);
153}
trunk/src/emu/machine/omti5100.h
r0r241977
1/***************************************************************************
2
3    SMS OMTI 5100
4
5    license: MAME, GPL-2.0+
6    copyright-holders: Dirk Best
7
8    SCSI/SASI Intelligent Data Controller
9
10***************************************************************************/
11
12#pragma once
13
14#ifndef __OMTI5100_H__
15#define __OMTI5100_H__
16
17#include "emu.h"
18#include "cpu/z8/z8.h"
19
20
21//**************************************************************************
22//  INTERFACE CONFIGURATION MACROS
23//**************************************************************************
24
25#define MCFG_OMTI5100_ADD(_tag) \
26   MCFG_DEVICE_ADD(_tag, OMTI5100, 0)
27
28#define MCFG_OMTI5100_BSY_HANDLER(_devcb) \
29   devcb = &omti5100_device::set_bsy_handler(*device, DEVCB_##_devcb);
30
31#define MCFG_OMTI5100_CD_HANDLER(_devcb) \
32   devcb = &omti5100_device::set_cd_handler(*device, DEVCB_##_devcb);
33
34#define MCFG_OMTI5100_IO_HANDLER(_devcb) \
35   devcb = &omti5100_device::set_io_handler(*device, DEVCB_##_devcb);
36
37#define MCFG_OMTI5100_REQ_HANDLER(_devcb) \
38   devcb = &omti5100_device::set_req_handler(*device, DEVCB_##_devcb);
39
40#define MCFG_OMTI5100_MSG_HANDLER(_devcb) \
41   devcb = &omti5100_device::set_msg_handler(*device, DEVCB_##_devcb);
42
43
44//**************************************************************************
45//  TYPE DEFINITIONS
46//**************************************************************************
47
48// ======================> omti5100_device
49
50class omti5100_device : public device_t
51{
52public:
53   // construction/destruction
54   omti5100_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
55
56   // callbacks
57   template<class _Object> static devcb_base &set_bsy_handler(device_t &device, _Object object)
58      { return downcast<omti5100_device &>(device).m_bsy_w.set_callback(object); }
59
60   template<class _Object> static devcb_base &set_cd_handler(device_t &device, _Object object)
61      { return downcast<omti5100_device &>(device).m_cd_w.set_callback(object); }
62
63   template<class _Object> static devcb_base &set_io_handler(device_t &device, _Object object)
64      { return downcast<omti5100_device &>(device).m_io_w.set_callback(object); }
65
66   template<class _Object> static devcb_base &set_req_handler(device_t &device, _Object object)
67      { return downcast<omti5100_device &>(device).m_req_w.set_callback(object); }
68
69   template<class _Object> static devcb_base &set_msg_handler(device_t &device, _Object object)
70      { return downcast<omti5100_device &>(device).m_msg_w.set_callback(object); }
71
72   // data
73   DECLARE_READ8_MEMBER( data_r );
74   DECLARE_WRITE8_MEMBER( data_w );
75   DECLARE_READ_LINE_MEMBER( parity_r );
76   DECLARE_WRITE_LINE_MEMBER( parity_w );
77
78   // control
79   DECLARE_WRITE_LINE_MEMBER( rst_w );
80   DECLARE_WRITE_LINE_MEMBER( sel_w );
81   DECLARE_WRITE_LINE_MEMBER( ack_w );
82
83protected:
84   // device_t overrides
85   virtual const rom_entry *device_rom_region() const;
86   virtual machine_config_constructor device_mconfig_additions() const;
87   virtual void device_start();
88   virtual void device_reset();
89
90private:
91//   required_device<z8681_device> m_cpu;
92
93   devcb_write_line m_bsy_w;
94   devcb_write_line m_cd_w;
95   devcb_write_line m_io_w;
96   devcb_write_line m_req_w;
97   devcb_write_line m_msg_w;
98};
99
100// device type definition
101extern const device_type OMTI5100;
102
103#endif // __OMTI5100_H__
trunk/src/mess/drivers/pcd.c
r241976r241977
1515#include "machine/nvram.h"
1616#include "machine/pic8259.h"
1717#include "machine/mc2661.h"
18#include "machine/omti5100.h"
1819#include "machine/wd_fdc.h"
1920#include "machine/mc146818.h"
2021#include "sound/speaker.h"
r241976r241977
3334   m_pic1(*this, "pic1"),
3435   m_pic2(*this, "pic2"),
3536   m_speaker(*this, "speaker"),
37   m_sasi(*this, "sasi"),
3638   m_fdc(*this, "fdc"),
3739   m_rtc(*this, "rtc")
3840   { }
r241976r241977
5557   required_device<pic8259_device> m_pic1;
5658   required_device<pic8259_device> m_pic2;
5759   required_device<speaker_sound_device> m_speaker;
60   required_device<omti5100_device> m_sasi;
5861   required_device<wd2793_t> m_fdc;
5962   required_device<mc146818_device> m_rtc;
6063};
r241976r241977
125128   AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_SHARE("nvram")
126129   AM_RANGE(0xf840, 0xf841) AM_DEVREADWRITE8("pic1", pic8259_device, read, write, 0xff00)
127130   AM_RANGE(0xf900, 0xf907) AM_DEVREADWRITE8("fdc", wd2793_t, read, write, 0x00ff)
131//   AM_RANGE(0xf940, 0xf941) // sasi controller here?
128132   AM_RANGE(0xf980, 0xf981) AM_READWRITE8(crt_data_r, crt_data_w, 0x00ff) AM_READ8(crt_status_r, 0xff00)
129133//   AM_RANGE(0xfa00, 0xfa7f) // pcs4-n (peripheral chip select)
130134ADDRESS_MAP_END
r241976r241977
159163   // nvram
160164   MCFG_NVRAM_ADD_1FILL("nvram")
161165
166   // sasi controller
167   MCFG_OMTI5100_ADD("sasi")
168
162169   // floppy disk controller
163170   MCFG_WD2793x_ADD("fdc", XTAL_16MHz/2/8)
164171   MCFG_WD_FDC_INTRQ_CALLBACK(DEVWRITELINE("pic1", pic8259_device, ir6_w))
r241976r241977
196203   ROM_LOAD16_BYTE("s26361-d359.d42", 0x0001, 0x2000, CRC(e20244dd) SHA1(0ebc5ddb93baacd9106f1917380de58aac64fe73))
197204   ROM_LOAD16_BYTE("s26361-d359.d43", 0x0000, 0x2000, CRC(e03db2ec) SHA1(fcae8b0c9e7543706817b0a53872826633361fda))
198205
199   // hdd (omti 5100)
200   ROM_REGION(0x2000, "hdd", 0)
201   ROM_LOAD("1002401-n.bin", 0x0000, 0x2000, CRC(d531e25c) SHA1(22e4762a70841b80e843a5d76175c1fdb6838e18))
202
203206   // gfx card (scn2674 with 8741), to be moved
204207   ROM_REGION(0x400, "graphics", 0)
205208   ROM_LOAD("s36361-d321-v1.bin", 0x000, 0x400, CRC(69baeb2a) SHA1(98b9cd0f38c51b4988a3aed0efcf004bedd115ff))
trunk/src/mess/mess.mak
r241976r241977
476476MACHINES += NMC9306
477477MACHINES += NSC810
478478MACHINES += NSCSI
479MACHINES += OMTI5100
479480MACHINES += PC_FDC
480481MACHINES += PC_LPT
481482MACHINES += PCCARD


Previous 199869 Revisions Next


© 1997-2024 The MAME Team