trunk/src/emu/bus/ti99_peb/hfdc.c
| r29627 | r29628 | |
| 430 | 430 | if (VERBOSE>6) LOG("hfdc: motor off\n"); |
| 431 | 431 | } |
| 432 | 432 | |
| 433 | | const smc92x4_interface ti99_smc92x4_interface = |
| 434 | | { |
| 435 | | FALSE, /* do not use the full track layout */ |
| 436 | | }; |
| 437 | | |
| 438 | 433 | MACHINE_CONFIG_FRAGMENT( ti99_hfdc ) |
| 439 | | MCFG_SMC92X4_ADD(FDC_TAG, ti99_smc92x4_interface ) |
| 434 | MCFG_DEVICE_ADD(FDC_TAG, SMC92X4, 0) |
| 440 | 435 | MCFG_SMC92X4_INTRQ_CALLBACK(WRITELINE(myarc_hfdc_device, intrq_w)) |
| 441 | 436 | MCFG_SMC92X4_DIP_CALLBACK(WRITELINE(myarc_hfdc_device, dip_w)) |
| 442 | 437 | MCFG_SMC92X4_AUXBUS_OUT_CALLBACK(WRITE8(myarc_hfdc_device, auxbus_out)) |
| 443 | 438 | MCFG_SMC92X4_AUXBUS_IN_CALLBACK(READ8(myarc_hfdc_device, auxbus_in)) |
| 444 | 439 | MCFG_SMC92X4_DMA_IN_CALLBACK(READ8(myarc_hfdc_device, read_buffer)) |
| 445 | 440 | 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 */ |
| 446 | 442 | |
| 447 | 443 | MCFG_DEVICE_ADD(CLOCK_TAG, MM58274C, 0) |
| 448 | 444 | MCFG_MM58274C_MODE24(1) // 24 hour |
trunk/src/emu/machine/smc92x4.c
| r29627 | r29628 | |
| 194 | 194 | m_out_auxbus(*this), |
| 195 | 195 | m_in_auxbus(*this), |
| 196 | 196 | m_in_dma(*this), |
| 197 | | m_out_dma(*this) |
| 197 | m_out_dma(*this), |
| 198 | m_full_track_layout(FALSE) |
| 198 | 199 | { |
| 199 | 200 | } |
| 200 | 201 | |
| r29627 | r29628 | |
| 1951 | 1952 | |
| 1952 | 1953 | void smc92x4_device::device_start() |
| 1953 | 1954 | { |
| 1954 | | const smc92x4_interface *intf = reinterpret_cast<const smc92x4_interface *>(static_config()); |
| 1955 | | |
| 1956 | 1955 | m_out_intrq.resolve_safe(); |
| 1957 | 1956 | m_out_dip.resolve_safe(); |
| 1958 | 1957 | m_out_auxbus.resolve_safe(); |
| r29627 | r29628 | |
| 1960 | 1959 | m_out_dma.resolve_safe(); |
| 1961 | 1960 | m_in_dma.resolve_safe(0); |
| 1962 | 1961 | |
| 1963 | | m_full_track_layout = intf->full_track_layout; |
| 1964 | | |
| 1965 | 1962 | // allocate timers |
| 1966 | 1963 | // m_timer_data = timer_alloc(DATA_TIMER); |
| 1967 | 1964 | m_timer_rs = timer_alloc(READ_TIMER); |
trunk/src/emu/machine/smc92x4.h
| r29627 | r29628 | |
| 66 | 66 | #define MCFG_SMC92X4_DMA_OUT_CALLBACK(_write) \ |
| 67 | 67 | devcb = &smc92x4_device::set_dma_wr_callback(*device, DEVCB2_##_write); |
| 68 | 68 | |
| 69 | | struct 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); |
| 79 | 77 | |
| 80 | 78 | |
| 81 | 79 | class smc92x4_device : public device_t |
| r29627 | r29628 | |
| 90 | 88 | 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); } |
| 91 | 89 | 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); } |
| 92 | 90 | |
| 91 | static void set_full_track_layout(device_t &device, bool lay) { downcast<smc92x4_device &>(device).m_full_track_layout = lay; } |
| 92 | |
| 93 | 93 | DECLARE_READ8_MEMBER( read ); |
| 94 | 94 | DECLARE_WRITE8_MEMBER( write ); |
| 95 | 95 | |
| r29627 | r29628 | |
| 226 | 226 | mfm_harddisk_device *m_harddisk; |
| 227 | 227 | }; |
| 228 | 228 | |
| 229 | | #define MCFG_SMC92X4_ADD(_tag, _intrf) \ |
| 230 | | MCFG_DEVICE_ADD(_tag, SMC92X4, 0) \ |
| 231 | | MCFG_DEVICE_CONFIG(_intrf) |
| 232 | | |
| 233 | 229 | #endif |