Previous 15994 Revisions Next

r15364 Thursday 31st May, 2012 at 07:44:17 UTC by Miodrag Milanović
Added SMC37C78 based floppy controller and connected it to 386+ and atvga.
According to documentation pooling is off by default for that chip and can be enabled by configure command later. Probably also the case other integrated fdc solutions (no whatsnew)
[src/mess/drivers]at.c
[src/mess/machine]isa_fdc.c isa_fdc.h upd765.c

src/mess/machine/isa_fdc.c
r15363r15364
8484{
8585}
8686
87isa8_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
8794//-------------------------------------------------
8895//  device_start - device-specific startup
8996//-------------------------------------------------
r15363r15364
437444   pc_fdc_set_tc_state( this, state);
438445}
439446
447static 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)
451MACHINE_CONFIG_END
452
453//**************************************************************************
454//  GLOBAL VARIABLES
455//**************************************************************************
456
457const device_type ISA8_FDC_SMC = &device_creator<isa8_fdc_smc_device>;
458
459//-------------------------------------------------
460//  machine_config_additions - device-specific
461//  machine configurations
462//-------------------------------------------------
463
464machine_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
473isa8_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
r15363r15364
2424public:
2525        // construction/destruction
2626        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);
2728
2829      // optional information overrides
2930      virtual machine_config_constructor device_mconfig_additions() const;
r15363r15364
6162// device type definition
6263extern const device_type ISA8_FDC;
6364
65// ======================> isa8_fdc_smc_device
66
67class isa8_fdc_smc_device :
68      public isa8_fdc_device
69{
70public:
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
81extern const device_type ISA8_FDC_SMC;
82
6483#endif  /* ISA_FDC_H */
src/mess/machine/upd765.c
r15363r15364
146146
147147   char *data_buffer;
148148   const upd765_interface *intf;
149   
150   bool pool;
149151};
150152
151153//static void upd765_setup_data_request(unsigned char Data);
r15363r15364
20592061         {
20602062            /* clear ready changed bit */
20612063            fdc->ready_changed &= ~(1 << fdc->drive);
2064           
2065            if (!fdc->pool) {
2066               fdc->ready_changed = 0;
2067            }
20622068
20632069            /* clear drive seek bits */
20642070            fdc->FDC_main &= ~(1 | 2 | 4 | 8);
r15363r15364
22242230                     break;
22252231
22262232                  case 0x13:      /* configure */
2233                     fdc->pool = fdc->upd765_command_bytes[1] & 0x10;
22272234                     upd765_idle(device);
22282235                     break;
22292236
r15363r15364
24172424   fdc->out_int_func.resolve(fdc->intf->out_int_func, *device);
24182425   fdc->out_drq_func.resolve(fdc->intf->out_drq_func, *device);
24192426
2427   // plain upd765 is doing pooling
2428   fdc->pool = true;   
24202429   // register for state saving
24212430   //state_save_register_item(device->machine(), "upd765", device->tag(), 0, upd765->number);
24222431}
r15363r15364
24342443static DEVICE_START( smc37c78 )
24352444{
24362445   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;
24372449}
24382450
24392451static DEVICE_START( upd72065 )
src/mess/drivers/at.c
r15363r15364
377377   SLOT_INTERFACE("mpu401", ISA8_MPU401)
378378   SLOT_INTERFACE("lpt", ISA8_LPT)
379379   SLOT_INTERFACE("ibm_mfc", ISA8_IBM_MFC)
380   SLOT_INTERFACE("fdcsmc", ISA8_FDC_SMC)
380381   // ISA 16 bit
381382   SLOT_INTERFACE("ide", ISA16_IDE)
382383   SLOT_INTERFACE("ide_cd", ISA16_IDE_CD)
r15363r15364
525526   MCFG_FRAGMENT_ADD( at_motherboard )
526527
527528   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)
529530   MCFG_ISA16_SLOT_ADD("isabus","isa2", pc_isa16_cards, "ide", NULL, false)
530531   MCFG_ISA16_SLOT_ADD("isabus","isa3", pc_isa16_cards, "comat", NULL, false)
531532   MCFG_ISA16_SLOT_ADD("isabus","isa4", pc_isa16_cards, "ne2000", NULL, false)
r15363r15364
574575
575576   MCFG_ISA16_BUS_ADD("isabus", "maincpu", isabus_intf)
576577   // 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)
578579   MCFG_ISA16_SLOT_ADD("isabus","board2", pc_isa16_cards, "comat", NULL, true)
579580   MCFG_ISA16_SLOT_ADD("isabus","board3", pc_isa16_cards, "ide", NULL, true)
580581   MCFG_ISA16_SLOT_ADD("isabus","board4", pc_isa16_cards, "lpt", NULL, true)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team