trunk/src/emu/bus/ti99_peb/hfdc.c
| r32110 | r32111 | |
| 41 | 41 | 27C128 - EPROM 16K x 8 |
| 42 | 42 | |
| 43 | 43 | Author: Michael Zapf |
| 44 | | June 2014: Rewritten for modern floppy implementation |
| 44 | September 2014: Rewritten for modern floppy implementation |
| 45 | 45 | |
| 46 | 46 | WORK IN PROGRESS |
| 47 | 47 | |
| r32110 | r32111 | |
| 80 | 80 | #define TRACE_LINES 0 |
| 81 | 81 | #define TRACE_MOTOR 0 |
| 82 | 82 | #define TRACE_DMA 0 |
| 83 | #define TRACE_INT 0 |
| 83 | 84 | |
| 84 | 85 | // ========================================================================= |
| 85 | 86 | |
| r32110 | r32111 | |
| 543 | 544 | } |
| 544 | 545 | else |
| 545 | 546 | { |
| 546 | | // HD selected |
| 547 | 547 | index = slog2((data>>4) & 0x0f); |
| 548 | 548 | if (index == -1) |
| 549 | 549 | { |
| 550 | | if (TRACE_LINES) logerror("%s: Unselect all drives\n", tag()); |
| 550 | if (TRACE_LINES) logerror("%s: Unselect all HD drives\n", tag()); |
| 551 | connect_floppy_unit(index); |
| 551 | 552 | } |
| 552 | 553 | else |
| 553 | 554 | { |
| 555 | // HD selected |
| 554 | 556 | if (TRACE_LINES) logerror("%s: Select hard disk WDS%d\n", tag(), index); |
| 555 | 557 | // if (index>=0) m_hdc9234->connect_hard_drive(m_harddisk_unit[index-1]); |
| 556 | 558 | } |
| r32110 | r32111 | |
| 576 | 578 | // Output the step pulse to the selected floppy drive |
| 577 | 579 | if (m_current_floppy != NULL) |
| 578 | 580 | { |
| 581 | m_current_floppy->ss_w(data & 0x01); |
| 579 | 582 | m_current_floppy->dir_w((data & 0x20)==0); |
| 580 | 583 | m_current_floppy->stp_w((data & 0x10)==0); |
| 581 | 584 | } |
| r32110 | r32111 | |
| 670 | 673 | WRITE_LINE_MEMBER( myarc_hfdc_device::intrq_w ) |
| 671 | 674 | { |
| 672 | 675 | m_irq = (line_state)state; |
| 673 | | if (TRACE_LINES) logerror("%s: INT pin from controller = %d, propagating to INTA*\n", tag(), state); |
| 676 | if (TRACE_INT) logerror("%s: INT pin from controller = %d, propagating to INTA*\n", tag(), state); |
| 674 | 677 | |
| 675 | 678 | // Set INTA* |
| 676 | 679 | // Signal from SMC is active high, INTA* is active low; board inverts signal |
| r32110 | r32111 | |
| 684 | 687 | */ |
| 685 | 688 | WRITE_LINE_MEMBER( myarc_hfdc_device::dmarq_w ) |
| 686 | 689 | { |
| 687 | | if (TRACE_LINES) logerror("%s: DMARQ pin from controller = %d\n", tag(), state); |
| 690 | if (TRACE_DMA) logerror("%s: DMARQ pin from controller = %d\n", tag(), state); |
| 688 | 691 | if (state == ASSERT_LINE) |
| 689 | 692 | { |
| 690 | 693 | m_hdc9234->dmaack(ASSERT_LINE); |
| r32110 | r32111 | |
| 704 | 707 | */ |
| 705 | 708 | READ8_MEMBER( myarc_hfdc_device::read_buffer ) |
| 706 | 709 | { |
| 707 | | logerror("%s: Read access to onboard SRAM at %04x\n", tag(), m_dma_address); |
| 710 | if (TRACE_DMA) logerror("%s: Read access to onboard SRAM at %04x\n", tag(), m_dma_address); |
| 708 | 711 | UINT8 value = m_buffer_ram[m_dma_address & 0x7fff]; |
| 709 | 712 | m_dma_address = (m_dma_address+1) & 0x7fff; |
| 710 | 713 | return value; |
trunk/src/lib/formats/ti99_dsk.c
| r32110 | r32111 | |
| 284 | 284 | { |
| 285 | 285 | static floppy_image_format_t::desc_e desc_mfm[] = |
| 286 | 286 | { |
| 287 | | { SECTOR_INTERLEAVE_SKEW, 6, 6 }, // Possible ilv: 0, 4, 6, 10, 12, 16. |
| 287 | { SECTOR_INTERLEAVE_SKEW, 4, 0 }, // Possible ilv: 0, 4, 6, 10, 12, 16. |
| 288 | 288 | { MFM, 0x4e, f.gap_1 }, // track lead-in |
| 289 | 289 | { SECTOR_LOOP_START, 0, 17 }, // 18 sectors |
| 290 | 290 | { CRC_CCITT_START, 1 }, |