trunk/src/mess/machine/c2031.c
| r24571 | r24572 | |
| 358 | 358 | |
| 359 | 359 | MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, c1541_floppy_interface) |
| 360 | 360 | MCFG_64H156_ADD(C64H156_TAG, XTAL_16MHz, ga_intf) |
| 361 | |
| 362 | MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL) |
| 361 | 363 | MACHINE_CONFIG_END |
| 362 | 364 | |
| 363 | 365 | |
| r24571 | r24572 | |
| 372 | 374 | } |
| 373 | 375 | |
| 374 | 376 | |
| 377 | //------------------------------------------------- |
| 378 | // INPUT_PORTS( c2031 ) |
| 379 | //------------------------------------------------- |
| 375 | 380 | |
| 381 | static INPUT_PORTS_START( c2031 ) |
| 382 | PORT_START("ADDRESS") |
| 383 | PORT_DIPNAME( 0x03, 0x00, "Device Address" ) |
| 384 | PORT_DIPSETTING( 0x00, "8" ) |
| 385 | PORT_DIPSETTING( 0x01, "9" ) |
| 386 | PORT_DIPSETTING( 0x02, "10" ) |
| 387 | PORT_DIPSETTING( 0x03, "11" ) |
| 388 | INPUT_PORTS_END |
| 389 | |
| 390 | |
| 391 | //------------------------------------------------- |
| 392 | // input_ports - device-specific input ports |
| 393 | //------------------------------------------------- |
| 394 | |
| 395 | ioport_constructor c2031_device::device_input_ports() const |
| 396 | { |
| 397 | return INPUT_PORTS_NAME( c2031 ); |
| 398 | } |
| 399 | |
| 400 | |
| 401 | |
| 376 | 402 | //************************************************************************** |
| 377 | 403 | // INLINE HELPERS |
| 378 | 404 | //************************************************************************** |
| r24571 | r24572 | |
| 385 | 411 | { |
| 386 | 412 | int state = 1; |
| 387 | 413 | |
| 388 | | switch (m_address) |
| 414 | switch (m_address->read() & 0x03) |
| 389 | 415 | { |
| 390 | | case 8: state = (m_atna && m_nrfd_out); break; |
| 391 | | case 9: state = m_nrfd_out; break; |
| 392 | | case 10: state = m_atna; break; |
| 393 | | case 11: state = 1; break; |
| 416 | case 0: state = (m_atna && m_nrfd_out); break; |
| 417 | case 1: state = m_nrfd_out; break; |
| 418 | case 2: state = m_atna; break; |
| 419 | case 3: state = 1; break; |
| 394 | 420 | } |
| 395 | 421 | |
| 396 | 422 | return state; |
| r24571 | r24572 | |
| 414 | 440 | m_via1(*this, M6522_1_TAG), |
| 415 | 441 | m_ga(*this, C64H156_TAG), |
| 416 | 442 | m_image(*this, FLOPPY_0), |
| 443 | m_address(*this, "ADDRESS"), |
| 417 | 444 | m_nrfd_out(1), |
| 418 | 445 | m_ndac_out(1), |
| 419 | 446 | m_atna(1), |
trunk/src/mess/machine/c2031.h
| r24571 | r24572 | |
| 20 | 20 | #include "formats/g64_dsk.h" |
| 21 | 21 | #include "machine/64h156.h" |
| 22 | 22 | #include "machine/6522via.h" |
| 23 | #include "machine/cbmipt.h" |
| 23 | 24 | #include "machine/ieee488.h" |
| 24 | 25 | |
| 25 | 26 | |
| r24571 | r24572 | |
| 52 | 53 | // optional information overrides |
| 53 | 54 | virtual const rom_entry *device_rom_region() const; |
| 54 | 55 | virtual machine_config_constructor device_mconfig_additions() const; |
| 56 | virtual ioport_constructor device_input_ports() const; |
| 55 | 57 | |
| 56 | 58 | protected: |
| 57 | 59 | // device-level overrides |
| r24571 | r24572 | |
| 69 | 71 | required_device<via6522_device> m_via1; |
| 70 | 72 | required_device<c64h156_device> m_ga; |
| 71 | 73 | required_device<legacy_floppy_image_device> m_image; |
| 74 | required_ioport m_address; |
| 72 | 75 | |
| 73 | 76 | // IEEE-488 bus |
| 74 | 77 | int m_nrfd_out; // not ready for data |
trunk/src/mess/machine/c2040.c
| r24571 | r24572 | |
| 505 | 505 | PB0 DEVICE NUMBER SELECTION |
| 506 | 506 | PB1 DEVICE NUMBER SELECTION |
| 507 | 507 | PB2 DEVICE NUMBER SELECTION |
| 508 | | PB3 ACT LED 1 |
| 509 | | PB4 ACT LED 0 |
| 510 | | PB5 ERR LED |
| 508 | PB3 |
| 509 | PB4 |
| 510 | PB5 |
| 511 | 511 | PB6 DACI |
| 512 | 512 | PB7 RFDI |
| 513 | 513 | |
| r24571 | r24572 | |
| 516 | 516 | UINT8 data = 0; |
| 517 | 517 | |
| 518 | 518 | // device number selection |
| 519 | | data |= m_address - 8; |
| 519 | data |= m_address->read() & 0x07; |
| 520 | 520 | |
| 521 | 521 | // data accepted in |
| 522 | 522 | data |= m_bus->ndac_r() << 6; |
| r24571 | r24572 | |
| 533 | 533 | |
| 534 | 534 | bit description |
| 535 | 535 | |
| 536 | | PB0 DEVICE NUMBER SELECTION |
| 537 | | PB1 DEVICE NUMBER SELECTION |
| 538 | | PB2 DEVICE NUMBER SELECTION |
| 536 | PB0 |
| 537 | PB1 |
| 538 | PB2 |
| 539 | 539 | PB3 ACT LED 1 |
| 540 | 540 | PB4 ACT LED 0 |
| 541 | 541 | PB5 ERR LED |
| 542 | | PB6 DACI |
| 543 | | PB7 RFDI |
| 542 | PB6 |
| 543 | PB7 |
| 544 | 544 | |
| 545 | 545 | */ |
| 546 | 546 | |
| r24571 | r24572 | |
| 1099 | 1099 | MCFG_MOS6530_ADD(M6530_TAG, XTAL_16MHz/16, miot_intf) |
| 1100 | 1100 | |
| 1101 | 1101 | MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(c2040_floppy_interface) |
| 1102 | |
| 1103 | MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL) |
| 1102 | 1104 | MACHINE_CONFIG_END |
| 1103 | 1105 | |
| 1104 | 1106 | |
| r24571 | r24572 | |
| 1133 | 1135 | MCFG_MOS6530_ADD(M6530_TAG, XTAL_16MHz/16, miot_intf) |
| 1134 | 1136 | |
| 1135 | 1137 | MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(c4040_floppy_interface) |
| 1138 | |
| 1139 | MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL) |
| 1136 | 1140 | MACHINE_CONFIG_END |
| 1137 | 1141 | |
| 1138 | 1142 | |
| r24571 | r24572 | |
| 1167 | 1171 | MCFG_MOS6530_ADD(M6530_TAG, XTAL_12MHz/12, c8050_miot_intf) |
| 1168 | 1172 | |
| 1169 | 1173 | MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(c8050_floppy_interface) |
| 1174 | |
| 1175 | MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL) |
| 1170 | 1176 | MACHINE_CONFIG_END |
| 1171 | 1177 | |
| 1172 | 1178 | |
| r24571 | r24572 | |
| 1201 | 1207 | MCFG_MOS6530_ADD(M6530_TAG, XTAL_12MHz/12, c8050_miot_intf) |
| 1202 | 1208 | |
| 1203 | 1209 | MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(c8250_floppy_interface) |
| 1210 | |
| 1211 | MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL) |
| 1204 | 1212 | MACHINE_CONFIG_END |
| 1205 | 1213 | |
| 1206 | 1214 | |
| r24571 | r24572 | |
| 1235 | 1243 | MCFG_MOS6530_ADD(M6530_TAG, XTAL_12MHz/12, c8050_miot_intf) |
| 1236 | 1244 | |
| 1237 | 1245 | MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(c8250_floppy_interface) |
| 1246 | |
| 1247 | MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL) |
| 1238 | 1248 | MACHINE_CONFIG_END |
| 1239 | 1249 | |
| 1240 | 1250 | |
| r24571 | r24572 | |
| 1269 | 1279 | MCFG_MOS6530_ADD(M6530_TAG, XTAL_12MHz/12, c8050_miot_intf) |
| 1270 | 1280 | |
| 1271 | 1281 | MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, c8250_floppy_interface) |
| 1282 | |
| 1283 | MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL) |
| 1272 | 1284 | MACHINE_CONFIG_END |
| 1273 | 1285 | |
| 1274 | 1286 | |
| r24571 | r24572 | |
| 1283 | 1295 | } |
| 1284 | 1296 | |
| 1285 | 1297 | |
| 1298 | //------------------------------------------------- |
| 1299 | // INPUT_PORTS( c2040 ) |
| 1300 | //------------------------------------------------- |
| 1286 | 1301 | |
| 1302 | static INPUT_PORTS_START( c2040 ) |
| 1303 | PORT_START("ADDRESS") |
| 1304 | PORT_DIPNAME( 0x07, 0x00, "Device Address" ) |
| 1305 | PORT_DIPSETTING( 0x00, "8" ) |
| 1306 | PORT_DIPSETTING( 0x01, "9" ) |
| 1307 | PORT_DIPSETTING( 0x02, "10" ) |
| 1308 | PORT_DIPSETTING( 0x03, "11" ) |
| 1309 | PORT_DIPSETTING( 0x04, "12" ) |
| 1310 | PORT_DIPSETTING( 0x05, "13" ) |
| 1311 | PORT_DIPSETTING( 0x06, "14" ) |
| 1312 | PORT_DIPSETTING( 0x07, "15" ) |
| 1313 | INPUT_PORTS_END |
| 1314 | |
| 1315 | |
| 1316 | //------------------------------------------------- |
| 1317 | // input_ports - device-specific input ports |
| 1318 | //------------------------------------------------- |
| 1319 | |
| 1320 | ioport_constructor c2040_device::device_input_ports() const |
| 1321 | { |
| 1322 | return INPUT_PORTS_NAME( c2040 ); |
| 1323 | } |
| 1324 | |
| 1325 | |
| 1326 | |
| 1287 | 1327 | //************************************************************************** |
| 1288 | 1328 | // INLINE HELPERS |
| 1289 | 1329 | //************************************************************************** |
| r24571 | r24572 | |
| 1483 | 1523 | m_image0(*this, FLOPPY_0), |
| 1484 | 1524 | m_image1(*this, FLOPPY_1), |
| 1485 | 1525 | m_gcr(*this, "gcr"), |
| 1526 | m_address(*this, "ADDRESS"), |
| 1486 | 1527 | m_drive(0), |
| 1487 | 1528 | m_side(0), |
| 1488 | 1529 | m_rfdo(1), |
| r24571 | r24572 | |
| 1520 | 1561 | m_image0(*this, FLOPPY_0), |
| 1521 | 1562 | m_image1(*this, FLOPPY_1), |
| 1522 | 1563 | m_gcr(*this, "gcr"), |
| 1564 | m_address(*this, "ADDRESS"), |
| 1523 | 1565 | m_drive(0), |
| 1524 | 1566 | m_side(0), |
| 1525 | 1567 | m_rfdo(1), |
trunk/src/mess/machine/c2040.h
| r24571 | r24572 | |
| 21 | 21 | #include "formats/g64_dsk.h" |
| 22 | 22 | #include "machine/6522via.h" |
| 23 | 23 | #include "machine/6532riot.h" |
| 24 | #include "machine/cbmipt.h" |
| 24 | 25 | #include "machine/mos6530.h" |
| 25 | 26 | #include "machine/ieee488.h" |
| 26 | 27 | |
| r24571 | r24572 | |
| 43 | 44 | // optional information overrides |
| 44 | 45 | virtual const rom_entry *device_rom_region() const; |
| 45 | 46 | virtual machine_config_constructor device_mconfig_additions() const; |
| 47 | virtual ioport_constructor device_input_ports() const; |
| 46 | 48 | |
| 47 | 49 | // not really public |
| 48 | 50 | static void on_disk0_change(device_image_interface &image); |
| r24571 | r24572 | |
| 92 | 94 | required_device<legacy_floppy_image_device> m_image0; |
| 93 | 95 | optional_device<legacy_floppy_image_device> m_image1; |
| 94 | 96 | required_memory_region m_gcr; |
| 97 | required_ioport m_address; |
| 95 | 98 | |
| 96 | 99 | struct { |
| 97 | 100 | // motors |
trunk/src/mess/machine/ieee488.c
| r24571 | r24572 | |
| 72 | 72 | |
| 73 | 73 | |
| 74 | 74 | //------------------------------------------------- |
| 75 | | // static_set_slot - |
| 75 | // device_start - device-specific startup |
| 76 | 76 | //------------------------------------------------- |
| 77 | 77 | |
| 78 | | void ieee488_slot_device::static_set_slot(device_t &device, int address) |
| 78 | void ieee488_slot_device::device_start() |
| 79 | 79 | { |
| 80 | | ieee488_slot_device &ieee488_card = dynamic_cast<ieee488_slot_device &>(device); |
| 81 | | ieee488_card.m_address = address; |
| 82 | | } |
| 80 | ieee488_device* bus = NULL; |
| 83 | 81 | |
| 82 | for (device_t *device = owner(); device != NULL; device = device->owner()) |
| 83 | { |
| 84 | bus = device->subdevice<ieee488_device>(IEEE488_TAG); |
| 85 | if (bus != NULL) break; |
| 86 | } |
| 84 | 87 | |
| 85 | | //------------------------------------------------- |
| 86 | | // device_start - device-specific startup |
| 87 | | //------------------------------------------------- |
| 88 | assert(bus); |
| 88 | 89 | |
| 89 | | void ieee488_slot_device::device_start() |
| 90 | | { |
| 91 | | ieee488_device* bus = owner()->subdevice<ieee488_device>(IEEE488_TAG); |
| 92 | 90 | device_ieee488_interface *dev = dynamic_cast<device_ieee488_interface *>(get_card_device()); |
| 93 | | if (dev) bus->add_device(get_card_device(), m_address); |
| 91 | if (dev) bus->add_device(get_card_device()); |
| 94 | 92 | } |
| 95 | 93 | |
| 96 | 94 | |
| r24571 | r24572 | |
| 104 | 102 | //------------------------------------------------- |
| 105 | 103 | |
| 106 | 104 | ieee488_device::ieee488_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 107 | | : device_t(mconfig, IEEE488, "IEEE488 bus", tag, owner, clock, "ieee488", __FILE__), |
| 105 | : device_t(mconfig, IEEE488, "IEEE-488 bus", tag, owner, clock, "ieee488", __FILE__), |
| 108 | 106 | m_write_eoi(*this), |
| 109 | 107 | m_write_dav(*this), |
| 110 | 108 | m_write_nrfd(*this), |
| r24571 | r24572 | |
| 154 | 152 | // add_device - |
| 155 | 153 | //------------------------------------------------- |
| 156 | 154 | |
| 157 | | void ieee488_device::add_device(device_t *target, int address) |
| 155 | void ieee488_device::add_device(device_t *target) |
| 158 | 156 | { |
| 159 | 157 | daisy_entry *entry = auto_alloc(machine(), daisy_entry(target)); |
| 160 | 158 | |
| 161 | 159 | entry->m_interface->m_bus = this; |
| 162 | | entry->m_interface->m_address = address; |
| 163 | 160 | |
| 164 | 161 | m_device_list.append(*entry); |
| 165 | 162 | } |
trunk/src/mess/machine/ieee488.h
| r24571 | r24572 | |
| 58 | 58 | downcast<ieee488_device *>(device)->set_ren_callback(DEVCB2_##_write); |
| 59 | 59 | |
| 60 | 60 | |
| 61 | | #define MCFG_IEEE488_SLOT_ADD(_tag, _num, _slot_intf, _def_slot) \ |
| 61 | #define MCFG_IEEE488_SLOT_ADD(_tag, _slot_intf, _def_slot) \ |
| 62 | 62 | MCFG_DEVICE_ADD(_tag, IEEE488_SLOT, 0) \ |
| 63 | | MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \ |
| 64 | | ieee488_slot_device::static_set_slot(*device, _num); |
| 63 | MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) |
| 65 | 64 | |
| 66 | 65 | |
| 67 | 66 | |
| r24571 | r24572 | |
| 88 | 87 | template<class _write> void set_atn_callback(_write wr) { m_write_atn.set_callback(wr); } |
| 89 | 88 | template<class _write> void set_ren_callback(_write wr) { m_write_ren.set_callback(wr); } |
| 90 | 89 | |
| 91 | | void add_device(device_t *target, int address); |
| 90 | void add_device(device_t *target); |
| 92 | 91 | |
| 93 | 92 | // reads for both host and peripherals |
| 94 | 93 | UINT8 dio_r() { return get_data(); } |
| r24571 | r24572 | |
| 190 | 189 | |
| 191 | 190 | // device-level overrides |
| 192 | 191 | virtual void device_start(); |
| 193 | | |
| 194 | | // inline configuration |
| 195 | | static void static_set_slot(device_t &device, int address); |
| 196 | | |
| 197 | | private: |
| 198 | | // configuration |
| 199 | | int m_address; |
| 200 | 192 | }; |
| 201 | 193 | |
| 202 | 194 | |
| r24571 | r24572 | |
| 225 | 217 | virtual void ieee488_ren(int state) { }; |
| 226 | 218 | |
| 227 | 219 | ieee488_device *m_bus; |
| 228 | | int m_address; |
| 229 | 220 | }; |
| 230 | 221 | |
| 231 | 222 | |
trunk/src/mess/machine/d9060.c
| r24571 | r24572 | |
| 267 | 267 | UINT8 data = 0; |
| 268 | 268 | |
| 269 | 269 | // device number selection |
| 270 | | data |= m_address - 8; |
| 270 | data |= m_address->read() & 0x07; |
| 271 | 271 | |
| 272 | 272 | // data accepted in |
| 273 | 273 | data |= m_bus->ndac_r() << 6; |
| r24571 | r24572 | |
| 446 | 446 | MCFG_SCSIDEV_ADD(SASIBUS_TAG ":harddisk0", D9060HD, SCSI_ID_0) |
| 447 | 447 | MCFG_SCSICB_ADD(SASIBUS_TAG ":host") |
| 448 | 448 | MCFG_SCSICB_REQ_HANDLER(DEVWRITELINE(DEVICE_SELF_OWNER, base_d9060_device, req_w)) |
| 449 | |
| 450 | MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL) |
| 449 | 451 | MACHINE_CONFIG_END |
| 450 | 452 | |
| 451 | 453 | |
| r24571 | r24572 | |
| 460 | 462 | } |
| 461 | 463 | |
| 462 | 464 | |
| 465 | //------------------------------------------------- |
| 466 | // INPUT_PORTS( d9060 ) |
| 467 | //------------------------------------------------- |
| 463 | 468 | |
| 469 | static INPUT_PORTS_START( d9060 ) |
| 470 | PORT_START("ADDRESS") |
| 471 | PORT_DIPNAME( 0x07, 0x01, "Device Address" ) |
| 472 | PORT_DIPSETTING( 0x00, "8" ) |
| 473 | PORT_DIPSETTING( 0x01, "9" ) |
| 474 | PORT_DIPSETTING( 0x02, "10" ) |
| 475 | PORT_DIPSETTING( 0x03, "11" ) |
| 476 | PORT_DIPSETTING( 0x04, "12" ) |
| 477 | PORT_DIPSETTING( 0x05, "13" ) |
| 478 | PORT_DIPSETTING( 0x06, "14" ) |
| 479 | PORT_DIPSETTING( 0x07, "15" ) |
| 480 | INPUT_PORTS_END |
| 481 | |
| 482 | |
| 483 | //------------------------------------------------- |
| 484 | // input_ports - device-specific input ports |
| 485 | //------------------------------------------------- |
| 486 | |
| 487 | ioport_constructor base_d9060_device::device_input_ports() const |
| 488 | { |
| 489 | return INPUT_PORTS_NAME( d9060 ); |
| 490 | } |
| 491 | |
| 492 | |
| 493 | |
| 464 | 494 | //************************************************************************** |
| 465 | 495 | // INLINE HELPERS |
| 466 | 496 | //************************************************************************** |
| r24571 | r24572 | |
| 498 | 528 | m_riot1(*this, M6532_1_TAG), |
| 499 | 529 | m_via(*this, M6522_TAG), |
| 500 | 530 | m_sasibus(*this, SASIBUS_TAG ":host"), |
| 531 | m_address(*this, "ADDRESS"), |
| 501 | 532 | m_rfdo(1), |
| 502 | 533 | m_daco(1), |
| 503 | 534 | m_atna(1), |
trunk/src/mess/machine/d9060.h
| r24571 | r24572 | |
| 28 | 28 | #include "cpu/m6502/m6502.h" |
| 29 | 29 | #include "machine/6522via.h" |
| 30 | 30 | #include "machine/6532riot.h" |
| 31 | #include "machine/cbmipt.h" |
| 31 | 32 | #include "machine/ieee488.h" |
| 32 | 33 | #include "machine/scsicb.h" |
| 33 | 34 | |
| r24571 | r24572 | |
| 56 | 57 | // optional information overrides |
| 57 | 58 | virtual const rom_entry *device_rom_region() const; |
| 58 | 59 | virtual machine_config_constructor device_mconfig_additions() const; |
| 60 | virtual ioport_constructor device_input_ports() const; |
| 59 | 61 | |
| 60 | 62 | // not really public |
| 61 | 63 | DECLARE_WRITE_LINE_MEMBER( req_w ); |
| r24571 | r24572 | |
| 90 | 92 | required_device<riot6532_device> m_riot1; |
| 91 | 93 | required_device<via6522_device> m_via; |
| 92 | 94 | required_device<scsicb_device> m_sasibus; |
| 95 | required_ioport m_address; |
| 93 | 96 | |
| 94 | 97 | // IEEE-488 bus |
| 95 | 98 | int m_rfdo; // not ready for data output |
trunk/src/mess/machine/c8280.c
| r24571 | r24572 | |
| 257 | 257 | UINT8 data = 0; |
| 258 | 258 | |
| 259 | 259 | // device number selection |
| 260 | | data |= m_address - 8; |
| 260 | data |= m_address->read() & 0x07; |
| 261 | 261 | |
| 262 | 262 | // data accepted in |
| 263 | 263 | data |= m_bus->ndac_r() << 6; |
| r24571 | r24572 | |
| 340 | 340 | MCFG_CPU_PROGRAM_MAP(c8280_fdc_mem) |
| 341 | 341 | |
| 342 | 342 | MCFG_FD1797x_ADD(WD1797_TAG, XTAL_12MHz/6) // clock? |
| 343 | | |
| 344 | 343 | MCFG_FLOPPY_DRIVE_ADD(WD1797_TAG":0", c8280_floppies, "8dsdd", floppy_image_device::default_floppy_formats) |
| 345 | 344 | 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) |
| 346 | 347 | MACHINE_CONFIG_END |
| 347 | 348 | |
| 348 | 349 | |
| r24571 | r24572 | |
| 357 | 358 | } |
| 358 | 359 | |
| 359 | 360 | |
| 361 | //------------------------------------------------- |
| 362 | // INPUT_PORTS( c8280 ) |
| 363 | //------------------------------------------------- |
| 364 | |
| 365 | static INPUT_PORTS_START( c8280 ) |
| 366 | PORT_START("ADDRESS") |
| 367 | PORT_DIPNAME( 0x07, 0x00, "Device Address" ) |
| 368 | PORT_DIPSETTING( 0x00, "8" ) |
| 369 | PORT_DIPSETTING( 0x01, "9" ) |
| 370 | PORT_DIPSETTING( 0x02, "10" ) |
| 371 | PORT_DIPSETTING( 0x03, "11" ) |
| 372 | PORT_DIPSETTING( 0x04, "12" ) |
| 373 | PORT_DIPSETTING( 0x05, "13" ) |
| 374 | PORT_DIPSETTING( 0x06, "14" ) |
| 375 | PORT_DIPSETTING( 0x07, "15" ) |
| 376 | INPUT_PORTS_END |
| 377 | |
| 378 | |
| 379 | //------------------------------------------------- |
| 380 | // input_ports - device-specific input ports |
| 381 | //------------------------------------------------- |
| 382 | |
| 383 | ioport_constructor c8280_device::device_input_ports() const |
| 384 | { |
| 385 | return INPUT_PORTS_NAME( c8280 ); |
| 386 | } |
| 387 | |
| 388 | |
| 389 | |
| 360 | 390 | //************************************************************************** |
| 361 | 391 | // INLINE HELPERS |
| 362 | 392 | //************************************************************************** |
| r24571 | r24572 | |
| 395 | 425 | m_fdc(*this, WD1797_TAG), |
| 396 | 426 | m_floppy0(*this, WD1797_TAG":0"), |
| 397 | 427 | m_floppy1(*this, WD1797_TAG":1"), |
| 428 | m_address(*this, "ADDRESS"), |
| 398 | 429 | m_rfdo(1), |
| 399 | 430 | m_daco(1), |
| 400 | 431 | m_atna(1) |
trunk/src/mess/machine/c8280.h
| r24571 | r24572 | |
| 16 | 16 | #include "emu.h" |
| 17 | 17 | #include "cpu/m6502/m6502.h" |
| 18 | 18 | #include "machine/6532riot.h" |
| 19 | #include "machine/cbmipt.h" |
| 19 | 20 | #include "machine/ieee488.h" |
| 20 | 21 | #include "machine/wd_fdc.h" |
| 21 | 22 | |
| r24571 | r24572 | |
| 37 | 38 | // optional information overrides |
| 38 | 39 | virtual const rom_entry *device_rom_region() const; |
| 39 | 40 | virtual machine_config_constructor device_mconfig_additions() const; |
| 41 | virtual ioport_constructor device_input_ports() const; |
| 40 | 42 | |
| 41 | 43 | // not really public |
| 42 | 44 | DECLARE_READ8_MEMBER( dio_r ); |
| r24571 | r24572 | |
| 69 | 71 | required_device<fd1797_t> m_fdc; |
| 70 | 72 | required_device<floppy_connector> m_floppy0; |
| 71 | 73 | required_device<floppy_connector> m_floppy1; |
| 74 | required_ioport m_address; |
| 72 | 75 | floppy_image_device *m_floppy; |
| 73 | 76 | |
| 74 | 77 | // IEEE-488 bus |
trunk/src/mess/machine/hardbox.c
| r24571 | r24572 | |
| 19 | 19 | Start the pet8032 emulator with the HardBox attached as device 9, |
| 20 | 20 | with the new CHD and the utilities floppy mounted: |
| 21 | 21 | |
| 22 | | $ mess pet8032 -ieee9 hardbox \ |
| 22 | $ mess pet8032 -ieee:c8050:ieee hardbox \ |
| 23 | 23 | -hard1 /path/to/corvus20mb.chd \ |
| 24 | 24 | -flop1 /path/to/hardbox-utils.d80 |
| 25 | 25 | |
| r24571 | r24572 | |
| 132 | 132 | m_bus->dio_w(this, data ^ 0xff); |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | | READ8_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_address - 8) << 1) ^ 0xff; |
| 142 | | |
| 143 | | return data; |
| 144 | | } |
| 145 | | |
| 146 | 135 | static I8255A_INTERFACE( ppi0_intf ) |
| 147 | 136 | { |
| 148 | 137 | DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, hardbox_device, ppi0_pa_r), |
| 149 | 138 | DEVCB_NULL, // Port A write |
| 150 | 139 | DEVCB_NULL, // Port B read |
| 151 | 140 | DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, hardbox_device, ppi0_pb_w), |
| 152 | | DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, hardbox_device, ppi0_pc_r), |
| 141 | DEVCB_INPUT_PORT("SW1"), // Port C read |
| 153 | 142 | DEVCB_NULL // Port C write |
| 154 | 143 | }; |
| 155 | 144 | |
| r24571 | r24572 | |
| 294 | 283 | MCFG_HARDDISK_ADD("harddisk2") |
| 295 | 284 | MCFG_HARDDISK_ADD("harddisk3") |
| 296 | 285 | MCFG_HARDDISK_ADD("harddisk4") |
| 286 | |
| 287 | MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, NULL) |
| 297 | 288 | MACHINE_CONFIG_END |
| 298 | 289 | |
| 299 | 290 | |
| r24571 | r24572 | |
| 315 | 306 | INPUT_PORTS_START( hardbox ) |
| 316 | 307 | PORT_START("SW1") |
| 317 | 308 | PORT_DIPUNKNOWN_DIPLOC( 0x01, IP_ACTIVE_LOW, "SW1:1" ) |
| 318 | | |
| 319 | | /* SW1:2,3,4 are missing intentionally. These switches would control |
| 320 | | IEEE-488 primary address. See the note in hardbox_device::ppi0_pc_r. */ |
| 321 | | |
| 309 | PORT_DIPNAME( 0x0e, 0x0c, "Device Address" ) PORT_DIPLOCATION("SW1:2,3,4") |
| 310 | PORT_DIPSETTING( 0x0e, "8" ) |
| 311 | PORT_DIPSETTING( 0x0c, "9" ) |
| 312 | PORT_DIPSETTING( 0x0a, "10" ) |
| 313 | PORT_DIPSETTING( 0x08, "11" ) |
| 314 | PORT_DIPSETTING( 0x06, "12" ) |
| 315 | PORT_DIPSETTING( 0x04, "13" ) |
| 316 | PORT_DIPSETTING( 0x02, "14" ) |
| 317 | PORT_DIPSETTING( 0x00, "15" ) |
| 322 | 318 | PORT_DIPUNKNOWN_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW1:5" ) |
| 323 | 319 | PORT_DIPUNKNOWN_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW1:6" ) |
| 324 | 320 | PORT_DIPUNKNOWN_DIPLOC( 0x40, IP_ACTIVE_LOW, "SW1:7" ) |
trunk/src/mess/drivers/pet.c
| r24571 | r24572 | |
| 1827 | 1827 | MCFG_DEVICE_MODIFY(MC6845_TAG) |
| 1828 | 1828 | MCFG_DEVICE_CONFIG(cbm8296_crtc_intf) |
| 1829 | 1829 | |
| 1830 | | MCFG_DEVICE_REMOVE("ieee8") |
| 1831 | | MCFG_IEEE488_SLOT_ADD("ieee8", 8, cbm_ieee488_devices, "c8250") |
| 1830 | MCFG_DEVICE_REMOVE("ieee") |
| 1831 | MCFG_IEEE488_SLOT_ADD("ieee", cbm_ieee488_devices, "c8250") |
| 1832 | 1832 | |
| 1833 | 1833 | MCFG_RAM_ADD(RAM_TAG) |
| 1834 | 1834 | MCFG_RAM_DEFAULT_SIZE("128K") |
| r24571 | r24572 | |
| 1842 | 1842 | //------------------------------------------------- |
| 1843 | 1843 | |
| 1844 | 1844 | static MACHINE_CONFIG_DERIVED( cbm8296d, cbm8296 ) |
| 1845 | | MCFG_DEVICE_REMOVE("ieee8") |
| 1846 | | MCFG_IEEE488_SLOT_ADD("ieee8", 8, cbm8296d_ieee488_devices, "c8250lp") |
| 1845 | MCFG_DEVICE_REMOVE("ieee") |
| 1846 | MCFG_IEEE488_SLOT_ADD("ieee", cbm8296d_ieee488_devices, "c8250lp") |
| 1847 | 1847 | MACHINE_CONFIG_END |
| 1848 | 1848 | |
| 1849 | 1849 | |