Previous 199869 Revisions Next

r31617 Monday 11th August, 2014 at 19:56:26 UTC by Wilbert Pol
(MESS) msx.c: Added support for National FS-CF351 + FS-FD351 external floppy controller and drive (nw)
[hash]msx1_cart.xml
[src/emu/bus/msx_cart]cartridge.c disk.c disk.h

trunk/src/emu/bus/msx_cart/disk.h
r31616r31617
1111extern const device_type MSX_CART_VY0010;
1212extern const device_type MSX_CART_FSFD1;
1313extern const device_type MSX_CART_FSFD1A;
14extern const device_type MSX_CART_FSCF351;
1415
1516
1617class msx_cart_disk : public device_t
r31616r31617
6364};
6465
6566
67class msx_cart_disk_type2 : public msx_cart_disk_wd
68{
69public:
70   msx_cart_disk_type2(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname);
71
72   // device-level overrides
73   virtual void device_start();
74   virtual void device_reset();
75
76   virtual DECLARE_READ8_MEMBER(read_cart);
77   virtual DECLARE_WRITE8_MEMBER(write_cart);
78
79   void post_load();
80
81protected:
82   UINT8 m_control;
83
84   void set_control(UINT8 data);
85};
86
87
6688class msx_cart_vy0010 : public msx_cart_disk_type1
6789{
6890public:
r31616r31617
81103};
82104
83105
106class msx_cart_fscf351 : public msx_cart_disk_type2
107{
108public:
109   msx_cart_fscf351(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
110
111   virtual machine_config_constructor device_mconfig_additions() const;
112};
113
114
84115class msx_cart_disk_tc8566 : public msx_cart_disk
85116{
86117public:
trunk/src/emu/bus/msx_cart/cartridge.c
r31616r31617
3939   SLOT_INTERFACE_INTERNAL("superloderunner", MSX_CART_SUPERLODERUNNER)
4040   SLOT_INTERFACE_INTERNAL("synthesizer", MSX_CART_SYNTHESIZER)
4141   SLOT_INTERFACE_INTERNAL("cross_blaim", MSX_CART_CROSSBLAIM)
42//  SLOT_INTERFACE_INTERNAL("disk_rom", MSX_CART_DISK_ROM)
4342   SLOT_INTERFACE_INTERNAL("korean_80in1", MSX_CART_KOREAN_80IN1)
4443   SLOT_INTERFACE_INTERNAL("korean_90in1", MSX_CART_KOREAN_90IN1)
4544   SLOT_INTERFACE_INTERNAL("korean_126in1", MSX_CART_KOREAN_126IN1)
r31616r31617
5857   SLOT_INTERFACE_INTERNAL("disk_vy0010", MSX_CART_VY0010)
5958   SLOT_INTERFACE_INTERNAL("disk_fsfd1", MSX_CART_FSFD1)
6059   SLOT_INTERFACE_INTERNAL("disk_fsfd1a", MSX_CART_FSFD1A)
60   SLOT_INTERFACE_INTERNAL("disk_fscf351", MSX_CART_FSCF351)
6161   SLOT_INTERFACE("bm_012", MSX_CART_BM_012)
6262SLOT_INTERFACE_END
6363
trunk/src/emu/bus/msx_cart/disk.c
r31616r31617
33 * MSX Floopy drive interface add-on cartridges
44 *
55 * Currently supported:
6 * - Philips VY-0010 (Interface cartridge + 1 3.5" SS floppy drive)
6 * - National FS-CF351 + FS-FD351 - MB8877A - DSDD 3.5" Floppy drive + interface
77 * - Panasonic FS-FD1 - WD2793? - DSDD 3.5" Floppy drive + interface
88 * - Panasonic FS-FD1A - TC8566F - DSDD 3.5" Floppy drive with builtin interface
99 *                     - Rom label reads: "FDC BIOS V1.0 / COPYRIGHT MEI / 1987 DASFD1AA1"
10 * - Philips VY-0010 (Interface cartridge + 1 3.5" SS floppy drive)
1011 *
1112 * Not supported yet:
1213 * - Canon VF-100 - DSDD 3.5" Floppy drive + interface + 1 floppy disk containing MSX-DOS
13 * - National FS-FD351 - MB8877A - DSDD 3.5" Floppy drive + interface
1414 * - Talent DPF-550/5 - WD1772 - DSDD 5.25" Floppy drive (360KB) plus interface (manufactured by Daewoo)
1515 *                    - Rom label markings: MSX DISK / DPF 555D
1616 *
r31616r31617
106106const device_type MSX_CART_VY0010 = &device_creator<msx_cart_vy0010>;
107107const device_type MSX_CART_FSFD1 = &device_creator<msx_cart_fsfd1>;
108108const device_type MSX_CART_FSFD1A = &device_creator<msx_cart_fsfd1a>;
109const device_type MSX_CART_FSCF351 = &device_creator<msx_cart_fscf351>;
109110
110111
111112FLOPPY_FORMATS_MEMBER( msx_cart_disk::floppy_formats )
r31616r31617
142143{
143144}
144145
146
147msx_cart_disk_type2::msx_cart_disk_type2(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname)
148   : msx_cart_disk_wd(mconfig, type, name, tag, owner, clock, shortname)
149   , m_control(0)
150{
151}
152
153
145154msx_cart_vy0010::msx_cart_vy0010(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
146155   : msx_cart_disk_type1(mconfig, MSX_CART_VY0010, "MSX Cartridge - VY0010", tag, owner, clock, "msx_cart_vy0010")
147156{
r31616r31617
154163}
155164
156165
166msx_cart_fscf351::msx_cart_fscf351(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
167    : msx_cart_disk_type2(mconfig, MSX_CART_FSCF351, "MSX Cartridge - FS-CF351", tag, owner, clock, "msx_cart_fscf351")
168{
169}
170
171
157172msx_cart_disk_tc8566::msx_cart_disk_tc8566(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname)
158173   : msx_cart_disk(mconfig, type, name, tag, owner, clock, shortname)
159174   , m_fdc(*this, "fdc")
r31616r31617
244259}
245260
246261
262static MACHINE_CONFIG_FRAGMENT( fscf351 )
263   MCFG_MB8877x_ADD("fdc", XTAL_4MHz / 4)
264   MCFG_WD_FDC_FORCE_READY
265
266   // Double sided 3.5" floppy drive
267   MCFG_FLOPPY_DRIVE_ADD("fdc:0", msx_floppies, "35dd", msx_cart_disk::floppy_formats)
268
269   // Attach software lists
270   // We do not know in what kind of machine the user has inserted the floppy interface
271   // so we list all msx floppy software lists.
272   //
273   MCFG_SOFTWARE_LIST_ADD("flop_list","msx2_flop")
274   MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("msx1_flop_list","msx1_flop")
275MACHINE_CONFIG_END
276
277
278machine_config_constructor msx_cart_fscf351::device_mconfig_additions() const
279{
280   return MACHINE_CONFIG_NAME( fscf351 );
281}
282
283
247284void msx_cart_disk_type1::device_start()
248285{
249286   save_item(NAME(m_side_control));
r31616r31617
400437}
401438
402439
440void msx_cart_disk_type2::device_start()
441{
442   save_item(NAME(m_control));
443
444   machine().save().register_postload(save_prepost_delegate(FUNC(msx_cart_disk_type2::post_load), this));
445}
446
447
448void msx_cart_disk_type2::device_reset()
449{
450   m_fdc->dden_w(false);
451}
452
453
454void msx_cart_disk_type2::post_load()
455{
456   UINT8 data = m_control;
457
458   // To make sure the FDD busy led status gets set correctly
459   m_control ^= 0x40;
460
461   set_control(data);
462}
463
464
465void msx_cart_disk_type2::set_control(UINT8 data)
466{
467   UINT8 old_m_control = m_control;
468
469   m_control = data;
470
471   switch (m_control & 3)
472   {
473      case 1:
474         m_floppy = m_floppy0 ? m_floppy0->get_device() : NULL;
475         break;
476
477      case 2:
478         m_floppy = m_floppy1 ? m_floppy1->get_device() : NULL;
479         break;
480
481      default:
482         m_floppy = NULL;
483         break;
484   }
485
486   if (m_floppy)
487   {
488      m_floppy->mon_w((m_control & 0x08) ? 0 : 1);
489      m_floppy->ss_w((m_control & 0x04) ? 1 : 0);
490   }
491
492   m_fdc->set_floppy(m_floppy);
493
494   if ((old_m_control ^ m_control) & 0x40)
495   {
496      set_led_status(machine(), 0, !(m_control & 0x40));
497   }
498}
499
500
501READ8_MEMBER(msx_cart_disk_type2::read_cart)
502{
503   switch (offset)
504   {
505      case 0x7fb8:
506      case 0xbfb8:
507         return m_fdc->status_r();
508
509      case 0x7fb9:
510      case 0xbfb9:
511         return m_fdc->track_r();
512
513      case 0x7fba:
514      case 0xbfba:
515         return m_fdc->sector_r();
516
517      case 0x7fbb:
518      case 0xbfbb:
519         return m_fdc->data_r();
520
521      case 0x7fbc:
522      case 0xbfbc:
523         return 0x3f | (m_fdc->drq_r() ? 0 : 0x40) | (m_fdc->intrq_r() ? 0x80 : 0);
524   }
525
526   if (offset >= 0x4000 && offset < 0x8000)
527   {
528      return get_rom_base()[offset & 0x3fff];
529   }
530   return 0xff;
531}
532
533
534WRITE8_MEMBER(msx_cart_disk_type2::write_cart)
535{
536   switch (offset)
537   {
538      case 0x7fb8:
539      case 0xbfb8:
540         m_fdc->cmd_w(data);
541         break;
542
543      case 0x7fb9:
544      case 0xbfb9:
545         m_fdc->track_w(data);
546         break;
547
548      case 0x7fba:
549      case 0xbfba:
550         m_fdc->sector_w(data);
551         break;
552
553      case 0x7fbb:
554      case 0xbfbb:
555         m_fdc->data_w(data);
556         break;
557
558      case 0x7fbc:
559      case 0xbfbc:
560         set_control(data);
561         break;
562
563      default:
564         logerror("msx_cart_disk_type2::write_cart: Unmapped write writing %02x to %04x\n", data, offset);
565         break;
566   }
567}
568
569
570
571
403572void msx_cart_fsfd1a::device_start()
404573{
405574}
trunk/hash/msx1_cart.xml
r31616r31617
1715017150-->
1715117151   </software>
1715217152
17153   <software name="fscf351">
17154      <description>FS-CF351 Controller + FS-FD351 DSDD 3.5" Floppy drive</description>
17155      <year>198?</year>
17156      <publisher>National</publisher>
17157      <part name="cart" interface="msx_cart">
17158         <feature name="slot" value="disk_fscf351" />
17159         <dataarea name="rom" size="0x4000">
17160            <!-- hashes not verified -->
17161            <rom name="fs_cf351.rom" size="0x4000" crc="006fba38" sha1="c1fb0fa01fadf82d86ed02daff46e7bd4ad7a59d" offset="0" />
17162         </dataarea>
17163      </part>
17164<!--
17165        The floppy drive was most likely bundled with a copy of MSX-DOS, but we are not 10% sure yet
17166        <part name="flop1" interface="floppy_3_5">
17167        </part>
17168-->
17169   </software>
17170
1715317171   <!-- SORT -->
1715417172
1715517173   <software name="dooly">

Previous 199869 Revisions Next


© 1997-2024 The MAME Team