src/mess/machine/isa_fdc.c
| r15363 | r15364 | |
| 84 | 84 | { |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | isa8_fdc_device::isa8_fdc_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock) : |
| 88 | device_t(mconfig, type, name, tag, owner, clock), |
| 89 | device_isa8_card_interface(mconfig, *this), |
| 90 | m_upd765(*this, "upd765") |
| 91 | { |
| 92 | } |
| 93 | |
| 87 | 94 | //------------------------------------------------- |
| 88 | 95 | // device_start - device-specific startup |
| 89 | 96 | //------------------------------------------------- |
| r15363 | r15364 | |
| 437 | 444 | pc_fdc_set_tc_state( this, state); |
| 438 | 445 | } |
| 439 | 446 | |
| 447 | static MACHINE_CONFIG_FRAGMENT( fdc_smc_config ) |
| 448 | MCFG_SMC37C78_ADD("upd765", pc_fdc_upd765_not_connected_interface) |
| 449 | |
| 450 | MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(ibmpc_floppy_interface) |
| 451 | MACHINE_CONFIG_END |
| 452 | |
| 453 | //************************************************************************** |
| 454 | // GLOBAL VARIABLES |
| 455 | //************************************************************************** |
| 456 | |
| 457 | const device_type ISA8_FDC_SMC = &device_creator<isa8_fdc_smc_device>; |
| 458 | |
| 459 | //------------------------------------------------- |
| 460 | // machine_config_additions - device-specific |
| 461 | // machine configurations |
| 462 | //------------------------------------------------- |
| 463 | |
| 464 | machine_config_constructor isa8_fdc_smc_device::device_mconfig_additions() const |
| 465 | { |
| 466 | return MACHINE_CONFIG_NAME( fdc_smc_config ); |
| 467 | } |
| 468 | |
| 469 | //------------------------------------------------- |
| 470 | // isa8_fdc_smc_device - constructor |
| 471 | //------------------------------------------------- |
| 472 | |
| 473 | isa8_fdc_smc_device::isa8_fdc_smc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 474 | isa8_fdc_device(mconfig, ISA8_FDC_SMC, "Diskette Drive Adapter (SMC37C78)", tag, owner, clock) |
| 475 | { |
| 476 | } |
| 477 | |
src/mess/machine/isa_fdc.h
| r15363 | r15364 | |
| 24 | 24 | public: |
| 25 | 25 | // construction/destruction |
| 26 | 26 | isa8_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 27 | isa8_fdc_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock); |
| 27 | 28 | |
| 28 | 29 | // optional information overrides |
| 29 | 30 | virtual machine_config_constructor device_mconfig_additions() const; |
| r15363 | r15364 | |
| 61 | 62 | // device type definition |
| 62 | 63 | extern const device_type ISA8_FDC; |
| 63 | 64 | |
| 65 | // ======================> isa8_fdc_smc_device |
| 66 | |
| 67 | class isa8_fdc_smc_device : |
| 68 | public isa8_fdc_device |
| 69 | { |
| 70 | public: |
| 71 | // construction/destruction |
| 72 | isa8_fdc_smc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 73 | |
| 74 | // optional information overrides |
| 75 | virtual machine_config_constructor device_mconfig_additions() const; |
| 76 | virtual void device_config_complete() { m_shortname = "isa_fdc_smc"; } |
| 77 | }; |
| 78 | |
| 79 | |
| 80 | // device type definition |
| 81 | extern const device_type ISA8_FDC_SMC; |
| 82 | |
| 64 | 83 | #endif /* ISA_FDC_H */ |
src/mess/machine/upd765.c
| r15363 | r15364 | |
| 146 | 146 | |
| 147 | 147 | char *data_buffer; |
| 148 | 148 | const upd765_interface *intf; |
| 149 | |
| 150 | bool pool; |
| 149 | 151 | }; |
| 150 | 152 | |
| 151 | 153 | //static void upd765_setup_data_request(unsigned char Data); |
| r15363 | r15364 | |
| 2059 | 2061 | { |
| 2060 | 2062 | /* clear ready changed bit */ |
| 2061 | 2063 | fdc->ready_changed &= ~(1 << fdc->drive); |
| 2064 | |
| 2065 | if (!fdc->pool) { |
| 2066 | fdc->ready_changed = 0; |
| 2067 | } |
| 2062 | 2068 | |
| 2063 | 2069 | /* clear drive seek bits */ |
| 2064 | 2070 | fdc->FDC_main &= ~(1 | 2 | 4 | 8); |
| r15363 | r15364 | |
| 2224 | 2230 | break; |
| 2225 | 2231 | |
| 2226 | 2232 | case 0x13: /* configure */ |
| 2233 | fdc->pool = fdc->upd765_command_bytes[1] & 0x10; |
| 2227 | 2234 | upd765_idle(device); |
| 2228 | 2235 | break; |
| 2229 | 2236 | |
| r15363 | r15364 | |
| 2417 | 2424 | fdc->out_int_func.resolve(fdc->intf->out_int_func, *device); |
| 2418 | 2425 | fdc->out_drq_func.resolve(fdc->intf->out_drq_func, *device); |
| 2419 | 2426 | |
| 2427 | // plain upd765 is doing pooling |
| 2428 | fdc->pool = true; |
| 2420 | 2429 | // register for state saving |
| 2421 | 2430 | //state_save_register_item(device->machine(), "upd765", device->tag(), 0, upd765->number); |
| 2422 | 2431 | } |
| r15363 | r15364 | |
| 2434 | 2443 | static DEVICE_START( smc37c78 ) |
| 2435 | 2444 | { |
| 2436 | 2445 | common_start(device, TYPE_SMC37C78); |
| 2446 | // specified in documentation that by default is off |
| 2447 | upd765_t *fdc = get_safe_token(device); |
| 2448 | fdc->pool = false; |
| 2437 | 2449 | } |
| 2438 | 2450 | |
| 2439 | 2451 | static DEVICE_START( upd72065 ) |
src/mess/drivers/at.c
| r15363 | r15364 | |
| 377 | 377 | SLOT_INTERFACE("mpu401", ISA8_MPU401) |
| 378 | 378 | SLOT_INTERFACE("lpt", ISA8_LPT) |
| 379 | 379 | SLOT_INTERFACE("ibm_mfc", ISA8_IBM_MFC) |
| 380 | SLOT_INTERFACE("fdcsmc", ISA8_FDC_SMC) |
| 380 | 381 | // ISA 16 bit |
| 381 | 382 | SLOT_INTERFACE("ide", ISA16_IDE) |
| 382 | 383 | SLOT_INTERFACE("ide_cd", ISA16_IDE_CD) |
| r15363 | r15364 | |
| 525 | 526 | MCFG_FRAGMENT_ADD( at_motherboard ) |
| 526 | 527 | |
| 527 | 528 | MCFG_ISA16_BUS_ADD("isabus", "maincpu", isabus_intf) |
| 528 | | MCFG_ISA16_SLOT_ADD("isabus","isa1", pc_isa16_cards, "fdc", NULL, false) |
| 529 | MCFG_ISA16_SLOT_ADD("isabus","isa1", pc_isa16_cards, "fdcsmc", NULL, false) |
| 529 | 530 | MCFG_ISA16_SLOT_ADD("isabus","isa2", pc_isa16_cards, "ide", NULL, false) |
| 530 | 531 | MCFG_ISA16_SLOT_ADD("isabus","isa3", pc_isa16_cards, "comat", NULL, false) |
| 531 | 532 | MCFG_ISA16_SLOT_ADD("isabus","isa4", pc_isa16_cards, "ne2000", NULL, false) |
| r15363 | r15364 | |
| 574 | 575 | |
| 575 | 576 | MCFG_ISA16_BUS_ADD("isabus", "maincpu", isabus_intf) |
| 576 | 577 | // on board devices |
| 577 | | MCFG_ISA16_SLOT_ADD("isabus","board1", pc_isa16_cards, "fdc", NULL, true) |
| 578 | MCFG_ISA16_SLOT_ADD("isabus","board1", pc_isa16_cards, "fdcsmc", NULL, true) |
| 578 | 579 | MCFG_ISA16_SLOT_ADD("isabus","board2", pc_isa16_cards, "comat", NULL, true) |
| 579 | 580 | MCFG_ISA16_SLOT_ADD("isabus","board3", pc_isa16_cards, "ide", NULL, true) |
| 580 | 581 | MCFG_ISA16_SLOT_ADD("isabus","board4", pc_isa16_cards, "lpt", NULL, true) |