mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
(MESS) ieee488: Restored some usability. (nw)
This commit is contained in:
parent
bee8e52814
commit
08a8842ef9
@ -1827,8 +1827,8 @@ static MACHINE_CONFIG_DERIVED_CLASS( cbm8296, pet80, cbm8296_state )
|
||||
MCFG_DEVICE_MODIFY(MC6845_TAG)
|
||||
MCFG_DEVICE_CONFIG(cbm8296_crtc_intf)
|
||||
|
||||
MCFG_DEVICE_REMOVE("ieee")
|
||||
MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, "c8250")
|
||||
MCFG_DEVICE_MODIFY("ieee8")
|
||||
MCFG_DEVICE_SLOT_INTERFACE(cbm_ieee488_devices, "c8250", false)
|
||||
|
||||
MCFG_RAM_ADD(RAM_TAG)
|
||||
MCFG_RAM_DEFAULT_SIZE("128K")
|
||||
@ -1842,8 +1842,8 @@ MACHINE_CONFIG_END
|
||||
//-------------------------------------------------
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( cbm8296d, cbm8296 )
|
||||
MCFG_DEVICE_REMOVE("ieee")
|
||||
MCFG_IEEE488_SLOT_ADD("ieee", cbm8296d_ieee488_devices, "c8250lp")
|
||||
MCFG_DEVICE_MODIFY("ieee8")
|
||||
MCFG_DEVICE_SLOT_INTERFACE(cbm8296d_ieee488_devices, "c8250lp", false)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -358,8 +358,6 @@ static MACHINE_CONFIG_FRAGMENT( c2031 )
|
||||
|
||||
MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, c1541_floppy_interface)
|
||||
MCFG_64H156_ADD(C64H156_TAG, XTAL_16MHz, ga_intf)
|
||||
|
||||
MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
@ -411,7 +409,7 @@ inline int c2031_device::get_device_number()
|
||||
{
|
||||
int state = 1;
|
||||
|
||||
switch (m_address->read() & 0x03)
|
||||
switch ((m_slot->get_address() - 8) & 0x03)
|
||||
{
|
||||
case 0: state = (m_atna && m_nrfd_out); break;
|
||||
case 1: state = m_nrfd_out; break;
|
||||
|
@ -516,7 +516,7 @@ READ8_MEMBER( c2040_device::riot1_pb_r )
|
||||
UINT8 data = 0;
|
||||
|
||||
// device number selection
|
||||
data |= m_address->read() & 0x07;
|
||||
data |= m_slot->get_address() - 8;
|
||||
|
||||
// data accepted in
|
||||
data |= m_bus->ndac_r() << 6;
|
||||
@ -1099,8 +1099,6 @@ static MACHINE_CONFIG_FRAGMENT( c2040 )
|
||||
MCFG_MOS6530_ADD(M6530_TAG, XTAL_16MHz/16, miot_intf)
|
||||
|
||||
MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(c2040_floppy_interface)
|
||||
|
||||
MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
@ -1135,8 +1133,6 @@ static MACHINE_CONFIG_FRAGMENT( c4040 )
|
||||
MCFG_MOS6530_ADD(M6530_TAG, XTAL_16MHz/16, miot_intf)
|
||||
|
||||
MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(c4040_floppy_interface)
|
||||
|
||||
MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
@ -1171,8 +1167,6 @@ static MACHINE_CONFIG_FRAGMENT( c8050 )
|
||||
MCFG_MOS6530_ADD(M6530_TAG, XTAL_12MHz/12, c8050_miot_intf)
|
||||
|
||||
MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(c8050_floppy_interface)
|
||||
|
||||
MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
@ -1207,8 +1201,6 @@ static MACHINE_CONFIG_FRAGMENT( c8250 )
|
||||
MCFG_MOS6530_ADD(M6530_TAG, XTAL_12MHz/12, c8050_miot_intf)
|
||||
|
||||
MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(c8250_floppy_interface)
|
||||
|
||||
MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
@ -1243,8 +1235,6 @@ static MACHINE_CONFIG_FRAGMENT( c8250lp )
|
||||
MCFG_MOS6530_ADD(M6530_TAG, XTAL_12MHz/12, c8050_miot_intf)
|
||||
|
||||
MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(c8250_floppy_interface)
|
||||
|
||||
MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
@ -1279,8 +1269,6 @@ static MACHINE_CONFIG_FRAGMENT( sfd1001 )
|
||||
MCFG_MOS6530_ADD(M6530_TAG, XTAL_12MHz/12, c8050_miot_intf)
|
||||
|
||||
MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, c8250_floppy_interface)
|
||||
|
||||
MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -257,7 +257,7 @@ READ8_MEMBER( c8280_device::riot1_pb_r )
|
||||
UINT8 data = 0;
|
||||
|
||||
// device number selection
|
||||
data |= m_address->read() & 0x07;
|
||||
data |= m_slot->get_address() - 8;
|
||||
|
||||
// data accepted in
|
||||
data |= m_bus->ndac_r() << 6;
|
||||
@ -342,8 +342,6 @@ static MACHINE_CONFIG_FRAGMENT( c8280 )
|
||||
MCFG_FD1797x_ADD(WD1797_TAG, XTAL_12MHz/6) // clock?
|
||||
MCFG_FLOPPY_DRIVE_ADD(WD1797_TAG":0", c8280_floppies, "8dsdd", floppy_image_device::default_floppy_formats)
|
||||
MCFG_FLOPPY_DRIVE_ADD(WD1797_TAG":1", c8280_floppies, "8dsdd", floppy_image_device::default_floppy_formats)
|
||||
|
||||
MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -115,7 +115,15 @@
|
||||
|
||||
|
||||
#define MCFG_CBM_IEEE488_ADD(_default_drive) \
|
||||
MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, _default_drive) \
|
||||
MCFG_IEEE488_SLOT_ADD("ieee4", 4, cbm_ieee488_devices, NULL) \
|
||||
MCFG_IEEE488_SLOT_ADD("ieee8", 8, cbm_ieee488_devices, _default_drive) \
|
||||
MCFG_IEEE488_SLOT_ADD("ieee9", 9, cbm_ieee488_devices, NULL) \
|
||||
MCFG_IEEE488_SLOT_ADD("ieee10", 10, cbm_ieee488_devices, NULL) \
|
||||
MCFG_IEEE488_SLOT_ADD("ieee11", 11, cbm_ieee488_devices, NULL) \
|
||||
MCFG_IEEE488_SLOT_ADD("ieee12", 12, cbm_ieee488_devices, NULL) \
|
||||
MCFG_IEEE488_SLOT_ADD("ieee13", 13, cbm_ieee488_devices, NULL) \
|
||||
MCFG_IEEE488_SLOT_ADD("ieee14", 14, cbm_ieee488_devices, NULL) \
|
||||
MCFG_IEEE488_SLOT_ADD("ieee15", 15, cbm_ieee488_devices, NULL) \
|
||||
MCFG_IEEE488_BUS_ADD()
|
||||
|
||||
|
||||
|
@ -267,7 +267,7 @@ READ8_MEMBER( base_d9060_device::riot1_pb_r )
|
||||
UINT8 data = 0;
|
||||
|
||||
// device number selection
|
||||
data |= m_address->read() & 0x07;
|
||||
data |= m_slot->get_address() - 8;
|
||||
|
||||
// data accepted in
|
||||
data |= m_bus->ndac_r() << 6;
|
||||
@ -446,8 +446,6 @@ static MACHINE_CONFIG_FRAGMENT( d9060 )
|
||||
MCFG_SCSIDEV_ADD(SASIBUS_TAG ":harddisk0", D9060HD, SCSI_ID_0)
|
||||
MCFG_SCSICB_ADD(SASIBUS_TAG ":host")
|
||||
MCFG_SCSICB_REQ_HANDLER(DEVWRITELINE(DEVICE_SELF_OWNER, base_d9060_device, req_w))
|
||||
|
||||
MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
Start the pet8032 emulator with the HardBox attached as device 9,
|
||||
with the new CHD and the utilities floppy mounted:
|
||||
|
||||
$ mess pet8032 -ieee:c8050:ieee hardbox \
|
||||
$ mess pet8032 -ieee9 hardbox \
|
||||
-hard1 /path/to/corvus20mb.chd \
|
||||
-flop1 /path/to/hardbox-utils.d80
|
||||
|
||||
@ -132,13 +132,24 @@ WRITE8_MEMBER( hardbox_device::ppi0_pb_w )
|
||||
m_bus->dio_w(this, data ^ 0xff);
|
||||
}
|
||||
|
||||
READ8_MEMBER( hardbox_device::ppi0_pc_r )
|
||||
{
|
||||
UINT8 data = ioport("SW1")->read();
|
||||
|
||||
/* DIP switches on PC1,PC2,PC3 configure the IEEE-488 primary address.
|
||||
We get the address from m_address instead. */
|
||||
data |= ((m_slot->get_address() - 8) << 1) ^ 0xff;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
static I8255A_INTERFACE( ppi0_intf )
|
||||
{
|
||||
DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, hardbox_device, ppi0_pa_r),
|
||||
DEVCB_NULL, // Port A write
|
||||
DEVCB_NULL, // Port B read
|
||||
DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, hardbox_device, ppi0_pb_w),
|
||||
DEVCB_INPUT_PORT("SW1"), // Port C read
|
||||
DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, hardbox_device, ppi0_pc_r),
|
||||
DEVCB_NULL // Port C write
|
||||
};
|
||||
|
||||
@ -283,8 +294,6 @@ static MACHINE_CONFIG_FRAGMENT( hardbox )
|
||||
MCFG_HARDDISK_ADD("harddisk2")
|
||||
MCFG_HARDDISK_ADD("harddisk3")
|
||||
MCFG_HARDDISK_ADD("harddisk4")
|
||||
|
||||
MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -43,6 +43,7 @@ public:
|
||||
|
||||
DECLARE_READ8_MEMBER( ppi0_pa_r );
|
||||
DECLARE_WRITE8_MEMBER( ppi0_pb_w );
|
||||
DECLARE_READ8_MEMBER( ppi0_pc_r );
|
||||
|
||||
DECLARE_READ8_MEMBER( ppi1_pa_r );
|
||||
DECLARE_WRITE8_MEMBER( ppi1_pb_w );
|
||||
|
@ -88,7 +88,7 @@ void ieee488_slot_device::device_start()
|
||||
assert(bus);
|
||||
|
||||
device_ieee488_interface *dev = dynamic_cast<device_ieee488_interface *>(get_card_device());
|
||||
if (dev) bus->add_device(get_card_device());
|
||||
if (dev) bus->add_device(this, get_card_device());
|
||||
}
|
||||
|
||||
|
||||
@ -152,11 +152,12 @@ void ieee488_device::device_stop()
|
||||
// add_device -
|
||||
//-------------------------------------------------
|
||||
|
||||
void ieee488_device::add_device(device_t *target)
|
||||
void ieee488_device::add_device(ieee488_slot_device *slot, device_t *target)
|
||||
{
|
||||
daisy_entry *entry = auto_alloc(machine(), daisy_entry(target));
|
||||
|
||||
entry->m_interface->m_bus = this;
|
||||
entry->m_interface->m_slot = slot;
|
||||
|
||||
m_device_list.append(*entry);
|
||||
}
|
||||
|
@ -58,9 +58,10 @@
|
||||
downcast<ieee488_device *>(device)->set_ren_callback(DEVCB2_##_write);
|
||||
|
||||
|
||||
#define MCFG_IEEE488_SLOT_ADD(_tag, _slot_intf, _def_slot) \
|
||||
#define MCFG_IEEE488_SLOT_ADD(_tag, _address, _slot_intf, _def_slot) \
|
||||
MCFG_DEVICE_ADD(_tag, IEEE488_SLOT, 0) \
|
||||
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
|
||||
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \
|
||||
downcast<ieee488_slot_device *>(device)->set_address(_address);
|
||||
|
||||
|
||||
|
||||
@ -70,6 +71,7 @@
|
||||
|
||||
// ======================> ieee488_device
|
||||
|
||||
class ieee488_slot_device;
|
||||
class device_ieee488_interface;
|
||||
|
||||
class ieee488_device : public device_t
|
||||
@ -87,7 +89,7 @@ public:
|
||||
template<class _write> void set_atn_callback(_write wr) { m_write_atn.set_callback(wr); }
|
||||
template<class _write> void set_ren_callback(_write wr) { m_write_ren.set_callback(wr); }
|
||||
|
||||
void add_device(device_t *target);
|
||||
void add_device(ieee488_slot_device *slot, device_t *target);
|
||||
|
||||
// reads for both host and peripherals
|
||||
UINT8 dio_r() { return get_data(); }
|
||||
@ -187,8 +189,14 @@ public:
|
||||
// construction/destruction
|
||||
ieee488_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
void set_address(int address) { m_address = address; }
|
||||
int get_address() { return m_address; }
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
|
||||
protected:
|
||||
int m_address;
|
||||
};
|
||||
|
||||
|
||||
@ -216,7 +224,8 @@ public:
|
||||
virtual void ieee488_atn(int state) { };
|
||||
virtual void ieee488_ren(int state) { };
|
||||
|
||||
ieee488_device *m_bus;
|
||||
ieee488_device *m_bus;
|
||||
ieee488_slot_device *m_slot;
|
||||
};
|
||||
|
||||
|
||||
|
@ -112,8 +112,6 @@ static MACHINE_CONFIG_FRAGMENT( shark )
|
||||
// devices
|
||||
MCFG_HARDDISK_ADD("harddisk1")
|
||||
MCFG_RS232_PORT_ADD(RS232_TAG, rs232_intf, default_rs232_devices, NULL)
|
||||
|
||||
MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -281,8 +281,6 @@ static MACHINE_CONFIG_FRAGMENT( softbox )
|
||||
MCFG_HARDDISK_ADD("harddisk3")
|
||||
MCFG_HARDDISK_ADD("harddisk4")
|
||||
MCFG_RS232_PORT_ADD(RS232_TAG, rs232_intf, default_rs232_devices, NULL)
|
||||
|
||||
MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user