mirror of
https://github.com/holub/mame
synced 2025-04-24 17:30:55 +03:00
smc92x4: updated to use inline configs. nw.
This commit is contained in:
parent
b7746b9921
commit
35b65418d5
@ -430,19 +430,15 @@ void myarc_hfdc_device::device_timer(emu_timer &timer, device_timer_id id, int p
|
||||
if (VERBOSE>6) LOG("hfdc: motor off\n");
|
||||
}
|
||||
|
||||
const smc92x4_interface ti99_smc92x4_interface =
|
||||
{
|
||||
FALSE, /* do not use the full track layout */
|
||||
};
|
||||
|
||||
MACHINE_CONFIG_FRAGMENT( ti99_hfdc )
|
||||
MCFG_SMC92X4_ADD(FDC_TAG, ti99_smc92x4_interface )
|
||||
MCFG_DEVICE_ADD(FDC_TAG, SMC92X4, 0)
|
||||
MCFG_SMC92X4_INTRQ_CALLBACK(WRITELINE(myarc_hfdc_device, intrq_w))
|
||||
MCFG_SMC92X4_DIP_CALLBACK(WRITELINE(myarc_hfdc_device, dip_w))
|
||||
MCFG_SMC92X4_AUXBUS_OUT_CALLBACK(WRITE8(myarc_hfdc_device, auxbus_out))
|
||||
MCFG_SMC92X4_AUXBUS_IN_CALLBACK(READ8(myarc_hfdc_device, auxbus_in))
|
||||
MCFG_SMC92X4_DMA_IN_CALLBACK(READ8(myarc_hfdc_device, read_buffer))
|
||||
MCFG_SMC92X4_DMA_OUT_CALLBACK(WRITE8(myarc_hfdc_device, write_buffer))
|
||||
MCFG_SMC92X4_FULL_TRACK_LAYOUT(FALSE) /* do not use the full track layout */
|
||||
|
||||
MCFG_DEVICE_ADD(CLOCK_TAG, MM58274C, 0)
|
||||
MCFG_MM58274C_MODE24(1) // 24 hour
|
||||
|
@ -194,7 +194,8 @@ smc92x4_device::smc92x4_device(const machine_config &mconfig, const char *tag, d
|
||||
m_out_auxbus(*this),
|
||||
m_in_auxbus(*this),
|
||||
m_in_dma(*this),
|
||||
m_out_dma(*this)
|
||||
m_out_dma(*this),
|
||||
m_full_track_layout(FALSE)
|
||||
{
|
||||
}
|
||||
|
||||
@ -1951,8 +1952,6 @@ WRITE8_MEMBER( smc92x4_device::write )
|
||||
|
||||
void smc92x4_device::device_start()
|
||||
{
|
||||
const smc92x4_interface *intf = reinterpret_cast<const smc92x4_interface *>(static_config());
|
||||
|
||||
m_out_intrq.resolve_safe();
|
||||
m_out_dip.resolve_safe();
|
||||
m_out_auxbus.resolve_safe();
|
||||
@ -1960,8 +1959,6 @@ void smc92x4_device::device_start()
|
||||
m_out_dma.resolve_safe();
|
||||
m_in_dma.resolve_safe(0);
|
||||
|
||||
m_full_track_layout = intf->full_track_layout;
|
||||
|
||||
// allocate timers
|
||||
// m_timer_data = timer_alloc(DATA_TIMER);
|
||||
m_timer_rs = timer_alloc(READ_TIMER);
|
||||
|
@ -66,16 +66,14 @@ extern const device_type SMC92X4;
|
||||
#define MCFG_SMC92X4_DMA_OUT_CALLBACK(_write) \
|
||||
devcb = &smc92x4_device::set_dma_wr_callback(*device, DEVCB2_##_write);
|
||||
|
||||
struct smc92x4_interface
|
||||
{
|
||||
// Disk format support. This flag allows to choose between the full
|
||||
// FM/MFM format and an abbreviated track layout. The difference results
|
||||
// from legal variations of the layout. This is not part of
|
||||
// the smc92x4 specification, but it allows to keep the image format
|
||||
// simple without too much case checking. Should be removed as soon as
|
||||
// the respective disk formats support the full format.
|
||||
int full_track_layout;
|
||||
};
|
||||
// Disk format support. This flag allows to choose between the full
|
||||
// FM/MFM format and an abbreviated track layout. The difference results
|
||||
// from legal variations of the layout. This is not part of
|
||||
// the smc92x4 specification, but it allows to keep the image format
|
||||
// simple without too much case checking. Should be removed as soon as
|
||||
// the respective disk formats support the full format.
|
||||
#define MCFG_SMC92X4_FULL_TRACK_LAYOUT(_lay) \
|
||||
smc92x4_device::set_full_track_layout(*device, _lay);
|
||||
|
||||
|
||||
class smc92x4_device : public device_t
|
||||
@ -90,6 +88,8 @@ public:
|
||||
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); }
|
||||
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); }
|
||||
|
||||
static void set_full_track_layout(device_t &device, bool lay) { downcast<smc92x4_device &>(device).m_full_track_layout = lay; }
|
||||
|
||||
DECLARE_READ8_MEMBER( read );
|
||||
DECLARE_WRITE8_MEMBER( write );
|
||||
|
||||
@ -226,8 +226,4 @@ private:
|
||||
mfm_harddisk_device *m_harddisk;
|
||||
};
|
||||
|
||||
#define MCFG_SMC92X4_ADD(_tag, _intrf) \
|
||||
MCFG_DEVICE_ADD(_tag, SMC92X4, 0) \
|
||||
MCFG_DEVICE_CONFIG(_intrf)
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user