trunk/src/emu/bus/ieee488/c8050.c
r245663 | r245664 | |
484 | 484 | |
485 | 485 | |
486 | 486 | //------------------------------------------------- |
| 487 | // SLOT_INTERFACE( sfd1001_floppies ) |
| 488 | //------------------------------------------------- |
| 489 | |
| 490 | static SLOT_INTERFACE_START( sfd1001_floppies ) |
| 491 | SLOT_INTERFACE( "525qd", FLOPPY_525_QD ) // Matsushita JU-570 / JU-570-2 |
| 492 | SLOT_INTERFACE_END |
| 493 | |
| 494 | |
| 495 | //------------------------------------------------- |
487 | 496 | // FLOPPY_FORMATS( floppy_formats ) |
488 | 497 | //------------------------------------------------- |
489 | 498 | |
r245663 | r245664 | |
727 | 736 | MCFG_DEVICE_ADD(M6530_TAG, MOS6530n, XTAL_12MHz/12) |
728 | 737 | MCFG_MOS6530n_IRQ_CB(INPUTLINE(M6504_TAG, M6502_IRQ_LINE)) |
729 | 738 | MCFG_MOS6530n_OUT_PA_CB(DEVWRITE8(FDC_TAG, c8050_fdc_t, write)) |
730 | | MCFG_MOS6530n_OUT_PB0_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, drv_sel_w)) |
731 | 739 | MCFG_MOS6530n_OUT_PB1_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, ds0_w)) |
732 | 740 | MCFG_MOS6530n_OUT_PB2_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, ds1_w)) |
733 | 741 | MCFG_MOS6530n_IN_PB3_CB(DEVREADLINE(FDC_TAG, c8050_fdc_t, wps_r)) |
r245663 | r245664 | |
739 | 747 | MCFG_C8050_READY_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_ca1)) |
740 | 748 | MCFG_C8050_BRDY_CALLBACK(INPUTLINE(M6504_TAG, M6502_SET_OVERFLOW)) MCFG_DEVCB_XOR(1) |
741 | 749 | MCFG_C8050_ERROR_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_cb1)) |
742 | | MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":0", c8250_floppies, "525qd", sfd1001_device::floppy_formats) |
743 | | MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":1", c8250_floppies, NULL, sfd1001_device::floppy_formats) |
| 750 | MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":0", sfd1001_floppies, "525qd", sfd1001_device::floppy_formats) |
744 | 751 | MACHINE_CONFIG_END |
745 | 752 | |
746 | 753 | |
r245663 | r245664 | |
882 | 889 | void c8050_device::device_start() |
883 | 890 | { |
884 | 891 | // install image callbacks |
885 | | m_fdc->set_floppy(m_floppy0->get_device(), m_floppy1->get_device()); |
| 892 | m_fdc->set_floppy(m_floppy0, m_floppy1); |
886 | 893 | |
887 | 894 | // register for state saving |
888 | 895 | save_item(NAME(m_rfdo)); |
trunk/src/lib/formats/d64_dsk.c
r245663 | r245664 | |
180 | 180 | } |
181 | 181 | } |
182 | 182 | |
| 183 | void d64_format::fix_end_gap(floppy_image_format_t::desc_e* desc, int remaining_size) |
| 184 | { |
| 185 | desc[21].p2 = remaining_size / 8; |
| 186 | desc[22].p2 = remaining_size & 7; |
| 187 | desc[22].p1 >>= remaining_size & 0x01; |
| 188 | } |
| 189 | |
183 | 190 | bool d64_format::load(io_generic *io, UINT32 form_factor, floppy_image *image) |
184 | 191 | { |
185 | 192 | int type = find_size(io, form_factor); |
r245663 | r245664 | |
219 | 226 | if(remaining_size < 0) |
220 | 227 | throw emu_fatalerror("d64_format: Incorrect track layout, max_size=%d, current_size=%d", total_size, current_size); |
221 | 228 | |
222 | | // Fixup the end gap |
223 | | desc[21].p2 = remaining_size / 8; |
224 | | desc[22].p2 = remaining_size & 7; |
225 | | desc[22].p1 >>= remaining_size & 0x01; |
| 229 | this->fix_end_gap(desc, remaining_size); |
226 | 230 | |
227 | 231 | desc_s sectors[40]; |
228 | 232 | |
trunk/src/lib/formats/d80_dsk.c
r245663 | r245664 | |
37 | 37 | |
38 | 38 | const d80_format::format d80_format::file_formats[] = { |
39 | 39 | { // d80, dos 2.5, 77 tracks, head/stepper 100 tpi |
40 | | floppy_image::FF_525, floppy_image::SSQD, 2083, 77, 1, 256, 19, 19 // TODO verify gaps |
| 40 | floppy_image::FF_525, floppy_image::SSQD, 2083, 77, 1, 256, 22, 19 // TODO verify gaps |
41 | 41 | }, |
42 | 42 | {} |
43 | 43 | }; |
r245663 | r245664 | |
104 | 104 | /* 07 */ { GCR5, id2, 1 }, |
105 | 105 | /* 08 */ { GCR5, id1, 1 }, |
106 | 106 | /* 09 */ { CRC_END, 1 }, |
107 | | /* 10 */ { GCR5, 0x0f, 2 }, |
108 | | /* 11 */ { RAWBYTE, 0x55, f.gap_1 }, |
109 | | /* 12 */ { RAWBYTE, 0xff, 5 }, |
110 | | /* 13 */ { GCR5, 0x07, 1 }, |
111 | | /* 14 */ { CRC_CBM_START, 2 }, |
112 | | /* 15 */ { SECTOR_DATA_GCR5, -1 }, |
113 | | /* 16 */ { CRC_END, 2 }, |
114 | | /* 17 */ { CRC, 2 }, |
115 | | /* 18 */ { GCR5, 0x00, 2 }, |
116 | | /* 19 */ { RAWBYTE, 0x55, gap_2 }, |
117 | | /* 20 */ { SECTOR_LOOP_END }, |
118 | | /* 21 */ { RAWBYTE, 0x55, 0 }, |
119 | | /* 22 */ { RAWBITS, 0x5555, 0 }, |
120 | | /* 23 */ { END } |
| 107 | /* 10 */ { GCR5, 0x0f, f.gap_1 }, |
| 108 | /* 11 */ { RAWBYTE, 0xff, 5 }, |
| 109 | /* 12 */ { GCR5, 0x07, 1 }, |
| 110 | /* 13 */ { CRC_CBM_START, 2 }, |
| 111 | /* 14 */ { SECTOR_DATA_GCR5, -1 }, |
| 112 | /* 15 */ { CRC_END, 2 }, |
| 113 | /* 16 */ { CRC, 2 }, |
| 114 | /* 17 */ { GCR5, 0x0f, gap_2 }, |
| 115 | /* 18 */ { SECTOR_LOOP_END }, |
| 116 | /* 19 */ { RAWBYTE, 0x55, 0 }, |
| 117 | /* 20 */ { RAWBITS, 0x5555, 0 }, |
| 118 | /* 21 */ { END } |
121 | 119 | }; |
122 | 120 | |
123 | | current_size = 40 + (1+1+4+2)*10 + (f.gap_1)*8 + 40 + (1+f.sector_base_size+1+2)*10 + gap_2*8; |
| 121 | current_size = 40 + (1+1+4)*10 + (f.gap_1)*10 + 40 + (1+f.sector_base_size+1)*10 + gap_2*10; |
124 | 122 | |
125 | 123 | current_size *= sector_count; |
126 | 124 | return desc; |
127 | 125 | } |
128 | 126 | |
| 127 | void d80_format::fix_end_gap(floppy_image_format_t::desc_e* desc, int remaining_size) |
| 128 | { |
| 129 | desc[19].p2 = remaining_size / 8; |
| 130 | desc[20].p2 = remaining_size & 7; |
| 131 | desc[20].p1 >>= remaining_size & 0x01; |
| 132 | } |
| 133 | |
129 | 134 | const floppy_format_type FLOPPY_D80_FORMAT = &floppy_image_format_creator<d80_format>; |
trunk/src/lib/formats/d80_dsk.h
r245663 | r245664 | |
29 | 29 | virtual UINT32 get_cell_size(const format &f, int track); |
30 | 30 | virtual int get_sectors_per_track(const format &f, int track); |
31 | 31 | virtual int get_disk_id_offset(const format &f); |
32 | | floppy_image_format_t::desc_e* get_sector_desc(const format &f, int ¤t_size, int sector_count, UINT8 id1, UINT8 id2, int gap_2); |
| 32 | virtual floppy_image_format_t::desc_e* get_sector_desc(const format &f, int ¤t_size, int sector_count, UINT8 id1, UINT8 id2, int gap_2); |
| 33 | virtual void fix_end_gap(floppy_image_format_t::desc_e* desc, int remaining_size); |
33 | 34 | |
34 | 35 | static const format file_formats[]; |
35 | 36 | |