Previous 199869 Revisions Next

r29628 Monday 14th April, 2014 at 05:35:45 UTC by Fabio Priuli
smc92x4: updated to use inline configs. nw.
[src/emu/bus/ti99_peb]hfdc.c
[src/emu/machine]smc92x4.c smc92x4.h

trunk/src/emu/bus/ti99_peb/hfdc.c
r29627r29628
430430   if (VERBOSE>6) LOG("hfdc: motor off\n");
431431}
432432
433const smc92x4_interface ti99_smc92x4_interface =
434{
435   FALSE,      /* do not use the full track layout */
436};
437
438433MACHINE_CONFIG_FRAGMENT( ti99_hfdc )
439   MCFG_SMC92X4_ADD(FDC_TAG, ti99_smc92x4_interface )
434   MCFG_DEVICE_ADD(FDC_TAG, SMC92X4, 0)
440435   MCFG_SMC92X4_INTRQ_CALLBACK(WRITELINE(myarc_hfdc_device, intrq_w))
441436   MCFG_SMC92X4_DIP_CALLBACK(WRITELINE(myarc_hfdc_device, dip_w))
442437   MCFG_SMC92X4_AUXBUS_OUT_CALLBACK(WRITE8(myarc_hfdc_device, auxbus_out))
443438   MCFG_SMC92X4_AUXBUS_IN_CALLBACK(READ8(myarc_hfdc_device, auxbus_in))
444439   MCFG_SMC92X4_DMA_IN_CALLBACK(READ8(myarc_hfdc_device, read_buffer))
445440   MCFG_SMC92X4_DMA_OUT_CALLBACK(WRITE8(myarc_hfdc_device, write_buffer))
441   MCFG_SMC92X4_FULL_TRACK_LAYOUT(FALSE)    /* do not use the full track layout */
446442
447443   MCFG_DEVICE_ADD(CLOCK_TAG, MM58274C, 0)
448444   MCFG_MM58274C_MODE24(1) // 24 hour
trunk/src/emu/machine/smc92x4.c
r29627r29628
194194   m_out_auxbus(*this),
195195   m_in_auxbus(*this),
196196   m_in_dma(*this),
197   m_out_dma(*this)
197   m_out_dma(*this),
198   m_full_track_layout(FALSE)
198199{
199200}
200201
r29627r29628
19511952
19521953void smc92x4_device::device_start()
19531954{
1954   const smc92x4_interface *intf = reinterpret_cast<const smc92x4_interface *>(static_config());
1955
19561955   m_out_intrq.resolve_safe();
19571956   m_out_dip.resolve_safe();
19581957   m_out_auxbus.resolve_safe();
r29627r29628
19601959   m_out_dma.resolve_safe();
19611960   m_in_dma.resolve_safe(0);
19621961
1963   m_full_track_layout = intf->full_track_layout;
1964
19651962   // allocate timers
19661963   // m_timer_data = timer_alloc(DATA_TIMER);
19671964   m_timer_rs = timer_alloc(READ_TIMER);
trunk/src/emu/machine/smc92x4.h
r29627r29628
6666#define MCFG_SMC92X4_DMA_OUT_CALLBACK(_write) \
6767   devcb = &smc92x4_device::set_dma_wr_callback(*device, DEVCB2_##_write);
6868
69struct smc92x4_interface
70{
71   // Disk format support. This flag allows to choose between the full
72   // FM/MFM format and an abbreviated track layout. The difference results
73   // from legal variations of the layout. This is not part of
74   // the smc92x4 specification, but it allows to keep the image format
75   // simple without too much case checking. Should be removed as soon as
76   // the respective disk formats support the full format.
77   int full_track_layout;
78};
69// Disk format support. This flag allows to choose between the full
70// FM/MFM format and an abbreviated track layout. The difference results
71// from legal variations of the layout. This is not part of
72// the smc92x4 specification, but it allows to keep the image format
73// simple without too much case checking. Should be removed as soon as
74// the respective disk formats support the full format.
75#define MCFG_SMC92X4_FULL_TRACK_LAYOUT(_lay) \
76   smc92x4_device::set_full_track_layout(*device, _lay);
7977
8078
8179class smc92x4_device : public device_t
r29627r29628
9088   template<class _Object> static devcb2_base &set_dma_rd_callback(device_t &device, _Object object) { return downcast<smc92x4_device &>(device).m_in_dma.set_callback(object); }
9189   template<class _Object> static devcb2_base &set_dma_wr_callback(device_t &device, _Object object) { return downcast<smc92x4_device &>(device).m_out_dma.set_callback(object); }
9290
91   static void set_full_track_layout(device_t &device, bool lay) { downcast<smc92x4_device &>(device).m_full_track_layout = lay; }
92
9393   DECLARE_READ8_MEMBER( read );
9494   DECLARE_WRITE8_MEMBER( write );
9595
r29627r29628
226226   mfm_harddisk_device           *m_harddisk;
227227};
228228
229#define MCFG_SMC92X4_ADD(_tag, _intrf) \
230   MCFG_DEVICE_ADD(_tag, SMC92X4, 0) \
231   MCFG_DEVICE_CONFIG(_intrf)
232
233229#endif

Previous 199869 Revisions Next


© 1997-2024 The MAME Team