Previous 199869 Revisions Next

r24605 Wednesday 31st July, 2013 at 20:19:39 UTC by Curt Coder
(MESS) ieee488: Restored some usability. (nw)
[src/mess/drivers]pet.c
[src/mess/machine]c2031.c c2040.c c8280.c cbmipt.h d9060.c hardbox.c hardbox.h ieee488.c ieee488.h shark.c softbox.c

trunk/src/mess/drivers/pet.c
r24604r24605
18271827   MCFG_DEVICE_MODIFY(MC6845_TAG)
18281828   MCFG_DEVICE_CONFIG(cbm8296_crtc_intf)
18291829
1830   MCFG_DEVICE_REMOVE("ieee")
1831   MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, "c8250")
1830   MCFG_DEVICE_MODIFY("ieee8")
1831   MCFG_DEVICE_SLOT_INTERFACE(cbm_ieee488_devices, "c8250", false)
18321832
18331833   MCFG_RAM_ADD(RAM_TAG)
18341834   MCFG_RAM_DEFAULT_SIZE("128K")
r24604r24605
18421842//-------------------------------------------------
18431843
18441844static MACHINE_CONFIG_DERIVED( cbm8296d, cbm8296 )
1845   MCFG_DEVICE_REMOVE("ieee")
1846   MCFG_IEEE488_SLOT_ADD("ieee", cbm8296d_ieee488_devices, "c8250lp")
1845   MCFG_DEVICE_MODIFY("ieee8")
1846   MCFG_DEVICE_SLOT_INTERFACE(cbm8296d_ieee488_devices, "c8250lp", false)
18471847MACHINE_CONFIG_END
18481848
18491849
trunk/src/mess/machine/hardbox.c
r24604r24605
1919   Start the pet8032 emulator with the HardBox attached as device 9,
2020   with the new CHD and the utilities floppy mounted:
2121
22   $ mess pet8032 -ieee:c8050:ieee hardbox \
22   $ mess pet8032 -ieee9 hardbox \
2323               -hard1 /path/to/corvus20mb.chd \
2424               -flop1 /path/to/hardbox-utils.d80
2525   
r24604r24605
132132   m_bus->dio_w(this, data ^ 0xff);
133133}
134134
135READ8_MEMBER( hardbox_device::ppi0_pc_r )
136{
137   UINT8 data = ioport("SW1")->read();
138
139   /* DIP switches on PC1,PC2,PC3 configure the IEEE-488 primary address. 
140      We get the address from m_address instead. */
141   data |= ((m_slot->get_address() - 8) << 1) ^ 0xff;
142
143   return data;
144}
145
135146static I8255A_INTERFACE( ppi0_intf )
136147{
137148   DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, hardbox_device, ppi0_pa_r),
138149   DEVCB_NULL, // Port A write
139150   DEVCB_NULL, // Port B read
140151   DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, hardbox_device, ppi0_pb_w),
141   DEVCB_INPUT_PORT("SW1"), // Port C read
152   DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, hardbox_device, ppi0_pc_r),
142153   DEVCB_NULL  // Port C write
143154};
144155
r24604r24605
283294   MCFG_HARDDISK_ADD("harddisk2")
284295   MCFG_HARDDISK_ADD("harddisk3")
285296   MCFG_HARDDISK_ADD("harddisk4")
286
287   MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL)
288297MACHINE_CONFIG_END
289298
290299
trunk/src/mess/machine/hardbox.h
r24604r24605
4343
4444   DECLARE_READ8_MEMBER( ppi0_pa_r );
4545   DECLARE_WRITE8_MEMBER( ppi0_pb_w );
46   DECLARE_READ8_MEMBER( ppi0_pc_r );
4647
4748   DECLARE_READ8_MEMBER( ppi1_pa_r );
4849   DECLARE_WRITE8_MEMBER( ppi1_pb_w );
trunk/src/mess/machine/softbox.c
r24604r24605
281281   MCFG_HARDDISK_ADD("harddisk3")
282282   MCFG_HARDDISK_ADD("harddisk4")
283283   MCFG_RS232_PORT_ADD(RS232_TAG, rs232_intf, default_rs232_devices, NULL)
284
285   MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL)
286284MACHINE_CONFIG_END
287285
288286
trunk/src/mess/machine/c2031.c
r24604r24605
358358
359359   MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, c1541_floppy_interface)
360360   MCFG_64H156_ADD(C64H156_TAG, XTAL_16MHz, ga_intf)
361
362   MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL)
363361MACHINE_CONFIG_END
364362
365363
r24604r24605
411409{
412410   int state = 1;
413411
414   switch (m_address->read() & 0x03)
412   switch ((m_slot->get_address() - 8) & 0x03)
415413   {
416414   case 0: state = (m_atna && m_nrfd_out); break;
417415   case 1: state = m_nrfd_out;             break;
trunk/src/mess/machine/c2040.c
r24604r24605
516516   UINT8 data = 0;
517517
518518   // device number selection
519   data |= m_address->read() & 0x07;
519   data |= m_slot->get_address() - 8;
520520
521521   // data accepted in
522522   data |= m_bus->ndac_r() << 6;
r24604r24605
10991099   MCFG_MOS6530_ADD(M6530_TAG, XTAL_16MHz/16, miot_intf)
11001100
11011101   MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(c2040_floppy_interface)
1102
1103   MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL)
11041102MACHINE_CONFIG_END
11051103
11061104
r24604r24605
11351133   MCFG_MOS6530_ADD(M6530_TAG, XTAL_16MHz/16, miot_intf)
11361134
11371135   MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(c4040_floppy_interface)
1138
1139   MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL)
11401136MACHINE_CONFIG_END
11411137
11421138
r24604r24605
11711167   MCFG_MOS6530_ADD(M6530_TAG, XTAL_12MHz/12, c8050_miot_intf)
11721168
11731169   MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(c8050_floppy_interface)
1174
1175   MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL)
11761170MACHINE_CONFIG_END
11771171
11781172
r24604r24605
12071201   MCFG_MOS6530_ADD(M6530_TAG, XTAL_12MHz/12, c8050_miot_intf)
12081202
12091203   MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(c8250_floppy_interface)
1210
1211   MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL)
12121204MACHINE_CONFIG_END
12131205
12141206
r24604r24605
12431235   MCFG_MOS6530_ADD(M6530_TAG, XTAL_12MHz/12, c8050_miot_intf)
12441236
12451237   MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(c8250_floppy_interface)
1246
1247   MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL)
12481238MACHINE_CONFIG_END
12491239
12501240
r24604r24605
12791269   MCFG_MOS6530_ADD(M6530_TAG, XTAL_12MHz/12, c8050_miot_intf)
12801270
12811271   MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, c8250_floppy_interface)
1282
1283   MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL)
12841272MACHINE_CONFIG_END
12851273
12861274
trunk/src/mess/machine/cbmipt.h
r24604r24605
115115
116116
117117#define MCFG_CBM_IEEE488_ADD(_default_drive) \
118   MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, _default_drive) \
118   MCFG_IEEE488_SLOT_ADD("ieee4", 4, cbm_ieee488_devices, NULL) \
119   MCFG_IEEE488_SLOT_ADD("ieee8", 8, cbm_ieee488_devices, _default_drive) \
120   MCFG_IEEE488_SLOT_ADD("ieee9", 9, cbm_ieee488_devices, NULL) \
121   MCFG_IEEE488_SLOT_ADD("ieee10", 10, cbm_ieee488_devices, NULL) \
122   MCFG_IEEE488_SLOT_ADD("ieee11", 11, cbm_ieee488_devices, NULL) \
123   MCFG_IEEE488_SLOT_ADD("ieee12", 12, cbm_ieee488_devices, NULL) \
124   MCFG_IEEE488_SLOT_ADD("ieee13", 13, cbm_ieee488_devices, NULL) \
125   MCFG_IEEE488_SLOT_ADD("ieee14", 14, cbm_ieee488_devices, NULL) \
126   MCFG_IEEE488_SLOT_ADD("ieee15", 15, cbm_ieee488_devices, NULL) \
119127   MCFG_IEEE488_BUS_ADD()
120128
121129
trunk/src/mess/machine/shark.c
r24604r24605
112112   // devices
113113   MCFG_HARDDISK_ADD("harddisk1")
114114   MCFG_RS232_PORT_ADD(RS232_TAG, rs232_intf, default_rs232_devices, NULL)
115
116   MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL)
117115MACHINE_CONFIG_END
118116
119117
trunk/src/mess/machine/d9060.c
r24604r24605
267267   UINT8 data = 0;
268268
269269   // device number selection
270   data |= m_address->read() & 0x07;
270   data |= m_slot->get_address() - 8;
271271
272272   // data accepted in
273273   data |= m_bus->ndac_r() << 6;
r24604r24605
446446   MCFG_SCSIDEV_ADD(SASIBUS_TAG ":harddisk0", D9060HD, SCSI_ID_0)
447447   MCFG_SCSICB_ADD(SASIBUS_TAG ":host")
448448   MCFG_SCSICB_REQ_HANDLER(DEVWRITELINE(DEVICE_SELF_OWNER, base_d9060_device, req_w))
449
450   MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL)
451449MACHINE_CONFIG_END
452450
453451
trunk/src/mess/machine/ieee488.c
r24604r24605
8888   assert(bus);
8989
9090   device_ieee488_interface *dev = dynamic_cast<device_ieee488_interface *>(get_card_device());
91   if (dev) bus->add_device(get_card_device());
91   if (dev) bus->add_device(this, get_card_device());
9292}
9393
9494
r24604r24605
152152//  add_device -
153153//-------------------------------------------------
154154
155void ieee488_device::add_device(device_t *target)
155void ieee488_device::add_device(ieee488_slot_device *slot, device_t *target)
156156{
157157   daisy_entry *entry = auto_alloc(machine(), daisy_entry(target));
158158
159159   entry->m_interface->m_bus = this;
160   entry->m_interface->m_slot = slot;
160161
161162   m_device_list.append(*entry);
162163}
trunk/src/mess/machine/ieee488.h
r24604r24605
5858   downcast<ieee488_device *>(device)->set_ren_callback(DEVCB2_##_write);
5959
6060
61#define MCFG_IEEE488_SLOT_ADD(_tag, _slot_intf, _def_slot) \
61#define MCFG_IEEE488_SLOT_ADD(_tag, _address, _slot_intf, _def_slot) \
6262   MCFG_DEVICE_ADD(_tag, IEEE488_SLOT, 0) \
63   MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
63   MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \
64   downcast<ieee488_slot_device *>(device)->set_address(_address);
6465
6566
6667
r24604r24605
7071
7172// ======================> ieee488_device
7273
74class ieee488_slot_device;
7375class device_ieee488_interface;
7476
7577class ieee488_device : public device_t
r24604r24605
8789   template<class _write> void set_atn_callback(_write wr) { m_write_atn.set_callback(wr); }
8890   template<class _write> void set_ren_callback(_write wr) { m_write_ren.set_callback(wr); }
8991
90   void add_device(device_t *target);
92   void add_device(ieee488_slot_device *slot, device_t *target);
9193
9294   // reads for both host and peripherals
9395   UINT8 dio_r() { return get_data(); }
r24604r24605
187189   // construction/destruction
188190   ieee488_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
189191
192   void set_address(int address) { m_address = address; }
193   int get_address() { return m_address; }
194
190195   // device-level overrides
191196   virtual void device_start();
197
198protected:
199   int m_address;
192200};
193201
194202
r24604r24605
216224   virtual void ieee488_atn(int state) { };
217225   virtual void ieee488_ren(int state) { };
218226
219   ieee488_device  *m_bus;
227   ieee488_device *m_bus;
228   ieee488_slot_device *m_slot;
220229};
221230
222231
trunk/src/mess/machine/c8280.c
r24604r24605
257257   UINT8 data = 0;
258258
259259   // device number selection
260   data |= m_address->read() & 0x07;
260   data |= m_slot->get_address() - 8;
261261
262262   // data accepted in
263263   data |= m_bus->ndac_r() << 6;
r24604r24605
342342   MCFG_FD1797x_ADD(WD1797_TAG, XTAL_12MHz/6) // clock?
343343   MCFG_FLOPPY_DRIVE_ADD(WD1797_TAG":0", c8280_floppies, "8dsdd", floppy_image_device::default_floppy_formats)
344344   MCFG_FLOPPY_DRIVE_ADD(WD1797_TAG":1", c8280_floppies, "8dsdd", floppy_image_device::default_floppy_formats)
345
346   MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL)
347345MACHINE_CONFIG_END
348346
349347

Previous 199869 Revisions Next


© 1997-2024 The MAME Team