Previous 199869 Revisions Next

r26270 Monday 18th November, 2013 at 19:33:05 UTC by Curt Coder
(MESS) tiki100: Floppy WIP. (nw)
[src/lib/formats]tiki100_dsk.c tiki100_dsk.h wd177x_dsk.c
[src/mess/drivers]tiki100.c

trunk/src/lib/formats/tiki100_dsk.c
r26269r26270
3535const tiki100_format::format tiki100_format::formats[] = {
3636   {   //  90K 5 1/4 inch single density single sided
3737      floppy_image::FF_525, floppy_image::SSSD, floppy_image::FM,
38      4000, 18, 40, 1, 128, {}, 1, {}, 40, 11, 10
38      4000, 18, 40, 1, 128, {}, 1, {}, 16, 11, 8
3939   },
4040   {   //  200K 5 1/4 inch double density single sided
4141      floppy_image::FF_525, floppy_image::SSDD, floppy_image::MFM,
r26269r26270
5252   {}
5353};
5454
55floppy_image_format_t::desc_e* tiki100_format::get_desc_fm(const format &f, int &current_size, int &end_gap_index)
56{
57   static floppy_image_format_t::desc_e desc[23] = {
58      /* 00 */ { FM, 0xff, f.gap_1 },
59      /* 01 */ { SECTOR_LOOP_START, 0, f.sector_count-1 },
60      /* 02 */ {   FM, 0x00, 4 }, // NOTE here is the difference to wd177x_format
61      /* 03 */ {   CRC_CCITT_FM_START, 1 },
62      /* 04 */ {     RAW, 0xf57e, 1 },
63      /* 05 */ {     TRACK_ID_FM },
64      /* 06 */ {     HEAD_ID_FM },
65      /* 07 */ {     SECTOR_ID_FM },
66      /* 08 */ {     SIZE_ID_FM },
67      /* 09 */ {   CRC_END, 1 },
68      /* 10 */ {   CRC, 1 },
69      /* 11 */ {   FM, 0xff, f.gap_2 },
70      /* 12 */ {   FM, 0x00, 6 },
71      /* 13 */ {   CRC_CCITT_FM_START, 2 },
72      /* 14 */ {     RAW, 0xf56f, 1 },
73      /* 15 */ {     SECTOR_DATA_FM, -1 },
74      /* 16 */ {   CRC_END, 2 },
75      /* 17 */ {   CRC, 2 },
76      /* 18 */ {   FM, 0xff, f.gap_3 },
77      /* 19 */ { SECTOR_LOOP_END },
78      /* 20 */ { FM, 0xff, 0 },
79      /* 21 */ { RAWBITS, 0xffff, 0 },
80      /* 22 */ { END }
81   };
82
83   current_size = f.gap_1*16;
84   if(f.sector_base_size)
85      current_size += f.sector_base_size * f.sector_count * 16;
86   else {
87      for(int j=0; j != f.sector_count; j++)
88         current_size += f.per_sector_size[j] * 16;
89   }
90   current_size += (4+1+4+2+f.gap_2+6+1+2+f.gap_3) * f.sector_count * 16;
91
92   end_gap_index = 20;
93
94   return desc;
95}
96
5597const floppy_format_type FLOPPY_TIKI100_FORMAT = &floppy_image_format_creator<tiki100_format>;
trunk/src/lib/formats/tiki100_dsk.h
r26269r26270
2121   virtual const char *description() const;
2222   virtual const char *extensions() const;
2323
24   virtual floppy_image_format_t::desc_e* get_desc_fm(const format &f, int &current_size, int &end_gap_index);
25
2426private:
2527   static const format formats[];
2628};
trunk/src/lib/formats/wd177x_dsk.c
r26269r26270
8282      /* 01 */ { SECTOR_LOOP_START, 0, f.sector_count-1 },
8383      /* 02 */ {   FM, 0x00, 6 },
8484      /* 03 */ {   CRC_CCITT_FM_START, 1 },
85      /* 04 */ {     FM, 0xfe, 1 },
85      /* 04 */ {     RAW, 0xf57e, 1 },
8686      /* 05 */ {     TRACK_ID_FM },
8787      /* 06 */ {     HEAD_ID_FM },
8888      /* 07 */ {     SECTOR_ID_FM },
r26269r26270
9292      /* 11 */ {   FM, 0xff, f.gap_2 },
9393      /* 12 */ {   FM, 0x00, 6 },
9494      /* 13 */ {   CRC_CCITT_FM_START, 2 },
95      /* 14 */ {     FM, 0xfb, 1 },
95      /* 14 */ {     RAW, 0xf56f, 1 },
9696      /* 15 */ {     SECTOR_DATA_FM, -1 },
9797      /* 16 */ {   CRC_END, 2 },
9898      /* 17 */ {   CRC, 2 },
9999      /* 18 */ {   FM, 0xff, f.gap_3 },
100100      /* 19 */ { SECTOR_LOOP_END },
101      /* 20 */ { FM, 0x00, 0 },
101      /* 20 */ { FM, 0xff, 0 },
102102      /* 21 */ { RAWBITS, 0xffff, 0 },
103103      /* 22 */ { END }
104104   };
trunk/src/mess/drivers/tiki100.c
r26269r26270
512512FLOPPY_FORMATS_END
513513
514514static SLOT_INTERFACE_START( tiki100_floppies )
515   SLOT_INTERFACE( "525ssdd", FLOPPY_525_SSDD )
515516   SLOT_INTERFACE( "525dd", FLOPPY_525_DD ) // Tead FD-55A
516517   SLOT_INTERFACE( "525qd", FLOPPY_525_QD ) // Teac FD-55F
517518SLOT_INTERFACE_END
r26269r26270
613614   MCFG_Z80CTC_ADD(Z80CTC_TAG, XTAL_8MHz/4, ctc_intf)
614615   MCFG_TIMER_DRIVER_ADD_PERIODIC("ctc", tiki100_state, ctc_tick, attotime::from_hz(XTAL_8MHz/4))
615616   MCFG_FD1797x_ADD(FD1797_TAG, XTAL_8MHz/8) // FD1767PL-02 or FD1797-PL
616   MCFG_FLOPPY_DRIVE_ADD(FD1797_TAG":0", tiki100_floppies, "525dd", tiki100_state::floppy_formats)
617   MCFG_FLOPPY_DRIVE_ADD(FD1797_TAG":1", tiki100_floppies, "525dd", tiki100_state::floppy_formats)
617   MCFG_FLOPPY_DRIVE_ADD(FD1797_TAG":0", tiki100_floppies, "525ssdd", tiki100_state::floppy_formats)
618   MCFG_FLOPPY_DRIVE_ADD(FD1797_TAG":1", tiki100_floppies, "525ssdd", tiki100_state::floppy_formats)
618619
619620   /* sound hardware */
620621   MCFG_SPEAKER_STANDARD_MONO("mono")

Previous 199869 Revisions Next


© 1997-2024 The MAME Team