Previous 15994 Revisions Next

r5744 Wednesday 16th September, 2009 at 15:05:07 UTC by Miodrag Milanović
Floppy moved to device, APPLE2 not working still, others should work as before
[src/mess/devices]appldriv.c appldriv.h coco_fdc.c flopdrv.c flopdrv.h sonydriv.c sonydriv.h thomflop.c
[src/mess/drivers]abc80.c abc80x.c adam.c amstrad.c apf.c apple2.c apple2gs.c apple3.c aquarius.c at.c atarist.c atm.c atom.c b2m.c bbc.c bebox.c bw12.c bw2.c cgenie.c coco.c compis.c comx35.c concept.c dgn_beta.c einstein.c elwro800.c enterp.c exidy.c fm7.c geneve.c kaypro.c kc.c lisa.c mac.c mbee.c mikromik.c msx.c nanos.c nascom1.c nc.c newbrain.c oric.c orion.c osborne1.c osi.c partner.c pc.c pc8801.c pcw.c pcw16.c pentagon.c pk8020.c prof80.c pyl601.c ql.c samcoupe.c scorpion.c sg1000.c sord.c special.c specpls3.c svi318.c thomson.c ti990_4.c ti99_4p.c ti99_4x.c ti99_8.c tiki100.c tmc2000e.c tmc600.c trs80.c v1050.c vector06.c x1.c x68k.c xerox820.c xor100.c z80ne.c
[src/mess/formats]flopimg.c flopimg.h
[src/mess/machine]990_dk.c 99_dsk.c adam.c amstrad.c atom.c bbc.c bebox.c beta.c cgenie.c coco.c compis.c comx35.c concept.c conkort.c exidy.c i8271.c i8271.h kaypro.c kc.c mc6843.c msx.c nascom1.c nec765.c nec765.h oric.c osborne1.c partner.c pc8801.c pc_fdc.c pc_fdc.h pf10.c smc92x4.c svi318.c trs80.c wd17xx.c wd17xx.h

src/mess/machine/conkort.c
r5743r5744
167167
168168INLINE const device_config *get_floppy_image(running_machine *machine, int drive)
169169{
170   return image_from_devtype_and_index(machine, IO_FLOPPY, drive);
170   return floppy_get_device(machine, drive);
171171}
172172
173173/***************************************************************************
r5743r5744
717717static const wd17xx_interface slow_wd17xx_interface =
718718{
719719   slow_wd1791_callback,
720   NULL
720   NULL,
721   {FLOPPY_0,FLOPPY_1,FLOPPY_2,FLOPPY_3}
721722};
722723
723724/* FD1793 */
r5743r5744
743744
744745static const wd17xx_interface fast_wd17xx_interface =
745746{
746   fast_wd1793_callback
747   fast_wd1793_callback,
748   NULL,
749   {FLOPPY_0,FLOPPY_1,FLOPPY_2,FLOPPY_3}
747750};
748751
749752/* Machine Driver */
src/mess/machine/adam.c
r5743r5744
537537
538538         if (deviceNum>=4 && deviceNum<=7)
539539         {
540            image = image_from_devtype_and_index(machine, IO_FLOPPY, deviceNum - 4);
540            image = floppy_get_device(machine, deviceNum - 4);
541541            if (image_exists(image))
542542               ram[statusDCB+20] = (ram[statusDCB+20]&0xF0); /* Inserted Media */
543543            else
r5743r5744
559559               }
560560               else if (deviceNum>=4 && deviceNum<=7)
561561               {
562                  image = image_from_devtype_and_index(machine, IO_FLOPPY, deviceNum - 4);
562                  image = floppy_get_device(machine, deviceNum - 4);
563563                  if (image_exists(image))
564564                  {
565565                     ram[statusDCB] = 0x80;
r5743r5744
620620               }
621621               else if (deviceNum>=4 && deviceNum<=7)
622622               {
623                  image = image_from_devtype_and_index(machine, IO_FLOPPY, deviceNum - 4);
623                  image = floppy_get_device(machine, deviceNum - 4);
624624                  if (image_exists(image))
625625                  {
626626                     sectorNmbr = ((ram[statusDCB+5])+(ram[statusDCB+6]<<8)+(ram[statusDCB+7]<<16)+(ram[statusDCB+8]<<24))<<1;
src/mess/machine/coco.c
r5743r5744
29662966
29672967const wd17xx_interface dgnalpha_wd17xx_interface = {
29682968   dgnalpha_fdc_callback,
2969   NULL
2969   NULL,
2970   {FLOPPY_0,FLOPPY_1,FLOPPY_2,FLOPPY_3}
29702971};
29712972/******* Machine Setups CoCos **********/
29722973
src/mess/machine/99_dsk.c
r5743r5744
359359
360360   for (id=0; id<MAX_FLOPPIES; id++)
361361   {
362      image = image_from_devtype_and_index(machine, IO_FLOPPY, id);
362      image = floppy_get_device(machine, id);
363363      floppy_install_tracktranslate_proc(image, ti99_tracktranslate);
364364   }
365365}
r5743r5744
390390   fdc_handle_hold(device->machine);
391391}
392392
393const wd17xx_interface ti99_wd17xx_interface = { fdc_callback, NULL };
393const wd17xx_interface ti99_wd17xx_interface = { fdc_callback, NULL, {FLOPPY_0,FLOPPY_1,FLOPPY_2,FLOPPY_3} };
394394
395395
396396/*
src/mess/machine/oric.c
r5743r5744
10631063   }
10641064}
10651065
1066const wd17xx_interface oric_wd17xx_interface = { oric_wd179x_callback, NULL };
1066const wd17xx_interface oric_wd17xx_interface = { oric_wd179x_callback, NULL, {FLOPPY_0,FLOPPY_1,FLOPPY_2,FLOPPY_3} };
10671067
10681068static void oric_common_init_machine(running_machine *machine)
10691069{
src/mess/machine/990_dk.c
r5743r5744
9494
9595static void fd800_unload_proc(const device_config *image)
9696{
97   int unit = image_index_in_device(image);
97   int unit = floppy_get_drive(image);
9898
9999   fd800.drv[unit].log_cylinder[0] = fd800.drv[unit].log_cylinder[1] = -1;
100100}
r5743r5744
114114
115115   for (i=0; i<MAX_FLOPPIES; i++)
116116   {
117      fd800.drv[i].img = image_from_devtype_and_index(machine, IO_FLOPPY, i);
117      fd800.drv[i].img = floppy_get_device(machine, i);
118118      fd800.drv[i].phys_cylinder = -1;
119119      fd800.drv[i].log_cylinder[0] = fd800.drv[i].log_cylinder[1] = -1;
120120      fd800.drv[i].seclen = 64;
src/mess/machine/nascom1.c
r5743r5744
6666}
6767
6868
69const wd17xx_interface nascom2_wd17xx_interface = { nascom2_fdc_callback, NULL };
69const wd17xx_interface nascom2_wd17xx_interface = { nascom2_fdc_callback, NULL, {FLOPPY_0,FLOPPY_1,FLOPPY_2,FLOPPY_3} };
7070
7171
7272READ8_HANDLER( nascom2_fdc_select_r )
src/mess/machine/osborne1.c
r5743r5744
472472
473473   for(drive=0;drive<2;drive++)
474474   {
475      floppy_install_load_proc(image_from_devtype_and_index(machine, IO_FLOPPY, drive), osborne1_load_proc);
475      floppy_install_load_proc(floppy_get_device(machine, drive), osborne1_load_proc);
476476   }
477477   
478478   memory_set_direct_update_handler( space, osborne1_opbase );
src/mess/machine/amstrad.c
r5743r5744
25532553               /* FDC Motor Control - Bit 0 defines the state of the FDD motor:
25542554                * "1" the FDD motor will be active.
25552555                * "0" the FDD motor will be in-active.*/
2556               floppy_drive_set_motor_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 0), (data & 0x01));
2557               floppy_drive_set_motor_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 1), (data & 0x01));
2558               floppy_drive_set_ready_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 0), 1,1);
2559               floppy_drive_set_ready_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 1), 1,1);
2556               floppy_drive_set_motor_state(floppy_get_device(space->machine, 0), (data & 0x01));
2557               floppy_drive_set_motor_state(floppy_get_device(space->machine, 1), (data & 0x01));
2558               floppy_drive_set_ready_state(floppy_get_device(space->machine, 0), 1,1);
2559               floppy_drive_set_ready_state(floppy_get_device(space->machine, 1), 1,1);
25602560              break;
25612561
25622562            case 0x03: /* Write Data register of FDC */
r5743r5744
32633263
32643264   if(amstrad_system_type != SYSTEM_GX4000)
32653265   {
3266      floppy_drive_set_geometry(image_from_devtype_and_index(machine, IO_FLOPPY, 0),  FLOPPY_DRIVE_SS_40);
3267      floppy_drive_set_geometry(image_from_devtype_and_index(machine, IO_FLOPPY, 1),  FLOPPY_DRIVE_SS_40);
3266      floppy_drive_set_geometry(floppy_get_device(machine, 0),  FLOPPY_DRIVE_SS_40);
3267      floppy_drive_set_geometry(floppy_get_device(machine, 1),  FLOPPY_DRIVE_SS_40);
32683268   }
32693269
32703270   /* The opcode timing in the Amstrad is different to the opcode
r5743r5744
34393439   amstrad_common_init(machine);
34403440   amstrad_reset_machine(machine);
34413441
3442   floppy_drive_set_geometry(image_from_devtype_and_index(machine, IO_FLOPPY, 0),  FLOPPY_DRIVE_DS_80);
3443   floppy_drive_set_geometry(image_from_devtype_and_index(machine, IO_FLOPPY, 1),  FLOPPY_DRIVE_DS_80);
3442   floppy_drive_set_geometry(floppy_get_device(machine, 0),  FLOPPY_DRIVE_DS_80);
3443   floppy_drive_set_geometry(floppy_get_device(machine, 1),  FLOPPY_DRIVE_DS_80);
34443444}
34453445
34463446
src/mess/machine/wd17xx.c
r5743r5744
322322static const device_config *wd17xx_current_image(const device_config *device)
323323{
324324   wd17xx_t *w = get_safe_token(device);
325   return image_from_devtype_and_index(device->machine, IO_FLOPPY, w->current_drive);
325   if (w->intf->floppy_drive_tags[w->current_drive]!=NULL) {
326      return devtag_get_device(device->machine,w->intf->floppy_drive_tags[w->current_drive]);
327   } else {
328      return NULL;
329   }
326330}
327331
328332
r5743r5744
393397   UINT8 step_counter;
394398   wd17xx_t *w = get_safe_token(device);
395399
396   if (w->current_drive >= device_count(device->machine, IO_FLOPPY))
400   if (w->current_drive >= 1)
397401      return;
398402
399403   step_counter = 255;
r5743r5744
892896
893897   usecs = 12;
894898
895   /* set new timer */
899   /* set new timer */   
896900   timer_adjust_oneshot(w->timer, ATTOTIME_IN_USEC(usecs), MISCCALLBACK_COMMAND);
897901}
898902
r5743r5744
17001704   }
17011705}
17021706
1703const wd17xx_interface default_wd17xx_interface = { NULL, NULL };
1707const wd17xx_interface default_wd17xx_interface = { NULL, NULL, { FLOPPY_0, FLOPPY_1, FLOPPY_2, FLOPPY_3} };
1708const wd17xx_interface default_wd17xx_interface_2_drives = { NULL, NULL, { FLOPPY_0, FLOPPY_1, NULL, NULL} };
17041709
17051710/* device interface */
17061711static void common_start(const device_config *device, wd17xx_type_t device_type)
r5743r5744
17281733   wd17xx_t *w = get_safe_token(device);
17291734   int i;
17301735
1731   for (i = 0; i < device_count(device->machine, IO_FLOPPY); i++)
1736   for (i = 0; i < 4; i++)
17321737   {
1733      const device_config *img = image_from_devtype_and_index(device->machine, IO_FLOPPY, i);
1734      floppy_drive_set_controller(img,device);
1735      floppy_drive_set_index_pulse_callback(img, wd17xx_index_pulse_callback);
1736      floppy_drive_set_rpm( img, 300.);
1738      const device_config *img = devtag_get_device(device->machine,w->intf->floppy_drive_tags[w->current_drive]);
1739      if (img!=NULL) {
1740         floppy_drive_set_controller(img,device);
1741         floppy_drive_set_index_pulse_callback(img, wd17xx_index_pulse_callback);
1742         floppy_drive_set_rpm( img, 300.);
1743      }
17371744   }
17381745
17391746   w->current_drive = 0;
src/mess/machine/wd17xx.h
r5743r5744
4545typedef void* (*wd17xx_param_callback_func)(const device_config *device);
4646#define WD17XX_PARAM_CALLBACK(name)   void* name(const device_config *device)
4747
48
4948/* Interface */
5049typedef struct _wd17xx_interface wd17xx_interface;
5150struct _wd17xx_interface
5251{
5352   wd17xx_callback_func callback;
5453   wd17xx_param_callback_func callback_param;
54   const char *floppy_drive_tags[4];
5555};
5656
5757/***************************************************************************
r5743r5744
9393void wd17xx_set_pause_time(const device_config *device, int usec); /* default is 40 usec if not set */
9494
9595extern const wd17xx_interface default_wd17xx_interface;
96extern const wd17xx_interface default_wd17xx_interface_2_drives;
9697/***************************************************************************
9798    DEVICE CONFIGURATION MACROS
9899***************************************************************************/
src/mess/machine/comx35.c
r5743r5744
213213   }
214214}
215215
216const wd17xx_interface comx35_wd17xx_interface = { comx35_fdc_callback, NULL };
216const wd17xx_interface comx35_wd17xx_interface = { comx35_fdc_callback, NULL, {FLOPPY_0,FLOPPY_1,FLOPPY_2,FLOPPY_3} };
217217
218218static UINT8 fdc_r(const address_space *space)
219219{
src/mess/machine/trs80.c
r5743r5744
638638   }
639639}
640640
641const wd17xx_interface trs80_wd17xx_interface = { trs80_fdc_callback, NULL };
641const wd17xx_interface trs80_wd17xx_interface = { trs80_fdc_callback, NULL, {FLOPPY_0,FLOPPY_1,FLOPPY_2,FLOPPY_3} };
642642
643643
644644/*************************************
src/mess/machine/svi318.c
r5743r5744
330330   }
331331}
332332
333const wd17xx_interface svi_wd17xx_interface = { svi_fdc_callback, NULL };
333const wd17xx_interface svi_wd17xx_interface = { svi_fdc_callback, NULL, {FLOPPY_0,FLOPPY_1,NULL,NULL} };
334334
335335static WRITE8_HANDLER( svi318_fdc_drive_motor_w )
336336{
r5743r5744
608608static void svi318_load_proc(const device_config *image)
609609{
610610   int size;
611   int id = image_index_in_device(image);
611   int id = floppy_get_drive(image);
612612
613613   size = image_length (image);
614614
r5743r5744
637637   
638638   for(drive=0;drive<2;drive++)
639639   {
640      floppy_install_load_proc(image_from_devtype_and_index(machine, IO_FLOPPY, drive), svi318_load_proc);
640      floppy_install_load_proc(floppy_get_device(machine, drive), svi318_load_proc);
641641   }
642642}
643643
src/mess/machine/pf10.c
r5743r5744
6464   DEVCB_NULL, /* interrupt line */
6565   NULL,
6666   NULL,
67   NEC765_RDY_PIN_NOT_CONNECTED /* ??? */
67   NEC765_RDY_PIN_NOT_CONNECTED, /* ??? */
68   {FLOPPY_0, FLOPPY_1, NULL, NULL}
6869};
6970
7071static MACHINE_DRIVER_START( pf10 )
src/mess/machine/compis.c
r5743r5744
317317   DEVCB_LINE(compis_fdc_int),
318318   compis_fdc_dma_drq,
319319   NULL,
320   NEC765_RDY_PIN_CONNECTED
320   NEC765_RDY_PIN_CONNECTED,
321   {FLOPPY_0, FLOPPY_1, NULL, NULL}
321322};
322323
323324READ16_HANDLER (compis_fdc_dack_r)
src/mess/machine/nec765.c
r5743r5744
167167
168168   if (!fdc->intf->get_image)
169169   {
170      if (fdc->drive < device_count(device->machine, IO_FLOPPY))
171         image = image_from_devtype_and_index(device->machine, IO_FLOPPY, fdc->drive);
170      if (fdc->intf->floppy_drive_tags[fdc->drive]!=NULL) {
171         image = devtag_get_device(device->machine,fdc->intf->floppy_drive_tags[fdc->drive]);         
172      }
172173   }
173174   else
174175   {
r5743r5744
710711with error */
711712static void nec765_set_ready_change_callback(const device_config *controller, const device_config *img, int state)
712713{
713   nec765_t *fdc = get_safe_token(controller);
714   int drive = image_index_in_device(img);
714   nec765_t *fdc = get_safe_token(controller);   
715   int drive = floppy_get_drive(img);
715716
716717   logerror("nec765: ready state change\n");
717718
r5743r5744
22002201      are checked or only the drive selected with the drive select bits?? */
22012202
22022203      a_drive_is_ready = 0;
2203      for (i = 0; i < device_count(device->machine, IO_FLOPPY); i++)
2204      for (i = 0; i < 2; i++)
22042205      {
2205         if (image_exists(image_from_devtype_and_index(device->machine, IO_FLOPPY, i)))
2206         {
2207            a_drive_is_ready = 1;
2208            break;
2206         if (fdc->intf->floppy_drive_tags[i]!=NULL) {
2207            if(devtag_get_device(device->machine,fdc->intf->floppy_drive_tags[i])) {
2208               a_drive_is_ready = 1;
2209               break;
2210            }
22092211         }
22102212
22112213      }
r5743r5744
23192321static DEVICE_RESET( nec765 )
23202322{
23212323   int i;
2322
2323   for (i = 0; i < device_count(device->machine, IO_FLOPPY); i++) {
2324      const device_config *img = image_from_devtype_and_index(device->machine, IO_FLOPPY, i);
2325      floppy_drive_set_controller(img, device);
2326      floppy_drive_set_ready_state_change_callback(img, nec765_set_ready_change_callback);
2324   nec765_t *fdc = get_safe_token(device);
2325   for (i = 0; i < 2; i++) {
2326      if (fdc->intf->floppy_drive_tags[i]!=NULL) {
2327         const device_config *img = devtag_get_device(device->machine,fdc->intf->floppy_drive_tags[i]);
2328         floppy_drive_set_controller(img, device);
2329         floppy_drive_set_ready_state_change_callback(img, nec765_set_ready_change_callback);
2330      }
23272331   }
23282332
23292333   nec765_reset(device,0);
src/mess/machine/nec765.h
r5743r5744
5353   /* image lookup */
5454   nec765_get_image_func get_image;
5555   
56   NEC765_RDY_PIN rdy_pin;   
56   NEC765_RDY_PIN rdy_pin;
57   
58   const char *floppy_drive_tags[4];
5759} nec765_interface;
5860
5961
src/mess/machine/i8271.c
r5743r5744
190190static const device_config *current_image(const device_config *device)
191191{
192192   i8271_t *i8271 = get_safe_token(device);
193   return image_from_devtype_and_index(device->machine, IO_FLOPPY, i8271->drive);
193   if (i8271->intf->floppy_drive_tags[i8271->drive]!=NULL) {
194      return devtag_get_device(device->machine,i8271->intf->floppy_drive_tags[i8271->drive]);
195   } else {
196      return NULL;
197   }   
194198}
195199
196200
r5743r5744
10741078         status |= (1<<2) | (1<<6);
10751079
10761080         /* these two do not appear to be set at all! ?? */
1077         if (floppy_drive_get_flag_state(image_from_devtype_and_index(img->machine, IO_FLOPPY, 0), FLOPPY_DRIVE_READY))
1078         {
1079            status |= (1<<2);
1081         
1082         if (i8271->intf->floppy_drive_tags[0]!=NULL) {
1083            if (floppy_drive_get_flag_state(devtag_get_device(device->machine,i8271->intf->floppy_drive_tags[0]), FLOPPY_DRIVE_READY))
1084            {
1085               status |= (1<<2);
1086            }
10801087         }
10811088
1082         if (floppy_drive_get_flag_state(image_from_devtype_and_index(img->machine, IO_FLOPPY, 1), FLOPPY_DRIVE_READY))
1083         {
1084            status |= (1<<6);
1089         if (i8271->intf->floppy_drive_tags[1]!=NULL) {
1090            if (floppy_drive_get_flag_state(devtag_get_device(device->machine,i8271->intf->floppy_drive_tags[1]), FLOPPY_DRIVE_READY))
1091            {
1092               status |= (1<<6);
1093            }
10851094         }
10861095
10871096         /* bit 3 = 1 if write protected */
src/mess/machine/i8271.h
r5743r5744
2121{
2222   void (*interrupt)(const device_config *device, int state);
2323   void (*dma_request)(const device_config *device, int state, int read_);
24   const char *floppy_drive_tags[2];
2425} i8271_interface;
2526
2627/***************************************************************************
src/mess/machine/concept.c
r5743r5744
597597   }
598598}
599599
600const wd17xx_interface concept_wd17xx_interface = { fdc_callback, NULL };
600const wd17xx_interface concept_wd17xx_interface = { fdc_callback, NULL, {FLOPPY_0,FLOPPY_1,FLOPPY_2,FLOPPY_3}};
601601
602602static  READ8_HANDLER(concept_fdc_reg_r)
603603{
r5743r5744
642642      current_drive = ((data >> LC_DE0_bit) & 1) | ((data >> (LC_DE1_bit-1)) & 2);
643643      wd17xx_set_drive(fdc, current_drive);
644644      /*motor_on = (data & LC_MOTOROF_mask) == 0;*/
645      // floppy_drive_set_motor_state(image_from_devtype_and_index(machine, IO_FLOPPY, current_drive), (data & LC_MOTOROF_mask) == 0 ? 1 : 0);
645      // floppy_drive_set_motor_state(floppy_get_device(machine, current_drive), (data & LC_MOTOROF_mask) == 0 ? 1 : 0);
646646      /*flp_8in = (data & LC_FLP8IN_mask) != 0;*/
647647      wd17xx_set_density(fdc, (data & LC_FMMFM_mask) ? DEN_FM_LO : DEN_MFM_LO);
648      floppy_drive_set_ready_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, current_drive), 1, 0);
648      floppy_drive_set_ready_state(floppy_get_device(space->machine, current_drive), 1, 0);
649649      break;
650650
651651   case 8:
src/mess/machine/msx.c
r5743r5744
721721   }
722722}
723723
724const wd17xx_interface msx_wd17xx_interface = { msx_wd179x_int, NULL };
724const wd17xx_interface msx_wd17xx_interface = { msx_wd179x_int, NULL, {FLOPPY_0,FLOPPY_1,NULL,NULL} };
725725
726726FLOPPY_OPTIONS_START(msx)
727727   FLOPPY_OPTION(msx, "dsk", "MSX SS", basicdsk_identify_default, basicdsk_construct_default,
src/mess/machine/cgenie.c
r5743r5744
450450   }
451451}
452452
453const wd17xx_interface cgenie_wd17xx_interface = { cgenie_fdc_callback, NULL };
453const wd17xx_interface cgenie_wd17xx_interface = { cgenie_fdc_callback, NULL, {FLOPPY_0, FLOPPY_1, FLOPPY_2, FLOPPY_3} };
454454
455455WRITE8_HANDLER( cgenie_motor_w )
456456{
src/mess/machine/kaypro.c
r5743r5744
345345   }
346346}
347347
348const wd17xx_interface kaypro_wd1793_interface = { kaypro_fdc_callback, NULL };
348const wd17xx_interface kaypro_wd1793_interface = { kaypro_fdc_callback, NULL, {FLOPPY_0,FLOPPY_1,NULL,NULL} };
349349
350350/***********************************************************
351351
src/mess/machine/beta.c
r5743r5744
101101   }
102102}
103103
104static const wd17xx_interface beta_wd17xx_interface = { betadisk_wd179x_callback, NULL };
104static const wd17xx_interface beta_wd17xx_interface = { betadisk_wd179x_callback, NULL, {FLOPPY_0,FLOPPY_1,FLOPPY_2,FLOPPY_3} };
105105
106106READ8_DEVICE_HANDLER(betadisk_status_r)
107107{
r5743r5744
211211   }   
212212}
213213
214void beta_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
214static const floppy_config beta_floppy_config =
215215{
216   /* floppy */
217   switch(state)
218   {
219      /* --- the following bits of info are returned as 64-bit signed integers --- */
220      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
216   FLOPPY_DRIVE_DS_80,
217   FLOPPY_OPTIONS_NAME(trd)
218};
221219
222      /* --- the following bits of info are returned as pointers to data or functions --- */
223      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_trd; break;
224
225      default:                              floppy_device_getinfo(devclass, state, info); break;
226   }
227}
228
229220static MACHINE_DRIVER_START( beta_disk )
230221   MDRV_WD179X_ADD("wd179x", beta_wd17xx_interface )
222   MDRV_FLOPPY_4_DRIVES_ADD(beta_floppy_config)
231223MACHINE_DRIVER_END
232224
233225ROM_START( beta_disk )
src/mess/machine/exidy.c
r5743r5744
421421
422422MACHINE_RESET( exidy )
423423{
424   floppy_drive_set_geometry(image_from_devtype_and_index(machine, IO_FLOPPY, 0), FLOPPY_DRIVE_DS_80);
424   floppy_drive_set_geometry(floppy_get_device(machine, 0), FLOPPY_DRIVE_DS_80);
425425   MACHINE_RESET_CALL( exidyd );
426426}
src/mess/machine/pc8801.c
r5743r5744
818818   DEVCB_LINE(pc8801_fdc_interrupt),
819819   pc8801_fdc_dma_drq,
820820   NULL,
821   NEC765_RDY_PIN_CONNECTED
821   NEC765_RDY_PIN_CONNECTED,
822   {FLOPPY_0, FLOPPY_1, NULL, NULL}
822823};
823824
824825static void pc8801_init_5fd(running_machine *machine)
r5743r5744
829830   else
830831      cputag_resume(machine, "sub", SUSPEND_REASON_DISABLE);
831832   cpu_set_input_line_vector(cputag_get_cpu(machine, "sub"), 0, 0);
832   floppy_drive_set_motor_state(image_from_devtype_and_index(machine, IO_FLOPPY, 0), 1);
833   floppy_drive_set_motor_state(image_from_devtype_and_index(machine, IO_FLOPPY, 1), 1);
834   floppy_drive_set_ready_state(image_from_devtype_and_index(machine, IO_FLOPPY, 0), 1,0);
835   floppy_drive_set_ready_state(image_from_devtype_and_index(machine, IO_FLOPPY, 1), 1,0);
833   floppy_drive_set_motor_state(floppy_get_device(machine, 0), 1);
834   floppy_drive_set_motor_state(floppy_get_device(machine, 1), 1);
835   floppy_drive_set_ready_state(floppy_get_device(machine, 0), 1,0);
836   floppy_drive_set_ready_state(floppy_get_device(machine, 1), 1,0);
836837}
837838
838839/*
src/mess/machine/atom.c
r5743r5744
115115const i8271_interface atom_8271_interface=
116116{
117117   atom_8271_interrupt_callback,
118   NULL
118   NULL,
119   {FLOPPY_0, FLOPPY_1}
119120};
120121
121122/*
src/mess/machine/partner.c
r5743r5744
4444   }
4545}
4646
47const wd17xx_interface partner_wd17xx_interface = { partner_wd17xx_callback, NULL };
47const wd17xx_interface partner_wd17xx_interface = { partner_wd17xx_callback, NULL, {FLOPPY_0,FLOPPY_1,NULL,NULL} };
4848
4949MACHINE_START(partner)
5050{
src/mess/machine/pc_fdc.c
r5743r5744
6565   DEVCB_LINE(pc_fdc_hw_interrupt),
6666   pc_fdc_hw_dma_drq,
6767   pc_fdc_get_image,
68   NEC765_RDY_PIN_CONNECTED
68   NEC765_RDY_PIN_CONNECTED,
69   {FLOPPY_0, FLOPPY_1, NULL, NULL}
6970};
7071
72const nec765_interface pc_fdc_nec765_connected_1_drive_interface =
73{
74   DEVCB_LINE(pc_fdc_hw_interrupt),
75   pc_fdc_hw_dma_drq,
76   pc_fdc_get_image,
77   NEC765_RDY_PIN_CONNECTED,
78   {FLOPPY_0, NULL, NULL, NULL}
79};
80
81
7182const nec765_interface pc_fdc_nec765_not_connected_interface =
7283{
7384   DEVCB_LINE(pc_fdc_hw_interrupt),
7485   pc_fdc_hw_dma_drq,
7586   pc_fdc_get_image,
76   NEC765_RDY_PIN_NOT_CONNECTED
87   NEC765_RDY_PIN_NOT_CONNECTED,
88   {FLOPPY_0, FLOPPY_1, NULL, NULL}
7789};
7890
7991static const device_config* pc_get_device(running_machine *machine)
r5743r5744
117129
118130   pc_fdc_reset(machine);
119131
120   for (i = 0; i < device_count(machine, IO_FLOPPY); i++)
132   for (i = 0; i < 4; i++)
121133   {
122      img = image_from_devtype_and_index(machine, IO_FLOPPY, i);
123      floppy_drive_set_geometry(img, FLOPPY_DRIVE_DS_80);
134      img = floppy_get_device(machine, i);
135      if (img) {
136         floppy_drive_set_geometry(img, FLOPPY_DRIVE_DS_80);
137      }
124138   }
125139}
126140
r5743r5744
132146
133147   if (!fdc->fdc_interface.get_image)
134148   {
135      if (floppy_index < device_count(device->machine, IO_FLOPPY))
136         image = image_from_devtype_and_index(device->machine, IO_FLOPPY, floppy_index);
149      image = floppy_get_device(device->machine, floppy_index);
137150   }
138151   else
139152   {
r5743r5744
255268   int selected_drive;
256269   int floppy_count;
257270
258   floppy_count = device_count(machine, IO_FLOPPY);
271   floppy_count = 4;//device_count(machine, IO_FLOPPY);
259272
260273   if (floppy_count > (fdc->digital_output_register & 0x03))
261      floppy_drive_set_ready_state(image_from_devtype_and_index(machine, IO_FLOPPY, fdc->digital_output_register & 0x03), 1, 0);
274      floppy_drive_set_ready_state(floppy_get_device(machine, fdc->digital_output_register & 0x03), 1, 0);
262275
263276   fdc->digital_output_register = data;
264277
r5743r5744
266279
267280   /* set floppy drive motor state */
268281   if (floppy_count > 0)
269      floppy_drive_set_motor_state(image_from_devtype_and_index(machine, IO_FLOPPY, 0),   (data>>4) & 0x0f);
282      floppy_drive_set_motor_state(floppy_get_device(machine, 0),   (data>>4) & 0x0f);
270283   if (floppy_count > 1)
271      floppy_drive_set_motor_state(image_from_devtype_and_index(machine, IO_FLOPPY, 1),   (data>>5) & 0x01);
284      floppy_drive_set_motor_state(floppy_get_device(machine, 1),   (data>>5) & 0x01);
272285   if (floppy_count > 2)
273      floppy_drive_set_motor_state(image_from_devtype_and_index(machine, IO_FLOPPY, 2),   (data>>6) & 0x01);
286      floppy_drive_set_motor_state(floppy_get_device(machine, 2),   (data>>6) & 0x01);
274287   if (floppy_count > 3)
275      floppy_drive_set_motor_state(image_from_devtype_and_index(machine, IO_FLOPPY, 3),   (data>>7) & 0x01);
288      floppy_drive_set_motor_state(floppy_get_device(machine, 3),   (data>>7) & 0x01);
276289
277290   if ((data>>4) & (1<<selected_drive))
278291   {
279292      if (floppy_count > selected_drive)
280         floppy_drive_set_ready_state(image_from_devtype_and_index(machine, IO_FLOPPY, selected_drive), 1, 0);
293         floppy_drive_set_ready_state(floppy_get_device(machine, selected_drive), 1, 0);
281294   }
282295
283296   /* changing the DMA enable bit, will affect the terminal count state
r5743r5744
362375{
363376   int floppy_count;
364377
365   floppy_count = device_count(machine, IO_FLOPPY);
378   floppy_count = 4;//device_count(machine, IO_FLOPPY);
366379
367380   /* set floppy drive motor state */
368381   if (floppy_count > 0)
369      floppy_drive_set_motor_state(image_from_devtype_and_index(machine, IO_FLOPPY, 0), data & 0x01);
382      floppy_drive_set_motor_state(floppy_get_device(machine, 0), data & 0x01);
370383
371384   if ( data & 0x01 )
372385   {
373386      if ( floppy_count )
374         floppy_drive_set_ready_state(image_from_devtype_and_index(machine, IO_FLOPPY, 0), 1, 0);
387         floppy_drive_set_ready_state(floppy_get_device(machine, 0), 1, 0);
375388   }
376389
377390   /* Is the watchdog timer disabled */
src/mess/machine/pc_fdc.h
r5743r5744
3434
3535extern const nec765_interface pc_fdc_nec765_connected_interface;
3636extern const nec765_interface pc_fdc_nec765_not_connected_interface;
37extern const nec765_interface pc_fdc_nec765_connected_1_drive_interface;
3738
3839void pc_fdc_init(running_machine *machine, const struct pc_fdc_interface *iface);
3940void pc_fdc_set_tc_state(running_machine *machine, int state);
src/mess/machine/mc6843.c
r5743r5744
123123static const device_config* mc6843_floppy_image ( const device_config *device )
124124{
125125   mc6843_t* mc6843 = get_safe_token( device );
126   return image_from_devtype_and_index( device->machine, IO_FLOPPY, mc6843->drive );
126   return floppy_get_device( device->machine, mc6843->drive );
127127}
128128
129129
r5743r5744
781781   LOG (( "mc6843 reset\n" ));
782782
783783   /* setup/reset floppy drive */
784   for ( i = 0; i < device_count( device->machine, IO_FLOPPY ); i++ )
784   for ( i = 0; i < 4; i++ )
785785   {
786      const device_config * img = image_from_devtype_and_index( device->machine, IO_FLOPPY, i );
786      const device_config * img = floppy_get_device( device->machine, i );
787787      floppy_drive_set_motor_state( img, 1 );
788788      floppy_drive_set_ready_state( img, FLOPPY_DRIVE_READY, 0 );
789789      floppy_drive_set_rpm( img, 300. );
src/mess/machine/bebox.c
r5743r5744
428428{
429429   /* the BeBox boot ROM seems to query for floppy #1 when it should be
430430    * querying for floppy #0 */
431   return image_from_devtype_and_index(machine, IO_FLOPPY, 0);
431   return floppy_get_device(machine, 0);
432432}
433433
434434static const device_config * bebox_get_device(running_machine *machine )
src/mess/machine/smc92x4.c
r5743r5744
131131*/
132132static int floppy_read_id(running_machine *machine,int which, int disk_unit, int head)
133133{
134   const device_config *disk_img = image_from_devtype_and_index(machine, IO_FLOPPY, disk_unit);
134   const device_config *disk_img = floppy_get_device(machine, disk_unit);
135135   UINT8 revolution_count;
136136   chrn_id id;
137137
r5743r5744
163163*/
164164static int floppy_find_sector(running_machine *machine,int which, int disk_unit, int cylinder, int head, int check_secnum, int sector, int *sector_data_id, int *sector_len)
165165{
166   const device_config *disk_img = image_from_devtype_and_index(machine, IO_FLOPPY, disk_unit);
166   const device_config *disk_img = floppy_get_device(machine, disk_unit);
167167   UINT8 revolution_count;
168168   chrn_id id;
169169
r5743r5744
207207   int sector_data_id, sector_len;
208208   UINT8 buf[MAX_SECTOR_LEN];
209209   int i;
210   const device_config *disk_img = image_from_devtype_and_index(machine, IO_FLOPPY, disk_unit);
210   const device_config *disk_img = floppy_get_device(machine, disk_unit);
211211
212212   if (! floppy_find_sector(machine,which, disk_unit, cylinder, head, check_secnum, sector, & sector_data_id, & sector_len))
213213   {
r5743r5744
229229   int sector_data_id, sector_len;
230230   UINT8 buf[MAX_SECTOR_LEN];
231231   int i;
232   const device_config *disk_img = image_from_devtype_and_index(machine, IO_FLOPPY, disk_unit);
232   const device_config *disk_img = floppy_get_device(machine, disk_unit);
233233
234234   if (! floppy_find_sector(machine,which, disk_unit, cylinder, head, check_secnum, sector, & sector_data_id, & sector_len))
235235   {
r5743r5744
248248
249249static void floppy_step(running_machine *machine,int which, int disk_unit, int direction)
250250{
251   const device_config *disk_img = image_from_devtype_and_index(machine, IO_FLOPPY, disk_unit);
251   const device_config *disk_img = floppy_get_device(machine, disk_unit);
252252   floppy_drive_seek(disk_img, direction);
253253}
254254
255255static UINT8 floppy_get_disk_status(running_machine *machine,int which, int disk_unit)
256256{
257   const device_config *disk_img = image_from_devtype_and_index(machine, IO_FLOPPY, disk_unit);
257   const device_config *disk_img = floppy_get_device(machine, disk_unit);
258258   int status = floppy_status(disk_img, -1);
259259   int reply;
260260
src/mess/machine/bbc.c
r5743r5744
14891489const i8271_interface bbc_i8271_interface=
14901490{
14911491   bbc_i8271_interrupt,
1492    NULL
1492    NULL,
1493   {FLOPPY_0, FLOPPY_1}
14931494};
14941495
14951496
r5743r5744
16551656
16561657const wd17xx_interface bbc_wd17xx_interface = {
16571658   bbc_wd177x_callback,
1658   NULL
1659   NULL,
1660   {FLOPPY_0,FLOPPY_1,NULL,NULL}
16591661};
16601662
16611663static WRITE8_HANDLER(bbc_wd177x_status_w)
src/mess/machine/kc.c
r5743r5744
217217   DEVCB_LINE(kc85_fdc_interrupt),
218218   kc85_fdc_dma_drq,
219219   NULL,
220   NEC765_RDY_PIN_CONNECTED   
220   NEC765_RDY_PIN_CONNECTED,
221   {FLOPPY_0, FLOPPY_1, NULL, NULL}
221222};
222223
223224static TIMER_CALLBACK(kc85_disk_reset_timer_callback)
src/mess/devices/flopdrv.c
r5743r5744
3232typedef struct _floppy_drive floppy_drive;
3333struct _floppy_drive
3434{
35   const floppy_config   *config;
36   
3537   /* flags */
3638   int flags;
3739   /* maximum track allowed */
r5743r5744
6264   void (*load_proc)(const device_config *image);
6365   void (*unload_proc)(const device_config *image);
6466   int (*tracktranslate_proc)(const device_config *image, floppy_image *floppy, int physical_track);
67   void *custom_data;
6568};
6669
6770
r5743r5744
9194/***************************************************************************
9295    IMPLEMENTATION
9396***************************************************************************/
94static floppy_drive *get_drive(const device_config *img)
97
98INLINE floppy_drive *get_safe_token(const device_config *device)
9599{
96   return image_lookuptag(img, FLOPDRVTAG);
100   assert( device != NULL );
101   assert( device->token != NULL );
102   assert( device->type == DEVICE_GET_INFO_NAME(floppy) );
103   return (floppy_drive *) device->token;
97104}
98105
99106floppy_image *flopimg_get_image(const device_config *image)
100107{
101   return get_drive(image)->floppy;
108   return get_safe_token(image)->floppy;
102109}
103110
111void *flopimg_get_custom_data(const device_config *image)
112{
113   floppy_drive *flopimg = get_safe_token( image );
114   return flopimg->custom_data;
115}
116
117void flopimg_alloc_custom_data(const device_config *image,int size)
118{
119   floppy_drive *flopimg = get_safe_token( image );
120   flopimg->custom_data = malloc(size);
121}
122
104123static void flopimg_seek_callback(const device_config *image, int physical_track)
105124{
106   floppy_drive *flopimg = get_drive(image);
125   floppy_drive *flopimg = get_safe_token( image );
107126   if (!flopimg || !flopimg->floppy)
108127      return;
109128
r5743r5744
118137{
119138   floperr_t err;
120139   int sector_count;
121   floppy_drive *flopimg = get_drive(image);
140   floppy_drive *flopimg = get_safe_token( image );
122141
123142   if (!flopimg || !flopimg->floppy)
124143      return 0;
r5743r5744
136155   unsigned long flags;
137156   UINT32 sector_length;
138157
139   flopimg = get_drive(image);
158   flopimg = get_safe_token( image );
140159   if (!flopimg || !flopimg->floppy)
141160      return;
142161
r5743r5744
199218
200219/* this is called on device init */
201220void floppy_drive_init(const device_config *img)
202{
203   floppy_drive *pDrive;
221{   
222   floppy_drive *pDrive = get_safe_token( img );
223//   assert(image_slotexists(img));
204224
205   assert(image_slotexists(img));
225//   pDrive = image_alloctag(img, FLOPDRVTAG, sizeof(floppy_drive));
206226
207   pDrive = image_alloctag(img, FLOPDRVTAG, sizeof(floppy_drive));
208
209227   /* initialise flags */
210228   pDrive->flags = 0;
211229   pDrive->index_pulse_callback = NULL;
r5743r5744
230248/* index pulses at rpm/60 Hz, and stays high 1/20th of time */
231249static void floppy_drive_index_func(const device_config *img)
232250{
233   floppy_drive *pDrive = get_drive(img);
251   floppy_drive *pDrive = get_safe_token( img );
234252
235253   double ms = 1000. / (pDrive->rpm / 60.);
236254
r5743r5744
284302/* set flag state */
285303void floppy_drive_set_flag_state(const device_config *img, int flag, int state)
286304{
287   floppy_drive *drv = get_drive(img);
305   floppy_drive *drv = get_safe_token( img );
288306   int prev_state;
289307   int new_state;
290308
r5743r5744
343361      /* if timer already setup remove it */
344362      if (image_slotexists(img))
345363      {
346         floppy_drive *pDrive = get_drive(img);
364         floppy_drive *pDrive = get_safe_token( img );
347365
348366         pDrive->index = 0;
349367         if (new_motor_state)
r5743r5744
402420/* get flag state */
403421int   floppy_drive_get_flag_state(const device_config *img, int flag)
404422{
405   floppy_drive *drv = get_drive(img);
423   floppy_drive *drv = get_safe_token( img );
406424   int drive_flags;
407425   int flags;
408426
r5743r5744
466484{
467485   floppy_drive *pDrive;
468486
469   pDrive = get_drive(img);
487   pDrive = get_safe_token( img );
470488
471489   LOG(("seek from: %d delta: %d\n",pDrive->current_track, signed_tracks));
472490
r5743r5744
505523   floppy_drive *pDrive;
506524   int spt;
507525
508   pDrive = get_drive(img);
526   pDrive = get_safe_token( img );
509527
510528   /* get sectors per track */
511529   spt = flopimg_get_sectors_per_track(img, side);
r5743r5744
540558   floppy_drive *flopimg;
541559   if (image_exists(img))
542560   {
543      flopimg = get_drive(img);
561      flopimg = get_safe_token( img );
544562      if (!flopimg || !flopimg->floppy)
545563         return;
546564
r5743r5744
553571   floppy_drive *flopimg;
554572   if (image_exists(img))
555573   {
556      flopimg = get_drive(img);
574      flopimg = get_safe_token( img );
557575      if (!flopimg || !flopimg->floppy)
558576         return;
559577
r5743r5744
575593   floppy_drive *flopimg;
576594   if (image_exists(img))
577595   {
578      flopimg = get_drive(img);
596      flopimg = get_safe_token( img );
579597      if (!flopimg || !flopimg->floppy)
580598         return;
581599
r5743r5744
592610   floppy_drive *flopimg;
593611   if (image_exists(img))
594612   {
595      flopimg = get_drive(img);
613      flopimg = get_safe_token( img );
596614      if (!flopimg || !flopimg->floppy)
597615         return;
598616
r5743r5744
640658
641659void floppy_install_load_proc(const device_config *image, void (*proc)(const device_config *image))
642660{
643   floppy_drive *flopimg = get_drive(image);
661   floppy_drive *flopimg = get_safe_token( image );
644662   flopimg->load_proc = proc;
645663}
646664
647665void floppy_install_unload_proc(const device_config *image, void (*proc)(const device_config *image))
648666{
649   floppy_drive *flopimg = get_drive(image);
667   floppy_drive *flopimg = get_safe_token( image );
650668   flopimg->unload_proc = proc;
651669}
652670
653671void floppy_install_tracktranslate_proc(const device_config *image, int (*proc)(const device_config *image, floppy_image *floppy, int physical_track))
654672{
655   floppy_drive *flopimg = get_drive(image);
673   floppy_drive *flopimg = get_safe_token( image );
656674   flopimg->tracktranslate_proc = proc;
657675}
658676
659677/* set the callback for the index pulse */
660678void floppy_drive_set_index_pulse_callback(const device_config *img, void (*callback)(const device_config *controller,const device_config *image, int state))
661679{
662   floppy_drive *pDrive = get_drive(img);
680   floppy_drive *pDrive = get_safe_token( img );
663681   pDrive->index_pulse_callback = callback;
664682}
665683
666684
667685void floppy_drive_set_ready_state_change_callback(const device_config *img, void (*callback)(const device_config *controller,const device_config *img, int state))
668686{
669   floppy_drive *pDrive = get_drive(img);
687   floppy_drive *pDrive = get_safe_token( img );
670688   pDrive->ready_state_change_callback = callback;
671689}
672690
673691void floppy_drive_set_geometry_absolute(const device_config *img, int tracks, int sides)
674692{
675   floppy_drive *pDrive = get_drive(img);
693   floppy_drive *pDrive = get_safe_token( img );
676694   pDrive->max_track = tracks;
677695   pDrive->num_sides = sides;
678696}
679697
680698int   floppy_drive_get_current_track(const device_config *img)
681699{
682   floppy_drive *drv = get_drive(img);
700   floppy_drive *drv = get_safe_token( img );
683701   return drv->current_track;
684702}
685703
686704void floppy_drive_set_rpm(const device_config *img, float rpm)
687705{
688   floppy_drive *drv = get_drive(img);
706   floppy_drive *drv = get_safe_token( img );
689707   drv->rpm = rpm;
690708}
691709
692710void floppy_drive_set_controller(const device_config *img, const device_config *controller)
693711{
694   floppy_drive *drv = get_drive(img);
712   floppy_drive *drv = get_safe_token( img );
695713   drv->controller = controller;
696714}
697715
698716/* ----------------------------------------------------------------------- */
699static DEVICE_START( floppy )
717DEVICE_START( floppy )
700718{
719   floppy_drive   *floppy = get_safe_token( device );
720   floppy->config = device->static_config;
701721   floppy_drive_init(device);
702722}
703723
r5743r5744
709729   const struct FloppyFormat *floppy_options;
710730   int floppy_flags, i;
711731   const char *extension;
712   int keep_geometry = 0;
713732
714733   /* look up instance data */
715   flopimg = get_drive(image);
734   flopimg = get_safe_token( image );
716735
717736   /* figure out the floppy options */
718737   devclass = mess_devclass_from_core_device(image);
719   floppy_options = mess_device_get_info_ptr(devclass, MESS_DEVINFO_PTR_FLOPPY_OPTIONS);
738   floppy_options = ((floppy_config*)image->static_config)->formats;
720739
721740   if (image_has_been_created(image))
722741   {
r5743r5744
735754      if (err)
736755         goto error;
737756   }
738
739   /* if we can get head and track counts, then set the geometry accordingly
740       However, at least the ti99 system family requires that medium track
741       count and drive track count be handled separately.
742       It is possible to insert a 40 track medium in an 80 track drive; the
743       TI controllers read the track count from sector 0 and automatically
744       apply double steps. Setting the track count of the drive to the
745       medium track count will then lead to unreachable tracks.
746    */
747   keep_geometry = (int)mess_device_get_info_int(mess_devclass_from_core_device(image), MESS_DEVINFO_INT_KEEP_DRIVE_GEOMETRY);
748
749   if (!keep_geometry
750            && floppy_callbacks(flopimg->floppy)->get_heads_per_disk
751      && floppy_callbacks(flopimg->floppy)->get_tracks_per_disk)
757   if (floppy_callbacks(flopimg->floppy)->get_heads_per_disk && floppy_callbacks(flopimg->floppy)->get_tracks_per_disk)
752758   {
753759      floppy_drive_set_geometry_absolute(image,
754760         floppy_get_tracks_per_disk(flopimg->floppy),
r5743r5744
767773
768774
769775
770static DEVICE_IMAGE_LOAD( floppy )
776DEVICE_IMAGE_LOAD( floppy )
771777{
772778   floppy_drive *flopimg;
773779   int retVal = internal_floppy_device_load(image, -1, NULL);
774   flopimg = get_drive(image);
780   flopimg = get_safe_token( image );
775781   if (retVal==INIT_PASS) {
776782      /* if we have one of our hacky unload procs, call it */
777783      if (flopimg->load_proc)
r5743r5744
780786   return retVal;
781787}
782788
783static DEVICE_IMAGE_CREATE( floppy )
789DEVICE_IMAGE_CREATE( floppy )
784790{
785791   return internal_floppy_device_load(image, create_format, create_args);
786792}
787793
788static DEVICE_IMAGE_UNLOAD( floppy )
794DEVICE_IMAGE_UNLOAD( floppy )
789795{
790   floppy_drive *flopimg = get_drive(image);
796   floppy_drive *flopimg = get_safe_token( image );
791797   if (flopimg->unload_proc)
792798      flopimg->unload_proc(image);
793799
r5743r5744
795801   flopimg->floppy = NULL;
796802}
797803
804const device_config *floppy_get_device(running_machine *machine,int drive)
805{
806   switch(drive) {
807      case 0 : return devtag_get_device(machine,FLOPPY_0);
808      case 1 : return devtag_get_device(machine,FLOPPY_1);
809      case 2 : return devtag_get_device(machine,FLOPPY_2);
810      case 3 : return devtag_get_device(machine,FLOPPY_3);     
811   }
812   return NULL;
813}
814
815int floppy_get_drive(const device_config *image)
816{
817   int drive =0;
818   if (strcmp(image->tag, FLOPPY_0) == 0) drive = 0;
819   if (strcmp(image->tag, FLOPPY_1) == 0) drive = 1;
820   if (strcmp(image->tag, FLOPPY_2) == 0) drive = 2;
821   if (strcmp(image->tag, FLOPPY_3) == 0) drive = 3;
822   return drive;
823}
824
798825/*************************************
799826 *
800827 *  Device specification function
801828 *
802829 *************************************/
803
830/*
804831void floppy_device_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
805832{
806833   char *s;
r5743r5744
809836
810837   switch(state)
811838   {
812      /* --- the following bits of info are returned as 64-bit signed integers --- */
839      // --- the following bits of info are returned as 64-bit signed integers ---
813840      case MESS_DEVINFO_INT_TYPE:            info->i = IO_FLOPPY; break;
814841      case MESS_DEVINFO_INT_READABLE:         info->i = 1; break;
815842      case MESS_DEVINFO_INT_WRITEABLE:         info->i = 1; break;
r5743r5744
819846         break;
820847
821848      case MESS_DEVINFO_INT_CREATE_OPTCOUNT:
822         /* count total floppy options */
849         // count total floppy options
823850         floppy_options = mess_device_get_info_ptr(devclass, MESS_DEVINFO_PTR_FLOPPY_OPTIONS);
824851         for (count = 0; floppy_options[count].construct; count++)
825852            ;
r5743r5744
830857         info->i = 0;
831858         break;
832859
833      /* --- the following bits of info are returned as NULL-terminated strings --- */
860      //--- the following bits of info are returned as NULL-terminated strings ---
834861      case MESS_DEVINFO_STR_FILE_EXTENSIONS:
835         /* retrieve the floppy options */
862         // retrieve the floppy options
836863         floppy_options = mess_device_get_info_ptr(devclass, MESS_DEVINFO_PTR_FLOPPY_OPTIONS);
837864
838         /* set up a temporary string */
865         // set up a temporary string
839866         s = device_temp_str();
840867         info->s = s;
841868         s[0] = '\0';
842869
843         /* append each of the extensions */
870         // append each of the extensions
844871         for (i = 0; floppy_options[i].construct; i++)
845872            specify_extension(s, 256, floppy_options[i].extensions);
846873         break;
847874
848      /* --- the following bits of info are returned as pointers to data or functions --- */
875      // --- the following bits of info are returned as pointers to data or functions ---
849876      case MESS_DEVINFO_PTR_START:            info->start = DEVICE_START_NAME(floppy); break;
850877      case MESS_DEVINFO_PTR_LOAD:            info->load = DEVICE_IMAGE_LOAD_NAME(floppy); break;
851878      case MESS_DEVINFO_PTR_CREATE:         info->create = DEVICE_IMAGE_CREATE_NAME(floppy); break;
r5743r5744
874901   }
875902}
876903
904*/
905/*-------------------------------------------------
906    safe_strcpy - hack
907-------------------------------------------------*/
908
909static void safe_strcpy(char *dst, const char *src)
910{
911   strcpy(dst, src ? src : "");
912}
913
914DEVICE_GET_INFO(floppy)
915{
916   switch( state )
917   {
918      /* --- the following bits of info are returned as 64-bit signed integers --- */
919      case DEVINFO_INT_TOKEN_BYTES:            info->i = sizeof(floppy_drive); break;
920      case DEVINFO_INT_INLINE_CONFIG_BYTES:      info->i = 0; break;
921      case DEVINFO_INT_CLASS:                  info->i = DEVICE_CLASS_PERIPHERAL; break;
922      case DEVINFO_INT_IMAGE_TYPE:            info->i = IO_FLOPPY; break;
923      case DEVINFO_INT_IMAGE_READABLE:         info->i = 1; break;
924      case DEVINFO_INT_IMAGE_WRITEABLE:         info->i = 1; break;
925      case DEVINFO_INT_IMAGE_CREATABLE:         info->i = ((floppy_config*)device->static_config)->formats->param_guidelines ? 1 : 0; break; // Fix this
926
927      /* --- the following bits of info are returned as pointers to data or functions --- */
928      case DEVINFO_FCT_START:                  info->start = DEVICE_START_NAME(floppy); break;
929      case DEVINFO_FCT_IMAGE_CREATE:            info->f = (genf *) DEVICE_IMAGE_CREATE_NAME(floppy); break;
930      case DEVINFO_FCT_IMAGE_LOAD:            info->f = (genf *) DEVICE_IMAGE_LOAD_NAME(floppy); break;
931      case DEVINFO_FCT_IMAGE_UNLOAD:            info->f = (genf *) DEVICE_IMAGE_UNLOAD_NAME(floppy); break;
932      case DEVINFO_PTR_IMAGE_CREATE_OPTGUIDE:      info->p = (void *)floppy_option_guide; break;
933      case DEVINFO_INT_IMAGE_CREATE_OPTCOUNT:      {
934         const struct FloppyFormat *floppy_options = ((floppy_config*)device->static_config)->formats;
935         int count;         
936         for (count = 0; floppy_options[count].construct; count++)
937            ;
938         info->i = count;
939         break;
940         }
941
942      /* --- the following bits of info are returned as NULL-terminated strings --- */
943      case DEVINFO_STR_NAME:                  strcpy(info->s, "Floppy Disk"); break;
944      case DEVINFO_STR_FAMILY:               strcpy(info->s, "Floppy Disk"); break;
945      case DEVINFO_STR_SOURCE_FILE:            strcpy(info->s, __FILE__); break;
946      case DEVINFO_STR_IMAGE_FILE_EXTENSIONS:         
947         if ( device && device->static_config )
948         {
949            const struct FloppyFormat *floppy_options = ((floppy_config*)device->static_config)->formats;
950            int      i;
951            /* set up a temporary string */
952            info->s[0] = '\0';
953            for ( i = 0; floppy_options[i].construct; i++ )
954               specify_extension( info->s, 256, floppy_options[i].extensions );
955         }
956         break;
957      default:
958         {     
959            if ( device && device->static_config )
960            {
961               const struct FloppyFormat *floppy_options = ((floppy_config*)device->static_config)->formats;
962               if ((state >= DEVINFO_PTR_IMAGE_CREATE_OPTSPEC) && (state < DEVINFO_PTR_IMAGE_CREATE_OPTSPEC + DEVINFO_CREATE_OPTMAX)) {
963                  info->p = (void *) floppy_options[state - DEVINFO_PTR_IMAGE_CREATE_OPTSPEC].param_guidelines;         
964               } else if ((state >= DEVINFO_STR_IMAGE_CREATE_OPTNAME) && (state < DEVINFO_STR_IMAGE_CREATE_OPTNAME + DEVINFO_CREATE_OPTMAX)) {
965                  safe_strcpy(info->s,floppy_options[state - DEVINFO_STR_IMAGE_CREATE_OPTNAME].name);
966               }
967               else if ((state >= DEVINFO_STR_IMAGE_CREATE_OPTDESC) && (state < DEVINFO_STR_IMAGE_CREATE_OPTDESC + DEVINFO_CREATE_OPTMAX)) {
968                  safe_strcpy(info->s,floppy_options[state - DEVINFO_STR_IMAGE_CREATE_OPTDESC].description);
969               }
970               else if ((state >= DEVINFO_STR_IMAGE_CREATE_OPTEXTS) && (state < DEVINFO_STR_IMAGE_CREATE_OPTEXTS + DEVINFO_CREATE_OPTMAX)) {
971                  safe_strcpy(info->s,floppy_options[state - DEVINFO_STR_IMAGE_CREATE_OPTEXTS].extensions);
972               }
973            }
974         }
975         
976         break;                 
977   }
978}
src/mess/devices/sonydriv.c
r5743r5744
4545
4646#ifdef MAME_DEBUG
4747#define LOG_SONY      1
48#define LOG_SONY_EXTRA   
48#define LOG_SONY_EXTRA   1
4949#else
50#define LOG_SONY      0
51#define LOG_SONY_EXTRA   0
50#define LOG_SONY      1
51#define LOG_SONY_EXTRA   1
5252#endif
5353
54static const mess_device_class parent_devclass = { floppy_device_getinfo, NULL };
54//static const mess_device_class parent_devclass = { floppy_device_getinfo, NULL };
5555
5656/*
5757   These lines are normally connected to the PHI0-PHI3 lines of the IWM
r5743r5744
107107#ifdef UNUSED_FUNCTION
108108static floppy *get_sony_floppy(const device_config *img)
109109{
110   int id = image_index_in_device(img);
110   int id = floppy_get_drive(img);
111111   return &sony_floppy[id];
112112}
113113#endif
r5743r5744
121121   floppy *f;
122122
123123   f = &sony_floppy[floppy_select];
124   cur_image = image_from_devtag_and_index(device->machine, "sonydriv", floppy_select);
124   cur_image = floppy_get_device(device->machine, floppy_select);
125125
126126   track_size = floppy_get_track_size(flopimg_get_image(cur_image), f->head, floppy_drive_get_current_track(cur_image));
127127   new_data = image_realloc(cur_image, f->loadedtrack_data, track_size);
r5743r5744
145145   int len;
146146
147147   f = &sony_floppy[floppy_select];
148   cur_image = image_from_devtag_and_index(device->machine, "sonydriv", floppy_select);
148   cur_image = floppy_get_device(device->machine, floppy_select);
149149
150150   if (f->loadedtrack_dirty)
151151   {
r5743r5744
167167      return 0xFF;         /* right ??? */
168168
169169   f = &sony_floppy[sony_floppy_select];
170   cur_image = image_from_devtag_and_index(device->machine, "sonydriv", sony_floppy_select);
170   cur_image = floppy_get_device(device->machine, sony_floppy_select);
171171   if (!image_exists(cur_image))
172172      return 0xFF;
173173
r5743r5744
186186   floppy *f;
187187
188188   f = &sony_floppy[sony_floppy_select];
189   cur_image = image_from_devtag_and_index(device->machine, "sonydriv", sony_floppy_select);
189   cur_image = floppy_get_device(device->machine, sony_floppy_select);
190190   if (!image_exists(cur_image))
191191      return;
192192
r5743r5744
269269   if ((! sony_enable2()) && sony_floppy_enable)
270270   {
271271      f = &sony_floppy[sony_floppy_select];
272      cur_image = image_from_devtag_and_index(device->machine, "sonydriv", sony_floppy_select);
272      cur_image = floppy_get_device(device->machine, sony_floppy_select);
273273      if (!image_exists(cur_image))
274274         cur_image = NULL;
275275
r5743r5744
380380   if (sony_floppy_enable)
381381   {
382382      f = &sony_floppy[sony_floppy_select];
383      cur_image = image_from_devtag_and_index(device->machine, "sonydriv", sony_floppy_select);
383      cur_image = floppy_get_device(device->machine, sony_floppy_select);
384384      if (!image_exists(cur_image))
385385         cur_image = NULL;
386386
r5743r5744
491491static DEVICE_IMAGE_UNLOAD( sonydriv_floppy )
492492{
493493   int id;
494   device_image_unload_func parent_unload;
494   //device_image_unload_func parent_unload;
495495   const device_config *fdc;
496496
497497   /* locate the FDC */
498498   fdc = devtag_get_device(image->machine, "fdc");
499499
500   id = image_index_in_device(image);
500   id = floppy_get_drive(image);
501501   save_track_data(fdc, id);
502502   memset(&sony_floppy[id], 0, sizeof(sony_floppy[id]));
503503
504   parent_unload = (device_image_unload_func) mess_device_get_info_fct(&parent_devclass, MESS_DEVINFO_PTR_UNLOAD);
505   parent_unload(image);
504   DEVICE_IMAGE_UNLOAD_NAME(floppy)(image);   
506505}
507506
508507
509
508/*
510509void sonydriv_device_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
511510{
512511   switch(state)
513512   {
514      /* --- the following bits of info are returned as 64-bit signed integers --- */
515513      case MESS_DEVINFO_INT_COUNT:            info->i = 2; break;
516514
517      /* --- the following bits of info are returned as NULL-terminated strings --- */
518515      case MESS_DEVINFO_STR_DEV_TAG:         strcpy(info->s = device_temp_str(), "sonydriv"); break;
519516
520      /* --- the following bits of info are returned as pointers to data or functions --- */
521517      case MESS_DEVINFO_PTR_UNLOAD:         info->unload = DEVICE_IMAGE_UNLOAD_NAME(sonydriv_floppy); break;
522518      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:
523519         if (mess_device_get_info_int(devclass, MESS_DEVINFO_INT_SONYDRIV_ALLOWABLE_SIZES) & SONY_FLOPPY_SUPPORT2IMG)
r5743r5744
529525      default: floppy_device_getinfo(devclass, state, info); break;
530526   }
531527}
528*/
529DEVICE_GET_INFO( sonydriv )
530{
531   switch (state)
532   {
533      case DEVINFO_FCT_IMAGE_UNLOAD:            info->f = (genf *) DEVICE_IMAGE_UNLOAD_NAME(sonydriv_floppy); break;
532534
535      default:                            DEVICE_GET_INFO_CALL(floppy);            break;
536   }
537}
src/mess/devices/flopdrv.h
r5743r5744
88#include "image.h"
99#include "formats/flopimg.h"
1010
11/***************************************************************************
12    TYPE DEFINITIONS
13***************************************************************************/
14/* floppy drive types */
15typedef enum
16{
17   FLOPPY_DRIVE_SS_40,
18   FLOPPY_DRIVE_DS_80
19} floppy_type;
1120
21typedef struct floppy_config_t   floppy_config;
22struct floppy_config_t
23{
24   floppy_type floppy_type;
25   const struct FloppyFormat *formats;
26};
27
1228typedef enum
1329{
1430   DEN_FM_LO = 0,
r5743r5744
5066/* a callback which will be executed if the ready state of the drive changes e.g. not ready->ready, ready->not ready */
5167void floppy_drive_set_ready_state_change_callback(const device_config *img, void (*callback)(const device_config *controller,const device_config *img, int state));
5268
53/* floppy drive types */
54typedef enum
55{
56   FLOPPY_DRIVE_SS_40,
57   FLOPPY_DRIVE_DS_80
58} floppy_type;
59
6069void floppy_drive_set_index_pulse_callback(const device_config *img, void (*callback)(const device_config *controller,const device_config *image, int state));
6170
6271/* set flag state */
r5743r5744
6978void floppy_drive_set_geometry(const device_config *img, floppy_type type);
7079void floppy_drive_set_geometry_absolute(const device_config *img, int tracks, int sides);
7180
72/* called in device init/exit functions */
73void floppy_drive_init(const device_config *img);
74
7581/* get next id from track, 1 if got a id, 0 if no id was got */
7682int floppy_drive_get_next_id(const device_config *img, int side, chrn_id *);
7783/* set ready state of drive. If flag == 1, set ready state only if drive present,
r5743r5744
107113
108114floppy_image *flopimg_get_image(const device_config *image);
109115
110void floppy_device_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info);
111
112116/* hack for apple II; replace this when we think of something better */
113117void floppy_install_unload_proc(const device_config *image, void (*proc)(const device_config *image));
114118
r5743r5744
117121/* hack for TI99; replace this when we think of something better */
118122void floppy_install_tracktranslate_proc(const device_config *image, int (*proc)(const device_config *image, floppy_image *floppy, int physical_track));
119123
124const device_config *floppy_get_device(running_machine *machine,int drive);
120125
126int floppy_get_drive(const device_config *image);
127
128void *flopimg_get_custom_data(const device_config *image);
129void flopimg_alloc_custom_data(const device_config *image,int size);
130
131#define FLOPPY   DEVICE_GET_INFO_NAME(floppy)
132DEVICE_GET_INFO(floppy);
133
134extern DEVICE_START( floppy );
135extern DEVICE_IMAGE_LOAD( floppy );
136extern DEVICE_IMAGE_CREATE( floppy );
137extern DEVICE_IMAGE_UNLOAD( floppy );
138
139/***************************************************************************
140    DEVICE CONFIGURATION MACROS
141***************************************************************************/
142#define FLOPPY_0 "floppy0"
143#define FLOPPY_1 "floppy1"
144#define FLOPPY_2 "floppy2"
145#define FLOPPY_3 "floppy3"
146
147
148#define MDRV_FLOPPY_DRIVE_ADD(_tag, _config)    \
149   MDRV_DEVICE_ADD(_tag, FLOPPY, 0)         \
150   MDRV_DEVICE_CONFIG(_config)
151
152#define MDRV_FLOPPY_DRIVE_MODIFY(_tag, _config)   \
153   MDRV_DEVICE_MODIFY(_tag)      \
154   MDRV_DEVICE_CONFIG(_config)
155
156#define MDRV_FLOPPY_4_DRIVES_ADD(_config)    \
157   MDRV_DEVICE_ADD(FLOPPY_0, FLOPPY, 0)      \
158   MDRV_DEVICE_CONFIG(_config)   \
159   MDRV_DEVICE_ADD(FLOPPY_1, FLOPPY, 0)      \
160   MDRV_DEVICE_CONFIG(_config)   \
161   MDRV_DEVICE_ADD(FLOPPY_2, FLOPPY, 0)      \
162   MDRV_DEVICE_CONFIG(_config)   \
163   MDRV_DEVICE_ADD(FLOPPY_3, FLOPPY, 0)      \
164   MDRV_DEVICE_CONFIG(_config)   
165
166#define MDRV_FLOPPY_4_DRIVES_MODIFY(_config)    \
167   MDRV_DEVICE_MODIFY(FLOPPY_0)      \
168   MDRV_DEVICE_CONFIG(_config)   \
169   MDRV_DEVICE_MODIFY(FLOPPY_1)      \
170   MDRV_DEVICE_CONFIG(_config)   \
171   MDRV_DEVICE_MODIFY(FLOPPY_2)      \
172   MDRV_DEVICE_CONFIG(_config)   \
173   MDRV_DEVICE_MODIFY(FLOPPY_3)      \
174   MDRV_DEVICE_CONFIG(_config)   
175
176#define MDRV_FLOPPY_4_DRIVES_REMOVE()    \
177   MDRV_DEVICE_REMOVE(FLOPPY_0)      \
178   MDRV_DEVICE_REMOVE(FLOPPY_1)      \
179   MDRV_DEVICE_REMOVE(FLOPPY_2)      \
180   MDRV_DEVICE_REMOVE(FLOPPY_3)     
181   
182#define MDRV_FLOPPY_2_DRIVES_ADD(_config)    \
183   MDRV_DEVICE_ADD(FLOPPY_0, FLOPPY, 0)      \
184   MDRV_DEVICE_CONFIG(_config)   \
185   MDRV_DEVICE_ADD(FLOPPY_1, FLOPPY, 0)      \
186   MDRV_DEVICE_CONFIG(_config)   
187
188#define MDRV_FLOPPY_2_DRIVES_MODIFY(_config)    \
189   MDRV_DEVICE_MODIFY(FLOPPY_0)      \
190   MDRV_DEVICE_CONFIG(_config)   \
191   MDRV_DEVICE_MODIFY(FLOPPY_1)      \
192   MDRV_DEVICE_CONFIG(_config)   
193
194#define MDRV_FLOPPY_2_DRIVES_REMOVE()    \
195   MDRV_DEVICE_REMOVE(FLOPPY_0)      \
196   MDRV_DEVICE_REMOVE(FLOPPY_1)     
197         
121198#endif /* FLOPDRV_H */
src/mess/devices/sonydriv.h
r5743r5744
1111
1212#include "device.h"
1313#include "image.h"
14#include "flopdrv.h"
1415
15
1616enum
1717{
1818   MESS_DEVINFO_INT_SONYDRIV_ALLOWABLE_SIZES = MESS_DEVINFO_INT_DEV_SPECIFIC
r5743r5744
4040void sony_write_data(const device_config *device,UINT8 data);
4141int sony_read_status(const device_config *device);
4242
43#define FLOPPY_SONY   DEVICE_GET_INFO_NAME(sonydriv)
44DEVICE_GET_INFO(sonydriv);
4345
46#define MDRV_FLOPPY_SONY_2_DRIVES_ADD(_config)    \
47   MDRV_DEVICE_ADD(FLOPPY_0, FLOPPY_SONY, 0)      \
48   MDRV_DEVICE_CONFIG(_config)   \
49   MDRV_DEVICE_ADD(FLOPPY_1, FLOPPY_SONY, 0)      \
50   MDRV_DEVICE_CONFIG(_config)   
51
52#define MDRV_FLOPPY_SONY_2_DRIVES_ADDITIONAL_ADD(_config)    \
53   MDRV_DEVICE_ADD(FLOPPY_2, FLOPPY_SONY, 0)      \
54   MDRV_DEVICE_CONFIG(_config)   \
55   MDRV_DEVICE_ADD(FLOPPY_3, FLOPPY_SONY, 0)      \
56   MDRV_DEVICE_CONFIG(_config)   
57
58#define MDRV_FLOPPY_SONY_2_DRIVES_MODIFY(_config)    \
59   MDRV_DEVICE_MODIFY(FLOPPY_0)      \
60   MDRV_DEVICE_CONFIG(_config)   \
61   MDRV_DEVICE_MODIFY(FLOPPY_1)      \
62   MDRV_DEVICE_CONFIG(_config)   
63
64
65
4466#endif /* SONYDRIV_H */
src/mess/devices/coco_fdc.c
r5743r5744
144144
145145static const wd17xx_interface coco_wd17xx_interface =
146146{
147   fdc_callback
147   fdc_callback,
148   NULL,
149   {FLOPPY_0,FLOPPY_1,FLOPPY_2,FLOPPY_3}
148150};
149151
150152
src/mess/devices/appldriv.c
r5743r5744
1010#include "flopdrv.h"
1111#include "formats/ap2_dsk.h"
1212
13
14#define APPLE525TAG   "apple525driv"
15
1613struct apple525_disk
1714{
1815   unsigned int state : 4;      /* bits 0-3 are the phase */
r5743r5744
2421   UINT8 track_data[APPLE2_NIBBLE_SIZE * APPLE2_SECTOR_COUNT];
2522};
2623
27static const mess_device_class parent_devclass = { floppy_device_getinfo, NULL };
2824static int apple525_enable_mask = 1;
2925
30
31
3226void apple525_set_enable_lines(const device_config *device,int enable_mask)
3327{
3428   apple525_enable_mask = enable_mask;
r5743r5744
4337   int len;
4438   struct apple525_disk *disk;
4539
46   disk = (struct apple525_disk *) image_lookuptag(image, APPLE525TAG);
40   disk = (struct apple525_disk *) flopimg_get_custom_data(image);
4741   len = sizeof(disk->track_data);
4842
4943   floppy_drive_read_track_data_info_buffer(image, 0, disk->track_data, &len);
r5743r5744
5852   int len;
5953   struct apple525_disk *disk;
6054
61   disk = (struct apple525_disk *) image_lookuptag(image, APPLE525TAG);
55   disk = (struct apple525_disk *) flopimg_get_custom_data(image);
6256
6357   if (disk->track_dirty)
6458   {
r5743r5744
108102   UINT8 old_state;
109103   unsigned int phase;
110104
111   cur_disk = (struct apple525_disk *) image_lookuptag(image, APPLE525TAG);
105   cur_disk = (struct apple525_disk *) flopimg_get_custom_data(image);
112106
113107   old_state = cur_disk->state;
114108   cur_disk->state = new_state;
r5743r5744
145139
146140void apple525_set_lines(const device_config *device,UINT8 lines)
147141{
148   int i, count;
142   int i;
149143   const device_config *image;
150144
151   count = device_count_tag_from_machine(device->machine, APPLE525TAG);
152
153   for (i = 0; i < count; i++)
145   for (i = 0; i < 2; i++)
154146   {
155147      if (apple525_enable_mask & (1 << i))
156148      {
157         image = image_from_devtag_and_index(device->machine, APPLE525TAG, i);
149         image = floppy_get_device(device->machine, i);                 
158150         if (image)
159151            apple525_disk_set_lines(device,image, lines);
160152      }
r5743r5744
170162   struct apple525_disk *disk;
171163   int spinfract_divisor;
172164   int spinfract_dividend;
173   const mess_device_class *devclass;
165   //const mess_device_class *devclass;
174166
175   disk = (struct apple525_disk *) image_lookuptag(img, APPLE525TAG);
176   devclass = mess_devclass_from_core_device(img);
177   spinfract_dividend = (int) mess_device_get_info_int(devclass, MESS_DEVINFO_INT_APPLE525_SPINFRACT_DIVIDEND);
178   spinfract_divisor = (int) mess_device_get_info_int(devclass, MESS_DEVINFO_INT_APPLE525_SPINFRACT_DIVISOR);
167   disk = (struct apple525_disk *)  flopimg_get_custom_data(img);
168   //devclass = mess_devclass_from_core_device(img);
169   spinfract_dividend = 15;//(int) mess_device_get_info_int(devclass, MESS_DEVINFO_INT_APPLE525_SPINFRACT_DIVIDEND);
170   spinfract_divisor = 16;//(int) mess_device_get_info_int(devclass, MESS_DEVINFO_INT_APPLE525_SPINFRACT_DIVISOR);
179171
180172   /* no image initialized for that drive ? */
181173   if (!image_exists(img))
r5743r5744
218210
219211static const device_config *apple525_selected_image(running_machine *machine)
220212{
221   int i, count;
222
223   count = device_count_tag_from_machine(machine, APPLE525TAG);
224
225   for (i = 0; i < count; i++)
213   int i;
214   for (i = 0; i < 2; i++)
226215   {
227216      if (apple525_enable_mask & (1 << i))
228         return image_from_devtag_and_index(machine, APPLE525TAG, i);
217         return floppy_get_device(machine, i);
229218   }
230219   return NULL;
231220}
r5743r5744
253242
254243int apple525_read_status(const device_config *device)
255244{
256   int i, count, result = 0;
245   int i, result = 0;
257246   const device_config *image;
258
259   count = device_count_tag_from_machine(device->machine, APPLE525TAG);
260
261   for (i = 0; i < count; i++)
247   for (i = 0; i < 2; i++)
262248   {
263249      if (apple525_enable_mask & (1 << i))
264250      {
265         image = image_from_devtag_and_index(device->machine, APPLE525TAG, i);
251         image = floppy_get_device(device->machine, i);
266252         if (image && !image_is_writable(image))
267253            result = 1;
268254      }
r5743r5744
275261/* ----------------------------------------------------------------------- */
276262
277263static DEVICE_START( apple525_floppy )
278{
279   device_start_func parent_init;
280
281   image_alloctag(device, APPLE525TAG, sizeof(struct apple525_disk));
282
283   parent_init = (device_start_func) mess_device_get_info_fct(&parent_devclass, MESS_DEVINFO_PTR_START);
284   parent_init(device);
264{   
265   DEVICE_START_CALL(floppy);
266   flopimg_alloc_custom_data(device,sizeof(struct apple525_disk));
285267}
286268
287269
288270
289271static DEVICE_IMAGE_LOAD( apple525_floppy )
290272{
291   int result;
292   device_image_load_func parent_load;
293
294   parent_load = (device_image_load_func) mess_device_get_info_fct(&parent_devclass, MESS_DEVINFO_PTR_LOAD);
295   result = parent_load(image);
296
273   int result = DEVICE_IMAGE_LOAD_NAME(floppy)(image);
297274   floppy_drive_seek(image, -999);
298275   floppy_drive_seek(image, +35/2);
299276   return result;
r5743r5744
303280
304281static DEVICE_IMAGE_UNLOAD( apple525_floppy )
305282{
306   device_image_unload_func parent_unload;
307
308283   apple525_save_current_track(image, TRUE);
309284
310   parent_unload = (device_image_unload_func) mess_device_get_info_fct(&parent_devclass, MESS_DEVINFO_PTR_UNLOAD);
311   parent_unload(image);
285   DEVICE_IMAGE_UNLOAD_NAME(floppy)(image);   
312286}
313287
314288
315
289/*
316290void apple525_device_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
317291{
318292   switch(state)
319293   {
320      /* --- the following bits of info are returned as 64-bit signed integers --- */
321294      case MESS_DEVINFO_INT_COUNT:            info->i = 2; break;
322295
323      /* --- the following bits of info are returned as NULL-terminated strings --- */
324296      case MESS_DEVINFO_STR_DEV_TAG:         strcpy(info->s = device_temp_str(), APPLE525TAG); break;
325297
326      /* --- the following bits of info are returned as pointers to data or functions --- */
327298      case MESS_DEVINFO_PTR_START:            info->start = DEVICE_START_NAME(apple525_floppy); break;
328299      case MESS_DEVINFO_PTR_LOAD:            info->load = DEVICE_IMAGE_LOAD_NAME(apple525_floppy); break;
329300      case MESS_DEVINFO_PTR_UNLOAD:         info->unload = DEVICE_IMAGE_UNLOAD_NAME(apple525_floppy); break;
r5743r5744
332303      default: floppy_device_getinfo(devclass, state, info); break;
333304   }
334305}
306
307*/
308DEVICE_GET_INFO( apple525 )
309{
310   switch (state)
311   {
312      case DEVINFO_FCT_START:                  info->start = DEVICE_START_NAME(apple525_floppy); break;
313      case DEVINFO_FCT_IMAGE_LOAD:            info->f = (genf *) DEVICE_IMAGE_LOAD_NAME(apple525_floppy); break;
314      case DEVINFO_FCT_IMAGE_UNLOAD:            info->f = (genf *) DEVICE_IMAGE_UNLOAD_NAME(apple525_floppy); break;
315
316      default:                            DEVICE_GET_INFO_CALL(floppy);            break;
317   }
318}
src/mess/devices/appldriv.h
r5743r5744
1212#include "mame.h"
1313#include "device.h"
1414
15
16enum
17{
18   MESS_DEVINFO_INT_APPLE525_SPINFRACT_DIVIDEND = MESS_DEVINFO_INT_DEV_SPECIFIC,
19   MESS_DEVINFO_INT_APPLE525_SPINFRACT_DIVISOR
20};
21
2215void apple525_device_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info);
2316
2417void apple525_set_lines(const device_config *device,UINT8 lines);
r5743r5744
2821void apple525_write_data(const device_config *device,UINT8 data);
2922int apple525_read_status(const device_config *device);
3023
24#define FLOPPY_APPLE   DEVICE_GET_INFO_NAME(apple525)
25DEVICE_GET_INFO(apple525);
3126
27#define MDRV_FLOPPY_APPLE_2_DRIVES_ADD(_config)    \
28   MDRV_DEVICE_ADD(FLOPPY_0, FLOPPY_APPLE, 0)      \
29   MDRV_DEVICE_CONFIG(_config)   \
30   MDRV_DEVICE_ADD(FLOPPY_1, FLOPPY_APPLE, 0)      \
31   MDRV_DEVICE_CONFIG(_config)   
32
33
34#define MDRV_FLOPPY_APPLE_2_DRIVES_REMOVE()    \
35   MDRV_DEVICE_REMOVE(FLOPPY_0)      \
36   MDRV_DEVICE_REMOVE(FLOPPY_1)     
37
3238#endif /* APPLDRIV_H */
src/mess/devices/thomflop.c
r5743r5744
10131013   }
10141014
10151015   thmfc1->stat0 = THMFC1_STAT0_CRC_ERROR | THMFC1_STAT0_FINISHED;
1016   LOG (( "thmfc_floppy_find_sector: sector not found drive=%i track=%i sector=%i\n", image_index_in_device( img ), thmfc1->track, thmfc1->sector ));
1016   LOG (( "thmfc_floppy_find_sector: sector not found drive=%i track=%i sector=%i\n", floppy_get_drive( img ), thmfc1->track, thmfc1->sector ));
10171017   return 0;
10181018}
10191019
src/mess/formats/flopimg.c
r5743r5744
315315
316316static void floppy_close_internal(floppy_image *floppy, int close_file)
317317{
318   assert(floppy);
319318   if (floppy) {
320319      floppy_track_unload(floppy);
321320      if (close_file)
src/mess/formats/flopimg.h
r5743r5744
7979};
8080
8181
82#define FLOPPY_OPTIONS_NAME(name)   floppyoptions_##name
8283
8384#define FLOPPY_OPTIONS_START(name)                                    \
8485   const struct FloppyFormat floppyoptions_##name[] =                        \
src/mess/drivers/dgn_beta.c
r5743r5744
275275INPUT_PORTS_END
276276
277277
278static void dgnbeta_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
279{
280   /* floppy */
281   switch(state)
282   {
283      /* --- the following bits of info are returned as 64-bit signed integers --- */
284      case MESS_DEVINFO_INT_COUNT:         info->i = 4; break;
285
286      /* --- the following bits of info are returned as pointers to data or functions --- */
287      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:   info->p = (void *) floppyoptions_coco; break;
288
289      /* --- the following bits of info are returned as NULL-terminated strings --- */
290      case MESS_DEVINFO_STR_NAME+0:      strcpy(info->s = device_temp_str(), "floppydisk0"); break;
291      case MESS_DEVINFO_STR_NAME+1:      strcpy(info->s = device_temp_str(), "floppydisk1"); break;
292      case MESS_DEVINFO_STR_NAME+2:      strcpy(info->s = device_temp_str(), "floppydisk2"); break;
293      case MESS_DEVINFO_STR_NAME+3:      strcpy(info->s = device_temp_str(), "floppydisk3"); break;
294      case MESS_DEVINFO_STR_SHORT_NAME+0:      strcpy(info->s = device_temp_str(), "flop0"); break;
295      case MESS_DEVINFO_STR_SHORT_NAME+1:      strcpy(info->s = device_temp_str(), "flop1"); break;
296      case MESS_DEVINFO_STR_SHORT_NAME+2:      strcpy(info->s = device_temp_str(), "flop2"); break;
297      case MESS_DEVINFO_STR_SHORT_NAME+3:      strcpy(info->s = device_temp_str(), "flop3"); break;
298      case MESS_DEVINFO_STR_DESCRIPTION+0:   strcpy(info->s = device_temp_str(), "Floppy #0"); break;
299      case MESS_DEVINFO_STR_DESCRIPTION+1:   strcpy(info->s = device_temp_str(), "Floppy #1"); break;
300      case MESS_DEVINFO_STR_DESCRIPTION+2:   strcpy(info->s = device_temp_str(), "Floppy #2"); break;
301      case MESS_DEVINFO_STR_DESCRIPTION+3:   strcpy(info->s = device_temp_str(), "Floppy #3"); break;
302
303      default:                              floppy_device_getinfo(devclass, state, info); break;
304   }
305}
306
307278static PALETTE_INIT( dgnbeta )
308279{
309280   int i;
r5743r5744
313284   }
314285}
315286
287static const floppy_config dgnbeta_floppy_config =
288{
289   FLOPPY_DRIVE_DS_80,
290   FLOPPY_OPTIONS_NAME(coco)
291};
292
316293static MACHINE_DRIVER_START( dgnbeta )
317294   /* basic machine hardware */
318295   MDRV_CPU_ADD("maincpu", M6809E, DGNBETA_CPU_SPEED_HZ)        /* 2 MHz */
r5743r5744
344321   MDRV_PIA6821_ADD( "pia_2", dgnbeta_pia_intf[2] )
345322
346323   MDRV_WD179X_ADD("wd179x", dgnbeta_wd17xx_interface )   
324   
325   MDRV_FLOPPY_4_DRIVES_ADD(dgnbeta_floppy_config)
347326MACHINE_DRIVER_END
348327
349328ROM_START(dgnbeta)
r5743r5744
373352   CONFIG_RAM(512 * 1024)
374353   CONFIG_RAM(640 * 1024)
375354   CONFIG_RAM(768 * 1024)
376   CONFIG_DEVICE( dgnbeta_floppy_getinfo )
377355SYSTEM_CONFIG_END
378356
379357/*    YEAR  NAME        PARENT  COMPAT  MACHINE     INPUT       INIT    CONFIG      COMPANY             FULLNAME                    FLAGS */
src/mess/drivers/apple3.c
r5743r5744
4040   NULL,               /* port_write_func */
4141};
4242
43/*
44static void apple3_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
45{
46   switch(state)
47   {
48      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
4349
50      case MESS_DEVINFO_INT_APPLE525_SPINFRACT_DIVIDEND:   info->i = 1; break;
51      case MESS_DEVINFO_INT_APPLE525_SPINFRACT_DIVISOR:   info->i = 4; break;
4452
53      case MESS_DEVINFO_STR_NAME+0:                  strcpy(info->s = device_temp_str(), "slot6disk1"); break;
54      case MESS_DEVINFO_STR_NAME+1:                  strcpy(info->s = device_temp_str(), "slot6disk2"); break;
55      case MESS_DEVINFO_STR_SHORT_NAME+0:               strcpy(info->s = device_temp_str(), "s6d1"); break;
56      case MESS_DEVINFO_STR_SHORT_NAME+1:               strcpy(info->s = device_temp_str(), "s6d2"); break;
57      case MESS_DEVINFO_STR_DESCRIPTION+0:               strcpy(info->s = device_temp_str(), "Slot 6 Disk #1"); break;
58      case MESS_DEVINFO_STR_DESCRIPTION+1:               strcpy(info->s = device_temp_str(), "Slot 6 Disk #2"); break;
59
60      default:                              apple525_device_getinfo(devclass, state, info); break;
61   }
62}
63
64*/
65
66static const floppy_config apple3_floppy_config =
67{
68   FLOPPY_DRIVE_DS_80,
69   FLOPPY_OPTIONS_NAME(apple2)
70};
71
4572static MACHINE_DRIVER_START( apple3 )
4673   /* basic machine hardware */
4774   MDRV_CPU_ADD("maincpu", M6502, 2000000)        /* 2 MHz */
r5743r5744
6794
6895   /* fdc */
6996   MDRV_APPLEFDC_ADD("fdc", apple3_fdc_interface)
70
97   MDRV_FLOPPY_APPLE_2_DRIVES_ADD(apple3_floppy_config)
7198   /* acia */
7299   MDRV_ACIA6551_ADD("acia")
73100
r5743r5744
162189   ROM_LOAD( "apple3.rom", 0x0000, 0x1000, CRC(55e8eec9) SHA1(579ee4cd2b208d62915a0aa482ddc2744ff5e967))
163190ROM_END
164191
165static void apple3_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
166{
167   /* floppy */
168   switch(state)
169   {
170      /* --- the following bits of info are returned as 64-bit signed integers --- */
171      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
172
173      /* --- the following bits of info are returned as 64-bit signed integers --- */
174      case MESS_DEVINFO_INT_APPLE525_SPINFRACT_DIVIDEND:   info->i = 1; break;
175      case MESS_DEVINFO_INT_APPLE525_SPINFRACT_DIVISOR:   info->i = 4; break;
176
177      /* --- the following bits of info are returned as NULL-terminated strings --- */
178      case MESS_DEVINFO_STR_NAME+0:                  strcpy(info->s = device_temp_str(), "slot6disk1"); break;
179      case MESS_DEVINFO_STR_NAME+1:                  strcpy(info->s = device_temp_str(), "slot6disk2"); break;
180      case MESS_DEVINFO_STR_SHORT_NAME+0:               strcpy(info->s = device_temp_str(), "s6d1"); break;
181      case MESS_DEVINFO_STR_SHORT_NAME+1:               strcpy(info->s = device_temp_str(), "s6d2"); break;
182      case MESS_DEVINFO_STR_DESCRIPTION+0:               strcpy(info->s = device_temp_str(), "Slot 6 Disk #1"); break;
183      case MESS_DEVINFO_STR_DESCRIPTION+1:               strcpy(info->s = device_temp_str(), "Slot 6 Disk #2"); break;
184
185      default:                              apple525_device_getinfo(devclass, state, info); break;
186   }
187}
188
189192static SYSTEM_CONFIG_START(apple3)
190193   CONFIG_RAM_DEFAULT(0x80000)
191   CONFIG_DEVICE(apple3_floppy_getinfo)
192194SYSTEM_CONFIG_END
193195
194196/*     YEAR     NAME        PARENT  COMPAT  MACHINE    INPUT    INIT    CONFIG  COMPANY             FULLNAME */
src/mess/drivers/adam.c
r5743r5744
625625   timer_pulse(machine, ATTOTIME_IN_MSEC(20), NULL, 0, adam_paddle_callback);
626626}
627627
628static const floppy_config adam_floppy_config =
629{
630   FLOPPY_DRIVE_DS_80,
631   FLOPPY_OPTIONS_NAME(adam)
632};
633
628634static MACHINE_DRIVER_START( adam )
629635   /* Machine hardware */
630636   MDRV_CPU_ADD("maincpu", Z80, 3579545)       /* 3.579545 MHz */
r5743r5744
654660   MDRV_CARTSLOT_ADD("cart")
655661   MDRV_CARTSLOT_EXTENSION_LIST("rom,col,bin")
656662   MDRV_CARTSLOT_NOT_MANDATORY
663   
664   MDRV_FLOPPY_4_DRIVES_ADD(adam_floppy_config)   
657665MACHINE_DRIVER_END
658666
659667
r5743r5744
696704   //ROM_LOAD ("master68.rom", 0x0100, 0x0E4, CRC(619a47b8)) /* Replacement 6801 Master ROM */
697705ROM_END
698706
699static void adam_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
700{
701   /* floppy */
702   switch(state)
703   {
704      /* --- the following bits of info are returned as 64-bit signed integers --- */
705      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
706707
707      /* --- the following bits of info are returned as pointers to data or functions --- */
708      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_adam; break;
709
710      default:                              floppy_device_getinfo(devclass, state, info); break;
711   }
712}
713
714static SYSTEM_CONFIG_START(adam)
715   CONFIG_DEVICE(adam_floppy_getinfo)
716SYSTEM_CONFIG_END
717
718708/***************************************************************************
719709
720710  Game driver(s)
r5743r5744
722712***************************************************************************/
723713
724714/*    YEAR  NAME    PARENT  COMPAT  MACHINE INPUT   INIT    CONFIG  COMPANY FULLNAME */
725COMP( 1982, adam,   0,      coleco,   adam,   adam,   0,      adam,   "Coleco", "Adam" , 0)
715COMP( 1982, adam,   0,      coleco,   adam,   adam,   0,      0,   "Coleco", "Adam" , 0)
726716
src/mess/drivers/mbee.c
r5743r5744
331331   { NULL }
332332};
333333
334static FLOPPY_OPTIONS_START(mbee)
335   FLOPPY_OPTION(ss80, "ss80", "SS80 disk image", basicdsk_identify_default, basicdsk_construct_default,
336      HEADS([1])
337      TRACKS([80])
338      SECTORS([10])
339      SECTOR_LENGTH([512])
340      FIRST_SECTOR_ID([1]))
341   FLOPPY_OPTION(ds40, "ds40", "DS40 disk image", basicdsk_identify_default, basicdsk_construct_default,
342      HEADS([2])
343      TRACKS([80])
344      SECTORS([10])
345      SECTOR_LENGTH([512])
346      FIRST_SECTOR_ID([1]))
347   FLOPPY_OPTION(ds80, "ds80", "DS80 disk image", basicdsk_identify_default, basicdsk_construct_default,
348      HEADS([2])
349      TRACKS([160])
350      SECTORS([10])
351      SECTOR_LENGTH([512])
352      FIRST_SECTOR_ID([1]))
353   FLOPPY_OPTION(ds84, "ds84", "DS84 disk image", basicdsk_identify_default, basicdsk_construct_default,
354      HEADS([2])
355      TRACKS([168])
356      SECTORS([10])
357      SECTOR_LENGTH([512])
358      FIRST_SECTOR_ID([1]))                 
359FLOPPY_OPTIONS_END
360
361static const floppy_config mbee_floppy_config =
362{
363   FLOPPY_DRIVE_DS_80,
364   FLOPPY_OPTIONS_NAME(mbee)
365};
366
334367static MACHINE_DRIVER_START( mbee )
335368   /* basic machine hardware */
336369   MDRV_CPU_ADD("maincpu", Z80, XTAL_12MHz / 6)         /* 2 MHz */
r5743r5744
421454   MDRV_CPU_PROGRAM_MAP(mbeepc85_mem)
422455   MDRV_CPU_IO_MAP(mbeepc85_io)
423456   MDRV_WD179X_ADD("wd179x", mbee_wd17xx_interface )
457   MDRV_FLOPPY_2_DRIVES_ADD(mbee_floppy_config)
424458MACHINE_DRIVER_END
425459
426460static MACHINE_DRIVER_START( mbeeppc )
r5743r5744
669703  Game driver(s)
670704
671705***************************************************************************/
672static FLOPPY_OPTIONS_START(mbee)
673   FLOPPY_OPTION(mbee, "ss80", "SS80 disk image", basicdsk_identify_default, basicdsk_construct_default,
674      HEADS([1])
675      TRACKS([80])
676      SECTORS([10])
677      SECTOR_LENGTH([512])
678      FIRST_SECTOR_ID([1]))
679   FLOPPY_OPTION(mbee, "ds40", "DS40 disk image", basicdsk_identify_default, basicdsk_construct_default,
680      HEADS([2])
681      TRACKS([80])
682      SECTORS([10])
683      SECTOR_LENGTH([512])
684      FIRST_SECTOR_ID([1]))
685   FLOPPY_OPTION(mbee, "ds80", "DS80 disk image", basicdsk_identify_default, basicdsk_construct_default,
686      HEADS([2])
687      TRACKS([160])
688      SECTORS([10])
689      SECTOR_LENGTH([512])
690      FIRST_SECTOR_ID([1]))
691   FLOPPY_OPTION(mbee, "ds84", "DS84 disk image", basicdsk_identify_default, basicdsk_construct_default,
692      HEADS([2])
693      TRACKS([168])
694      SECTORS([10])
695      SECTOR_LENGTH([512])
696      FIRST_SECTOR_ID([1]))                 
697FLOPPY_OPTIONS_END
698706
699static void mbee_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
700{
701   /* floppy */
702   switch(state)
703   {
704      /* --- the following bits of info are returned as 64-bit signed integers --- */
705      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
706
707      /* --- the following bits of info are returned as pointers to data or functions --- */
708      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_mbee; break;
709
710      default:                              floppy_device_getinfo(devclass, state, info); break;
711   }
712}
713
714static SYSTEM_CONFIG_START(mbeeic)
715   CONFIG_DEVICE(mbee_floppy_getinfo)
716SYSTEM_CONFIG_END
717
718
719707/*    YEAR  NAME      PARENT    COMPAT  MACHINE   INPUT     INIT      CONFIG    COMPANY         FULLNAME */
720708COMP( 1982, mbee,     0,   0,   mbee,     mbee,     mbee,     0,   "Applied Technology",  "Microbee 16 Standard" , 0)
721COMP( 1982, mbeeic,   mbee,   0,   mbeeic,   mbee,     mbeeic,   mbeeic,   "Applied Technology",  "Microbee 32 IC" , 0)
722COMP( 1982, mbeepc,   mbee,   0,   mbeepc,   mbee,     mbeepc,   mbeeic,   "Applied Technology",  "Microbee 32 Personal Communicator" , 0)
723COMP( 1985, mbeepc85, mbee,   0,   mbeepc85, mbee,     mbeepc85, mbeeic,   "Applied Technology",  "Microbee 32 PC85" , 0)
724COMP( 1985, mbeeppc,  mbee,   0,   mbeeppc,  mbee,     mbeeppc,  mbeeic,   "Applied Technology",  "Microbee 32 Premium PC85" , GAME_NOT_WORKING)
725COMP( 1986, mbee56,   mbee,   0,   mbee56,   mbee,     mbee56,   mbeeic,   "Applied Technology",  "Microbee 56k" , GAME_NOT_WORKING)
726COMP( 1986, mbee64,   mbee,   0,   mbee64,   mbee,     mbee64,   mbeeic,   "Applied Technology",  "Microbee 64k" , GAME_NOT_WORKING)
709COMP( 1982, mbeeic,   mbee,   0,   mbeeic,   mbee,     mbeeic,   0,   "Applied Technology",  "Microbee 32 IC" , 0)
710COMP( 1982, mbeepc,   mbee,   0,   mbeepc,   mbee,     mbeepc,   0,   "Applied Technology",  "Microbee 32 Personal Communicator" , 0)
711COMP( 1985, mbeepc85, mbee,   0,   mbeepc85, mbee,     mbeepc85, 0,   "Applied Technology",  "Microbee 32 PC85" , 0)
712COMP( 1985, mbeeppc,  mbee,   0,   mbeeppc,  mbee,     mbeeppc,  0,   "Applied Technology",  "Microbee 32 Premium PC85" , GAME_NOT_WORKING)
713COMP( 1986, mbee56,   mbee,   0,   mbee56,   mbee,     mbee56,   0,   "Applied Technology",  "Microbee 56k" , GAME_NOT_WORKING)
714COMP( 1986, mbee64,   mbee,   0,   mbee64,   mbee,     mbee64,   0,   "Applied Technology",  "Microbee 64k" , GAME_NOT_WORKING)
727715
src/mess/drivers/coco.c
r5743r5744
691691   CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED
692692};
693693
694static const floppy_config coco_floppy_config =
695{
696   FLOPPY_DRIVE_DS_80,
697   FLOPPY_OPTIONS_NAME(coco)
698};
699
694700static MACHINE_DRIVER_START( dragon32 )
695701   /* basic machine hardware */
696702   MDRV_CPU_ADD("maincpu", M6809E, COCO_CPU_SPEED_HZ * 4)        /* 0,894886 MHz */
r5743r5744
728734   MDRV_DRAGON_CARTRIDGE_CART_CALLBACK(coco_cart_w)
729735   MDRV_DRAGON_CARTRIDGE_HALT_CALLBACK(coco_halt_w)
730736   MDRV_DRAGON_CARTRIDGE_NMI_CALLBACK(coco_nmi_w)
737   
738   MDRV_FLOPPY_4_DRIVES_ADD(coco_floppy_config)
731739MACHINE_DRIVER_END
732740
733741static MACHINE_DRIVER_START( dragon64 )
r5743r5744
771779   MDRV_DRAGON_CARTRIDGE_CART_CALLBACK(coco_cart_w)
772780   MDRV_DRAGON_CARTRIDGE_HALT_CALLBACK(coco_halt_w)
773781   MDRV_DRAGON_CARTRIDGE_NMI_CALLBACK(coco_nmi_w)
782   
783   MDRV_FLOPPY_4_DRIVES_ADD(coco_floppy_config)
774784MACHINE_DRIVER_END
775785
776786static MACHINE_DRIVER_START( d64plus )
r5743r5744
814824   MDRV_DRAGON_CARTRIDGE_CART_CALLBACK(coco_cart_w)
815825   MDRV_DRAGON_CARTRIDGE_HALT_CALLBACK(coco_halt_w)
816826   MDRV_DRAGON_CARTRIDGE_NMI_CALLBACK(coco_nmi_w)
827   
828   MDRV_FLOPPY_4_DRIVES_ADD(coco_floppy_config)
817829MACHINE_DRIVER_END
818830
819831static MACHINE_DRIVER_START( dgnalpha )
r5743r5744
864876   MDRV_DRAGON_CARTRIDGE_CART_CALLBACK(coco_cart_w)
865877   MDRV_DRAGON_CARTRIDGE_HALT_CALLBACK(coco_halt_w)
866878   MDRV_DRAGON_CARTRIDGE_NMI_CALLBACK(coco_nmi_w)
879   
880   MDRV_FLOPPY_4_DRIVES_ADD(coco_floppy_config)
867881MACHINE_DRIVER_END
868882
869883static MACHINE_DRIVER_START( tanodr64 )
r5743r5744
907921   MDRV_DRAGON_CARTRIDGE_CART_CALLBACK(coco_cart_w)
908922   MDRV_DRAGON_CARTRIDGE_HALT_CALLBACK(coco_halt_w)
909923   MDRV_DRAGON_CARTRIDGE_NMI_CALLBACK(coco_nmi_w)
924   
925   MDRV_FLOPPY_4_DRIVES_ADD(coco_floppy_config)
910926MACHINE_DRIVER_END
911927
912928static MACHINE_DRIVER_START( coco )
r5743r5744
948964   MDRV_COCO_CARTRIDGE_CART_CALLBACK(coco_cart_w)
949965   MDRV_COCO_CARTRIDGE_HALT_CALLBACK(coco_halt_w)
950966   MDRV_COCO_CARTRIDGE_NMI_CALLBACK(coco_nmi_w)
967   
968   MDRV_FLOPPY_4_DRIVES_ADD(coco_floppy_config)
951969MACHINE_DRIVER_END
952970
953971static MACHINE_DRIVER_START( coco2 )
r5743r5744
9891007   MDRV_COCO_CARTRIDGE_CART_CALLBACK(coco_cart_w)
9901008   MDRV_COCO_CARTRIDGE_HALT_CALLBACK(coco_halt_w)
9911009   MDRV_COCO_CARTRIDGE_NMI_CALLBACK(coco_nmi_w)
1010   
1011   MDRV_FLOPPY_4_DRIVES_ADD(coco_floppy_config)
9921012MACHINE_DRIVER_END
9931013
9941014static MACHINE_DRIVER_START( coco2b )
r5743r5744
10301050   MDRV_COCO_CARTRIDGE_CART_CALLBACK(coco_cart_w)
10311051   MDRV_COCO_CARTRIDGE_HALT_CALLBACK(coco_halt_w)
10321052   MDRV_COCO_CARTRIDGE_NMI_CALLBACK(coco_nmi_w)
1053   
1054   MDRV_FLOPPY_4_DRIVES_ADD(coco_floppy_config)
10331055MACHINE_DRIVER_END
10341056
10351057static MACHINE_DRIVER_START( coco3 )
r5743r5744
10831105   MDRV_COCO_CARTRIDGE_CART_CALLBACK(coco3_cart_w)
10841106   MDRV_COCO_CARTRIDGE_HALT_CALLBACK(coco_halt_w)
10851107   MDRV_COCO_CARTRIDGE_NMI_CALLBACK(coco_nmi_w)
1108   
1109   MDRV_FLOPPY_4_DRIVES_ADD(coco_floppy_config)
10861110MACHINE_DRIVER_END
10871111
10881112static MACHINE_DRIVER_START( coco3p )
r5743r5744
12341258
12351259/*************************************
12361260 *
1237 *  CoCo device getinfo functions
1238 *
1239 *************************************/
1240
1241static void coco_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
1242{
1243   /* floppy */
1244   switch(state)
1245   {
1246      /* --- the following bits of info are returned as 64-bit signed integers --- */
1247      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
1248
1249      /* --- the following bits of info are returned as pointers to data or functions --- */
1250      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_coco; break;
1251
1252      /* --- the following bits of info are returned as NULL-terminated strings --- */
1253      case MESS_DEVINFO_STR_NAME+0:                  strcpy(info->s = device_temp_str(), "floppydisk0"); break;
1254      case MESS_DEVINFO_STR_NAME+1:                  strcpy(info->s = device_temp_str(), "floppydisk1"); break;
1255      case MESS_DEVINFO_STR_NAME+2:                  strcpy(info->s = device_temp_str(), "floppydisk2"); break;
1256      case MESS_DEVINFO_STR_NAME+3:                  strcpy(info->s = device_temp_str(), "floppydisk3"); break;
1257      case MESS_DEVINFO_STR_SHORT_NAME+0:               strcpy(info->s = device_temp_str(), "flop0"); break;
1258      case MESS_DEVINFO_STR_SHORT_NAME+1:               strcpy(info->s = device_temp_str(), "flop1"); break;
1259      case MESS_DEVINFO_STR_SHORT_NAME+2:               strcpy(info->s = device_temp_str(), "flop2"); break;
1260      case MESS_DEVINFO_STR_SHORT_NAME+3:               strcpy(info->s = device_temp_str(), "flop3"); break;
1261      case MESS_DEVINFO_STR_DESCRIPTION+0:               strcpy(info->s = device_temp_str(), "Floppy #0"); break;
1262      case MESS_DEVINFO_STR_DESCRIPTION+1:               strcpy(info->s = device_temp_str(), "Floppy #1"); break;
1263      case MESS_DEVINFO_STR_DESCRIPTION+2:               strcpy(info->s = device_temp_str(), "Floppy #2"); break;
1264      case MESS_DEVINFO_STR_DESCRIPTION+3:               strcpy(info->s = device_temp_str(), "Floppy #3"); break;
1265
1266      default:                              floppy_device_getinfo(devclass, state, info); break;
1267   }
1268}
1269
1270/*************************************
1271 *
12721261 *  CoCo sysconfig structures
12731262 *
12741263 *************************************/
1275
1276
1277static SYSTEM_CONFIG_START( generic_coco )
1278   CONFIG_DEVICE( coco_floppy_getinfo )
1279SYSTEM_CONFIG_END
1280
1281static SYSTEM_CONFIG_START( generic_coco12 )
1282   CONFIG_IMPORT_FROM( generic_coco )
1283SYSTEM_CONFIG_END
1284
1285/* These have to be split up, as the CoCo has a bitbanger */
1286/* where the Dragon has a paralell printer port */
1287static SYSTEM_CONFIG_START( generic_dragon )
1288   CONFIG_DEVICE( coco_floppy_getinfo )
1289SYSTEM_CONFIG_END
1290
1291
12921264/* ----------------------------------------------------------------------- */
12931265
12941266/* I have split up coco and cocoe, as the basic rom in the coco, cannot    */
r5743r5744
12961268/* split these to avoid confusion -- PHS                                   */
12971269
12981270static SYSTEM_CONFIG_START( coco )
1299   CONFIG_IMPORT_FROM   ( generic_coco12 )
13001271   CONFIG_RAM      (4 * 1024)
13011272   CONFIG_RAM_DEFAULT   (16 * 1024)
13021273   CONFIG_RAM      (32 * 1024)
r5743r5744
13041275SYSTEM_CONFIG_END
13051276
13061277static SYSTEM_CONFIG_START( cocoe )
1307   CONFIG_IMPORT_FROM   ( generic_coco12 )
13081278   CONFIG_RAM      (4 * 1024)
13091279   CONFIG_RAM      (16 * 1024)
13101280   CONFIG_RAM      (32 * 1024)
r5743r5744
13121282SYSTEM_CONFIG_END
13131283
13141284static SYSTEM_CONFIG_START(coco2)
1315   CONFIG_IMPORT_FROM   ( generic_coco12 )
13161285   CONFIG_RAM         (16 * 1024)
13171286   CONFIG_RAM_DEFAULT   (64 * 1024)
13181287SYSTEM_CONFIG_END
13191288
13201289static SYSTEM_CONFIG_START(coco3)
1321   CONFIG_IMPORT_FROM   ( generic_coco )
13221290   CONFIG_RAM         (128 * 1024)
13231291   CONFIG_RAM_DEFAULT   (512 * 1024)
13241292   CONFIG_RAM         (2048 * 1024)
r5743r5744
13261294SYSTEM_CONFIG_END
13271295
13281296static SYSTEM_CONFIG_START(dragon32)
1329   CONFIG_IMPORT_FROM   ( generic_dragon )
13301297   CONFIG_RAM_DEFAULT   (32 * 1024)
13311298   CONFIG_RAM      (64 * 1024)      // Since a fair number of users did this upgrade - phs
13321299SYSTEM_CONFIG_END
13331300
13341301static SYSTEM_CONFIG_START(dragon64)
1335   CONFIG_IMPORT_FROM   ( generic_dragon )
13361302   CONFIG_RAM_DEFAULT   (64 * 1024)
13371303SYSTEM_CONFIG_END
13381304
13391305static SYSTEM_CONFIG_START(d64plus)
1340   CONFIG_IMPORT_FROM   ( generic_dragon )
13411306   CONFIG_RAM_DEFAULT   (128 * 1024)      // 64K normal RAM + 64K on plus board.
13421307SYSTEM_CONFIG_END
13431308
13441309static SYSTEM_CONFIG_START(tanodr64)
1345   CONFIG_IMPORT_FROM   ( generic_dragon )
13461310   CONFIG_RAM_DEFAULT   (64 * 1024)
13471311SYSTEM_CONFIG_END
13481312
1349static SYSTEM_CONFIG_START(dgnalpha)
1350   CONFIG_IMPORT_FROM   ( generic_dragon )
1313static SYSTEM_CONFIG_START(dgnalpha)   
13511314   CONFIG_RAM_DEFAULT   (64 * 1024)
13521315SYSTEM_CONFIG_END
13531316
src/mess/drivers/ti99_8.c
r5743r5744
426426   0   /*  first day of week */
427427};
428428
429static const floppy_config ti99_8_floppy_config =
430{
431   FLOPPY_DRIVE_DS_80,
432   FLOPPY_OPTIONS_NAME(ti99)
433};
434
429435static MACHINE_DRIVER_START(ti99_8_60hz)
430436   /* basic machine hardware */
431437   /* TMS9995-MP9537 CPU @ 10.7 MHz */
r5743r5744
471477
472478   MDRV_WD179X_ADD("wd179x", ti99_wd17xx_interface )
473479   
480   MDRV_FLOPPY_4_DRIVES_ADD(ti99_8_floppy_config)   
481   
474482   MDRV_TI99_CARTRIDGE_ADD("ti99_multicart")
475483MACHINE_DRIVER_END
476484
r5743r5744
519527   MDRV_TMS9901_ADD("tms9901", tms9901reset_param_ti99_8)   
520528
521529   MDRV_WD179X_ADD("wd179x", ti99_wd17xx_interface )
530   MDRV_FLOPPY_4_DRIVES_ADD(ti99_8_floppy_config)   
522531
523532   MDRV_TI99_CARTRIDGE_ADD("ti99_multicart")
524533MACHINE_DRIVER_END
r5743r5744
556565
557566#define rom_ti99_8e rom_ti99_8
558567
559static void ti99_8_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
560{
561   /* floppy */
562   switch(state)
563   {
564      /* --- the following bits of info are returned as 64-bit signed integers --- */
565      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
566
567      /* --- the following bits of info are returned as pointers to data or functions --- */
568      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_ti99; break;
569
570      default:                              floppy_device_getinfo(devclass, state, info); break;
571   }
572}
573
574568static void ti99_8_parallel_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
575569{
576570   /* parallel */
r5743r5744
640634   /* one cassette unit port */
641635   /* Hex-bus disk controller: supports up to 4 floppy disk drives */
642636   /* expansion port (similar to 99/4(a) - yet slightly different) */
643   CONFIG_DEVICE(ti99_8_floppy_getinfo)
644637   CONFIG_DEVICE(ti99_8_parallel_getinfo)
645638   CONFIG_DEVICE(ti99_8_serial_getinfo)
646639   /*CONFIG_DEVICE(ti99_8_quickload_getinfo)*/
src/mess/drivers/x1.c
r5743r5744
804804         break;
805805      case 0x0ffc:
806806         wd17xx_set_drive(dev,data & 3);
807         floppy_drive_set_motor_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, data & 3), data & 0x80);
808         floppy_drive_set_ready_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, data & 3), data & 0x80,0);
807         floppy_drive_set_motor_state(floppy_get_device(space->machine, data & 3), data & 0x80);
808         floppy_drive_set_ready_state(floppy_get_device(space->machine, data & 3), data & 0x80,0);
809809         wd17xx_set_side(dev,(data & 0x10)>>4);
810810         break;
811811      case 0x0ffd:
r5743r5744
819819static const wd17xx_interface x1_mb8877a_interface =
820820{
821821   x1_fdc_irq,
822   NULL
822   NULL,
823   {FLOPPY_0,FLOPPY_1,FLOPPY_2,FLOPPY_3}
823824};
824825
825826/*************************************
r5743r5744
19041905   }
19051906}
19061907
1908FLOPPY_OPTIONS_START( x1 )
1909   FLOPPY_OPTION( d88, "d88",   "D88 Floppy Disk image",   fm7_d77_identify,   fm7_d77_construct, NULL)
1910   FLOPPY_OPTION( img2d, "2d", "2D disk image", basicdsk_identify_default, basicdsk_construct_default,
1911      HEADS([2])
1912      TRACKS([40])
1913      SECTORS([16])
1914      SECTOR_LENGTH([256])
1915      FIRST_SECTOR_ID([1]))
1916FLOPPY_OPTIONS_END
1917
1918static const floppy_config x1_floppy_config =
1919{
1920   FLOPPY_DRIVE_DS_80,
1921   FLOPPY_OPTIONS_NAME(x1)
1922};
1923
19071924static MACHINE_DRIVER_START( x1 )
19081925   /* basic machine hardware */
19091926   MDRV_CPU_ADD("maincpu", Z80, XTAL_4MHz)
r5743r5744
19481965   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
19491966
19501967   MDRV_CASSETTE_ADD("cass",x1_cassette_config)
1968   
1969   MDRV_FLOPPY_4_DRIVES_ADD(x1_floppy_config)   
19511970MACHINE_DRIVER_END
19521971
19531972static MACHINE_DRIVER_START( x1turbo )
r5743r5744
19631982
19641983/*************************************
19651984 *
1966 *  Image Load Functions
1967 *
1968 *************************************/
1969FLOPPY_OPTIONS_START( x1 )
1970   FLOPPY_OPTION( d88, "d88",   "D88 Floppy Disk image",   fm7_d77_identify,   fm7_d77_construct, NULL)
1971   FLOPPY_OPTION( img2d, "2d", "2D disk image", basicdsk_identify_default, basicdsk_construct_default,
1972      HEADS([2])
1973      TRACKS([40])
1974      SECTORS([16])
1975      SECTOR_LENGTH([256])
1976      FIRST_SECTOR_ID([1]))
1977FLOPPY_OPTIONS_END
1978
1979
1980static void x1_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
1981{
1982   /* floppy */
1983   switch(state)
1984   {
1985      /* --- the following bits of info are returned as 64-bit signed integers --- */
1986      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
1987
1988      /* --- the following bits of info are returned as pointers to data or functions --- */
1989      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_x1; break;
1990
1991      default:                              floppy_device_getinfo(devclass, state, info); break;
1992   }
1993}
1994
1995static SYSTEM_CONFIG_START(x1)
1996   CONFIG_DEVICE(x1_floppy_getinfo)
1997SYSTEM_CONFIG_END
1998
1999/*************************************
2000 *
20011985 * ROM definitions
20021986 *
20031987 *************************************/
r5743r5744
21012085
21022086
21032087/*    YEAR  NAME       PARENT  COMPAT   MACHINE  INPUT  INIT  CONFIG COMPANY   FULLNAME      FLAGS */
2104COMP( 1982, x1,        0,      0,       x1,      x1,    0,    x1,    "Sharp",  "X1 (CZ-800C)",         GAME_NOT_WORKING)
2105COMP( 1984, x1ck,      x1,     0,       x1,      x1,    0,    x1,    "Sharp",  "X1Ck (CZ-804C)",       GAME_NOT_WORKING)
2106COMP( 1984, x1turbo,   x1,     0,       x1turbo, x1,    0,    x1,    "Sharp",  "X1 Turbo (CZ-850C)",   GAME_NOT_WORKING)
2107COMP( 1986, x1turboz,  x1,     0,       x1turbo, x1,    0,    x1,    "Sharp",  "X1 Turbo Z (CZ-880C)", GAME_NOT_WORKING)
2088COMP( 1982, x1,        0,      0,       x1,      x1,    0,    0,    "Sharp",  "X1 (CZ-800C)",         GAME_NOT_WORKING)
2089COMP( 1984, x1ck,      x1,     0,       x1,      x1,    0,    0,    "Sharp",  "X1Ck (CZ-804C)",       GAME_NOT_WORKING)
2090COMP( 1984, x1turbo,   x1,     0,       x1turbo, x1,    0,    0,    "Sharp",  "X1 Turbo (CZ-850C)",   GAME_NOT_WORKING)
2091COMP( 1986, x1turboz,  x1,     0,       x1turbo, x1,    0,    0,    "Sharp",  "X1 Turbo Z (CZ-880C)", GAME_NOT_WORKING)
src/mess/drivers/xor100.c
r5743r5744
264264
265265static const wd17xx_interface wd1795_intf =
266266{
267   wd1795_callback
267   wd1795_callback,
268   NULL,
269   {FLOPPY_0,FLOPPY_1,NULL,NULL}
268270};
269271
270272/* Machine Initialization */
r5743r5744
315317   CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED
316318};
317319
320static FLOPPY_OPTIONS_START( xor100 )
321   FLOPPY_OPTION( xor100, "dsk", "XOR-100-12 disk image", basicdsk_identify_default, basicdsk_construct_default, // WRONG
322      HEADS([1])
323      TRACKS([80])
324      SECTORS([10])
325      SECTOR_LENGTH([512])
326      FIRST_SECTOR_ID([1]))
327FLOPPY_OPTIONS_END
328
329static const floppy_config xor100_floppy_config =
330{
331   FLOPPY_DRIVE_DS_80,
332   FLOPPY_OPTIONS_NAME(xor100)
333};
334
318335static MACHINE_DRIVER_START( xor100 )
319336   MDRV_DRIVER_DATA(xor100_state)
320337
r5743r5744
346363   MDRV_Z80CTC_ADD(Z80CTC_TAG, XTAL_8MHz/2, ctc_intf)
347364   MDRV_COM8116_ADD(COM5016_TAG, 5000000, com5016_intf) // COM5016
348365   MDRV_WD179X_ADD(WD1795_TAG, /*XTAL_8MHz/8,*/ wd1795_intf ) // WD1795-02
366   MDRV_FLOPPY_2_DRIVES_ADD(xor100_floppy_config)   
349367
350368   MDRV_CASSETTE_ADD(CASSETTE_TAG, xor100_cassette_config)
351369MACHINE_DRIVER_END
r5743r5744
359377
360378/* System Configuration */
361379
362static FLOPPY_OPTIONS_START( xor100 )
363   FLOPPY_OPTION( xor100, "dsk", "XOR-100-12 disk image", basicdsk_identify_default, basicdsk_construct_default, // WRONG
364      HEADS([1])
365      TRACKS([80])
366      SECTORS([10])
367      SECTOR_LENGTH([512])
368      FIRST_SECTOR_ID([1]))
369FLOPPY_OPTIONS_END
370
371static void xor100_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
372{
373   switch (state)
374   {
375      /* --- the following bits of info are returned as 64-bit signed integers --- */
376      case MESS_DEVINFO_INT_COUNT:         info->i = 2; break;
377
378      /* --- the following bits of info are returned as pointers to data or functions --- */
379      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:   info->p = (void *) floppyoptions_xor100; break;
380
381      default: floppy_device_getinfo(devclass, state, info); break;
382   }
383}
384380static SYSTEM_CONFIG_START( xor100 )
385   CONFIG_RAM_DEFAULT( 64 * 1024 )
386   CONFIG_DEVICE(xor100_floppy_getinfo)
381   CONFIG_RAM_DEFAULT( 64 * 1024 )   
387382SYSTEM_CONFIG_END
388383
389384/* System Drivers */
src/mess/drivers/tmc600.c
r5743r5744
312312   NULL,
313313   CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED
314314};
315static FLOPPY_OPTIONS_START(tmc600)
316   // dsk
317FLOPPY_OPTIONS_END
315318
319static const floppy_config tmc600_floppy_config =
320{
321   FLOPPY_DRIVE_DS_80,
322   FLOPPY_OPTIONS_NAME(tmc600)
323};
324
316325static MACHINE_DRIVER_START( tmc600 )
317326   MDRV_DRIVER_DATA(tmc600_state)
318327
r5743r5744
335344
336345   /* cassette */
337346   MDRV_CASSETTE_ADD(CASSETTE_TAG, tmc600_cassette_config)
347   
348   MDRV_FLOPPY_4_DRIVES_ADD(tmc600_floppy_config)   
338349MACHINE_DRIVER_END
339350
340351/* ROMs */
r5743r5744
364375ROM_END
365376
366377/* System Configuration */
367static FLOPPY_OPTIONS_START(tmc600)
368   // dsk
369FLOPPY_OPTIONS_END
370
371static void tmc600_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
372{
373   /* floppy */
374   switch(state)
375   {
376      /* --- the following bits of info are returned as 64-bit signed integers --- */
377      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
378
379      /* --- the following bits of info are returned as pointers to data or functions --- */
380      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_tmc600; break;
381
382      default:                              floppy_device_getinfo(devclass, state, info); break;
383   }
384}
385
386378static SYSTEM_CONFIG_START( tmc600 )
387379   CONFIG_RAM_DEFAULT   ( 8 * 1024)
388380   CONFIG_RAM         (16 * 1024)
389381   CONFIG_RAM         (24 * 1024)
390   CONFIG_DEVICE(tmc600_floppy_getinfo)
391382SYSTEM_CONFIG_END
392383
393384/* System Drivers */
src/mess/drivers/b2m.c
r5743r5744
175175   PORT_CONFSETTING(   0x00, "B/W")         
176176INPUT_PORTS_END
177177 
178static FLOPPY_OPTIONS_START(b2m)
179   FLOPPY_OPTION(b2m, "cpm", "Bashkiria-2M disk image", basicdsk_identify_default, basicdsk_construct_default,
180      HEADS([2])
181      TRACKS([80])
182      SECTORS([5])
183      SECTOR_LENGTH([1024])
184      FIRST_SECTOR_ID([1]))
185FLOPPY_OPTIONS_END
186
187static const floppy_config b2m_floppy_config =
188{
189   FLOPPY_DRIVE_DS_80,
190   FLOPPY_OPTIONS_NAME(b2m)
191};
192
178193/* Machine driver */
179194static MACHINE_DRIVER_START( b2m )
180195    /* basic machine hardware */
r5743r5744
217232   /* uart */
218233   MDRV_MSM8251_ADD("uart", default_msm8251_interface)
219234   
220   MDRV_WD1793_ADD("wd1793", default_wd17xx_interface )
235   MDRV_WD1793_ADD("wd1793", default_wd17xx_interface_2_drives )
236   
237   MDRV_FLOPPY_2_DRIVES_ADD(b2m_floppy_config)
221238MACHINE_DRIVER_END
222239
223240static MACHINE_DRIVER_START( b2mrom )
r5743r5744
226243     MDRV_CPU_IO_MAP(b2m_rom_io)
227244MACHINE_DRIVER_END
228245 
229static FLOPPY_OPTIONS_START(b2m)
230   FLOPPY_OPTION(b2m, "cpm", "Bashkiria-2M disk image", basicdsk_identify_default, basicdsk_construct_default,
231      HEADS([2])
232      TRACKS([80])
233      SECTORS([5])
234      SECTOR_LENGTH([1024])
235      FIRST_SECTOR_ID([1]))
236FLOPPY_OPTIONS_END
237
238static void b2m_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
239{
240   /* floppy */
241   switch(state)
242   {
243      /* --- the following bits of info are returned as 64-bit signed integers --- */
244      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
245
246      /* --- the following bits of info are returned as pointers to data or functions --- */
247      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_b2m; break;
248
249      default:                              floppy_device_getinfo(devclass, state, info); break;
250   }
251}
252
253246/* ROM definition */
254247
255248ROM_START( b2m )
r5743r5744
264257ROM_END
265258
266259static SYSTEM_CONFIG_START(b2m)   
267    CONFIG_RAM_DEFAULT(128 * 1024)
268    CONFIG_DEVICE(b2m_floppy_getinfo);
260    CONFIG_RAM_DEFAULT(128 * 1024)   
269261SYSTEM_CONFIG_END
270262
271263/* Driver */
src/mess/drivers/thomson.c
r5743r5744
635635     PORT_INCLUDE ( to7 )
636636INPUT_PORTS_END
637637
638static void thom_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
638static const floppy_config thomson_floppy_config =
639639{
640   /* floppy */
641   switch(state)
642   {
643      /* --- the following bits of info are returned as 64-bit signed integers --- */
644      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
640   FLOPPY_DRIVE_DS_80,
641   FLOPPY_OPTIONS_NAME(thomson)
642};
645643
646      /* --- the following bits of info are returned as pointers to data or functions --- */
647      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_thomson; break;
648
649      default:                              floppy_device_getinfo(devclass, state, info); break;
650   }
651}
652
653644/* ------------ config ------------ */
654645
655static SYSTEM_CONFIG_START ( to )
656     CONFIG_DEVICE ( thom_floppy_getinfo )
646static SYSTEM_CONFIG_START ( to )     
657647     CONFIG_DEVICE ( thom_serial_getinfo )
658648SYSTEM_CONFIG_END
659649
r5743r5744
728718   MDRV_PIA6821_ADD( THOM_PIA_MODEM, to7_pia6821_modem )
729719
730720/* acia */
731    MDRV_ACIA6551_ADD("acia")
721    MDRV_ACIA6551_ADD("acia")
732722
733723/* modem */
734    MDRV_ACIA6850_ADD( "acia6850", to7_modem )
724    MDRV_ACIA6850_ADD( "acia6850", to7_modem )
735725
736     MDRV_WD2793_ADD("wd2793", default_wd17xx_interface )
726    MDRV_WD2793_ADD("wd2793", default_wd17xx_interface )
727   
728   MDRV_FLOPPY_4_DRIVES_ADD(thomson_floppy_config)
737729
738730   /* cartridge */
739731   MDRV_CARTSLOT_ADD("cart")
r5743r5744
10981090
10991091/* ------------ config ------------ */
11001092
1101static SYSTEM_CONFIG_START ( mo )
1102     CONFIG_DEVICE ( thom_floppy_getinfo )
1093static SYSTEM_CONFIG_START ( mo )     
11031094     CONFIG_DEVICE ( thom_serial_getinfo )
11041095SYSTEM_CONFIG_END
11051096
src/mess/drivers/scorpion.c
r5743r5744
413413
414414static SYSTEM_CONFIG_START(scorpion)
415415   CONFIG_RAM_DEFAULT(256 * 1024)
416   CONFIG_DEVICE(beta_floppy_getinfo)
417416SYSTEM_CONFIG_END
418417
419418/*    YEAR  NAME      PARENT    COMPAT  MACHINE     INPUT       INIT    CONFIG      COMPANY     FULLNAME */
src/mess/drivers/abc80.c
r5743r5744
504504   state_save_register_global(machine, state->z80pio_astb);
505505}
506506
507static const floppy_config abc80_floppy_config =
508{
509   FLOPPY_DRIVE_DS_80,
510   FLOPPY_OPTIONS_NAME(abc80)
511};
512
507513/* Machine Drivers */
508514
509515static MACHINE_DRIVER_START( abc80 )
r5743r5744
542548
543549   /* cassette */
544550   MDRV_CASSETTE_ADD("cassette", default_cassette_config)
551   
552   MDRV_FLOPPY_2_DRIVES_ADD(abc80_floppy_config)
545553MACHINE_DRIVER_END
546554
547555/* ROMs */
r5743r5744
623631ROM_END
624632
625633/* System Configuration */
626static void abc80_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
627{
628   /* floppy */
629   switch(state)
630   {
631      /* --- the following bits of info are returned as 64-bit signed integers --- */
632      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
633634
634      /* --- the following bits of info are returned as pointers to data or functions --- */
635      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_abc80; break;
636
637      default:                              floppy_device_getinfo(devclass, state, info); break;
638   }
639}
640
641635static SYSTEM_CONFIG_START( abc80 )
642636   CONFIG_RAM_DEFAULT(16 * 1024)
643637   CONFIG_RAM        (32 * 1024)
644   CONFIG_DEVICE(abc80_floppy_getinfo)
645638SYSTEM_CONFIG_END
646639
647640/* Drivers */
src/mess/drivers/atarist.c
r5743r5744
17921792   return INIT_FAIL;
17931793}
17941794
1795static const floppy_config atarist_floppy_config =
1796{
1797   FLOPPY_DRIVE_DS_80,
1798   FLOPPY_OPTIONS_NAME(atarist)
1799};
1800
17951801static MACHINE_DRIVER_START( atarist_cartslot )
17961802   MDRV_CARTSLOT_ADD("cart")
17971803   MDRV_CARTSLOT_EXTENSION_LIST("stc")
r5743r5744
18391845   MDRV_ACIA6850_ADD("acia_1", acia_midi_intf)
18401846
18411847   MDRV_WD1772_ADD(WD1772_TAG, atarist_wd17xx_interface )
1848   
1849   MDRV_FLOPPY_2_DRIVES_ADD(atarist_floppy_config)
18421850
18431851   MDRV_IMPORT_FROM(atarist_cartslot)
18441852MACHINE_DRIVER_END
r5743r5744
19011909   MDRV_ACIA6850_ADD("acia_1", acia_midi_intf)
19021910
19031911   MDRV_WD1772_ADD(WD1772_TAG, atarist_wd17xx_interface )
1912   
1913   MDRV_FLOPPY_2_DRIVES_ADD(atarist_floppy_config)
19041914
19051915   MDRV_IMPORT_FROM(atarist_cartslot)
19061916MACHINE_DRIVER_END
r5743r5744
19571967   MDRV_ACIA6850_ADD("acia_1", acia_midi_intf)
19581968
19591969   MDRV_WD1772_ADD(WD1772_TAG, atarist_wd17xx_interface )
1970   
1971   MDRV_FLOPPY_2_DRIVES_ADD(atarist_floppy_config)
19601972
19611973   MDRV_IMPORT_FROM(atarist_cartslot)
19621974MACHINE_DRIVER_END
r5743r5744
20992111ROM_END
21002112
21012113/* System Configuration */
2102static void atarist_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
2103{
2104   /* floppy */
2105   switch(state)
2106   {
2107      /* --- the following bits of info are returned as 64-bit signed integers --- */
2108      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
2109
2110      /* --- the following bits of info are returned as pointers to data or functions --- */
2111      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_atarist; break;
2112
2113      default:                              floppy_device_getinfo(devclass, state, info); break;
2114   }
2115}
21162114static DEVICE_IMAGE_LOAD( atarist_serial )
21172115{
21182116   /* filename specified */
r5743r5744
21742172   CONFIG_RAM_DEFAULT(1024 * 1024) // 1040ST
21752173   CONFIG_RAM        ( 512 * 1024) //  520ST
21762174   CONFIG_RAM        ( 256 * 1024) //  260ST
2177   CONFIG_DEVICE(atarist_floppy_getinfo)
21782175   CONFIG_DEVICE(atarist_serial_getinfo)
21792176   // MIDI
21802177SYSTEM_CONFIG_END
r5743r5744
21832180   CONFIG_RAM_DEFAULT(4096 * 1024) // Mega ST 4
21842181   CONFIG_RAM        (2048 * 1024) // Mega ST 2
21852182   CONFIG_RAM        (1024 * 1024) // Mega ST 1
2186   CONFIG_DEVICE(atarist_floppy_getinfo)
21872183   CONFIG_DEVICE(atarist_serial_getinfo)
21882184   // MIDI
21892185SYSTEM_CONFIG_END
r5743r5744
21912187static SYSTEM_CONFIG_START( atariste )
21922188   CONFIG_RAM_DEFAULT(1024 * 1024) // 1040STe
21932189   CONFIG_RAM        ( 512 * 1024) //  520STe
2194   CONFIG_DEVICE(atarist_floppy_getinfo)
21952190   CONFIG_DEVICE(atarist_serial_getinfo)
21962191   // MIDI
21972192SYSTEM_CONFIG_END
r5743r5744
22002195   CONFIG_RAM_DEFAULT(4096 * 1024) // Mega STe 4
22012196   CONFIG_RAM        (2048 * 1024) // Mega STe 2
22022197   CONFIG_RAM        (1024 * 1024) // Mega STe 1
2203   CONFIG_DEVICE(atarist_floppy_getinfo)
22042198   CONFIG_DEVICE(megaste_serial_getinfo)
22052199   // MIDI
22062200   // LAN
r5743r5744
22092203static SYSTEM_CONFIG_START( stbook )
22102204   CONFIG_RAM_DEFAULT(4096 * 1024)
22112205   CONFIG_RAM        (1024 * 1024)
2212   CONFIG_DEVICE(atarist_floppy_getinfo)
22132206   CONFIG_DEVICE(megaste_serial_getinfo)
22142207   // MIDI
22152208   // IDE Hard Disk
src/mess/drivers/sg1000.c
r5743r5744
637637    */
638638
639639   /* floppy motor */
640   floppy_drive_set_motor_state(image_from_devtype_and_index(device->machine, IO_FLOPPY, 0), (data & 0x02) ? 0 : 1);
641   floppy_drive_set_ready_state(image_from_devtype_and_index(device->machine, IO_FLOPPY, 0), 1, 0);
640   floppy_drive_set_motor_state(floppy_get_device(device->machine, 0), (data & 0x02) ? 0 : 1);
641   floppy_drive_set_ready_state(floppy_get_device(device->machine, 0), 1, 0);
642642
643643   /* FDC terminal count */
644644   nec765_tc_w(fdc, data & 0x04);
r5743r5744
695695   DEVCB_LINE(sf7000_fdc_interrupt),
696696   NULL,
697697   NULL,
698   NEC765_RDY_PIN_CONNECTED
698   NEC765_RDY_PIN_CONNECTED,
699   {FLOPPY_0, NULL, NULL, NULL }
699700};
700701
701702
r5743r5744
710711   TMS9928A_configure(&tms9928a_interface);
711712
712713   /* configure FDC */
713   floppy_drive_set_index_pulse_callback(image_from_devtype_and_index(machine, IO_FLOPPY, 0), sf7000_fdc_index_callback);
714   floppy_drive_set_index_pulse_callback(floppy_get_device(machine, 0), sf7000_fdc_index_callback);
714715
715716   /* configure memory banking */
716717   memory_configure_bank(machine, 1, 0, 1, memory_region(machine, Z80_TAG), 0);
r5743r5744
907908   MDRV_CARTSLOT_LOAD(sc3000_cart)
908909MACHINE_DRIVER_END
909910
911static FLOPPY_OPTIONS_START(sf7000)
912   FLOPPY_OPTION(sf7000, "sf7", "SF7 disk image", basicdsk_identify_default, basicdsk_construct_default,
913      HEADS([1])
914      TRACKS([40])
915      SECTORS([16])
916      SECTOR_LENGTH([256])
917      FIRST_SECTOR_ID([1]))
918FLOPPY_OPTIONS_END
919
920static const floppy_config sf7000_floppy_config =
921{
922   FLOPPY_DRIVE_DS_80,
923   FLOPPY_OPTIONS_NAME(sf7000)
924};
925
910926static MACHINE_DRIVER_START( sf7000 )
911927   MDRV_DRIVER_DATA(sg1000_state)
912928
r5743r5744
944960   MDRV_MSM8251_ADD("uart", default_msm8251_interface)
945961
946962   MDRV_NEC765A_ADD(NEC765_TAG, sf7000_nec765_interface)
963   
964   MDRV_FLOPPY_DRIVE_ADD(FLOPPY_0, sf7000_floppy_config)
947965MACHINE_DRIVER_END
948966
949967/* ROMs */
r5743r5744
980998ROM_END
981999
9821000/* System Configuration */
983static FLOPPY_OPTIONS_START(sf7000)
984   FLOPPY_OPTION(sf7000, "sf7", "SF7 disk image", basicdsk_identify_default, basicdsk_construct_default,
985      HEADS([1])
986      TRACKS([40])
987      SECTORS([16])
988      SECTOR_LENGTH([256])
989      FIRST_SECTOR_ID([1]))
990FLOPPY_OPTIONS_END
991
992static void sf7000_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
993{
994   /* floppy */
995   switch(state)
996   {
997      /* --- the following bits of info are returned as 64-bit signed integers --- */
998      case MESS_DEVINFO_INT_COUNT:                     info->i = 1; break;
999
1000      /* --- the following bits of info are returned as pointers to data or functions --- */
1001      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_sf7000; break;
1002
1003      default:                              floppy_device_getinfo(devclass, state, info); break;
1004   }
1005}
1006
10071001static void sf7000_serial_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
10081002{
10091003   /* serial */
r5743r5744
10321026SYSTEM_CONFIG_END
10331027
10341028static SYSTEM_CONFIG_START( sf7000 )
1035   CONFIG_RAM_DEFAULT   (64 * 1024)
1036   CONFIG_DEVICE(sf7000_floppy_getinfo)
1029   CONFIG_RAM_DEFAULT   (64 * 1024)   
10371030   CONFIG_DEVICE(sf7000_serial_getinfo)
10381031SYSTEM_CONFIG_END
10391032
src/mess/drivers/mikromik.c
r5743r5744
6666
6767INLINE const device_config *get_floppy_image(running_machine *machine, int drive)
6868{
69   return image_from_devtype_and_index(machine, IO_FLOPPY, drive);
69   return floppy_get_device(machine, drive);
7070}
7171
7272/* Read/Write Handlers */
r5743r5744
311311   DEVCB_CPU_INPUT_LINE(I8085A_TAG, I8085_RST55_LINE),
312312   drq_w,
313313   NULL,
314   NEC765_RDY_PIN_CONNECTED // ???
314   NEC765_RDY_PIN_CONNECTED, // ???
315   {FLOPPY_0,FLOPPY_1, NULL, NULL}
315316};
316317
317318/* 8253 Interface */
r5743r5744
451452   state_save_register_global(machine, state->recall);
452453}
453454
454/* Machine Drivers */
455static FLOPPY_OPTIONS_START( mm1 )
456   FLOPPY_OPTION( mm1_640kb, "dsk", "Nokia MikroMikko 1 640KB disk image", basicdsk_identify_default, basicdsk_construct_default,
457      HEADS([2])
458      TRACKS([80])
459      SECTORS([8])
460      SECTOR_LENGTH([512])
461      FIRST_SECTOR_ID([1]))
462FLOPPY_OPTIONS_END
455463
464static FLOPPY_OPTIONS_START( mm2 )
465   FLOPPY_OPTION( mm2_360kb, "dsk", "Nokia MikroMikko 2 360KB disk image", basicdsk_identify_default, basicdsk_construct_default,
466      HEADS([2])
467      TRACKS([40])
468      SECTORS([9])
469      SECTOR_LENGTH([512])
470      FIRST_SECTOR_ID([1]))
471
472   FLOPPY_OPTION( mm2_720kb, "dsk", "Nokia MikroMikko 2 720KB disk image", basicdsk_identify_default, basicdsk_construct_default,
473      HEADS([2])
474      TRACKS([40])
475      SECTORS([18])
476      SECTOR_LENGTH([512])
477      FIRST_SECTOR_ID([1]))
478FLOPPY_OPTIONS_END
479
480static const floppy_config mm1_floppy_config =
481{
482   FLOPPY_DRIVE_DS_80,
483   FLOPPY_OPTIONS_NAME(mm1)
484};
485
486/* Machine Drivers */
456487static MACHINE_DRIVER_START( mm1 )
457488   MDRV_DRIVER_DATA(mm1_state)
458489
r5743r5744
484515   MDRV_PIT8253_ADD(I8253_TAG, mm1_pit8253_intf)
485516   MDRV_NEC765A_ADD(UPD765_TAG, /* XTAL_16MHz/2/2, */ mm1_nec765_intf)
486517   MDRV_UPD7201_ADD(UPD7201_TAG, XTAL_6_144MHz/2, mm1_upd7201_intf)
518   
519   MDRV_FLOPPY_2_DRIVES_ADD(mm1_floppy_config)
487520MACHINE_DRIVER_END
488521
489522static MACHINE_DRIVER_START( mm1m6 )
r5743r5744
510543#define rom_mm1m7 rom_mm1m6
511544
512545/* System Configuration */
513
514static FLOPPY_OPTIONS_START( mm1 )
515   FLOPPY_OPTION( mm1_640kb, "dsk", "Nokia MikroMikko 1 640KB disk image", basicdsk_identify_default, basicdsk_construct_default,
516      HEADS([2])
517      TRACKS([80])
518      SECTORS([8])
519      SECTOR_LENGTH([512])
520      FIRST_SECTOR_ID([1]))
521FLOPPY_OPTIONS_END
522
523static FLOPPY_OPTIONS_START( mm2 )
524   FLOPPY_OPTION( mm2_360kb, "dsk", "Nokia MikroMikko 2 360KB disk image", basicdsk_identify_default, basicdsk_construct_default,
525      HEADS([2])
526      TRACKS([40])
527      SECTORS([9])
528      SECTOR_LENGTH([512])
529      FIRST_SECTOR_ID([1]))
530
531   FLOPPY_OPTION( mm2_720kb, "dsk", "Nokia MikroMikko 2 720KB disk image", basicdsk_identify_default, basicdsk_construct_default,
532      HEADS([2])
533      TRACKS([40])
534      SECTORS([18])
535      SECTOR_LENGTH([512])
536      FIRST_SECTOR_ID([1]))
537FLOPPY_OPTIONS_END
538
539static void dual_640kb_floppy(const mess_device_class *devclass, UINT32 state, union devinfo *info)
540{
541   switch(state)
542   {
543      /* --- the following bits of info are returned as 64-bit signed integers --- */
544      case MESS_DEVINFO_INT_COUNT:         info->i = 2; break;
545
546      /* --- the following bits of info are returned as pointers to data or functions --- */
547      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:   info->p = (void *) floppyoptions_mm1; break;
548
549      default:                        floppy_device_getinfo(devclass, state, info); break;
550   }
551}
552
553546static SYSTEM_CONFIG_START( mm1m6 )
554547   CONFIG_RAM_DEFAULT   (64 * 1024)
555   CONFIG_DEVICE(dual_640kb_floppy)
556548SYSTEM_CONFIG_END
557549
558550static SYSTEM_CONFIG_START( mm1m7 )
559551   CONFIG_RAM_DEFAULT   (64 * 1024)
560   CONFIG_DEVICE(dual_640kb_floppy)
561552   // 5MB Winchester
562553SYSTEM_CONFIG_END
563554
src/mess/drivers/pcw.c
r5743r5744
144144   DEVCB_LINE(pcw_fdc_interrupt),
145145   NULL,
146146   NULL,
147   NEC765_RDY_PIN_CONNECTED
147   NEC765_RDY_PIN_CONNECTED,
148   {FLOPPY_0,FLOPPY_1, NULL, NULL}
148149};
149150
150151// set/reset INT and NMI lines
r5743r5744
530531      /* disc motor on */
531532      case 9:
532533      {
533         floppy_drive_set_motor_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 0), 1);
534         floppy_drive_set_motor_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 1), 1);
535         floppy_drive_set_ready_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 0), 1,1);
536         floppy_drive_set_ready_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 1), 1,1);
534         floppy_drive_set_motor_state(floppy_get_device(space->machine, 0), 1);
535         floppy_drive_set_motor_state(floppy_get_device(space->machine, 1), 1);
536         floppy_drive_set_ready_state(floppy_get_device(space->machine, 0), 1,1);
537         floppy_drive_set_ready_state(floppy_get_device(space->machine, 1), 1,1);
537538      }
538539      break;
539540
540541      /* disc motor off */
541542      case 10:
542543      {
543         floppy_drive_set_motor_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 0), 0);
544         floppy_drive_set_motor_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 1), 0);
545         floppy_drive_set_ready_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 0), 0,1);
546         floppy_drive_set_ready_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 1), 0,1);
544         floppy_drive_set_motor_state(floppy_get_device(space->machine, 0), 0);
545         floppy_drive_set_motor_state(floppy_get_device(space->machine, 1), 0);
546         floppy_drive_set_ready_state(floppy_get_device(space->machine, 0), 0,1);
547         floppy_drive_set_ready_state(floppy_get_device(space->machine, 1), 0,1);
547548      }
548549      break;
549550
r5743r5744
733734static MACHINE_START( pcw )
734735{
735736   fdc_interrupt_code = 2;
736   floppy_drive_set_geometry(image_from_devtype_and_index(machine, IO_FLOPPY, 0), FLOPPY_DRIVE_DS_80);
737   floppy_drive_set_geometry(image_from_devtype_and_index(machine, IO_FLOPPY, 1), FLOPPY_DRIVE_DS_80);
737   floppy_drive_set_geometry(floppy_get_device(machine, 0), FLOPPY_DRIVE_DS_80);
738   floppy_drive_set_geometry(floppy_get_device(machine, 1), FLOPPY_DRIVE_DS_80);
738739}
739740
740741static MACHINE_RESET( pcw )
r5743r5744
975976   PORT_BIT( 0xff, 0x00,    IPT_UNUSED)
976977INPUT_PORTS_END
977978
979static const floppy_config pcw_floppy_config =
980{
981   FLOPPY_DRIVE_DS_80,
982   FLOPPY_OPTIONS_NAME(dsk)
983};
978984
979985/* PCW8256, PCW8512, PCW9256 */
980986static MACHINE_DRIVER_START( pcw )
r5743r5744
10061012   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
10071013   
10081014   MDRV_NEC765A_ADD("nec765", pcw_nec765_interface)
1015   
1016   MDRV_FLOPPY_2_DRIVES_ADD(pcw_floppy_config)
10091017MACHINE_DRIVER_END
10101018
10111019
r5743r5744
10451053ROM_PCW(pcw9512)
10461054ROM_PCW(pcw10)
10471055
1048static void generic_pcw_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
1049{
1050   /* floppy */
1051   switch(state)
1052   {
1053      /* --- the following bits of info are returned as 64-bit signed integers --- */
1054      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
1055
1056      /* --- the following bits of info are returned as pointers to data or functions --- */
1057      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_dsk; break;
1058
1059      default:                              floppy_device_getinfo(devclass, state, info); break;
1060   }
1061}
1062
1063
1064static SYSTEM_CONFIG_START(generic_pcw)
1065   CONFIG_DEVICE(generic_pcw_floppy_getinfo)
1066SYSTEM_CONFIG_END
1067
10681056static SYSTEM_CONFIG_START(pcw_256k)
1069   CONFIG_IMPORT_FROM(generic_pcw)
10701057   CONFIG_RAM_DEFAULT(256 * 1024)
10711058SYSTEM_CONFIG_END
10721059
10731060static SYSTEM_CONFIG_START(pcw_512k)
1074   CONFIG_IMPORT_FROM(generic_pcw)
10751061   CONFIG_RAM_DEFAULT(512 * 1024)
10761062SYSTEM_CONFIG_END
10771063
src/mess/drivers/osi.c
r5743r5744
730730   MACHINE_START_CALL(c1p);
731731
732732   /* set floppy index hole callback */
733   floppy_drive_set_index_pulse_callback(image_from_devtype_and_index(machine, IO_FLOPPY, 0), osi470_index_callback);
733   floppy_drive_set_index_pulse_callback(floppy_get_device(machine, 0), osi470_index_callback);
734734}
735735
736static FLOPPY_OPTIONS_START(osi)
737   FLOPPY_OPTION(osi, "img", "OSI disk image", basicdsk_identify_default, basicdsk_construct_default,
738      HEADS([1])
739      TRACKS([36])
740      SECTORS([10])
741      SECTOR_LENGTH([256])
742      FIRST_SECTOR_ID([0]))
743FLOPPY_OPTIONS_END
744
745static const floppy_config osi_floppy_config =
746{
747   FLOPPY_DRIVE_SS_40,
748   FLOPPY_OPTIONS_NAME(osi)
749};
750
736751/* Machine Drivers */
737752
738753static MACHINE_DRIVER_START( osi600 )
r5743r5744
822837
823838   /* floppy ACIA */
824839   MDRV_ACIA6850_ADD("acia_1", osi470_acia_intf)
840   
841   MDRV_FLOPPY_DRIVE_ADD(FLOPPY_0, osi_floppy_config)
825842MACHINE_DRIVER_END
826843
827844/* ROMs */
r5743r5744
884901   CONFIG_RAM        (20 * 1024 )
885902SYSTEM_CONFIG_END
886903
887static FLOPPY_OPTIONS_START(osi)
888   FLOPPY_OPTION(osi, "img", "OSI disk image", basicdsk_identify_default, basicdsk_construct_default,
889      HEADS([1])
890      TRACKS([36])
891      SECTORS([10])
892      SECTOR_LENGTH([256])
893      FIRST_SECTOR_ID([0]))
894FLOPPY_OPTIONS_END
895
896static void osi_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
897{
898   /* floppy */
899   switch(state)
900   {
901      /* --- the following bits of info are returned as 64-bit signed integers --- */
902      case MESS_DEVINFO_INT_COUNT:                     info->i = 1; break;
903
904      /* --- the following bits of info are returned as pointers to data or functions --- */
905      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_osi; break;
906
907      default:                              floppy_device_getinfo(devclass, state, info); break;
908   }
909}
910904static SYSTEM_CONFIG_START( c1pmf )
911905   CONFIG_RAM_DEFAULT(20 * 1024 )
912   CONFIG_DEVICE( osi_floppy_getinfo )
913906SYSTEM_CONFIG_END
914907
915908/* System Drivers */
src/mess/drivers/oric.c
r5743r5744
360360   DEVCB_NULL
361361};
362362
363static const floppy_config oric1_floppy_config =
364{
365   FLOPPY_DRIVE_DS_80,
366   FLOPPY_OPTIONS_NAME(oric)
367};
368
369static const floppy_config prav8d_floppy_config =
370{
371   FLOPPY_DRIVE_DS_80,
372   FLOPPY_OPTIONS_NAME(apple2)
373};
374
363375static MACHINE_DRIVER_START( oric )
364376   /* basic machine hardware */
365377   MDRV_CPU_ADD("maincpu", M6502, 1000000)
r5743r5744
400412   MDRV_VIA6522_ADD( "via6522_0", 1000000, oric_6522_interface )
401413
402414   MDRV_WD179X_ADD("wd179x", oric_wd17xx_interface )
415   
416   MDRV_FLOPPY_4_DRIVES_ADD(oric1_floppy_config)
403417MACHINE_DRIVER_END
404418
419static MACHINE_DRIVER_START( prav8d)
420   MDRV_IMPORT_FROM( oric )
421   MDRV_FLOPPY_4_DRIVES_REMOVE()
422   MDRV_FLOPPY_DRIVE_ADD(FLOPPY_0, prav8d_floppy_config)
423MACHINE_DRIVER_END
405424
406425static MACHINE_DRIVER_START( telstrat)
407426   MDRV_IMPORT_FROM( oric )
r5743r5744
506525    ROM_LOAD_OPTIONAL( "8ddoshi.rom", 0x014100, 0x0200, CRC(66309641) SHA1(9c2e82b3c4d385ade6215fcb89f8b92e6fd2bf4b) )
507526ROM_END
508527
509static void oric1_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
510{
511   /* floppy */
512   switch(state)
513   {
514      /* --- the following bits of info are returned as 64-bit signed integers --- */
515      case MESS_DEVINFO_INT_COUNT:               info->i = 4; break;
516528
517      /* --- the following bits of info are returned as pointers to data or functions --- */
518      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:         info->p = (void *) floppyoptions_oric; break;
519
520      default:                              floppy_device_getinfo(devclass, state, info); break;
521   }
522}
523
524static SYSTEM_CONFIG_START(oric1)
525   CONFIG_DEVICE(oric1_floppy_getinfo)
526SYSTEM_CONFIG_END
527
528static void prav8_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
529{
530   /* floppy */
531   switch(state)
532   {
533      /* --- the following bits of info are returned as 64-bit signed integers --- */
534      case MESS_DEVINFO_INT_COUNT:               info->i = 1; break;
535
536      /* --- the following bits of info are returned as pointers to data or functions --- */
537      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:         info->p = (void *) floppyoptions_apple2; break;
538
539      default:                              floppy_device_getinfo(devclass, state, info); break;
540   }
541}
542
543static SYSTEM_CONFIG_START(prav8)
544   CONFIG_DEVICE(prav8_floppy_getinfo)
545SYSTEM_CONFIG_END
546
547
548529/*    YEAR   NAME       PARENT  COMPAT  MACHINE     INPUT       INIT    CONFIG    COMPANY         FULLNAME */
549COMP( 1983, oric1,     0,      0,      oric,       oric,       0,       oric1,    "Tangerine",    "Oric 1" , 0)
550COMP( 1984, orica,     oric1,   0,      oric,       orica,       0,       oric1,    "Tangerine",    "Oric Atmos" , 0)
551COMP( 1985, prav8d,    oric1,   0,      oric,       prav8d,     0,      prav8,    "Pravetz",      "Pravetz 8D", 0)
552COMP( 1989, prav8dd,   oric1,   0,      oric,       prav8d,     0,      prav8,    "Pravetz",      "Pravetz 8D (Disk ROM)", GAME_COMPUTER_MODIFIED)
553COMP( 1986, telstrat,  oric1,   0,      telstrat,   telstrat,   0,      oric1,    "Tangerine",    "Oric Telestrat", GAME_NOT_WORKING )
530COMP( 1983, oric1,     0,      0,      oric,       oric,       0,       0,    "Tangerine",    "Oric 1" , 0)
531COMP( 1984, orica,     oric1,   0,      oric,       orica,       0,       0,    "Tangerine",    "Oric Atmos" , 0)
532COMP( 1985, prav8d,    oric1,   0,      prav8d,     prav8d,     0,      0,    "Pravetz",      "Pravetz 8D", 0)
533COMP( 1989, prav8dd,   oric1,   0,      prav8d,     prav8d,     0,      0,    "Pravetz",      "Pravetz 8D (Disk ROM)", GAME_COMPUTER_MODIFIED)
534COMP( 1986, telstrat,  oric1,   0,      telstrat,   telstrat,   0,      0,    "Tangerine",    "Oric Telestrat", GAME_NOT_WORKING )
src/mess/drivers/at.c
r5743r5744
429429   DEVCB_CPU_INPUT_LINE("maincpu", 0)
430430};
431431
432static const floppy_config ibmat_floppy_config =
433{
434   FLOPPY_DRIVE_DS_80,
435   FLOPPY_OPTIONS_NAME(pc)
436};
432437
433438static MACHINE_DRIVER_START( ibm5170 )
434439   /* basic machine hardware */
r5743r5744
488493   MDRV_IMPORT_FROM( pc_hdc )
489494
490495   MDRV_NEC765A_ADD("nec765", pc_fdc_nec765_not_connected_interface)
496   
497   MDRV_FLOPPY_2_DRIVES_ADD(ibmat_floppy_config)
491498MACHINE_DRIVER_END
492499
493500
r5743r5744
551558   MDRV_IMPORT_FROM( pc_hdc )
552559
553560   MDRV_NEC765A_ADD("nec765", pc_fdc_nec765_not_connected_interface)
561   
562   MDRV_FLOPPY_2_DRIVES_ADD(ibmat_floppy_config)
554563MACHINE_DRIVER_END
555564
556565
r5743r5744
616625   MDRV_IMPORT_FROM( pc_hdc )
617626
618627   MDRV_NEC765A_ADD("nec765", pc_fdc_nec765_not_connected_interface)
628   
629   MDRV_FLOPPY_2_DRIVES_ADD(ibmat_floppy_config)
619630MACHINE_DRIVER_END
620631
621632
r5743r5744
683694   MDRV_IMPORT_FROM( pc_hdc )
684695
685696   MDRV_NEC765A_ADD("nec765", pc_fdc_nec765_not_connected_interface)
697   
698   MDRV_FLOPPY_2_DRIVES_ADD(ibmat_floppy_config)
686699MACHINE_DRIVER_END
687700
688701
r5743r5744
747760   MDRV_IMPORT_FROM( pc_hdc )
748761
749762   MDRV_NEC765A_ADD("nec765", pc_fdc_nec765_not_connected_interface)
763   
764   MDRV_FLOPPY_2_DRIVES_ADD(ibmat_floppy_config)
750765MACHINE_DRIVER_END
751766
752767
r5743r5744
10611076   ROM_LOAD("14166.bin", 0x0000, 0x2000, CRC(1aea1b53) SHA1(b75b6d4509036406052157bc34159f7039cdc72e))
10621077ROM_END
10631078
1064
1065static void ibmat_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
1066{
1067   /* floppy */
1068   switch(state)
1069   {
1070      /* --- the following bits of info are returned as 64-bit signed integers --- */
1071      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
1072
1073      /* --- the following bits of info are returned as pointers to data or functions --- */
1074      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_pc; break;
1075
1076      default:                              floppy_device_getinfo(devclass, state, info); break;
1077   }
1078}
1079
1080
10811079static SYSTEM_CONFIG_START(ibmat)
1082   CONFIG_RAM_DEFAULT( (640+1024) * 1024 )
1083   CONFIG_DEVICE(ibmat_floppy_getinfo)
1080   CONFIG_RAM_DEFAULT( (640+1024) * 1024 )   
10841081SYSTEM_CONFIG_END
10851082
10861083/***************************************************************************
src/mess/drivers/vector06.c
r5743r5744
144144      FIRST_SECTOR_ID([1]))
145145FLOPPY_OPTIONS_END
146146
147static void vector_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
147static const floppy_config vector_floppy_config =
148148{
149   /* floppy */
150   switch(state)
151   {
152      /* --- the following bits of info are returned as 64-bit signed integers --- */
153      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
149   FLOPPY_DRIVE_DS_80,
150   FLOPPY_OPTIONS_NAME(vector)
151};
154152
155      /* --- the following bits of info are returned as pointers to data or functions --- */
156      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_vector; break;
157
158      default:                              floppy_device_getinfo(devclass, state, info); break;
159   }
160}
161
162153/* Machine driver */
163154static MACHINE_DRIVER_START( vector06 )
164155  /* basic machine hardware */
r5743r5744
194185
195186   MDRV_CASSETTE_ADD( "cassette", vector_cassette_config )
196187   
197   MDRV_WD1793_ADD("wd1793", default_wd17xx_interface )   
188   MDRV_WD1793_ADD("wd1793", default_wd17xx_interface_2_drives )   
189   MDRV_FLOPPY_2_DRIVES_ADD(vector_floppy_config)   
198190
199191   /* cartridge */
200192   MDRV_CARTSLOT_ADD("cart")
r5743r5744
236228
237229static SYSTEM_CONFIG_START(vector06)
238230    CONFIG_RAM_DEFAULT(64 * 1024)
239    CONFIG_DEVICE(vector_floppy_getinfo);
240231SYSTEM_CONFIG_END
241232
242233/* Driver */
src/mess/drivers/v1050.c
r5743r5744
125125
126126INLINE const device_config *get_floppy_image(running_machine *machine, int drive)
127127{
128   return image_from_devtype_and_index(machine, IO_FLOPPY, drive);
128   return floppy_get_device(machine, drive);
129129}
130130
131131void v1050_set_int(running_machine *machine, UINT8 mask, int state)
r5743r5744
10821082
10831083static const wd17xx_interface v1050_wd17xx_intf =
10841084{
1085   v1050_mb8877_callback
1085   v1050_mb8877_callback,
1086   NULL,
1087   {FLOPPY_0,FLOPPY_1,NULL,NULL}
10861088};
10871089
10881090/* Machine Initialization */
r5743r5744
11691171   v1050_bankswitch(machine);
11701172}
11711173
1172/* Machine Driver */
11731174
1175static FLOPPY_OPTIONS_START( v1050 )
1176   FLOPPY_OPTION( v1050, "dsk", "Visual 1050 disk image", basicdsk_identify_default, basicdsk_construct_default,
1177      HEADS([1])
1178      TRACKS([80])
1179      SECTORS([10])
1180      SECTOR_LENGTH([512])
1181      FIRST_SECTOR_ID([1]))
1182FLOPPY_OPTIONS_END
1183
1184static const floppy_config v1050_floppy_config =
1185{
1186   FLOPPY_DRIVE_DS_80,
1187   FLOPPY_OPTIONS_NAME(v1050)
1188};
1189
1190/* Machine Driver */
11741191static MACHINE_DRIVER_START( v1050 )
11751192   MDRV_DRIVER_DATA(v1050_state)
11761193
r5743r5744
12121229   MDRV_MSM8251_ADD(I8251A_KB_TAG, /*XTAL_16MHz/8,*/ kb_8251_intf)
12131230   MDRV_MSM8251_ADD(I8251A_SIO_TAG, /*XTAL_16MHz/8,*/ sio_8251_intf)
12141231   MDRV_WD1793_ADD(MB8877_TAG, /*XTAL_16MHz/16,*/ v1050_wd17xx_intf )
1232   MDRV_FLOPPY_2_DRIVES_ADD(v1050_floppy_config)   
12151233   MDRV_TIMER_ADD_PERIODIC(TIMER_KB_TAG, kb_8251_tick, HZ((double)XTAL_16MHz/4/13/8))
12161234   MDRV_TIMER_ADD_PERIODIC(TIMER_SIO_TAG, sio_8251_tick, HZ((double)XTAL_16MHz/4/13/16))
12171235
r5743r5744
12341252ROM_END
12351253
12361254/* System Configuration */
1237
1238static FLOPPY_OPTIONS_START( v1050 )
1239   FLOPPY_OPTION( v1050, "dsk", "Visual 1050 disk image", basicdsk_identify_default, basicdsk_construct_default,
1240      HEADS([1])
1241      TRACKS([80])
1242      SECTORS([10])
1243      SECTOR_LENGTH([512])
1244      FIRST_SECTOR_ID([1]))
1245FLOPPY_OPTIONS_END
1246
1247static void v1050_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
1248{
1249   switch (state)
1250   {
1251      /* --- the following bits of info are returned as 64-bit signed integers --- */
1252      case MESS_DEVINFO_INT_COUNT:         info->i = 2; break;
1253
1254      /* --- the following bits of info are returned as pointers to data or functions --- */
1255      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:   info->p = (void *) floppyoptions_v1050; break;
1256
1257      default: floppy_device_getinfo(devclass, state, info); break;
1258   }
1259}
1260
12611255static SYSTEM_CONFIG_START( v1050 )
12621256   CONFIG_RAM_DEFAULT( 128 * 1024 )
1263   CONFIG_DEVICE(v1050_floppy_getinfo)
12641257SYSTEM_CONFIG_END
12651258
12661259/* System Drivers */
src/mess/drivers/ql.c
r5743r5744
610610   return INIT_FAIL;
611611}
612612
613
614static FLOPPY_OPTIONS_START(ql)
615   FLOPPY_OPTION(ql, "dsk", "SSSD disk image", basicdsk_identify_default, basicdsk_construct_default,
616      HEADS([1])
617      TRACKS([40])
618      SECTORS([9])
619      SECTOR_LENGTH([512])
620      FIRST_SECTOR_ID([1]))
621   FLOPPY_OPTION(ql, "dsk", "DSSD disk image", basicdsk_identify_default, basicdsk_construct_default,
622      HEADS([2])
623      TRACKS([40])
624      SECTORS([9])
625      SECTOR_LENGTH([512])
626      FIRST_SECTOR_ID([1]))
627   FLOPPY_OPTION(ql, "dsk", "DSDD disk image", basicdsk_identify_default, basicdsk_construct_default,
628      HEADS([2])
629      TRACKS([80])
630      SECTORS([9])
631      SECTOR_LENGTH([512])
632      FIRST_SECTOR_ID([1]))
633   FLOPPY_OPTION(ql, "dsk", "DSHD disk image", basicdsk_identify_default, basicdsk_construct_default,
634      HEADS([2])
635      TRACKS([80])
636      SECTORS([18])
637      SECTOR_LENGTH([512])
638      FIRST_SECTOR_ID([1]))
639   FLOPPY_OPTION(ql, "dsk", "DSED disk image", basicdsk_identify_default, basicdsk_construct_default,
640      HEADS([2])
641      TRACKS([80])
642      SECTORS([40])
643      SECTOR_LENGTH([512])
644      FIRST_SECTOR_ID([1]))     
645FLOPPY_OPTIONS_END
646
647static const floppy_config ql_floppy_config =
648{
649   FLOPPY_DRIVE_DS_80,
650   FLOPPY_OPTIONS_NAME(ql)
651};
652
613653static MACHINE_DRIVER_START( ql )
614654   MDRV_DRIVER_DATA(ql_state)
615655
r5743r5744
655695   MDRV_CARTSLOT_EXTENSION_LIST("bin")
656696   MDRV_CARTSLOT_NOT_MANDATORY
657697   MDRV_CARTSLOT_LOAD(ql_cart)
698   
699   MDRV_FLOPPY_2_DRIVES_ADD(ql_floppy_config)
658700MACHINE_DRIVER_END
659701
660702static MACHINE_DRIVER_START( opd )
r5743r5744
668710   MDRV_CPU_IO_MAP(ipc_io_map)
669711   
670712   MDRV_DEVICE_REMOVE("cart")
713   
714   MDRV_FLOPPY_2_DRIVES_REMOVE()
671715MACHINE_DRIVER_END
672716
673717static MACHINE_DRIVER_START( ql_ntsc )
r5743r5744
676720   MDRV_SCREEN_MODIFY(SCREEN_TAG)
677721   MDRV_SCREEN_REFRESH_RATE(60)
678722   MDRV_SCREEN_SIZE(960, 262)
679   MDRV_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1)
723   MDRV_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1)   
680724MACHINE_DRIVER_END
681725
682726/* ROMs */
r5743r5744
868912   }
869913}
870914
871static FLOPPY_OPTIONS_START(ql)
872   FLOPPY_OPTION(ql, "dsk", "SSSD disk image", basicdsk_identify_default, basicdsk_construct_default,
873      HEADS([1])
874      TRACKS([40])
875      SECTORS([9])
876      SECTOR_LENGTH([512])
877      FIRST_SECTOR_ID([1]))
878   FLOPPY_OPTION(ql, "dsk", "DSSD disk image", basicdsk_identify_default, basicdsk_construct_default,
879      HEADS([2])
880      TRACKS([40])
881      SECTORS([9])
882      SECTOR_LENGTH([512])
883      FIRST_SECTOR_ID([1]))
884   FLOPPY_OPTION(ql, "dsk", "DSDD disk image", basicdsk_identify_default, basicdsk_construct_default,
885      HEADS([2])
886      TRACKS([80])
887      SECTORS([9])
888      SECTOR_LENGTH([512])
889      FIRST_SECTOR_ID([1]))
890   FLOPPY_OPTION(ql, "dsk", "DSHD disk image", basicdsk_identify_default, basicdsk_construct_default,
891      HEADS([2])
892      TRACKS([80])
893      SECTORS([18])
894      SECTOR_LENGTH([512])
895      FIRST_SECTOR_ID([1]))
896   FLOPPY_OPTION(ql, "dsk", "DSED disk image", basicdsk_identify_default, basicdsk_construct_default,
897      HEADS([2])
898      TRACKS([80])
899      SECTORS([40])
900      SECTOR_LENGTH([512])
901      FIRST_SECTOR_ID([1]))     
902FLOPPY_OPTIONS_END
903
904static void ql_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
905{
906   /* floppy */
907   switch(state)
908   {
909      /* --- the following bits of info are returned as 64-bit signed integers --- */
910      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
911
912      /* --- the following bits of info are returned as pointers to data or functions --- */
913      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_ql; break;
914
915      default:                              floppy_device_getinfo(devclass, state, info); break;
916   }
917}
918915static SYSTEM_CONFIG_START( ql )
919916   CONFIG_RAM_DEFAULT   (128 * 1024)
920917   CONFIG_RAM         (192 * 1024) // 64K expansion
r5743r5744
922919   CONFIG_RAM         (384 * 1024) // 256K expansion
923920   CONFIG_RAM         (640 * 1024) // 512K expansion
924921   CONFIG_RAM         (896 * 1024) // Trump Card
925   CONFIG_DEVICE(ql_serial_getinfo)
926   CONFIG_DEVICE(ql_floppy_getinfo)
922   CONFIG_DEVICE(ql_serial_getinfo)   
927923SYSTEM_CONFIG_END
928924
929925static SYSTEM_CONFIG_START( opd )
src/mess/drivers/abc80x.c
r5743r5744
11631163}
11641164
11651165/* Machine Drivers */
1166static const floppy_config abc800_floppy_config =
1167{
1168   FLOPPY_DRIVE_DS_80,
1169   FLOPPY_OPTIONS_NAME(abc80)
1170};
11661171
11671172static MACHINE_DRIVER_START( abc800m )
11681173   MDRV_DRIVER_DATA(abc800_state)
r5743r5744
11971202
11981203   /* fake keyboard */
11991204   MDRV_TIMER_ADD_PERIODIC("keyboard", keyboard_tick, USEC(2500))
1205   
1206   MDRV_FLOPPY_2_DRIVES_ADD(abc800_floppy_config)
12001207MACHINE_DRIVER_END
12011208
12021209static MACHINE_DRIVER_START( abc800c )
r5743r5744
12321239
12331240   /* fake keyboard */
12341241   MDRV_TIMER_ADD_PERIODIC("keyboard", keyboard_tick, USEC(2500))
1242   
1243   MDRV_FLOPPY_2_DRIVES_ADD(abc800_floppy_config)
12351244MACHINE_DRIVER_END
12361245
12371246static MACHINE_DRIVER_START( abc802 )
r5743r5744
12671276
12681277   /* fake keyboard */
12691278   MDRV_TIMER_ADD_PERIODIC("keyboard", keyboard_tick, USEC(2500))
1279   
1280   MDRV_FLOPPY_2_DRIVES_ADD(abc800_floppy_config)
12701281MACHINE_DRIVER_END
12711282
12721283static MACHINE_DRIVER_START( abc806 )
r5743r5744
13001311
13011312   /* fake keyboard */
13021313   MDRV_TIMER_ADD_PERIODIC("keyboard", keyboard_tick, USEC(2500))
1314   
1315   MDRV_FLOPPY_2_DRIVES_ADD(abc800_floppy_config)
13031316MACHINE_DRIVER_END
13041317
13051318/* ROMs */
r5743r5744
14281441ROM_END
14291442
14301443/* System Configuration */
1431static void abc800_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
1432{
1433   /* floppy */
1434   switch(state)
1435   {
1436      /* --- the following bits of info are returned as 64-bit signed integers --- */
1437      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
1438
1439      /* --- the following bits of info are returned as pointers to data or functions --- */
1440      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_abc80; break;
1441
1442      default:                              floppy_device_getinfo(devclass, state, info); break;
1443   }
1444}
1445
14461444static DEVICE_IMAGE_LOAD( abc800_serial )
14471445{
14481446   /* filename specified */
r5743r5744
14841482static SYSTEM_CONFIG_START( abc800 )
14851483   CONFIG_RAM_DEFAULT(16 * 1024)
14861484   CONFIG_RAM        (32 * 1024)
1487   CONFIG_DEVICE(abc800_floppy_getinfo)
14881485   CONFIG_DEVICE(abc800_serial_getinfo)
14891486SYSTEM_CONFIG_END
14901487
14911488static SYSTEM_CONFIG_START( abc802 )
14921489   CONFIG_RAM_DEFAULT(64 * 1024)
1493   CONFIG_DEVICE(abc800_floppy_getinfo)
14941490   CONFIG_DEVICE(abc800_serial_getinfo)
14951491SYSTEM_CONFIG_END
14961492
14971493static SYSTEM_CONFIG_START( abc806 )
14981494   CONFIG_RAM_DEFAULT(160 * 1024) // 32KB + 128KB
14991495   CONFIG_RAM        (544 * 1024) // 32KB + 512KB
1500   CONFIG_DEVICE(abc800_floppy_getinfo)
15011496   CONFIG_DEVICE(abc800_serial_getinfo)
15021497SYSTEM_CONFIG_END
15031498
src/mess/drivers/orion.c
r5743r5744
138138   DEVCB_NULL
139139};
140140
141static FLOPPY_OPTIONS_START(orion)
142   FLOPPY_OPTION(orion, "odi,img", "Orion disk image", basicdsk_identify_default, basicdsk_construct_default,
143      HEADS([2])
144      TRACKS([80])
145      SECTORS([5])
146      SECTOR_LENGTH([1024])
147      FIRST_SECTOR_ID([1]))
148   FLOPPY_OPTION(orion_lk, "odi,img", "Lucksian Key Orion disk image", basicdsk_identify_default, basicdsk_construct_default,
149      HEADS([2])
150      TRACKS([80])
151      SECTORS([9])
152      SECTOR_LENGTH([512])
153      FIRST_SECTOR_ID([1]))
154FLOPPY_OPTIONS_END
155
156static const floppy_config orion_floppy_config =
157{
158   FLOPPY_DRIVE_DS_80,
159   FLOPPY_OPTIONS_NAME(orion)
160};
161
141162static MACHINE_DRIVER_START( orionz80 )
142163    MDRV_CPU_ADD("maincpu", Z80, 2500000)
143164    MDRV_CPU_PROGRAM_MAP(orionz80_mem)
r5743r5744
180201   
181202   MDRV_WD1793_ADD("wd1793", default_wd17xx_interface )     
182203   
204   MDRV_FLOPPY_4_DRIVES_ADD(orion_floppy_config)
205   
183206   MDRV_CARTSLOT_ADD("cart")
184207MACHINE_DRIVER_END
185208
r5743r5744
229252   
230253   MDRV_WD1793_ADD("wd1793", default_wd17xx_interface )
231254   
255   MDRV_FLOPPY_4_DRIVES_ADD(orion_floppy_config)
256   
232257   MDRV_CARTSLOT_ADD("cart")
233258MACHINE_DRIVER_END
234259
235static FLOPPY_OPTIONS_START(orion)
236   FLOPPY_OPTION(orion, "odi,img", "Orion disk image", basicdsk_identify_default, basicdsk_construct_default,
237      HEADS([2])
238      TRACKS([80])
239      SECTORS([5])
240      SECTOR_LENGTH([1024])
241      FIRST_SECTOR_ID([1]))
242   FLOPPY_OPTION(orion, "odi,img", "Lucksian Key Orion disk image", basicdsk_identify_default, basicdsk_construct_default,
243      HEADS([2])
244      TRACKS([80])
245      SECTORS([9])
246      SECTOR_LENGTH([512])
247      FIRST_SECTOR_ID([1]))
248FLOPPY_OPTIONS_END
249
250static void orion_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
251{
252   /* floppy */
253   switch(state)
254   {
255      /* --- the following bits of info are returned as 64-bit signed integers --- */
256      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
257
258      /* --- the following bits of info are returned as pointers to data or functions --- */
259      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_orion; break;
260
261      default:                              floppy_device_getinfo(devclass, state, info); break;
262   }
263}
264
265260static SYSTEM_CONFIG_START(orion128)
266261   CONFIG_RAM_DEFAULT(256 * 1024)
267   CONFIG_DEVICE(orion_floppy_getinfo);
268262SYSTEM_CONFIG_END
269263
270264static SYSTEM_CONFIG_START(orionz80)
271265   CONFIG_RAM_DEFAULT(512 * 1024)
272   CONFIG_DEVICE(orion_floppy_getinfo);
273266SYSTEM_CONFIG_END
274267
275268static SYSTEM_CONFIG_START(orionpro)
276269   CONFIG_RAM_DEFAULT(512 * 1024)
277   CONFIG_DEVICE(orion_floppy_getinfo);
278270SYSTEM_CONFIG_END
279271
280272/* ROM definition */
src/mess/drivers/nascom1.c
r5743r5744
306306   MDRV_CASSETTE_ADD( "cassette", default_cassette_config )
307307MACHINE_DRIVER_END
308308
309static FLOPPY_OPTIONS_START(nascom2)
310   FLOPPY_OPTION(nascom2_ss, "dsk", "Nascom 2 SS disk image", basicdsk_identify_default, basicdsk_construct_default,
311      HEADS([1])
312      TRACKS([80])
313      SECTORS([16])
314      SECTOR_LENGTH([256])
315      FIRST_SECTOR_ID([1]))
316   FLOPPY_OPTION(nascom2_ds, "dsk", "Nascom 2 DS disk image", basicdsk_identify_default, basicdsk_construct_default,
317      HEADS([2])
318      TRACKS([80])
319      SECTORS([16])
320      SECTOR_LENGTH([256])
321      FIRST_SECTOR_ID([1]))
322FLOPPY_OPTIONS_END
309323
324static const floppy_config nascom2_floppy_config =
325{
326   FLOPPY_DRIVE_DS_80,
327   FLOPPY_OPTIONS_NAME(nascom2)
328};
329
310330static MACHINE_DRIVER_START( nascom2 )
311331   MDRV_IMPORT_FROM(nascom1)
312332   MDRV_CPU_MODIFY("maincpu")
r5743r5744
322342   MDRV_VIDEO_UPDATE(nascom2)
323343   
324344   MDRV_WD1793_ADD("wd1793", nascom2_wd17xx_interface )
345   
346   MDRV_FLOPPY_4_DRIVES_ADD(nascom2_floppy_config)
325347MACHINE_DRIVER_END
326348
327349
r5743r5744
387409//   }
388410//}
389411
390static FLOPPY_OPTIONS_START(nascom2)
391   FLOPPY_OPTION(nascom2, "dsk", "Nascom 2 SS disk image", basicdsk_identify_default, basicdsk_construct_default,
392      HEADS([1])
393      TRACKS([80])
394      SECTORS([16])
395      SECTOR_LENGTH([256])
396      FIRST_SECTOR_ID([1]))
397   FLOPPY_OPTION(nascom2, "dsk", "Nascom 2 DS disk image", basicdsk_identify_default, basicdsk_construct_default,
398      HEADS([2])
399      TRACKS([80])
400      SECTORS([16])
401      SECTOR_LENGTH([256])
402      FIRST_SECTOR_ID([1]))
403FLOPPY_OPTIONS_END
404412
405static void nascom2_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
406{
407   /* floppy */
408   switch(state)
409   {
410      /* --- the following bits of info are returned as 64-bit signed integers --- */
411      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
412
413      /* --- the following bits of info are returned as pointers to data or functions --- */
414      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_nascom2; break;
415
416      default:                              floppy_device_getinfo(devclass, state, info); break;
417   }
418}
419
420413static SYSTEM_CONFIG_START( nascom1 )
421414   CONFIG_RAM(1 * 1024)
422415   CONFIG_RAM(16 * 1024)
r5743r5744
427420
428421
429422static SYSTEM_CONFIG_START( nascom2 )
430   CONFIG_IMPORT_FROM(nascom1)
431   CONFIG_DEVICE(nascom2_floppy_getinfo)
423   CONFIG_IMPORT_FROM(nascom1)   
432424SYSTEM_CONFIG_END
433425
434426
src/mess/drivers/newbrain.c
r5743r5744
656656
657657   newbrain_state *state = space->machine->driver_data;
658658
659   floppy_drive_set_motor_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 0), BIT(data, 0));
660   floppy_drive_set_ready_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 0), 1, 0);
659   floppy_drive_set_motor_state(floppy_get_device(space->machine, 0), BIT(data, 0));
660   floppy_drive_set_ready_state(floppy_get_device(space->machine, 0), 1, 0);
661661
662662   nec765_reset_w(state->nec765, BIT(data, 1));
663663
r5743r5744
13011301   DEVCB_LINE(newbrain_fdc_interrupt),
13021302   NULL,
13031303   NULL,
1304   NEC765_RDY_PIN_NOT_CONNECTED
1304   NEC765_RDY_PIN_NOT_CONNECTED,
1305   {FLOPPY_0,FLOPPY_1, NULL, NULL}
13051306};
13061307
13071308static WRITE8_DEVICE_HANDLER( ctc_z0_w )
r5743r5744
15091510   MDRV_CASSETTE_ADD("cassette2", newbrain_cassette_config)
15101511MACHINE_DRIVER_END
15111512
1513static FLOPPY_OPTIONS_START(newbrain)
1514   // 180K img
1515FLOPPY_OPTIONS_END
1516
1517static const floppy_config newbrain_floppy_config =
1518{
1519   FLOPPY_DRIVE_DS_80,
1520   FLOPPY_OPTIONS_NAME(newbrain)
1521};
1522
15121523static MACHINE_DRIVER_START( newbrain_eim )
15131524   MDRV_IMPORT_FROM(newbrain_a)
15141525   
r5743r5744
15341545   
15351546   /* NEC765 */
15361547   MDRV_NEC765A_ADD(NEC765_TAG, newbrain_nec765_interface)
1548   
1549   MDRV_FLOPPY_2_DRIVES_ADD(newbrain_floppy_config)
15371550MACHINE_DRIVER_END
15381551
15391552/* ROMs */
r5743r5744
16341647ROM_END
16351648
16361649/* System Configuration */
1637static FLOPPY_OPTIONS_START(newbrain)
1638   // 180K img
1639FLOPPY_OPTIONS_END
1640
1641static void newbrain_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
1642{
1643   /* floppy */
1644   switch(state)
1645   {
1646      /* --- the following bits of info are returned as 64-bit signed integers --- */
1647      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
1648
1649      /* --- the following bits of info are returned as pointers to data or functions --- */
1650      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_newbrain; break;
1651
1652      default:                              floppy_device_getinfo(devclass, state, info); break;
1653   }
1654}
1655
16561650static DEVICE_IMAGE_LOAD( newbrain_serial )
16571651{
16581652   /* filename specified */
r5743r5744
16971691SYSTEM_CONFIG_END
16981692
16991693static SYSTEM_CONFIG_START( newbrain_eim )
1700   CONFIG_RAM_DEFAULT   (96 * 1024)
1701   CONFIG_DEVICE(newbrain_floppy_getinfo)
1694   CONFIG_RAM_DEFAULT   (96 * 1024)   
17021695   CONFIG_DEVICE(newbrain_serial_getinfo)
17031696SYSTEM_CONFIG_END
17041697
src/mess/drivers/einstein.c
r5743r5744
576576   einstein->interrupt = 0;
577577   einstein->interrupt_mask = 0;
578578
579   floppy_drive_set_geometry(image_from_devtype_and_index(machine, IO_FLOPPY, 0), FLOPPY_DRIVE_SS_40);
580
581579   einstein->ctc_trigger = 0;
582580}
583581
r5743r5744
851849   NULL
852850};
853851
852static const floppy_config einstein_floppy_config =
853{
854   FLOPPY_DRIVE_SS_40,
855   FLOPPY_OPTIONS_NAME(dsk)
856};
854857
855858static MACHINE_DRIVER_START( einstein )
856859   /* basic machine hardware */
r5743r5744
896899
897900   /* uart */
898901   MDRV_MSM8251_ADD(IC_I060, default_msm8251_interface)
899
902   
900903   MDRV_WD1770_ADD(IC_I042, default_wd17xx_interface)
904   
905   MDRV_FLOPPY_4_DRIVES_ADD(einstein_floppy_config)
901906MACHINE_DRIVER_END
902907
903908
r5743r5744
924929   MDRV_MC6845_ADD("crtc", MC6845, XTAL_X002 / 4, einstein_crtc6845_interface)
925930
926931   MDRV_VIDEO_UPDATE(einstein2)
932
927933MACHINE_DRIVER_END
928934
929935
r5743r5744
974980/***************************************************************************
975981    SYSTEM CONFIG
976982***************************************************************************/
977static void einstein_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
978{
979   /* floppy */
980   switch(state)
981   {
982      /* --- the following bits of info are returned as 64-bit signed integers --- */
983      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
984
985      /* --- the following bits of info are returned as pointers to data or functions --- */
986      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_dsk; break;
987
988      default:                              floppy_device_getinfo(devclass, state, info); break;
989   }
990}
991
992983static SYSTEM_CONFIG_START( einstein )
993984   /* RAM is provided by 8k DRAM ICs i009, i010, i011, i012, i013, i014, i015 and i016 */
994   CONFIG_RAM_DEFAULT(8 * 8 * 1024)
995   CONFIG_DEVICE(einstein_floppy_getinfo)
985   CONFIG_RAM_DEFAULT(8 * 8 * 1024)   
996986SYSTEM_CONFIG_END
997987
998988
src/mess/drivers/osborne1.c
r5743r5744
165165   { NULL }
166166};
167167
168/*
169 * The Osborne-1 supports the following disc formats:
170 * - Osborne single density: 40 tracks, 10 sectors per track, 256-byte sectors (100 KByte)
171 * - Osborne double density: 40 tracks, 5 sectors per track, 1024-byte sectors (200 KByte)
172 * - IBM Personal Computer: 40 tracks, 8 sectors per track, 512-byte sectors (160 KByte)
173 * - Xerox 820 Computer: 40 tracks, 18 sectors per track, 128-byte sectors (90 KByte)
174 * - DEC 1820 double density: 40 tracks, 9 sectors per track, 512-byte sectors (180 KByte)
175 *
176 */
177FLOPPY_OPTIONS_START(osborne1 )
178   FLOPPY_OPTION( osd, "img", "Osborne single density", basicdsk_identify_default, basicdsk_construct_default,
179      HEADS([1])
180      TRACKS([40])
181      SECTORS([10])
182      SECTOR_LENGTH([256])
183      FIRST_SECTOR_ID([1]))   
184   FLOPPY_OPTION( odd, "img", "Osborne double density", basicdsk_identify_default, basicdsk_construct_default,
185      HEADS([1])
186      TRACKS([40])
187      SECTORS([5])
188      SECTOR_LENGTH([1024])
189      FIRST_SECTOR_ID([1]))
190   FLOPPY_OPTION( ibm, "img", "IBM Personal Computer", basicdsk_identify_default, basicdsk_construct_default,
191      HEADS([1])
192      TRACKS([40])
193      SECTORS([8])
194      SECTOR_LENGTH([512])
195      FIRST_SECTOR_ID([1]))               
196   FLOPPY_OPTION( xerox, "img", "Xerox 820 Computer", basicdsk_identify_default, basicdsk_construct_default,
197      HEADS([1])
198      TRACKS([40])
199      SECTORS([18])
200      SECTOR_LENGTH([128])
201      FIRST_SECTOR_ID([1]))               
202   FLOPPY_OPTION( dec, "img", "DEC 1820 double density", basicdsk_identify_default, basicdsk_construct_default,
203      HEADS([1])
204      TRACKS([40])
205      SECTORS([9])
206      SECTOR_LENGTH([512])
207      FIRST_SECTOR_ID([1]))               
208FLOPPY_OPTIONS_END
168209
210static const floppy_config osborne1_floppy_config =
211{
212   FLOPPY_DRIVE_SS_40,
213   FLOPPY_OPTIONS_NAME(osborne1)
214};
215
169216static MACHINE_DRIVER_START( osborne1 )
170217   MDRV_CPU_ADD( "maincpu", Z80, MAIN_CLOCK/4 )
171218   MDRV_CPU_PROGRAM_MAP( osborne1_mem)
r5743r5744
191238   MDRV_PIA6821_ADD( "pia_0", osborne1_ieee_pia_config )
192239   MDRV_PIA6821_ADD( "pia_1", osborne1_video_pia_config )
193240
194   MDRV_MB8877_ADD("mb8877", default_wd17xx_interface )
241   MDRV_MB8877_ADD("mb8877", default_wd17xx_interface_2_drives )
195242   
243   MDRV_FLOPPY_2_DRIVES_ADD(osborne1_floppy_config)   
196244MACHINE_DRIVER_END
197245
198246
r5743r5744
217265ROM_END
218266
219267/* System Configuration */
220/*
221 * The Osborne-1 supports the following disc formats:
222 * - Osborne single density: 40 tracks, 10 sectors per track, 256-byte sectors (100 KByte)
223 * - Osborne double density: 40 tracks, 5 sectors per track, 1024-byte sectors (200 KByte)
224 * - IBM Personal Computer: 40 tracks, 8 sectors per track, 512-byte sectors (160 KByte)
225 * - Xerox 820 Computer: 40 tracks, 18 sectors per track, 128-byte sectors (90 KByte)
226 * - DEC 1820 double density: 40 tracks, 9 sectors per track, 512-byte sectors (180 KByte)
227 *
228 */
229FLOPPY_OPTIONS_START(osborne1 )
230   FLOPPY_OPTION( osd, "img", "Osborne single density", basicdsk_identify_default, basicdsk_construct_default,
231      HEADS([1])
232      TRACKS([40])
233      SECTORS([10])
234      SECTOR_LENGTH([256])
235      FIRST_SECTOR_ID([1]))   
236   FLOPPY_OPTION( odd, "img", "Osborne double density", basicdsk_identify_default, basicdsk_construct_default,
237      HEADS([1])
238      TRACKS([40])
239      SECTORS([5])
240      SECTOR_LENGTH([1024])
241      FIRST_SECTOR_ID([1]))
242   FLOPPY_OPTION( ibm, "img", "IBM Personal Computer", basicdsk_identify_default, basicdsk_construct_default,
243      HEADS([1])
244      TRACKS([40])
245      SECTORS([8])
246      SECTOR_LENGTH([512])
247      FIRST_SECTOR_ID([1]))               
248   FLOPPY_OPTION( xerox, "img", "Xerox 820 Computer", basicdsk_identify_default, basicdsk_construct_default,
249      HEADS([1])
250      TRACKS([40])
251      SECTORS([18])
252      SECTOR_LENGTH([128])
253      FIRST_SECTOR_ID([1]))               
254   FLOPPY_OPTION( dec, "img", "DEC 1820 double density", basicdsk_identify_default, basicdsk_construct_default,
255      HEADS([1])
256      TRACKS([40])
257      SECTORS([9])
258      SECTOR_LENGTH([512])
259      FIRST_SECTOR_ID([1]))               
260FLOPPY_OPTIONS_END
261
262static void osborne1_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
263{
264   /* floppy */
265   switch(state)
266   {
267      /* --- the following bits of info are returned as 64-bit signed integers --- */
268      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
269
270      /* --- the following bits of info are returned as pointers to data or functions --- */
271      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_osborne1; break;
272
273      default:                              floppy_device_getinfo(devclass, state, info); break;
274   }
275}
276
277268static SYSTEM_CONFIG_START( osborne1 )
278   CONFIG_DEVICE( osborne1_floppy_getinfo )
279269   CONFIG_RAM_DEFAULT( 68 * 1024 )      /* 64KB Main RAM and 4Kbit video attribute RAM */
280270SYSTEM_CONFIG_END
281271
src/mess/drivers/amstrad.c
r5743r5744
138138   DEVCB_NULL,
139139   NULL,
140140   NULL,
141   NEC765_RDY_PIN_CONNECTED
141   NEC765_RDY_PIN_CONNECTED,
142   {FLOPPY_0,FLOPPY_1, NULL, NULL}
142143};
143144
144145/* Aleste uses an 8272A, with the interrupt flag visible on PPI port B */
r5743r5744
147148   DEVCB_LINE(aleste_interrupt),
148149   NULL,
149150   NULL,
150   NEC765_RDY_PIN_CONNECTED
151   NEC765_RDY_PIN_CONNECTED,
152   {FLOPPY_0,FLOPPY_1, NULL, NULL}
151153};
152154
153155
r5743r5744
835837   CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED
836838};
837839
840static const floppy_config cpc6128_floppy_config =
841{
842   FLOPPY_DRIVE_SS_40,
843   FLOPPY_OPTIONS_NAME(dsk)
844};
845
846static const floppy_config aleste_floppy_config =
847{
848   FLOPPY_DRIVE_SS_40,
849   FLOPPY_OPTIONS_NAME(msx)
850};
851
838852static MACHINE_DRIVER_START( cpcplus_cartslot )
839853   MDRV_CARTSLOT_ADD("cart")
840854   MDRV_CARTSLOT_EXTENSION_LIST("cpr,bin")
r5743r5744
886900   MDRV_CASSETTE_ADD( "cassette", amstrad_cassette_config )
887901
888902   MDRV_NEC765A_ADD("nec765", amstrad_nec765_interface)
903   
904   MDRV_FLOPPY_2_DRIVES_ADD(cpc6128_floppy_config)
889905MACHINE_DRIVER_END
890906
891907
r5743r5744
944960   MDRV_NEC765A_ADD("nec765", amstrad_nec765_interface)
945961
946962   MDRV_IMPORT_FROM(cpcplus_cartslot)
963   
964   MDRV_FLOPPY_2_DRIVES_ADD(cpc6128_floppy_config)
947965MACHINE_DRIVER_END
948966
949967
r5743r5744
9961014   MDRV_PALETTE_INIT(aleste)
9971015   MDRV_NVRAM_HANDLER(mc146818)
9981016   MDRV_NEC765A_MODIFY("nec765", aleste_8272_interface)
1017   
1018   MDRV_FLOPPY_2_DRIVES_MODIFY(aleste_floppy_config)
9991019MACHINE_DRIVER_END
10001020
10011021
r5743r5744
11181138 *  System configs
11191139 *
11201140 *************************************/
1121
1122static void cpc6128_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
1123{
1124   /* floppy */
1125   switch(state)
1126   {
1127      /* --- the following bits of info are returned as 64-bit signed integers --- */
1128      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
1129
1130      /* --- the following bits of info are returned as pointers to data or functions --- */
1131      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_dsk; break;
1132
1133      default:                              floppy_device_getinfo(devclass, state, info); break;
1134   }
1135
1136}
1137
1138static void aleste_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
1139{
1140   /* floppy */
1141   switch(state)
1142   {
1143      /* --- the following bits of info are returned as 64-bit signed integers --- */
1144      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
1145
1146      /* --- the following bits of info are returned as pointers to data or functions --- */
1147      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_msx; break;
1148
1149      default:                              floppy_device_getinfo(devclass, state, info); break;
1150   }
1151}
1152
1153
11541141static SYSTEM_CONFIG_START( cpc6128 )
11551142   CONFIG_RAM_DEFAULT(128 * 1024)
1156   CONFIG_DEVICE(cpc6128_floppy_getinfo)
11571143SYSTEM_CONFIG_END
11581144
1159
11601145static SYSTEM_CONFIG_START( cpcplus )
11611146   CONFIG_IMPORT_FROM(cpc6128)
11621147SYSTEM_CONFIG_END
11631148
1164
11651149static SYSTEM_CONFIG_START( gx4000 )
11661150   CONFIG_RAM_DEFAULT(64 * 1024)  // has 64k RAM
11671151SYSTEM_CONFIG_END
11681152
1169
11701153static SYSTEM_CONFIG_START( aleste )
1171   CONFIG_DEVICE(aleste_floppy_getinfo)
11721154   CONFIG_RAM_DEFAULT(2048 * 1024)  // has 2048k RAM
11731155SYSTEM_CONFIG_END
11741156
1175
1176
11771157/*************************************
11781158 *
11791159 *  Driver definitions
src/mess/drivers/samcoupe.c
r5743r5744
519519   CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED
520520};
521521
522
523FLOPPY_OPTIONS_START( samcoupe )
524   FLOPPY_OPTION
525   (
526      coupe_mgt, "mgt,dsk,sad", "SAM Coupe MGT disk image", coupe_mgt_identify, coupe_mgt_construct,
527      HEADS([2])
528      TRACKS([80])
529      SECTORS(9-[10])
530      SECTOR_LENGTH([512])
531      FIRST_SECTOR_ID([1])
532   )
533   FLOPPY_OPTION
534   (
535      coupe_sad, "sad,dsk", "SAM Coupe SAD disk image", coupe_sad_identify, coupe_sad_construct,
536      HEADS(1-[2]-255)
537      TRACKS(1-[80]-255)
538      SECTORS(1-[10]-255)
539      SECTOR_LENGTH(64/128/256/[512]/1024/2048/4096)
540      FIRST_SECTOR_ID([1])
541   )
542   FLOPPY_OPTION
543   (
544      coupe_sdf, "sdf,dsk,sad", "SAM Coupe SDF disk image", coupe_sdf_identify, coupe_sdf_construct,
545      HEADS(1-[2])
546      TRACKS(1-[80]-83)
547      SECTORS(1-[10]-12)
548      SECTOR_LENGTH(128/256/[512]/1024)
549      FIRST_SECTOR_ID([1])
550   )
551   FLOPPY_OPTION(dsk, "dsk", "DSK floppy disk image", dsk_dsk_identify, dsk_dsk_construct, NULL)
552FLOPPY_OPTIONS_END
553
554static const floppy_config samcoupe_floppy_config =
555{
556   FLOPPY_DRIVE_DS_80,
557   FLOPPY_OPTIONS_NAME(samcoupe)
558};
559
522560static MACHINE_DRIVER_START( samcoupe )
523561   /* basic machine hardware */
524562   MDRV_CPU_ADD("maincpu", Z80, SAMCOUPE_XTAL_X1 / 4) /* 6 MHz */
r5743r5744
552590   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
553591   MDRV_SOUND_ADD("saa1099", SAA1099, SAMCOUPE_XTAL_X1/3) /* 8 MHz */
554592   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
593   
594   MDRV_FLOPPY_4_DRIVES_ADD(samcoupe_floppy_config)
555595MACHINE_DRIVER_END
556596
557597
r5743r5744
600640/***************************************************************************
601641    SYSTEM CONFIG
602642***************************************************************************/
603
604FLOPPY_OPTIONS_START( coupe )
605   FLOPPY_OPTION
606   (
607      coupe_mgt, "mgt,dsk,sad", "SAM Coupe MGT disk image", coupe_mgt_identify, coupe_mgt_construct,
608      HEADS([2])
609      TRACKS([80])
610      SECTORS(9-[10])
611      SECTOR_LENGTH([512])
612      FIRST_SECTOR_ID([1])
613   )
614   FLOPPY_OPTION
615   (
616      coupe_sad, "sad,dsk", "SAM Coupe SAD disk image", coupe_sad_identify, coupe_sad_construct,
617      HEADS(1-[2]-255)
618      TRACKS(1-[80]-255)
619      SECTORS(1-[10]-255)
620      SECTOR_LENGTH(64/128/256/[512]/1024/2048/4096)
621      FIRST_SECTOR_ID([1])
622   )
623   FLOPPY_OPTION
624   (
625      coupe_sdf, "sdf,dsk,sad", "SAM Coupe SDF disk image", coupe_sdf_identify, coupe_sdf_construct,
626      HEADS(1-[2])
627      TRACKS(1-[80]-83)
628      SECTORS(1-[10]-12)
629      SECTOR_LENGTH(128/256/[512]/1024)
630      FIRST_SECTOR_ID([1])
631   )
632   FLOPPY_OPTION(dsk, "dsk", "DSK floppy disk image", dsk_dsk_identify, dsk_dsk_construct, NULL)
633FLOPPY_OPTIONS_END
634
635static void samcoupe_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
636{
637   /* floppy */
638   switch(state)
639   {
640      /* --- the following bits of info are returned as 64-bit signed integers --- */
641      case MESS_DEVINFO_INT_COUNT:         info->i = 2; break;
642
643      /* --- the following bits of info are returned as pointers to data or functions --- */
644      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:   info->p = (void *) floppyoptions_coupe; break;
645
646      default:                        floppy_device_getinfo(devclass, state, info); break;
647   }
648}
649
650643static SYSTEM_CONFIG_START( samcoupe )
651644   CONFIG_RAM(256 * 1024)
652645   CONFIG_RAM_DEFAULT(512 * 1024)
r5743r5744
658651   CONFIG_RAM(512 * 1024 + 3 * 1024 * 1024)
659652   CONFIG_RAM(256 * 1024 + 4 * 1024 * 1024)
660653   CONFIG_RAM(512 * 1024 + 4 * 1024 * 1024)
661   CONFIG_DEVICE(samcoupe_floppy_getinfo)
662654SYSTEM_CONFIG_END
663655
664
665656/***************************************************************************
666657    GAME DRIVERS
667658***************************************************************************/
src/mess/drivers/comx35.c
r5743r5744
362362   CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED
363363};
364364
365static const floppy_config comx35_floppy_config =
366{
367   FLOPPY_DRIVE_DS_80,
368   FLOPPY_OPTIONS_NAME(comx35)
369};
370
365371static MACHINE_DRIVER_START( comx35_pal )
366372   MDRV_DRIVER_DATA(comx35_state)
367373
r5743r5744
383389   MDRV_QUICKLOAD_ADD("quickload", comx35, "comx", 0)
384390   MDRV_CASSETTE_ADD(CASSETTE_TAG, comx35_cassette_config)
385391   MDRV_PRINTER_ADD("printer")
392   
393   MDRV_FLOPPY_2_DRIVES_ADD(comx35_floppy_config)
386394MACHINE_DRIVER_END
387395
388396static MACHINE_DRIVER_START( comx35_ntsc )
r5743r5744
406414   MDRV_QUICKLOAD_ADD("quickload", comx35, "comx", 0)
407415   MDRV_CASSETTE_ADD(CASSETTE_TAG, comx35_cassette_config)
408416   MDRV_PRINTER_ADD("printer")
417   
418   MDRV_FLOPPY_2_DRIVES_ADD(comx35_floppy_config)
409419MACHINE_DRIVER_END
410420
411421/* ROMs */
r5743r5744
450460#define rom_comx35n rom_comx35p
451461
452462/* System Configuration */
453static void comx35_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
454{
455   /* floppy */
456   switch(state)
457   {
458      /* --- the following bits of info are returned as 64-bit signed integers --- */
459      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
460
461      /* --- the following bits of info are returned as pointers to data or functions --- */
462      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_comx35; break;
463
464      default:                              floppy_device_getinfo(devclass, state, info); break;
465   }
466}
467463static SYSTEM_CONFIG_START( comx35 )
468464   CONFIG_RAM_DEFAULT   (32 * 1024)
469   CONFIG_DEVICE(comx35_floppy_getinfo)
470465SYSTEM_CONFIG_END
471466
472467/* System Drivers */
src/mess/drivers/trs80.c
r5743r5744
412412   NULL
413413};
414414
415static const floppy_config trs80_floppy_config =
416{
417   FLOPPY_DRIVE_DS_80,
418   FLOPPY_OPTIONS_NAME(trs80)
419};
420
415421static MACHINE_DRIVER_START( trs80 )      // the original model I, level I, with no extras
416422   /* basic machine hardware */
417423   MDRV_CPU_ADD("maincpu", Z80, 1796000)        /* 1.796 MHz */
r5743r5744
455461   MDRV_CASSETTE_MODIFY( "cassette", trs80l2_cassette_config )
456462   MDRV_QUICKLOAD_ADD("quickload", trs80_cmd, "cmd", 0.5)
457463   MDRV_WD179X_ADD("wd179x", trs80_wd17xx_interface )
464   MDRV_FLOPPY_4_DRIVES_ADD(trs80_floppy_config)   
458465   MDRV_CENTRONICS_ADD("centronics", standard_centronics)
459466   MDRV_AY31015_ADD( "tr1602", trs80_ay31015_config )
460467MACHINE_DRIVER_END
r5743r5744
692699   videoram = memory_region(machine, "gfx2")+0x4000;
693700}
694701
695static void trs8012_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
696{
697   /* floppy */
698   switch(state)
699   {
700      /* --- the following bits of info are returned as 64-bit signed integers --- */
701      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
702
703      /* --- the following bits of info are returned as pointers to data or functions --- */
704      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_trs80; break;
705
706      default:                              floppy_device_getinfo(devclass, state, info); break;
707   }
708}
709
710static SYSTEM_CONFIG_START(trs8012)
711   CONFIG_DEVICE(trs8012_floppy_getinfo)
712SYSTEM_CONFIG_END
713
714702/*    YEAR  NAME      PARENT  COMPAT  MACHINE     INPUT    INIT      CONFIG       COMPANY  FULLNAME */
715703COMP( 1977, trs80,    0,   0,   trs80,    trs80,   trs80,    0,      "Tandy Radio Shack",  "TRS-80 Model I (Level I Basic)" , 0 )
716COMP( 1978, trs80l2,  trs80,   0,   model1,   trs80,   trs80l2,  trs8012,   "Tandy Radio Shack",  "TRS-80 Model I (Level II Basic)" , 0 )
717COMP( 1983, radionic, trs80,   0,   radionic, trs80,   trs80,    trs8012,   "Komtek",  "Radionic" , 0 )
718COMP( 1980, sys80,    trs80,   0,   sys80,    trs80,   trs80l2,  trs8012,   "EACA Computers Ltd.","System-80" , 0 )
719COMP( 1981, lnw80,    trs80,   0,   lnw80,    trs80m3, lnw80,    trs8012,   "LNW Research","LNW-80", 0 )
720COMP( 1980, trs80m3,  trs80,   0,   model3,   trs80m3, trs80m4,  trs8012,   "Tandy Radio Shack",  "TRS-80 Model III", 0 )
721COMP( 1980, trs80m4,  trs80,   0,   model3,   trs80m3, trs80m4,  trs8012,   "Tandy Radio Shack",  "TRS-80 Model 4", 0 )
722COMP( 1983, trs80m4p, trs80,   0,   model3,   trs80m3, trs80m4,  trs8012,   "Tandy Radio Shack",  "TRS-80 Model 4P", GAME_NOT_WORKING )
723COMP( 1983, ht1080z,  trs80,   0,   ht1080z,  trs80,   trs80l2,  trs8012,   "Hiradastechnika Szovetkezet",  "HT-1080Z Series I" , 0 )
724COMP( 1984, ht1080z2, trs80,   0,   ht1080z,  trs80,   trs80l2,  trs8012,   "Hiradastechnika Szovetkezet",  "HT-1080Z Series II" , 0 )
725COMP( 1985, ht108064, trs80,   0,   ht1080z,  trs80,   trs80,    trs8012,   "Hiradastechnika Szovetkezet",  "HT-1080Z/64" , 0 )
704COMP( 1978, trs80l2,  trs80,   0,   model1,   trs80,   trs80l2,  0,   "Tandy Radio Shack",  "TRS-80 Model I (Level II Basic)" , 0 )
705COMP( 1983, radionic, trs80,   0,   radionic, trs80,   trs80,    0,   "Komtek",  "Radionic" , 0 )
706COMP( 1980, sys80,    trs80,   0,   sys80,    trs80,   trs80l2,  0,   "EACA Computers Ltd.","System-80" , 0 )
707COMP( 1981, lnw80,    trs80,   0,   lnw80,    trs80m3, lnw80,    0,   "LNW Research","LNW-80", 0 )
708COMP( 1980, trs80m3,  trs80,   0,   model3,   trs80m3, trs80m4,  0,   "Tandy Radio Shack",  "TRS-80 Model III", 0 )
709COMP( 1980, trs80m4,  trs80,   0,   model3,   trs80m3, trs80m4,  0,   "Tandy Radio Shack",  "TRS-80 Model 4", 0 )
710COMP( 1983, trs80m4p, trs80,   0,   model3,   trs80m3, trs80m4,  0,   "Tandy Radio Shack",  "TRS-80 Model 4P", GAME_NOT_WORKING )
711COMP( 1983, ht1080z,  trs80,   0,   ht1080z,  trs80,   trs80l2,  0,   "Hiradastechnika Szovetkezet",  "HT-1080Z Series I" , 0 )
712COMP( 1984, ht1080z2, trs80,   0,   ht1080z,  trs80,   trs80l2,  0,   "Hiradastechnika Szovetkezet",  "HT-1080Z Series II" , 0 )
713COMP( 1985, ht108064, trs80,   0,   ht1080z,  trs80,   trs80,    0,   "Hiradastechnika Szovetkezet",  "HT-1080Z/64" , 0 )
src/mess/drivers/atm.c
r5743r5744
174174ROM_END
175175static SYSTEM_CONFIG_START(atm)
176176   CONFIG_RAM_DEFAULT(128 * 1024)
177   CONFIG_DEVICE(beta_floppy_getinfo)
178177SYSTEM_CONFIG_END
179178
180179
src/mess/drivers/tiki100.c
r5743r5744
3737
3838INLINE const device_config *get_floppy_image(running_machine *machine, int drive)
3939{
40   return image_from_devtype_and_index(machine, IO_FLOPPY, drive);
40   return floppy_get_device(machine, drive);
4141}
4242
4343/* Memory Banking */
r5743r5744
554554static const wd17xx_interface tiki100_wd17xx_interface =
555555{
556556   NULL,
557   NULL
557   NULL,
558   {FLOPPY_0,FLOPPY_1,NULL,NULL}
558559};
559560
560561/* AY-3-8912 Interface */
r5743r5744
622623   state_save_register_global(machine, state->keylatch);
623624}
624625
625/* Machine Driver */
626static FLOPPY_OPTIONS_START(tiki100)
627   FLOPPY_OPTION(tiki100, "dsk", "SSSD disk image", basicdsk_identify_default, basicdsk_construct_default,
628      HEADS([1])
629      TRACKS([40])
630      SECTORS([18])
631      SECTOR_LENGTH([128])
632      FIRST_SECTOR_ID([1]))
633   FLOPPY_OPTION(tiki100, "dsk", "SSDD disk image", basicdsk_identify_default, basicdsk_construct_default,
634      HEADS([1])
635      TRACKS([40])
636      SECTORS([10])
637      SECTOR_LENGTH([512])
638      FIRST_SECTOR_ID([1]))
639   FLOPPY_OPTION(tiki100, "dsk", "DSDD disk image", basicdsk_identify_default, basicdsk_construct_default,
640      HEADS([2])
641      TRACKS([40])
642      SECTORS([10])
643      SECTOR_LENGTH([512])
644      FIRST_SECTOR_ID([1]))
645   FLOPPY_OPTION(tiki100, "dsk", "DSHD disk image", basicdsk_identify_default, basicdsk_construct_default,
646      HEADS([2])
647      TRACKS([80])
648      SECTORS([10])
649      SECTOR_LENGTH([512])
650      FIRST_SECTOR_ID([1]))
651FLOPPY_OPTIONS_END
626652
653static const floppy_config tiki100_floppy_config =
654{
655   FLOPPY_DRIVE_DS_80,
656   FLOPPY_OPTIONS_NAME(tiki100)
657};
658
659/* Machine Driver */
627660static MACHINE_DRIVER_START( tiki100 )
628661   MDRV_DRIVER_DATA(tiki100_state)
629662
r5743r5744
653686   MDRV_Z80CTC_ADD(Z80CTC_TAG, 2000000, ctc_intf)
654687   MDRV_TIMER_ADD_PERIODIC("ctc", ctc_tick, HZ(2000000))
655688   MDRV_WD179X_ADD(FD1797_TAG, tiki100_wd17xx_interface) // FD1767PL-02 or FD1797-PL
656   
689   MDRV_FLOPPY_2_DRIVES_ADD(tiki100_floppy_config)   
657690   /* sound hardware */
658691   MDRV_SPEAKER_STANDARD_MONO("mono")
659692   MDRV_SOUND_ADD(AY8912_TAG, AY8912, 2000000)
r5743r5744
679712ROM_END
680713
681714/* System Configuration */
682static FLOPPY_OPTIONS_START(tiki100)
683   FLOPPY_OPTION(tiki100, "dsk", "SSSD disk image", basicdsk_identify_default, basicdsk_construct_default,
684      HEADS([1])
685      TRACKS([40])
686      SECTORS([18])
687      SECTOR_LENGTH([128])
688      FIRST_SECTOR_ID([1]))
689   FLOPPY_OPTION(tiki100, "dsk", "SSDD disk image", basicdsk_identify_default, basicdsk_construct_default,
690      HEADS([1])
691      TRACKS([40])
692      SECTORS([10])
693      SECTOR_LENGTH([512])
694      FIRST_SECTOR_ID([1]))
695   FLOPPY_OPTION(tiki100, "dsk", "DSDD disk image", basicdsk_identify_default, basicdsk_construct_default,
696      HEADS([2])
697      TRACKS([40])
698      SECTORS([10])
699      SECTOR_LENGTH([512])
700      FIRST_SECTOR_ID([1]))
701   FLOPPY_OPTION(tiki100, "dsk", "DSHD disk image", basicdsk_identify_default, basicdsk_construct_default,
702      HEADS([2])
703      TRACKS([80])
704      SECTORS([10])
705      SECTOR_LENGTH([512])
706      FIRST_SECTOR_ID([1]))
707FLOPPY_OPTIONS_END
708
709static void tiki100_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
710{
711   /* floppy */
712   switch(state)
713   {
714      /* --- the following bits of info are returned as 64-bit signed integers --- */
715      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
716
717      /* --- the following bits of info are returned as pointers to data or functions --- */
718      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_tiki100; break;
719
720      default:                              floppy_device_getinfo(devclass, state, info); break;
721   }
722}
723
724715static SYSTEM_CONFIG_START( tiki100 )
725716   CONFIG_RAM_DEFAULT( 64 * 1024 )
726   CONFIG_DEVICE( tiki100_floppy_getinfo )
727717SYSTEM_CONFIG_END
728718
729719/* System Drivers */
src/mess/drivers/svi318.c
r5743r5744
346346   NULL
347347};
348348
349static const floppy_config svi318_floppy_config =
350{
351   FLOPPY_DRIVE_DS_80,
352   FLOPPY_OPTIONS_NAME(svi318)
353};
354
349355static MACHINE_DRIVER_START( svi328_806 )
350356   /* Basic machine hardware */
351357   MDRV_CPU_ADD( "maincpu", Z80, 3579545 )   /* 3.579545 MHz */
r5743r5744
400406
401407   MDRV_WD179X_ADD("wd179x", svi_wd17xx_interface )
402408
409   MDRV_FLOPPY_2_DRIVES_ADD(svi318_floppy_config)
410   
403411   MDRV_IMPORT_FROM( svi318_cartslot )
404412MACHINE_DRIVER_END
405413
r5743r5744
478486   ROMX_LOAD ("svi806se.rom", 0x0000, 0x1000, CRC(daea8956) SHA1(3f16d5513ad35692488ae7d864f660e76c6e8ed3), ROM_BIOS(2))
479487ROM_END
480488
481static void svi318_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
482{
483   /* floppy */
484   switch(state)
485   {
486      /* --- the following bits of info are returned as 64-bit signed integers --- */
487      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
488
489      /* --- the following bits of info are returned as pointers to data or functions --- */
490      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_svi318; break;
491
492      default:                              floppy_device_getinfo(devclass, state, info); break;
493   }
494}
495
496static SYSTEM_CONFIG_START( svi318_common )
497   CONFIG_DEVICE(svi318_floppy_getinfo)
498SYSTEM_CONFIG_END
499
500489static SYSTEM_CONFIG_START( svi318 )
501   CONFIG_IMPORT_FROM(svi318_common)
502490   CONFIG_RAM_DEFAULT(16 * 1024)
503491   CONFIG_RAM( 32 * 1024 )
504492   CONFIG_RAM( 96 * 1024 )
r5743r5744
506494SYSTEM_CONFIG_END
507495
508496static SYSTEM_CONFIG_START( svi328 )
509   CONFIG_IMPORT_FROM(svi318_common)
510497   CONFIG_RAM_DEFAULT(64 * 1024)
511498   CONFIG_RAM( 96 * 1024 )
512499   CONFIG_RAM( 160 * 1024 )
src/mess/drivers/nanos.c
r5743r5744
407407   memory_set_bankptr(machine, 2, mess_ram + 0x1000);
408408   memory_set_bankptr(machine, 3, mess_ram);
409409   
410   floppy_drive_set_motor_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 0), 1);
410   floppy_drive_set_motor_state(floppy_get_device(space->machine, 0), 1);
411411   
412   floppy_drive_set_ready_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 0), 1,1);
412   floppy_drive_set_ready_state(floppy_get_device(space->machine, 0), 1,1);
413413   timer_pulse(machine, ATTOTIME_IN_HZ(24000), NULL, 0, keyboard_callback);
414414}
415415
r5743r5744
430430   DEVCB_NULL,
431431   NULL,
432432   NULL,
433   NEC765_RDY_PIN_NOT_CONNECTED
433   NEC765_RDY_PIN_NOT_CONNECTED,
434   {FLOPPY_0,FLOPPY_1, FLOPPY_2, FLOPPY_3}
434435};
435436
437static FLOPPY_OPTIONS_START(nanos)
438   FLOPPY_OPTION(nanos, "img", "NANOS disk image", basicdsk_identify_default, basicdsk_construct_default,
439      HEADS([2])
440      TRACKS([80])
441      SECTORS([5])
442      SECTOR_LENGTH([1024])
443      FIRST_SECTOR_ID([1]))
444FLOPPY_OPTIONS_END
436445
446static const floppy_config nanos_floppy_config =
447{
448   FLOPPY_DRIVE_DS_80,
449   FLOPPY_OPTIONS_NAME(nanos)
450};
451
437452static MACHINE_DRIVER_START( nanos )
438453    /* basic machine hardware */
439454    MDRV_CPU_ADD("maincpu",Z80, XTAL_4MHz)
r5743r5744
468483   /* NEC765 */
469484   MDRV_NEC765A_ADD("nec765", nanos_nec765_interface)   
470485   
486   MDRV_FLOPPY_4_DRIVES_ADD(nanos_floppy_config)
471487MACHINE_DRIVER_END
472488
473static FLOPPY_OPTIONS_START(nanos)
474   FLOPPY_OPTION(nanos, "img", "NANOS disk image", basicdsk_identify_default, basicdsk_construct_default,
475      HEADS([2])
476      TRACKS([80])
477      SECTORS([5])
478      SECTOR_LENGTH([1024])
479      FIRST_SECTOR_ID([1]))
480FLOPPY_OPTIONS_END
481
482static void nanos_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
483{
484   /* floppy */
485   switch(state)
486   {
487      /* --- the following bits of info are returned as 64-bit signed integers --- */
488      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
489
490      /* --- the following bits of info are returned as pointers to data or functions --- */
491      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_nanos; break;
492
493      default:                              floppy_device_getinfo(devclass, state, info); break;
494   }
495}
496
497489static SYSTEM_CONFIG_START(nanos)
498490   CONFIG_RAM_DEFAULT(64 * 1024)
499   CONFIG_DEVICE(nanos_floppy_getinfo)
500491SYSTEM_CONFIG_END
501492
502493/* ROM definition */
src/mess/drivers/fm7.c
r5743r5744
524524         else
525525         {
526526            wd17xx_set_drive(dev,data & 0x03);
527            floppy_drive_set_motor_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, data & 0x03), data & 0x80);
528            floppy_drive_set_ready_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, data & 0x03), data & 0x80,0);
527            floppy_drive_set_motor_state(floppy_get_device(space->machine, data & 0x03), data & 0x80);
528            floppy_drive_set_ready_state(floppy_get_device(space->machine, data & 0x03), data & 0x80,0);
529529            logerror("FDC: wrote %02x to 0x%04x (drive)\n",data,offset+0xfd18);
530530         }
531531         break;
r5743r5744
18101810static const wd17xx_interface fm7_mb8877a_interface =
18111811{
18121812   fm7_fdc_irq,
1813   NULL
1813   NULL,
1814   {FLOPPY_0,FLOPPY_1,FLOPPY_2,FLOPPY_3}
18141815};
18151816
18161817static const ay8910_interface fm7_psg_intf =
r5743r5744
18431844   CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED
18441845};
18451846
1846static void fm7_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
1847static const floppy_config fm7_floppy_config =
18471848{
1848   switch(state)
1849   {
1850   case MESS_DEVINFO_INT_READABLE:
1851      info->i = 1;
1852      break;
1853   case MESS_DEVINFO_INT_WRITEABLE:
1854      info->i = 0;
1855      break;
1856   case MESS_DEVINFO_INT_CREATABLE:
1857      info->i = 0;
1858      break;
1859   case MESS_DEVINFO_INT_COUNT:
1860      info->i = 2;
1861      break;
1862   case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:           
1863      info->p = (void *) floppyoptions_fm7;
1864      break;
1865   default:
1866      floppy_device_getinfo(devclass, state, info);
1867      break;
1868   }
1869}
1849   FLOPPY_DRIVE_DS_80,
1850   FLOPPY_OPTIONS_NAME(fm7)
1851};
18701852
18711853static MACHINE_DRIVER_START( fm7 )
18721854   /* basic machine hardware */
r5743r5744
19091891   MDRV_MB8877_ADD("fdc",fm7_mb8877a_interface)
19101892   
19111893   MDRV_CENTRONICS_ADD("lpt",standard_centronics)
1894   
1895   MDRV_FLOPPY_2_DRIVES_ADD(fm7_floppy_config)
19121896MACHINE_DRIVER_END
19131897
19141898static MACHINE_DRIVER_START( fm77av )
r5743r5744
19511935   MDRV_MB8877_ADD("fdc",fm7_mb8877a_interface)
19521936   
19531937   MDRV_CENTRONICS_ADD("lpt",standard_centronics)
1938   
1939   MDRV_FLOPPY_2_DRIVES_ADD(fm7_floppy_config)
19541940MACHINE_DRIVER_END
19551941
19561942/* ROM definition */
r5743r5744
20372023
20382024ROM_END
20392025
2040
2041static SYSTEM_CONFIG_START(fm7)
2042   CONFIG_DEVICE(fm7_floppy_getinfo)
2043SYSTEM_CONFIG_END
2044
2045
20462026/* Driver */
20472027
20482028/*    YEAR  NAME      PARENT  COMPAT  MACHINE  INPUT   INIT  CONFIG  COMPANY      FULLNAME        FLAGS */
2049COMP( 1982, fm7,      0,      0,      fm7,     fm7,    fm7,  fm7,    "Fujitsu",   "FM-7",         0)
2050COMP( 1985, fm77av,   fm7,    0,      fm77av,  fm7,    fm7,  fm7,    "Fujitsu",   "FM-77AV",      GAME_IMPERFECT_GRAPHICS)
2051COMP( 1985, fm7740sx, fm7,    0,      fm77av,  fm7,    fm7,  fm7,    "Fujitsu",   "FM-77AV40SX",  GAME_NOT_WORKING)
2029COMP( 1982, fm7,      0,      0,      fm7,     fm7,    fm7,  0,    "Fujitsu",   "FM-7",         0)
2030COMP( 1985, fm77av,   fm7,    0,      fm77av,  fm7,    fm7,  0,    "Fujitsu",   "FM-77AV",      GAME_IMPERFECT_GRAPHICS)
2031COMP( 1985, fm7740sx, fm7,    0,      fm77av,  fm7,    fm7,  0,    "Fujitsu",   "FM-77AV40SX",  GAME_NOT_WORKING)
src/mess/drivers/compis.c
r5743r5744
248248   1   /*  first day of week */
249249};
250250
251static const floppy_config compis_floppy_config =
252{
253   FLOPPY_DRIVE_DS_80,
254   FLOPPY_OPTIONS_NAME(compis)
255};
256
251257static MACHINE_DRIVER_START( compis )
252258   /* basic machine hardware */
253259   MDRV_CPU_ADD("maincpu", I80186, 8000000)   /* 8 MHz */
r5743r5744
294300   MDRV_MM58274C_ADD("mm58274c", compis_mm58274c_interface)
295301
296302   MDRV_NEC765A_ADD("nec765", compis_fdc_interface)
303   
304   MDRV_FLOPPY_2_DRIVES_ADD(compis_floppy_config)
297305MACHINE_DRIVER_END
298306
299307/***************************************************************************
r5743r5744
307315     ROM_LOAD ("compis.rom", 0xf0000, 0x10000, CRC(89877688) SHA1(7daa1762f24e05472eafc025879da90fe61d0225))
308316ROM_END
309317
310static void compis_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
311{
312   /* floppy */
313   switch(state)
314   {
315      /* --- the following bits of info are returned as 64-bit signed integers --- */
316      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
317318
318      /* --- the following bits of info are returned as pointers to data or functions --- */
319      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_compis; break;
320
321      default:                              floppy_device_getinfo(devclass, state, info); break;
322   }
323}
324
325static SYSTEM_CONFIG_START(compis)
326   CONFIG_DEVICE(compis_floppy_getinfo)
327SYSTEM_CONFIG_END
328
329319/*   YEAR   NAME        PARENT  COMPAT MACHINE  INPUT   INIT    CONFIG  COMPANY     FULLNAME */
330COMP(1985,   compis,      0,      0,     compis,   compis,   compis,   compis,   "Telenova", "Compis" , GAME_NOT_WORKING)
320COMP(1985,   compis,      0,      0,     compis,   compis,   compis,   0,   "Telenova", "Compis" , GAME_NOT_WORKING)
src/mess/drivers/z80ne.c
r5743r5744
412412   NULL
413413};
414414
415static const floppy_config z80netf_floppy_config =
416{
417   FLOPPY_DRIVE_DS_80,
418   FLOPPY_OPTIONS_NAME(z80ne)
419};
420
415421static MACHINE_DRIVER_START( z80ne )
416422   /* basic machine hardware */
417423   MDRV_CPU_ADD("z80ne", Z80, Z80NE_CPU_SPEED_HZ)
r5743r5744
510516   MDRV_SCREEN_VISIBLE_AREA(0, 319, 1, 239)
511517
512518   MDRV_WD1771_ADD("wd1771", default_wd17xx_interface)
519   MDRV_FLOPPY_4_DRIVES_ADD(z80netf_floppy_config)   
513520
514521   MDRV_DEFAULT_LAYOUT(layout_z80netf)
515522MACHINE_DRIVER_END
r5743r5744
587594   CONFIG_RAM( 1 * 1024 )
588595SYSTEM_CONFIG_END
589596
590
591static void z80netf_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
592{
593   /* floppy */
594   switch(state)
595   {
596      /* --- the following bits of info are returned as 64-bit signed integers --- */
597      case MESS_DEVINFO_INT_COUNT:         info->i = 4; break;
598
599      /* --- the following bits of info are returned as pointers to data or functions --- */
600
601      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:   info->p = (void *) floppyoptions_z80ne; break;
602
603      case MESS_DEVINFO_STR_NAME+0:                  strcpy(info->s = device_temp_str(), "floppydisk0"); break;
604      case MESS_DEVINFO_STR_NAME+1:                  strcpy(info->s = device_temp_str(), "floppydisk1"); break;
605      case MESS_DEVINFO_STR_NAME+2:                  strcpy(info->s = device_temp_str(), "floppydisk2"); break;
606      case MESS_DEVINFO_STR_NAME+3:                  strcpy(info->s = device_temp_str(), "floppydisk3"); break;
607      case MESS_DEVINFO_STR_SHORT_NAME+0:               strcpy(info->s = device_temp_str(), "flop0"); break;
608      case MESS_DEVINFO_STR_SHORT_NAME+1:               strcpy(info->s = device_temp_str(), "flop1"); break;
609      case MESS_DEVINFO_STR_SHORT_NAME+2:               strcpy(info->s = device_temp_str(), "flop2"); break;
610      case MESS_DEVINFO_STR_SHORT_NAME+3:               strcpy(info->s = device_temp_str(), "flop3"); break;
611      case MESS_DEVINFO_STR_DESCRIPTION+0:               strcpy(info->s = device_temp_str(), "Floppy #0"); break;
612      case MESS_DEVINFO_STR_DESCRIPTION+1:               strcpy(info->s = device_temp_str(), "Floppy #1"); break;
613      case MESS_DEVINFO_STR_DESCRIPTION+2:               strcpy(info->s = device_temp_str(), "Floppy #2"); break;
614      case MESS_DEVINFO_STR_DESCRIPTION+3:               strcpy(info->s = device_temp_str(), "Floppy #3"); break;
615
616      /* --- the following bits of info are returned as NULL-terminated strings --- */
617      case MESS_DEVINFO_STR_FILE_EXTENSIONS:      strcpy(info->s = device_temp_str(), "zmk"); break;
618
619      default:               floppy_device_getinfo(devclass, state, info); break;
620   }
621}
622
623
624597static SYSTEM_CONFIG_START( z80netf )
625598   CONFIG_RAM_DEFAULT( 56 * 1024 )
626   CONFIG_DEVICE(z80netf_floppy_getinfo)
627599SYSTEM_CONFIG_END
628600
629601/*    YEAR  NAME      PARENT    COMPAT  MACHINE   INPUT     INIT     CONFIG   COMPANY               FULLNAME                      FLAGS */
src/mess/drivers/apple2gs.c
r5743r5744
4646#include "machine/ay3600.h"
4747#include "devices/flopdrv.h"
4848#include "formats/ap2_dsk.h"
49#include "formats/ap_dsk35.h"
4950#include "includes/apple2gs.h"
5051#include "devices/sonydriv.h"
5152#include "devices/appldriv.h"
r5743r5744
149150   apple2gs_docram
150151};
151152
153/*
154static void apple2gs_floppy35_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
155{
156   // 3.5" floppy
157   switch(state)
158   {
159      case MESS_DEVINFO_INT_SONYDRIV_ALLOWABLE_SIZES:      info->i = SONY_FLOPPY_ALLOW400K | SONY_FLOPPY_ALLOW800K | SONY_FLOPPY_SUPPORT2IMG; break;
160
161      case MESS_DEVINFO_STR_NAME+0:                  strcpy(info->s = device_temp_str(), "slot5disk1"); break;
162      case MESS_DEVINFO_STR_NAME+1:                  strcpy(info->s = device_temp_str(), "slot5disk2"); break;
163      case MESS_DEVINFO_STR_SHORT_NAME+0:               strcpy(info->s = device_temp_str(), "s5d1"); break;
164      case MESS_DEVINFO_STR_SHORT_NAME+1:               strcpy(info->s = device_temp_str(), "s5d2"); break;
165      case MESS_DEVINFO_STR_DESCRIPTION+0:               strcpy(info->s = device_temp_str(), "Slot 5 Disk #1"); break;
166      case MESS_DEVINFO_STR_DESCRIPTION+1:               strcpy(info->s = device_temp_str(), "Slot 5 Disk #2"); break;
167
168      default:                              sonydriv_device_getinfo(devclass, state, info); break;
169   }
170}
171
172
173
174static void apple2gs_floppy525_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
175{
176   // 5.25" floppy
177   switch(state)
178   {
179      case MESS_DEVINFO_INT_APPLE525_SPINFRACT_DIVIDEND:   info->i = 15; break;
180      case MESS_DEVINFO_INT_APPLE525_SPINFRACT_DIVISOR:   info->i = 16; break;
181
182      case MESS_DEVINFO_STR_NAME+0:                  strcpy(info->s = device_temp_str(), "slot6disk1"); break;
183      case MESS_DEVINFO_STR_NAME+1:                  strcpy(info->s = device_temp_str(), "slot6disk2"); break;
184      case MESS_DEVINFO_STR_SHORT_NAME+0:               strcpy(info->s = device_temp_str(), "s6d1"); break;
185      case MESS_DEVINFO_STR_SHORT_NAME+1:               strcpy(info->s = device_temp_str(), "s6d2"); break;
186      case MESS_DEVINFO_STR_DESCRIPTION+0:               strcpy(info->s = device_temp_str(), "Slot 6 Disk #1"); break;
187      case MESS_DEVINFO_STR_DESCRIPTION+1:               strcpy(info->s = device_temp_str(), "Slot 6 Disk #2"); break;
188
189      default:                              apple525_device_getinfo(devclass, state, info); break;
190   }
191}*/
192
193static const floppy_config apple2gs_floppy35_floppy_config =
194{
195   FLOPPY_DRIVE_DS_80,
196   FLOPPY_OPTIONS_NAME(apple35_iigs)
197};
198
199static const floppy_config apple2gs_floppy525_floppy_config =
200{
201   FLOPPY_DRIVE_DS_80,
202   FLOPPY_OPTIONS_NAME(apple2)
203};
204
152205static MACHINE_DRIVER_START( apple2gs )
153206   MDRV_IMPORT_FROM( apple2e )
154207   MDRV_CPU_REPLACE("maincpu", G65816, APPLE2GS_14M/5)
r5743r5744
179232   /* replace the old-style FDC with an IWM */
180233   MDRV_DEVICE_REMOVE("fdc")
181234   MDRV_IWM_ADD("fdc", apple2_fdc_interface)
182   /* SCC */
235   /* SCC */   
183236   MDRV_SCC8530_ADD("scc")
237   
238   MDRV_FLOPPY_APPLE_2_DRIVES_REMOVE()
239   MDRV_FLOPPY_APPLE_2_DRIVES_ADD(apple2gs_floppy525_floppy_config)
240   MDRV_FLOPPY_SONY_2_DRIVES_ADDITIONAL_ADD(apple2gs_floppy35_floppy_config)
184241MACHINE_DRIVER_END
185242
186243
r5743r5744
253310   ROM_LOAD("rom0d.bin", 0x18000, 0x8000, CRC(200a15b8) SHA1(0c2890bb169ead63369738bbd5f33b869f24c42a))
254311ROM_END
255312
256
257
258/* -----------------------------------------------------------------------
259 * Floppy disk devices
260 * ----------------------------------------------------------------------- */
261
262static void apple2gs_floppy35_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
263{
264   /* 3.5" floppy */
265   switch(state)
266   {
267      /* --- the following bits of info are returned as 64-bit signed integers --- */
268      case MESS_DEVINFO_INT_SONYDRIV_ALLOWABLE_SIZES:      info->i = SONY_FLOPPY_ALLOW400K | SONY_FLOPPY_ALLOW800K | SONY_FLOPPY_SUPPORT2IMG; break;
269
270      /* --- the following bits of info are returned as NULL-terminated strings --- */
271      case MESS_DEVINFO_STR_NAME+0:                  strcpy(info->s = device_temp_str(), "slot5disk1"); break;
272      case MESS_DEVINFO_STR_NAME+1:                  strcpy(info->s = device_temp_str(), "slot5disk2"); break;
273      case MESS_DEVINFO_STR_SHORT_NAME+0:               strcpy(info->s = device_temp_str(), "s5d1"); break;
274      case MESS_DEVINFO_STR_SHORT_NAME+1:               strcpy(info->s = device_temp_str(), "s5d2"); break;
275      case MESS_DEVINFO_STR_DESCRIPTION+0:               strcpy(info->s = device_temp_str(), "Slot 5 Disk #1"); break;
276      case MESS_DEVINFO_STR_DESCRIPTION+1:               strcpy(info->s = device_temp_str(), "Slot 5 Disk #2"); break;
277
278      default:                              sonydriv_device_getinfo(devclass, state, info); break;
279   }
280}
281
282
283
284static void apple2gs_floppy525_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
285{
286   /* 5.25" floppy */
287   switch(state)
288   {
289      /* --- the following bits of info are returned as 64-bit signed integers --- */
290      case MESS_DEVINFO_INT_APPLE525_SPINFRACT_DIVIDEND:   info->i = 15; break;
291      case MESS_DEVINFO_INT_APPLE525_SPINFRACT_DIVISOR:   info->i = 16; break;
292
293      /* --- the following bits of info are returned as NULL-terminated strings --- */
294      case MESS_DEVINFO_STR_NAME+0:                  strcpy(info->s = device_temp_str(), "slot6disk1"); break;
295      case MESS_DEVINFO_STR_NAME+1:                  strcpy(info->s = device_temp_str(), "slot6disk2"); break;
296      case MESS_DEVINFO_STR_SHORT_NAME+0:               strcpy(info->s = device_temp_str(), "s6d1"); break;
297      case MESS_DEVINFO_STR_SHORT_NAME+1:               strcpy(info->s = device_temp_str(), "s6d2"); break;
298      case MESS_DEVINFO_STR_DESCRIPTION+0:               strcpy(info->s = device_temp_str(), "Slot 6 Disk #1"); break;
299      case MESS_DEVINFO_STR_DESCRIPTION+1:               strcpy(info->s = device_temp_str(), "Slot 6 Disk #2"); break;
300
301      default:                              apple525_device_getinfo(devclass, state, info); break;
302   }
303}
304
305313static DRIVER_INIT(apple2gs)
306314{
307315   state_save_register_global_array(machine, apple2gs_docram);
r5743r5744
310318/* ----------------------------------------------------------------------- */
311319
312320static SYSTEM_CONFIG_START(apple2gs)
313   CONFIG_DEVICE(apple2gs_floppy35_getinfo)
314   CONFIG_DEVICE(apple2gs_floppy525_getinfo)
315
316321   CONFIG_RAM_DEFAULT         (2 * 1024 * 1024)
317322SYSTEM_CONFIG_END
318323
src/mess/drivers/mac.c
r5743r5744
4545#include "machine/applefdc.h"
4646#include "devices/sonydriv.h"
4747#include "devices/harddriv.h"
48#include "formats/ap_dsk35.h"
4849
4950// LC: boot needs 50f04000 bit 0 to go "1" at a49f00.  SCC.
5051
r5743r5744
134135/***************************************************************************
135136    MACHINE DRIVERS
136137***************************************************************************/
138static const floppy_config mac128512_floppy_config = //SONY_FLOPPY_ALLOW400K
139{
140   FLOPPY_DRIVE_DS_80,
141   FLOPPY_OPTIONS_NAME(apple35_mac)
142};
137143
144
145static const floppy_config mac_floppy_config = //SONY_FLOPPY_ALLOW400K | SONY_FLOPPY_ALLOW800K
146{
147   FLOPPY_DRIVE_DS_80,
148   FLOPPY_OPTIONS_NAME(apple35_mac)
149};
150
138151static MACHINE_DRIVER_START( mac512ke )
139152   /* basic machine hardware */
140153   MDRV_CPU_ADD("maincpu", M68000, 7833600)        /* 7.8336 MHz */
r5743r5744
167180
168181   /* devices */
169182   MDRV_IWM_ADD("fdc", mac_iwm_interface)
183   MDRV_FLOPPY_SONY_2_DRIVES_ADD(mac128512_floppy_config)
184   
170185   MDRV_SCC8530_ADD("scc")
171186   MDRV_SCC8530_ACK(mac_scc_ack)
172187   MDRV_VIA6522_ADD("via6522_0", 1000000, mac_via6522_intf)
r5743r5744
181196
182197   MDRV_HARDDISK_ADD( "harddisk1" )
183198   MDRV_HARDDISK_ADD( "harddisk2" )
199   
200   MDRV_FLOPPY_SONY_2_DRIVES_MODIFY(mac_floppy_config)
184201MACHINE_DRIVER_END
185202
186203
r5743r5744
379396        ROM_LOAD("350eacf0.rom", 0x000000, 0x080000, CRC(71681726) SHA1(6bef5853ae736f3f06c2b4e79772f65910c3b7d4))
380397ROM_END
381398
382static void mac128512_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
383{
384   /* floppy */
385   switch(state)
386   {
387      /* --- the following bits of info are returned as 64-bit signed integers --- */
388      case MESS_DEVINFO_INT_SONYDRIV_ALLOWABLE_SIZES:      info->i = SONY_FLOPPY_ALLOW400K; break;
389
390      default:                              sonydriv_device_getinfo(devclass, state, info); break;
391   }
392}
393
394static void mac_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
395{
396   /* floppy */
397   switch(state)
398   {
399      /* --- the following bits of info are returned as 64-bit signed integers --- */
400      case MESS_DEVINFO_INT_SONYDRIV_ALLOWABLE_SIZES:      info->i = SONY_FLOPPY_ALLOW400K | SONY_FLOPPY_ALLOW800K; break;
401
402      default:                              sonydriv_device_getinfo(devclass, state, info); break;
403   }
404}
405
406399static SYSTEM_CONFIG_START(mac128k)
407   CONFIG_DEVICE(mac128512_floppy_getinfo)
408400   CONFIG_RAM_DEFAULT(0x020000)
409401SYSTEM_CONFIG_END
410402
411403static SYSTEM_CONFIG_START(mac512k)
412   CONFIG_DEVICE(mac128512_floppy_getinfo)
413404   CONFIG_RAM_DEFAULT(0x080000)
414405SYSTEM_CONFIG_END
415406
416407static SYSTEM_CONFIG_START(macplus)
417   CONFIG_DEVICE(mac_floppy_getinfo)
418408   CONFIG_RAM         (0x080000)
419409   CONFIG_RAM_DEFAULT   (0x100000)
420410   CONFIG_RAM         (0x200000)
r5743r5744
423413SYSTEM_CONFIG_END
424414
425415static SYSTEM_CONFIG_START(macse)
426   CONFIG_DEVICE(mac_floppy_getinfo)
427416   CONFIG_RAM_DEFAULT   (0x100000)
428417   CONFIG_RAM         (0x200000)
429418   CONFIG_RAM         (0x280000)
r5743r5744
431420SYSTEM_CONFIG_END
432421
433422static SYSTEM_CONFIG_START(maclc)
434   CONFIG_DEVICE(mac_floppy_getinfo)
435423   CONFIG_RAM_DEFAULT   (0x200000)   // 2 MB RAM default
436424   CONFIG_RAM         (0x400000)
437425   CONFIG_RAM         (0x600000)
src/mess/drivers/nc.c
r5743r5744
13161316    DEVCB_LINE(nc200_fdc_interrupt),
13171317    NULL,
13181318    NULL,
1319    NEC765_RDY_PIN_CONNECTED
1319    NEC765_RDY_PIN_CONNECTED,
1320   {FLOPPY_0, NULL, NULL, NULL }
13201321};
13211322
13221323#ifdef UNUSED_FUNCTION
r5743r5744
13401341
13411342    nc_common_init_machine(machine);
13421343
1343    /* double sided, 80 track drive */
1344   floppy_drive_set_geometry(image_from_devtype_and_index(machine, IO_FLOPPY, 0), FLOPPY_DRIVE_DS_80);
1345   //floppy_drive_set_index_pulse_callback(image_from_devtype_and_index(machine, IO_FLOPPY, 0), nc200_floppy_drive_index_callback);
1346
13471344   mc146818_init(machine, MC146818_STANDARD);
13481345
13491346   nc200_uart_interrupt_irq = 0;
r5743r5744
16731670   MDRV_CARTSLOT_UNLOAD(nc_pcmcia_card)
16741671MACHINE_DRIVER_END
16751672
1673static const floppy_config nc200_floppy_config =
1674{
1675   FLOPPY_DRIVE_DS_80,
1676   FLOPPY_OPTIONS_NAME(pc)
1677};
16761678
16771679static MACHINE_DRIVER_START( nc200 )
16781680   MDRV_IMPORT_FROM( nc100 )
r5743r5744
17011703   MDRV_DEVICE_REMOVE("rtc")
17021704
17031705   MDRV_NEC765A_ADD("nec765", nc200_nec765_interface)
1706   
1707   MDRV_FLOPPY_DRIVE_ADD(FLOPPY_0, nc200_floppy_config)
17041708MACHINE_DRIVER_END
17051709
17061710
r5743r5744
17611765   CONFIG_RAM_DEFAULT(64 * 1024)
17621766SYSTEM_CONFIG_END
17631767
1764static void nc200_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
1765{
1766   /* floppy */
1767   switch(state)
1768   {
1769      /* --- the following bits of info are returned as 64-bit signed integers --- */
1770      case MESS_DEVINFO_INT_COUNT:                     info->i = 1; break;
1771
1772      /* --- the following bits of info are returned as pointers to data or functions --- */
1773      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_pc; break;
1774
1775      default:                              floppy_device_getinfo(devclass, state, info); break;
1776   }
1777}
1778
17791768static SYSTEM_CONFIG_START(nc200)
17801769   CONFIG_IMPORT_FROM(nc_common)
17811770   CONFIG_RAM_DEFAULT(128 * 1024)
1782   CONFIG_DEVICE(nc200_floppy_getinfo)
17831771SYSTEM_CONFIG_END
17841772
17851773/*    YEAR  NAME    PARENT  COMPAT  MACHINE INPUT   INIT    CONFIG  COMPANY         FULLNAME    FLAGS */
src/mess/drivers/sord.c
r5743r5744
130130
131131   LOG(("fd5 drive state w: %02x\n",state));
132132
133   floppy_drive_set_motor_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 0), state);
134   floppy_drive_set_motor_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 0), state);
135   floppy_drive_set_ready_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 1), 1,1);
136   floppy_drive_set_ready_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 1), 1,1);
133   floppy_drive_set_motor_state(floppy_get_device(space->machine, 0), state);
134   floppy_drive_set_motor_state(floppy_get_device(space->machine, 0), state);
135   floppy_drive_set_ready_state(floppy_get_device(space->machine, 1), 1,1);
136   floppy_drive_set_ready_state(floppy_get_device(space->machine, 1), 1,1);
137137}
138138
139139static WRITE8_HANDLER(fd5_tc_w)
r5743r5744
169169   DEVCB_LINE(sord_fd5_fdc_interrupt),
170170   NULL,
171171   NULL,
172   NEC765_RDY_PIN_CONNECTED
172   NEC765_RDY_PIN_CONNECTED,
173   {FLOPPY_0, FLOPPY_1, NULL, NULL}
173174};
174175
175176static MACHINE_RESET( sord_m5_fd5 )
176177{
177   floppy_drive_set_geometry(image_from_devtype_and_index(machine, IO_FLOPPY, 0), FLOPPY_DRIVE_SS_40);
178   floppy_drive_set_geometry(image_from_devtype_and_index(machine, IO_FLOPPY, 1), FLOPPY_DRIVE_SS_40);
178   floppy_drive_set_geometry(floppy_get_device(machine,0), FLOPPY_DRIVE_SS_40);
179   floppy_drive_set_geometry(floppy_get_device(machine,1), FLOPPY_DRIVE_SS_40);
179180   MACHINE_RESET_CALL(sord_m5);
180181   ppi8255_set_port_c(devtag_get_device(machine, "ppi8255"), 0x50);
181182}
r5743r5744
559560MACHINE_DRIVER_END
560561
561562
563static FLOPPY_OPTIONS_START( sordm5 )
564   FLOPPY_OPTION( sordm5, "dsk", "Sord M5 disk image", basicdsk_identify_default, basicdsk_construct_default,
565      HEADS([1])
566      TRACKS([40])
567      SECTORS([18])
568      SECTOR_LENGTH([256])
569      FIRST_SECTOR_ID([1]))
570FLOPPY_OPTIONS_END
571
572static const floppy_config sordm5_floppy_config =
573{
574   FLOPPY_DRIVE_DS_80,
575   FLOPPY_OPTIONS_NAME(sordm5)
576};
577
562578static MACHINE_DRIVER_START( sord_m5_fd5 )
563579   MDRV_IMPORT_FROM( sord_m5 )
564580
r5743r5744
575591
576592   MDRV_QUANTUM_TIME(HZ(1200))
577593   MDRV_MACHINE_RESET(sord_m5_fd5)
594   
595   MDRV_FLOPPY_2_DRIVES_ADD(sordm5_floppy_config)
578596MACHINE_DRIVER_END
579597
580598
r5743r5744
601619/***************************************************************************
602620    SYSTEM CONFIG
603621***************************************************************************/
604
605static FLOPPY_OPTIONS_START( sordm5 )
606   FLOPPY_OPTION( sordm5, "dsk", "Sord M5 disk image", basicdsk_identify_default, basicdsk_construct_default,
607      HEADS([1])
608      TRACKS([40])
609      SECTORS([18])
610      SECTOR_LENGTH([256])
611      FIRST_SECTOR_ID([1]))
612FLOPPY_OPTIONS_END
613
614622/* different ram sizes need to be emulated */
615623#ifdef UNUSED_FUNCTION
616624static SYSTEM_CONFIG_START( sordm5 )
r5743r5744
619627SYSTEM_CONFIG_END
620628#endif
621629
622static void srdm5fd5_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
623{
624   /* floppy */
625   switch(state)
626   {
627      /* --- the following bits of info are returned as 64-bit signed integers --- */
628      case MESS_DEVINFO_INT_COUNT:         info->i = 4; break;
629
630      /* --- the following bits of info are returned as pointers to data or functions --- */
631      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:   info->p = (void *) floppyoptions_sordm5; break;
632
633      default: floppy_device_getinfo(devclass, state, info); break;
634   }
635}
636
637
638static SYSTEM_CONFIG_START(srdm5fd5)
639/*   CONFIG_IMPORT_FROM(sordm5) */
640   CONFIG_DEVICE(srdm5fd5_floppy_getinfo)
641SYSTEM_CONFIG_END
642
643
644630/***************************************************************************
645631    GAME DRIVERS
646632***************************************************************************/
647633
648634/*    YEAR  NAME      PARENT  COMPAT  MACHINE      INPUT    INIT  CONFIG    COMPANY  FULLNAME               FLAGS */
649635COMP( 1983, sordm5,     0,      0,      sord_m5,      sord_m5, 0,    0,        "Sord",  "Sord M5",             0 )
650COMP( 1983, srdm5fd5, sordm5, 0,      sord_m5_fd5, sord_m5, 0,    srdm5fd5, "Sord",  "Sord M5 + PI5 + FD5", 0 )
636COMP( 1983, srdm5fd5, sordm5, 0,      sord_m5_fd5, sord_m5, 0,    0, "Sord",  "Sord M5 + PI5 + FD5", 0 )
src/mess/drivers/bw12.c
r5743r5744
4949
5050INLINE const device_config *get_floppy_image(running_machine *machine, int drive)
5151{
52   return image_from_devtype_and_index(machine, IO_FLOPPY, drive);
52   return floppy_get_device(machine, drive);
5353}
5454
5555static void bw12_bankswitch(running_machine *machine)
r5743r5744
451451   DEVCB_LINE(bw12_nec765_interrupt),      /* interrupt */
452452   NULL,                  /* DMA request */
453453   bw12_nec765_get_image,      /* image lookup */
454   NEC765_RDY_PIN_CONNECTED   /* ready pin */
454   NEC765_RDY_PIN_CONNECTED,   /* ready pin */
455   {FLOPPY_0,FLOPPY_1, NULL, NULL}
455456};
456457
457458/* PIA6821 Interface */
r5743r5744
717718   }
718719}
719720
720/* Machine Driver */
721static FLOPPY_OPTIONS_START(bw12)
722   FLOPPY_OPTION(bw12, "dsk", "180KB BW 12 SSDD", basicdsk_identify_default, basicdsk_construct_default,
723      HEADS([1])
724      TRACKS([40])
725      SECTORS([18])
726      SECTOR_LENGTH([256])
727      FIRST_SECTOR_ID([0]))
728   FLOPPY_OPTION(bw12, "dsk", "360KB BW 14 DSDD", basicdsk_identify_default, basicdsk_construct_default,
729      HEADS([2])
730      TRACKS([40])
731      SECTORS([18])
732      SECTOR_LENGTH([256])
733      FIRST_SECTOR_ID([0]))
734   FLOPPY_OPTION(bw12, "dsk", "SVI-328 SSDD", basicdsk_identify_default, basicdsk_construct_default,
735      HEADS([1])
736      TRACKS([40])
737      SECTORS([17])
738      SECTOR_LENGTH([256])
739      FIRST_SECTOR_ID([0]))
740   FLOPPY_OPTION(bw12, "dsk", "SVI-328 DSDD", basicdsk_identify_default, basicdsk_construct_default,
741      HEADS([2])
742      TRACKS([40])
743      SECTORS([17])
744      SECTOR_LENGTH([256])
745      FIRST_SECTOR_ID([0]))
746   FLOPPY_OPTION(bw12, "dsk", "Kaypro II SSDD", basicdsk_identify_default, basicdsk_construct_default,
747      HEADS([1])
748      TRACKS([40])
749      SECTORS([10])
750      SECTOR_LENGTH([512])
751      FIRST_SECTOR_ID([0]))
752FLOPPY_OPTIONS_END
721753
754static const floppy_config bw12_floppy_config =
755{
756   FLOPPY_DRIVE_DS_80,
757   FLOPPY_OPTIONS_NAME(bw12)
758};
759
760/* Machine Driver */
722761static MACHINE_DRIVER_START( bw12 )
723762   MDRV_DRIVER_DATA(bw12_state)
724763
r5743r5744
761800
762801   /* printer */
763802   MDRV_CENTRONICS_ADD(CENTRONICS_TAG, bw12_centronics_intf)
803   
804   MDRV_FLOPPY_2_DRIVES_ADD(bw12_floppy_config)
764805MACHINE_DRIVER_END
765806
766807/* ROMs */
r5743r5744
776817#define rom_bw14 rom_bw12
777818
778819/* System Configurations */
779static FLOPPY_OPTIONS_START(bw12)
780   FLOPPY_OPTION(bw12, "dsk", "180KB BW 12 SSDD", basicdsk_identify_default, basicdsk_construct_default,
781      HEADS([1])
782      TRACKS([40])
783      SECTORS([18])
784      SECTOR_LENGTH([256])
785      FIRST_SECTOR_ID([0]))
786   FLOPPY_OPTION(bw12, "dsk", "360KB BW 14 DSDD", basicdsk_identify_default, basicdsk_construct_default,
787      HEADS([2])
788      TRACKS([40])
789      SECTORS([18])
790      SECTOR_LENGTH([256])
791      FIRST_SECTOR_ID([0]))
792   FLOPPY_OPTION(bw12, "dsk", "SVI-328 SSDD", basicdsk_identify_default, basicdsk_construct_default,
793      HEADS([1])
794      TRACKS([40])
795      SECTORS([17])
796      SECTOR_LENGTH([256])
797      FIRST_SECTOR_ID([0]))
798   FLOPPY_OPTION(bw12, "dsk", "SVI-328 DSDD", basicdsk_identify_default, basicdsk_construct_default,
799      HEADS([2])
800      TRACKS([40])
801      SECTORS([17])
802      SECTOR_LENGTH([256])
803      FIRST_SECTOR_ID([0]))
804   FLOPPY_OPTION(bw12, "dsk", "Kaypro II SSDD", basicdsk_identify_default, basicdsk_construct_default,
805      HEADS([1])
806      TRACKS([40])
807      SECTORS([10])
808      SECTOR_LENGTH([512])
809      FIRST_SECTOR_ID([0]))
810FLOPPY_OPTIONS_END
811
812static void bw12_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
813{
814   /* floppy */
815   switch(state)
816   {
817      /* --- the following bits of info are returned as 64-bit signed integers --- */
818      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
819
820      /* --- the following bits of info are returned as pointers to data or functions --- */
821      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_bw12; break;
822
823      default:                              floppy_device_getinfo(devclass, state, info); break;
824   }
825}
826820static SYSTEM_CONFIG_START( bw12 )
827821   CONFIG_RAM_DEFAULT( 64 * 1024 )
828   CONFIG_DEVICE( bw12_floppy_getinfo )
829822SYSTEM_CONFIG_END
830823
831824static SYSTEM_CONFIG_START( bw14 )
832825   CONFIG_RAM_DEFAULT( 128 * 1024 )
833   CONFIG_DEVICE( bw12_floppy_getinfo )
834826SYSTEM_CONFIG_END
835827
836828/* System Drivers */
src/mess/drivers/pentagon.c
r5743r5744
212212ROM_END
213213static SYSTEM_CONFIG_START(pentagon)
214214   CONFIG_RAM_DEFAULT(128 * 1024)
215   CONFIG_DEVICE(beta_floppy_getinfo)
216215SYSTEM_CONFIG_END
217216
218217static SYSTEM_CONFIG_START(pent1024)
219218   CONFIG_RAM_DEFAULT(1024 * 1024)
220   CONFIG_DEVICE(beta_floppy_getinfo)
221219SYSTEM_CONFIG_END
222220
223221/*    YEAR  NAME      PARENT    COMPAT  MACHINE     INPUT       INIT    CONFIG      COMPANY     FULLNAME */
src/mess/drivers/concept.c
r5743r5744
6161   1   /*  first day of week */
6262};
6363
64
65
66static FLOPPY_OPTIONS_START(concept)
67#if 1
68   /* SSSD 8" */
69   FLOPPY_OPTION(concept, "img", "Corvus Concept 8\" SSSD disk image", basicdsk_identify_default, basicdsk_construct_default,
70      HEADS([1])
71      TRACKS([77])
72      SECTORS([26])
73      SECTOR_LENGTH([128])
74      FIRST_SECTOR_ID([1]))
75#elif 0
76   /* SSDD 8" (according to ROMs) */
77   FLOPPY_OPTION(concept, "img", "Corvus Concept 8\" SSDD disk image", basicdsk_identify_default, basicdsk_construct_default,
78      HEADS([1])
79      TRACKS([77])
80      SECTORS([26])
81      SECTOR_LENGTH([256])
82      FIRST_SECTOR_ID([1]))
83#elif 0
84   /* Apple II DSDD 5"1/4 (according to ROMs) */
85   FLOPPY_OPTION(concept, "img", "Corvus Concept Apple II 5\"1/4 DSDD disk image", basicdsk_identify_default, basicdsk_construct_default,
86      HEADS([2])
87      TRACKS([35])
88      SECTORS([16])
89      SECTOR_LENGTH([256])
90      FIRST_SECTOR_ID([1]))
91#elif 0
92   /* actual formats found */
93   FLOPPY_OPTION(concept, "img", "Corvus Concept 5\"1/4 DSDD disk image (256-byte sectors)", basicdsk_identify_default, basicdsk_construct_default,
94      HEADS([2])
95      TRACKS([80])
96      SECTORS([16])
97      SECTOR_LENGTH([256])
98      FIRST_SECTOR_ID([1]))
99#else
100   FLOPPY_OPTION(concept, "img", "Corvus Concept 5\"1/4 DSDD disk image (512-byte sectors)", basicdsk_identify_default, basicdsk_construct_default,
101      HEADS([2])
102      TRACKS([80])
103      SECTORS([9])
104      SECTOR_LENGTH([512])
105      FIRST_SECTOR_ID([1]))
106#endif
107FLOPPY_OPTIONS_END
108
109static const floppy_config concept_floppy_config =
110{
111   FLOPPY_DRIVE_DS_80,
112   FLOPPY_OPTIONS_NAME(concept)
113};
114
64115/* concept machine */
65116static MACHINE_DRIVER_START( concept )
66117   /* basic machine hardware */
r5743r5744
96147   MDRV_VIA6522_ADD("via6522_0", 1022750, concept_via6522_intf)
97148   
98149   MDRV_WD179X_ADD("wd179x", concept_wd17xx_interface )
150   
151   MDRV_FLOPPY_4_DRIVES_ADD(concept_floppy_config)
99152MACHINE_DRIVER_END
100153
101154
r5743r5744
274327
275328ROM_END
276329
277
278static FLOPPY_OPTIONS_START(concept)
279#if 1
280   /* SSSD 8" */
281   FLOPPY_OPTION(concept, "img", "Corvus Concept 8\" SSSD disk image", basicdsk_identify_default, basicdsk_construct_default,
282      HEADS([1])
283      TRACKS([77])
284      SECTORS([26])
285      SECTOR_LENGTH([128])
286      FIRST_SECTOR_ID([1]))
287#elif 0
288   /* SSDD 8" (according to ROMs) */
289   FLOPPY_OPTION(concept, "img", "Corvus Concept 8\" SSDD disk image", basicdsk_identify_default, basicdsk_construct_default,
290      HEADS([1])
291      TRACKS([77])
292      SECTORS([26])
293      SECTOR_LENGTH([256])
294      FIRST_SECTOR_ID([1]))
295#elif 0
296   /* Apple II DSDD 5"1/4 (according to ROMs) */
297   FLOPPY_OPTION(concept, "img", "Corvus Concept Apple II 5\"1/4 DSDD disk image", basicdsk_identify_default, basicdsk_construct_default,
298      HEADS([2])
299      TRACKS([35])
300      SECTORS([16])
301      SECTOR_LENGTH([256])
302      FIRST_SECTOR_ID([1]))
303#elif 0
304   /* actual formats found */
305   FLOPPY_OPTION(concept, "img", "Corvus Concept 5\"1/4 DSDD disk image (256-byte sectors)", basicdsk_identify_default, basicdsk_construct_default,
306      HEADS([2])
307      TRACKS([80])
308      SECTORS([16])
309      SECTOR_LENGTH([256])
310      FIRST_SECTOR_ID([1]))
311#else
312   FLOPPY_OPTION(concept, "img", "Corvus Concept 5\"1/4 DSDD disk image (512-byte sectors)", basicdsk_identify_default, basicdsk_construct_default,
313      HEADS([2])
314      TRACKS([80])
315      SECTORS([9])
316      SECTOR_LENGTH([512])
317      FIRST_SECTOR_ID([1]))
318#endif
319FLOPPY_OPTIONS_END
320
321static void concept_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
322{
323   /* floppy */
324   switch(state)
325   {
326      /* --- the following bits of info are returned as 64-bit signed integers --- */
327      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
328
329      /* --- the following bits of info are returned as pointers to data or functions --- */
330      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_concept; break;
331
332      default:                              floppy_device_getinfo(devclass, state, info); break;
333   }
334}
335
336
337static SYSTEM_CONFIG_START(concept)
338   /* The concept should eventually support floppies, hard disks, etc. */
339   CONFIG_DEVICE(concept_floppy_getinfo)
340SYSTEM_CONFIG_END
341
342
343330/*    YEAR  NAME      PARENT    COMPAT  MACHINE   INPUT    INIT  CONFIG   COMPANY           FULLNAME */
344COMP( 1982, concept,  0,      0,      concept,  concept, 0,    concept, "Corvus Systems", "Concept" , 0)
331COMP( 1982, concept,  0,      0,      concept,  concept, 0,    0, "Corvus Systems", "Concept" , 0)
src/mess/drivers/pcw16.c
r5743r5744
13821382   DEVCB_CPU_INPUT_LINE("maincpu", 0)
13831383};
13841384
1385static const floppy_config pcw16_floppy_config =
1386{
1387   FLOPPY_DRIVE_DS_80,
1388   FLOPPY_OPTIONS_NAME(pc)
1389};
13851390
13861391static MACHINE_DRIVER_START( pcw16 )
13871392   /* basic machine hardware */
r5743r5744
14181423   /* printer */
14191424   MDRV_PC_LPT_ADD("lpt", pcw16_lpt_config)
14201425   MDRV_NEC765A_ADD("nec765", pc_fdc_nec765_connected_interface)
1426   MDRV_FLOPPY_2_DRIVES_ADD(pcw16_floppy_config)
14211427MACHINE_DRIVER_END
14221428
14231429
r5743r5744
14411447   ROM_LOAD("pcw045.sys",0x10000, 524288, CRC(c642f498) SHA1(8a5c05de92e7b2c5acdfb038217503ad363285b5))
14421448ROM_END
14431449
1444static void pcw16_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
1445{
1446   /* floppy */
1447   switch(state)
1448   {
1449      /* --- the following bits of info are returned as 64-bit signed integers --- */
1450      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
1451
1452      /* --- the following bits of info are returned as pointers to data or functions --- */
1453      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_pc; break;
1454
1455      default:                              floppy_device_getinfo(devclass, state, info); break;
1456   }
1457}
1458
14591450static SYSTEM_CONFIG_START(pcw16)
14601451   CONFIG_RAM_DEFAULT(2048 * 1024)
1461   CONFIG_DEVICE(pcw16_floppy_getinfo)
14621452SYSTEM_CONFIG_END
14631453
14641454/*     YEAR  NAME     PARENT    COMPAT  MACHINE    INPUT     INIT   CONFIG,  COMPANY          FULLNAME */
src/mess/drivers/ti990_4.c
r5743r5744
202202    idle_callback
203203};*/
204204
205static const floppy_config ti990_4_floppy_config =
206{
207   FLOPPY_DRIVE_DS_80,
208   FLOPPY_OPTIONS_NAME(fd800)
209};
210
205211static MACHINE_DRIVER_START(ti990_4)
206212   /* basic machine hardware */
207213   /* TMS9900 CPU @ 3.0(???) MHz */
r5743r5744
248254   MDRV_SOUND_ADD("beep", BEEP, 0)
249255   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
250256#endif
257   MDRV_FLOPPY_4_DRIVES_ADD(ti990_4_floppy_config)   
251258
252259MACHINE_DRIVER_END
253260
r5743r5744
309316#endif
310317INPUT_PORTS_END
311318
312static void ti990_4_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
313{
314   /* floppy */
315   switch(state)
316   {
317      /* --- the following bits of info are returned as 64-bit signed integers --- */
318      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
319319
320      /* --- the following bits of info are returned as pointers to data or functions --- */
321      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_fd800; break;
322
323      default:                              floppy_device_getinfo(devclass, state, info); break;
324   }
325}
326
327static SYSTEM_CONFIG_START(ti990_4)
328   CONFIG_DEVICE(ti990_4_floppy_getinfo)
329SYSTEM_CONFIG_END
330
331320/*    YEAR  NAME        PARENT  COMPAT  MACHINE     INPUT       INIT        CONFIG      COMPANY                 FULLNAME */
332COMP( 1976,   ti990_4,   0,      0,      ti990_4,   ti990_4,   ti990_4,   ti990_4,   "Texas Instruments",   "TI Model 990/4 Microcomputer System" , GAME_NOT_WORKING )
321COMP( 1976,   ti990_4,   0,      0,      ti990_4,   ti990_4,   ti990_4,   0,   "Texas Instruments",   "TI Model 990/4 Microcomputer System" , GAME_NOT_WORKING )
src/mess/drivers/msx.c
r5743r5744
10141014   CASSETTE_PLAY
10151015};
10161016
1017static const floppy_config msx_floppy_config =
1018{
1019   FLOPPY_DRIVE_DS_80,
1020   FLOPPY_OPTIONS_NAME(msx)
1021};
1022
10171023static MACHINE_DRIVER_START( msx_cartslot )
10181024   MDRV_CARTSLOT_ADD("cart1")
10191025   MDRV_CARTSLOT_EXTENSION_LIST("mx1,rom")
r5743r5744
10691075   MDRV_CASSETTE_ADD( "cassette", msx_cassette_config )
10701076
10711077   MDRV_WD179X_ADD("wd179x", msx_wd17xx_interface )
1072
1078   
1079   MDRV_FLOPPY_2_DRIVES_ADD(msx_floppy_config)
1080   
10731081   MDRV_IMPORT_FROM(msx_cartslot)
10741082MACHINE_DRIVER_END
10751083
r5743r5744
11411149
11421150   MDRV_WD179X_ADD("wd179x", msx_wd17xx_interface )
11431151
1152   MDRV_FLOPPY_2_DRIVES_ADD(msx_floppy_config)
1153   
11441154   MDRV_IMPORT_FROM(msx_cartslot)
11451155MACHINE_DRIVER_END
11461156
r5743r5744
36493659   MSX_LAYOUT_RAMIO_SET_BITS (0x80)
36503660MSX_LAYOUT_END
36513661
3652static void msx_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
3653{
3654   /* floppy */
3655   switch(state)
3656   {
3657      /* --- the following bits of info are returned as 64-bit signed integers --- */
3658      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
3659
3660      /* --- the following bits of info are returned as pointers to data or functions --- */
3661      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_msx; break;
3662
3663      default:                              floppy_device_getinfo(devclass, state, info); break;
3664   }
3665}
3666
3667static SYSTEM_CONFIG_START(msx)
3668   CONFIG_DEVICE(msx_floppy_getinfo)
3669SYSTEM_CONFIG_END
3670
36713662MSX_DRIVER_LIST
36723663  /* MSX 1 */
36733664   MSX_DRIVER (msx)
r5743r5744
38023793
38033794
38043795/*    YEAR  NAME      PARENT    COMPAT  MACHINE  INPUT     INIT   CONFIG  COMPANY              FULLNAME */
3805COMP(1983, msx,        0,      0,   msx_pal,  msx,       msx,     msx, "ASCII & Microsoft", "MSX" , 0)
3796COMP(1983, msx,        0,      0,   msx_pal,  msx,       msx,     0, "ASCII & Microsoft", "MSX" , 0)
38063797
3807COMP(1983, ax170,        msx,   0,   msx_pal,  msx,      msx,     msx, "Al Alamiah", "AX-170" , 0)
3808COMP(1983, canonv10,  msx,   0,   msx_pal,  msx,      msx,     msx, "Canon", "V-10" , 0)
3809COMP(1983, canonv20,  msx,   0,   msx_pal,  msx,      msx,     msx, "Canon", "V-20" , 0)
3810COMP(1984, dpc100,   msx,   0,   msx,     msxkr,    msx,     msx, "Daewoo", "IQ-1000 DPC-100 (Korea)" , 0)
3811COMP(1984, dpc180,   msx,   0,   msx,     msxkr,    msx,     msx, "Daewoo", "IQ-1000 DPC-180 (Korea)" , 0)
3812COMP(1984, dpc200,   msx,   0,   msx,     msxkr,    msx,     msx, "Daewoo", "IQ-1000 DPC-200 (Korea)" , 0)
3813COMP(1983, gsfc200,   msx,   0,   msx_pal,  msx,      msx,     msx, "Goldstar", "FC-200" , 0)
3814COMP(1983, expert10, msx,   0,   msx,     expert10, msx,     msx, "Gradiente", "Expert 1.0 (Brazil)" , 0)
3815COMP(1984, expert11, msx,   0,   msx,     expert11, msx,     msx, "Gradiente", "Expert 1.1 (Brazil)" , 0)
3816COMP(1984, expert13, msx,   0,   msx,     expert11, msx,     msx, "Gradiente", "Expert 1.3 (Brazil)" , 0)
3817COMP(1985, expertdp, msx,   0,   msx,     expert11, msx,     msx, "Gradiente", "Expert DDPlus (Brazil)", 0 )
3818COMP(1984, expertpl, msx,   0,   msx,     expert11, msx,     msx, "Gradiente", "Expert Plus (Brazil)" , 0)
3819COMP(1983, jvchc7gb,  msx,   0,   msx_pal,  msx,      msx,     msx, "JVC", "HC-7GB" , 0)
3820COMP(1983, mlf80,       msx,   0,   msx_pal,  msx,      msx,     msx, "Mitsubishi", "ML-F80" , 0)
3821COMP(1983, mlfx1,      msx,   0,   msx_pal,  msx,      msx,     msx, "Mitsubishi", "ML-FX1" , 0)
3822COMP(1984, cf1200,   msx,   0,      msx,      msxjp,    msx,     msx, "National / Matsushita", "CF-1200 (Japan)" , 0)
3823COMP(1983, cf2000,   msx,   0,      msx,      msxjp,    msx,     msx, "National / Matsushita", "CF-2000 (Japan)" , 0)
3824COMP(1984, cf2700,   msx,   0,      msx,      msxjp,    msx,     msx, "National / Matsushita", "CF-2700 (Japan)" , 0)
3825COMP(1984, cf3000,   msx,   0,      msx,      msxjp,    msx,     msx, "National / Matsushita", "CF-3000 (Japan)" , 0)
3826COMP(1985, cf3300,   msx,   0,      msx,      msxjp,    msx,     msx, "National / Matsushita", "CF-3300 (Japan)", 0 )
3827COMP(1985, fs1300,   msx,   0,      msx,      msxjp,    msx,     msx, "National / Matsushita", "FS-1300 (Japan)" , 0)
3828COMP(1985, fs4000,   msx,   0,      msx,      msxjp,    msx,     msx, "National / Matsushita", "FS-4000 (Japan)" , 0)
3829COMP(1983, nms801,      msx,   0,   msx_pal,  msx,      msx,     msx, "Philips", "NMS-801" , 0)
3830COMP(1984, vg8000,  msx,   0,   msx,     msx,      msx,     msx, "Philips",    "VG-8000" , GAME_NOT_WORKING)
3831COMP(1984, vg8010,  msx,   0,   msx,     msx,      msx,     msx, "Philips",    "VG-8010" , GAME_NOT_WORKING)
3832COMP(1984, vg8010f,  msx,   0,   msx,     msx,      msx,     msx, "Philips",    "VG-8010F" , GAME_NOT_WORKING)
3833COMP(1985, vg802000,  msx,   0,   msx,     msx,      msx,     msx, "Philips",    "VG-8020-00" , 0)
3834COMP(1985, vg802020, msx,   0,   msx,     msx,      msx,     msx, "Philips",    "VG-8020-20" , 0)
3835COMP(1985, piopx7,      msx,   0,   msx_pal,  msx,      msx,     msx, "Pioneer",    "PX-07" , 0)
3836COMP(1985, mpc100,      msx,   0,   msx_pal,  msx,      msx,     msx, "Sanyo",    "MPC-100" , 0)
3837COMP(1985, hotbit11, msx,   0,   msx,     hotbit,   msx,     msx, "Sharp / Epcom",    "HB-8000 Hotbit 1.1" , 0)
3838COMP(1985, hotbit12, msx,   0,   msx,     hotbit,   msx,     msx, "Sharp / Epcom",    "HB-8000 Hotbit 1.2" , 0)
3839COMP(1985, hotbi13b, msx,   0,   msx,     hotbit,   msx,     msx, "Sharp / Epcom",    "HB-8000 Hotbit 1.3b" , 0)
3840COMP(1985, hotbi13p, msx,   0,   msx,     hotbit,   msx,     msx, "Sharp / Epcom",    "HB-8000 Hotbit 1.3p" , 0)
3841COMP(1985, hb10p,    msx,   0,  msx_pal,  msx,       msx,     msx, "Sony", "HB-10P" , 0)
3842COMP(1985, hb20p,    msx,   0,  msx_pal,  msx,       msx,     msx, "Sony", "HB-20P (Spanish)" , 0)
3843COMP(1985, hb201,    msx,   0,  msx,      msxjp,    msx,     msx, "Sony", "HB-201 (Japan)" , 0)
3844COMP(1985, hb201p,   msx,   0,   msx_pal,  msx,      msx,     msx, "Sony", "HB-201P" , 0)
3845COMP(1984, hb501p,   msx,   0,   msx_pal,  msx,      msx,     msx, "Sony", "HB-501P" , 0)
3846COMP(1983, hb55d,    msx,   0,   msx_pal,  msx,      msx,     msx, "Sony", "HB-55D (Germany)" , 0)
3847COMP(1983, hb55p,    msx,   0,   msx_pal,  msx,      msx,     msx, "Sony", "HB-55P" , 0)
3848COMP(1983, hb75d,    msx,   0,   msx_pal,  msx,      msx,     msx, "Sony", "HB-75D (Germany)" , 0)
3849COMP(1983, hb75p,    msx,   0,   msx_pal,  msx,      msx,     msx, "Sony", "HB-75P" , 0)
3850COMP(1985, svi728,   msx,   0,   msx_pal,  msx,      msx,     msx, "Spectravideo", "SVI-728", 0 )
3851COMP(1985, svi738,   msx,   0,   msx_pal,  msx,      msx,     msx, "Spectravideo", "SVI-738", 0 )
3852COMP(1985, svi738sw, msx,   0,   msx_pal,  msx,      msx,     msx, "Spectravideo", "SVI-738 (Swedish)", 0 )
3853COMP(1983, tadpc200,  msx,   0,   msx_pal,  msx,      msx,     msx, "Talent", "DPC-200" , 0)
3854COMP(1983, tadpc20a,  msx,   0,   msx_pal,  msx,      msx,     msx, "Talent", "DPC-200A" , 0)
3855COMP(1984, hx10,     msx,   0,   msx_pal,     msx,      msx,     msx, "Toshiba",    "HX-10" , 0)
3856COMP(1984, hx10s,     msx,   0,   msx_pal,     msx,      msx,     msx, "Toshiba",    "HX-10S" , 0)
3857COMP(1984, hx20,     msx,   0,   msx_pal,     msx,      msx,     msx, "Toshiba",    "HX-20" , 0)
3858COMP(1984, cx5m,     msx,   0,   msx_pal,     msx,      msx,     msx, "Yamaha",    "CX5M" , GAME_NOT_WORKING)
3859COMP(1984, cx5m128,  msx,   0,   msx_pal,     msx,      msx,     msx, "Yamaha",    "CX5M-128" , GAME_NOT_WORKING)
3860COMP(1984, cx5m2,     msx,   0,   msx_pal,     msx,      msx,     msx, "Yamaha",    "CX5MII" , GAME_NOT_WORKING)
3861COMP(1984, yis303,  msx,   0,   msx_pal,     msx,      msx,     msx, "Yamaha",    "YIS303" , 0)
3862COMP(1984, yis503,    msx,   0,   msx_pal,     msx,      msx,     msx, "Yamaha",    "YIS503" , 0)
3863COMP(1984, yis503ii,msx,   0,   msx_pal,     msx,      msx,     msx, "Yamaha",    "YIS503II" , 0)
3864COMP(1986, y503iir, msx,   0,   msx_pal,     msx,      msx,     msx, "Yamaha",    "YIS503IIR (Russian)" , 0)
3865COMP(1986, y503iir2, msx,   0,   msx_pal,     msx,      msx,     msx, "Yamaha",    "YIS503IIR (Estonian)" , 0)
3866COMP(1984, yis503m, msx,   0,   msx_pal,     msx,      msx,     msx, "Yamaha",    "YIS503M" , GAME_NOT_WORKING)
3867COMP(1984, yc64,     msx,   0,   msx_pal,     msx,      msx,     msx, "Yashica", "YC-64" , 0)
3868COMP(1984, bruc100, msx,   0,   msx_pal,     msx,      msx,     msx, "Frael", "Bruc 100-1" , 0)
3798COMP(1983, ax170,        msx,   0,   msx_pal,  msx,      msx,     0, "Al Alamiah", "AX-170" , 0)
3799COMP(1983, canonv10,  msx,   0,   msx_pal,  msx,      msx,     0, "Canon", "V-10" , 0)
3800COMP(1983, canonv20,  msx,   0,   msx_pal,  msx,      msx,     0, "Canon", "V-20" , 0)
3801COMP(1984, dpc100,   msx,   0,   msx,     msxkr,    msx,     0, "Daewoo", "IQ-1000 DPC-100 (Korea)" , 0)
3802COMP(1984, dpc180,   msx,   0,   msx,     msxkr,    msx,     0, "Daewoo", "IQ-1000 DPC-180 (Korea)" , 0)
3803COMP(1984, dpc200,   msx,   0,   msx,     msxkr,    msx,     0, "Daewoo", "IQ-1000 DPC-200 (Korea)" , 0)
3804COMP(1983, gsfc200,   msx,   0,   msx_pal,  msx,      msx,     0, "Goldstar", "FC-200" , 0)
3805COMP(1983, expert10, msx,   0,   msx,     expert10, msx,     0, "Gradiente", "Expert 1.0 (Brazil)" , 0)
3806COMP(1984, expert11, msx,   0,   msx,     expert11, msx,     0, "Gradiente", "Expert 1.1 (Brazil)" , 0)
3807COMP(1984, expert13, msx,   0,   msx,     expert11, msx,     0, "Gradiente", "Expert 1.3 (Brazil)" , 0)
3808COMP(1985, expertdp, msx,   0,   msx,     expert11, msx,     0, "Gradiente", "Expert DDPlus (Brazil)", 0 )
3809COMP(1984, expertpl, msx,   0,   msx,     expert11, msx,     0, "Gradiente", "Expert Plus (Brazil)" , 0)
3810COMP(1983, jvchc7gb,  msx,   0,   msx_pal,  msx,      msx,     0, "JVC", "HC-7GB" , 0)
3811COMP(1983, mlf80,       msx,   0,   msx_pal,  msx,      msx,     0, "Mitsubishi", "ML-F80" , 0)
3812COMP(1983, mlfx1,      msx,   0,   msx_pal,  msx,      msx,     0, "Mitsubishi", "ML-FX1" , 0)
3813COMP(1984, cf1200,   msx,   0,      msx,      msxjp,    msx,     0, "National / Matsushita", "CF-1200 (Japan)" , 0)
3814COMP(1983, cf2000,   msx,   0,      msx,      msxjp,    msx,     0, "National / Matsushita", "CF-2000 (Japan)" , 0)
3815COMP(1984, cf2700,   msx,   0,      msx,      msxjp,    msx,     0, "National / Matsushita", "CF-2700 (Japan)" , 0)
3816COMP(1984, cf3000,   msx,   0,      msx,      msxjp,    msx,     0, "National / Matsushita", "CF-3000 (Japan)" , 0)
3817COMP(1985, cf3300,   msx,   0,      msx,      msxjp,    msx,     0, "National / Matsushita", "CF-3300 (Japan)", 0 )
3818COMP(1985, fs1300,   msx,   0,      msx,      msxjp,    msx,     0, "National / Matsushita", "FS-1300 (Japan)" , 0)
3819COMP(1985, fs4000,   msx,   0,      msx,      msxjp,    msx,     0, "National / Matsushita", "FS-4000 (Japan)" , 0)
3820COMP(1983, nms801,      msx,   0,   msx_pal,  msx,      msx,     0, "Philips", "NMS-801" , 0)
3821COMP(1984, vg8000,  msx,   0,   msx,     msx,      msx,     0, "Philips",    "VG-8000" , GAME_NOT_WORKING)
3822COMP(1984, vg8010,  msx,   0,   msx,     msx,      msx,     0, "Philips",    "VG-8010" , GAME_NOT_WORKING)
3823COMP(1984, vg8010f,  msx,   0,   msx,     msx,      msx,     0, "Philips",    "VG-8010F" , GAME_NOT_WORKING)
3824COMP(1985, vg802000,  msx,   0,   msx,     msx,      msx,     0, "Philips",    "VG-8020-00" , 0)
3825COMP(1985, vg802020, msx,   0,   msx,     msx,      msx,     0, "Philips",    "VG-8020-20" , 0)
3826COMP(1985, piopx7,      msx,   0,   msx_pal,  msx,      msx,     0, "Pioneer",    "PX-07" , 0)
3827COMP(1985, mpc100,      msx,   0,   msx_pal,  msx,      msx,     0, "Sanyo",    "MPC-100" , 0)
3828COMP(1985, hotbit11, msx,   0,   msx,     hotbit,   msx,     0, "Sharp / Epcom",    "HB-8000 Hotbit 1.1" , 0)
3829COMP(1985, hotbit12, msx,   0,   msx,     hotbit,   msx,     0, "Sharp / Epcom",    "HB-8000 Hotbit 1.2" , 0)
3830COMP(1985, hotbi13b, msx,   0,   msx,     hotbit,   msx,     0, "Sharp / Epcom",    "HB-8000 Hotbit 1.3b" , 0)
3831COMP(1985, hotbi13p, msx,   0,   msx,     hotbit,   msx,     0, "Sharp / Epcom",    "HB-8000 Hotbit 1.3p" , 0)
3832COMP(1985, hb10p,    msx,   0,  msx_pal,  msx,       msx,     0, "Sony", "HB-10P" , 0)
3833COMP(1985, hb20p,    msx,   0,  msx_pal,  msx,       msx,     0, "Sony", "HB-20P (Spanish)" , 0)
3834COMP(1985, hb201,    msx,   0,  msx,      msxjp,    msx,     0, "Sony", "HB-201 (Japan)" , 0)
3835COMP(1985, hb201p,   msx,   0,   msx_pal,  msx,      msx,     0, "Sony", "HB-201P" , 0)
3836COMP(1984, hb501p,   msx,   0,   msx_pal,  msx,      msx,     0, "Sony", "HB-501P" , 0)
3837COMP(1983, hb55d,    msx,   0,   msx_pal,  msx,      msx,     0, "Sony", "HB-55D (Germany)" , 0)
3838COMP(1983, hb55p,    msx,   0,   msx_pal,  msx,      msx,     0, "Sony", "HB-55P" , 0)
3839COMP(1983, hb75d,    msx,   0,   msx_pal,  msx,      msx,     0, "Sony", "HB-75D (Germany)" , 0)
3840COMP(1983, hb75p,    msx,   0,   msx_pal,  msx,      msx,     0, "Sony", "HB-75P" , 0)
3841COMP(1985, svi728,   msx,   0,   msx_pal,  msx,      msx,     0, "Spectravideo", "SVI-728", 0 )
3842COMP(1985, svi738,   msx,   0,   msx_pal,  msx,      msx,     0, "Spectravideo", "SVI-738", 0 )
3843COMP(1985, svi738sw, msx,   0,   msx_pal,  msx,      msx,     0, "Spectravideo", "SVI-738 (Swedish)", 0 )
3844COMP(1983, tadpc200,  msx,   0,   msx_pal,  msx,      msx,     0, "Talent", "DPC-200" , 0)
3845COMP(1983, tadpc20a,  msx,   0,   msx_pal,  msx,      msx,     0, "Talent", "DPC-200A" , 0)
3846COMP(1984, hx10,     msx,   0,   msx_pal,     msx,      msx,     0, "Toshiba",    "HX-10" , 0)
3847COMP(1984, hx10s,     msx,   0,   msx_pal,     msx,      msx,     0, "Toshiba",    "HX-10S" , 0)
3848COMP(1984, hx20,     msx,   0,   msx_pal,     msx,      msx,     0, "Toshiba",    "HX-20" , 0)
3849COMP(1984, cx5m,     msx,   0,   msx_pal,     msx,      msx,     0, "Yamaha",    "CX5M" , GAME_NOT_WORKING)
3850COMP(1984, cx5m128,  msx,   0,   msx_pal,     msx,      msx,     0, "Yamaha",    "CX5M-128" , GAME_NOT_WORKING)
3851COMP(1984, cx5m2,     msx,   0,   msx_pal,     msx,      msx,     0, "Yamaha",    "CX5MII" , GAME_NOT_WORKING)
3852COMP(1984, yis303,  msx,   0,   msx_pal,     msx,      msx,     0, "Yamaha",    "YIS303" , 0)
3853COMP(1984, yis503,    msx,   0,   msx_pal,     msx,      msx,     0, "Yamaha",    "YIS503" , 0)
3854COMP(1984, yis503ii,msx,   0,   msx_pal,     msx,      msx,     0, "Yamaha",    "YIS503II" , 0)
3855COMP(1986, y503iir, msx,   0,   msx_pal,     msx,      msx,     0, "Yamaha",    "YIS503IIR (Russian)" , 0)
3856COMP(1986, y503iir2, msx,   0,   msx_pal,     msx,      msx,     0, "Yamaha",    "YIS503IIR (Estonian)" , 0)
3857COMP(1984, yis503m, msx,   0,   msx_pal,     msx,      msx,     0, "Yamaha",    "YIS503M" , GAME_NOT_WORKING)
3858COMP(1984, yc64,     msx,   0,   msx_pal,     msx,      msx,     0, "Yashica", "YC-64" , 0)
3859COMP(1984, bruc100, msx,   0,   msx_pal,     msx,      msx,     0, "Frael", "Bruc 100-1" , 0)
38693860
3870COMP(1985, msx2,     0,      msx,   msx2_pal, msx2,       msx,    msx, "ASCII & Microsoft", "MSX2", 0)
3871COMP(1986, ax350,    msx2,   0,   msx2_pal, msx2,       msx,    msx, "Al Alamiah", "AX-350", 0)
3872COMP(1986, ax370,    msx2,   0,   msx2_pal, msx2,       msx,    msx, "Al Alamiah", "AX-370", 0)
3873COMP(1986, expert20, msx2,   0,   msx2_pal, msx2,       msx,    msx, "Gradiente", "Expert 2.0 (Brazil)" , GAME_NOT_WORKING)
3874COMP(1986, nms8220,  msx2,   0,   msx2_pal, msx2,       msx,    msx, "Philips", "NMS-8220 (12-jun-1986)", 0)
3875COMP(1986, nms8220a, msx2,   0,   msx2_pal, msx2,       msx,    msx, "Philips", "NMS-8220 (13-aug-1986)", 0)
3876COMP(1986, vg8230,   msx2,   0,   msx2_pal, msx2,       msx,    msx, "Philips", "VG-8230", 0)
3877COMP(1986, vg8235,   msx2,   0,   msx2_pal, msx2,       msx,    msx, "Philips", "VG-8235", 0)
3878COMP(1986, vg8235f,  msx2,   0,   msx2_pal, msx2,       msx,    msx, "Philips", "VG-8235F", 0)
3879COMP(1986, vg8240,   msx2,   0,   msx2_pal, msx2,       msx,    msx, "Philips", "VG-8240", 0)
3880COMP(1986, nms8245,  msx2,   0,   msx2_pal, msx2,       msx,    msx, "Philips", "NMS-8245", 0)
3881COMP(1986, nms8245f, msx2,   0,   msx2_pal, msx2,       msx,    msx, "Philips", "NMS-8245F", 0)
3882COMP(1986, nms8250,  msx2,   0,   msx2_pal, msx2,       msx,    msx, "Philips", "NMS-8250", 0)
3883COMP(1986, nms8255,  msx2,   0,   msx2_pal, msx2,       msx,    msx, "Philips", "NMS-8255", 0)
3884COMP(1986, nms8280,  msx2,   0,   msx2_pal, msx2,       msx,    msx, "Philips", "NMS-8280", 0)
3885COMP(1986, nms8280g, msx2,   0,   msx2_pal, msx2,       msx,    msx, "Philips", "NMS-8280G", 0)
3886COMP(1985, hbf9p,    msx2,   0,   msx2_pal, msx2,       msx,    msx, "Sony", "HB-F9P" , 0)
3887COMP(1985, hbf9s,    msx2,   0,   msx2_pal, msx2,       msx,    msx, "Sony", "HB-F9S" , 0)
3888COMP(1985, hbf500p,  msx2,   0,   msx2_pal, msx2,       msx,    msx, "Sony", "HB-F500P", 0)
3889COMP(1985, hbf700d,  msx2,   0,   msx2_pal, msx2,       msx,    msx, "Sony", "HB-F700D (Germany)" , 0)
3890COMP(1985, hbf700f,  msx2,   0,   msx2_pal, msx2,       msx,    msx, "Sony", "HB-F700F" , 0)
3891COMP(1985, hbf700p,  msx2,   0,   msx2_pal, msx2,       msx,    msx, "Sony", "HB-F700P" , 0)
3892COMP(1985, hbf700s,  msx2,   0,   msx2_pal, msx2,       msx,    msx, "Sony", "HB-F700S (Spain)", 0)
3893COMP(1986, hbg900ap, msx2,   0,   msx2_pal, msx2,       msx,    msx, "Sony", "HB-G900AP", 0 )
3894COMP(1986, hbg900p,  msx2,   0,   msx2_pal, msx2,       msx,    msx, "Sony", "HB-G900P", 0 )
3895COMP(1986, hotbit20, msx2,   0,   msx2_pal, msx2,      msx,    msx, "Sharp / Epcom",    "HB-8000 Hotbit 2.0" , GAME_NOT_WORKING)
3896COMP(1986, tpc310,   msx2,   0,  msx2_pal, msx2,     msx,    msx, "Talent", "TPC-310", 0)
3897COMP(1986, hx23,     msx2,   0,  msx2_pal, msx2,     msx,    msx, "Toshiba", "HX-23", 0)
3898COMP(1986, hx23f,    msx2,   0,  msx2_pal, msx2,     msx,    msx, "Toshiba", "HX-23F", 0)
3899COMP(1986, cx7m,     msx2,   0,   msx2_pal,   msx2,     msx,     msx, "Yamaha",    "CX7M" , GAME_NOT_WORKING)
3900COMP(1986, cx7m128,  msx2,   0,   msx2_pal,   msx2,     msx,     msx, "Yamaha",    "CX7M-128" , GAME_NOT_WORKING)
3901COMP(1985, fs5500,   msx2,   0,      msx2,     msx2jp,   msx,    msx, "National / Matsushita", "FS-5500F1/F2 (Japan)", 0 )
3902COMP(1986, fs4500,   msx2,   0,      msx2,     msx2jp,   msx,    msx, "National / Matsushita", "FS-4500 (Japan)", 0 )
3903COMP(1986, fs4700,   msx2,   0,      msx2,     msx2jp,   msx,    msx, "National / Matsushita", "FS-4700 (Japan)", 0 )
3904COMP(1986, fs5000,   msx2,   0,      msx2,     msx2jp,   msx,    msx, "National / Matsushita", "FS-5000F2 (Japan)", 0 )
3905COMP(1986, fs4600,   msx2,   0,      msx2,     msx2jp,   msx,    msx, "National / Matsushita", "FS-4600 (Japan)", 0 )
3906COMP(1986, fsa1,     msx2,   0,      msx2,     msx2jp,   msx,    msx, "Panasonic / Matsushita", "FS-A1 / 1st released version (Japan)", 0)
3907COMP(1986, fsa1a,    msx2,   0,      msx2,     msx2jp,   msx,    msx, "Panasonic / Matsushita", "FS-A1 / 2nd released version (Japan)", 0)
3908COMP(1987, fsa1mk2,  msx2,   0,      msx2,     msx2jp,   msx,    msx, "Panasonic / Matsushita", "FS-A1MK2 (Japan)", 0)
3909COMP(1987, fsa1f,    msx2,   0,      msx2,     msx2jp,   msx,    msx, "Panasonic / Matsushita", "FS-A1F (Japan)", 0 )
3910COMP(1987, fsa1fm,   msx2,   0,      msx2,     msx2jp,   msx,    msx, "Panasonic / Matsushita", "FS-A1FM (Japan)", 0 )
3911COMP(1986, hbf500,   msx2,   0,      msx2,     msx2jp,   msx,    msx, "Sony", "HB-F500 (Japan)", 0)
3912COMP(1986, hbf900,   msx2,   0,      msx2,     msx2jp,   msx,    msx, "Sony", "HB-F900 / 1st released version (Japan)", 0)
3913COMP(1986, hbf900a,  msx2,   0,      msx2,     msx2jp,   msx,    msx, "Sony", "HB-F900 / 2nd released version (Japan)", 0)
3914COMP(1986, hbf1,     msx2,   0,      msx2,     msx2jp,   msx,    msx, "Sony", "HB-F1 (Japan)", GAME_NOT_WORKING )
3915COMP(1987, hbf12,    msx2,   0,      msx2,     msx2jp,   msx,    msx, "Sony", "HB-F1II (Japan)", GAME_NOT_WORKING )
3916COMP(1987, hbf1xd,   msx2,   0,      msx2,     msx2jp,   msx,    msx, "Sony", "HB-F1XD (Japan)", 0)
3917COMP(1988, hbf1xdm2, msx2,   0,      msx2,     msx2jp,   msx,    msx, "Sony", "HB-F1XDMK2 (Japan)", 0)
3918COMP(1988, phc23,    msx2,   0,      msx2,     msx2jp,   msx,    msx, "Sanyo", "WAVY PHC-23 (Japan)", 0)
3861COMP(1985, msx2,     0,      msx,   msx2_pal, msx2,       msx,    0, "ASCII & Microsoft", "MSX2", 0)
3862COMP(1986, ax350,    msx2,   0,   msx2_pal, msx2,       msx,    0, "Al Alamiah", "AX-350", 0)
3863COMP(1986, ax370,    msx2,   0,   msx2_pal, msx2,       msx,    0, "Al Alamiah", "AX-370", 0)
3864COMP(1986, expert20, msx2,   0,   msx2_pal, msx2,       msx,    0, "Gradiente", "Expert 2.0 (Brazil)" , GAME_NOT_WORKING)
3865COMP(1986, nms8220,  msx2,   0,   msx2_pal, msx2,       msx,    0, "Philips", "NMS-8220 (12-jun-1986)", 0)
3866COMP(1986, nms8220a, msx2,   0,   msx2_pal, msx2,       msx,    0, "Philips", "NMS-8220 (13-aug-1986)", 0)
3867COMP(1986, vg8230,   msx2,   0,   msx2_pal, msx2,       msx,    0, "Philips", "VG-8230", 0)
3868COMP(1986, vg8235,   msx2,   0,   msx2_pal, msx2,       msx,    0, "Philips", "VG-8235", 0)
3869COMP(1986, vg8235f,  msx2,   0,   msx2_pal, msx2,       msx,    0, "Philips", "VG-8235F", 0)
3870COMP(1986, vg8240,   msx2,   0,   msx2_pal, msx2,       msx,    0, "Philips", "VG-8240", 0)
3871COMP(1986, nms8245,  msx2,   0,   msx2_pal, msx2,       msx,    0, "Philips", "NMS-8245", 0)
3872COMP(1986, nms8245f, msx2,   0,   msx2_pal, msx2,       msx,    0, "Philips", "NMS-8245F", 0)
3873COMP(1986, nms8250,  msx2,   0,   msx2_pal, msx2,       msx,    0, "Philips", "NMS-8250", 0)
3874COMP(1986, nms8255,  msx2,   0,   msx2_pal, msx2,       msx,    0, "Philips", "NMS-8255", 0)
3875COMP(1986, nms8280,  msx2,   0,   msx2_pal, msx2,       msx,    0, "Philips", "NMS-8280", 0)
3876COMP(1986, nms8280g, msx2,   0,   msx2_pal, msx2,       msx,    0, "Philips", "NMS-8280G", 0)
3877COMP(1985, hbf9p,    msx2,   0,   msx2_pal, msx2,       msx,    0, "Sony", "HB-F9P" , 0)
3878COMP(1985, hbf9s,    msx2,   0,   msx2_pal, msx2,       msx,    0, "Sony", "HB-F9S" , 0)
3879COMP(1985, hbf500p,  msx2,   0,   msx2_pal, msx2,       msx,    0, "Sony", "HB-F500P", 0)
3880COMP(1985, hbf700d,  msx2,   0,   msx2_pal, msx2,       msx,    0, "Sony", "HB-F700D (Germany)" , 0)
3881COMP(1985, hbf700f,  msx2,   0,   msx2_pal, msx2,       msx,    0, "Sony", "HB-F700F" , 0)
3882COMP(1985, hbf700p,  msx2,   0,   msx2_pal, msx2,       msx,    0, "Sony", "HB-F700P" , 0)
3883COMP(1985, hbf700s,  msx2,   0,   msx2_pal, msx2,       msx,    0, "Sony", "HB-F700S (Spain)", 0)
3884COMP(1986, hbg900ap, msx2,   0,   msx2_pal, msx2,       msx,    0, "Sony", "HB-G900AP", 0 )
3885COMP(1986, hbg900p,  msx2,   0,   msx2_pal, msx2,       msx,    0, "Sony", "HB-G900P", 0 )
3886COMP(1986, hotbit20, msx2,   0,   msx2_pal, msx2,      msx,    0, "Sharp / Epcom",    "HB-8000 Hotbit 2.0" , GAME_NOT_WORKING)
3887COMP(1986, tpc310,   msx2,   0,  msx2_pal, msx2,     msx,    0, "Talent", "TPC-310", 0)
3888COMP(1986, hx23,     msx2,   0,  msx2_pal, msx2,     msx,    0, "Toshiba", "HX-23", 0)
3889COMP(1986, hx23f,    msx2,   0,  msx2_pal, msx2,     msx,    0, "Toshiba", "HX-23F", 0)
3890COMP(1986, cx7m,     msx2,   0,   msx2_pal,   msx2,     msx,     0, "Yamaha",    "CX7M" , GAME_NOT_WORKING)
3891COMP(1986, cx7m128,  msx2,   0,   msx2_pal,   msx2,     msx,     0, "Yamaha",    "CX7M-128" , GAME_NOT_WORKING)
3892COMP(1985, fs5500,   msx2,   0,      msx2,     msx2jp,   msx,    0, "National / Matsushita", "FS-5500F1/F2 (Japan)", 0 )
3893COMP(1986, fs4500,   msx2,   0,      msx2,     msx2jp,   msx,    0, "National / Matsushita", "FS-4500 (Japan)", 0 )
3894COMP(1986, fs4700,   msx2,   0,      msx2,     msx2jp,   msx,    0, "National / Matsushita", "FS-4700 (Japan)", 0 )
3895COMP(1986, fs5000,   msx2,   0,      msx2,     msx2jp,   msx,    0, "National / Matsushita", "FS-5000F2 (Japan)", 0 )
3896COMP(1986, fs4600,   msx2,   0,      msx2,     msx2jp,   msx,    0, "National / Matsushita", "FS-4600 (Japan)", 0 )
3897COMP(1986, fsa1,     msx2,   0,      msx2,     msx2jp,   msx,    0, "Panasonic / Matsushita", "FS-A1 / 1st released version (Japan)", 0)
3898COMP(1986, fsa1a,    msx2,   0,      msx2,     msx2jp,   msx,    0, "Panasonic / Matsushita", "FS-A1 / 2nd released version (Japan)", 0)
3899COMP(1987, fsa1mk2,  msx2,   0,      msx2,     msx2jp,   msx,    0, "Panasonic / Matsushita", "FS-A1MK2 (Japan)", 0)
3900COMP(1987, fsa1f,    msx2,   0,      msx2,     msx2jp,   msx,    0, "Panasonic / Matsushita", "FS-A1F (Japan)", 0 )
3901COMP(1987, fsa1fm,   msx2,   0,      msx2,     msx2jp,   msx,    0, "Panasonic / Matsushita", "FS-A1FM (Japan)", 0 )
3902COMP(1986, hbf500,   msx2,   0,      msx2,     msx2jp,   msx,    0, "Sony", "HB-F500 (Japan)", 0)
3903COMP(1986, hbf900,   msx2,   0,      msx2,     msx2jp,   msx,    0, "Sony", "HB-F900 / 1st released version (Japan)", 0)
3904COMP(1986, hbf900a,  msx2,   0,      msx2,     msx2jp,   msx,    0, "Sony", "HB-F900 / 2nd released version (Japan)", 0)
3905COMP(1986, hbf1,     msx2,   0,      msx2,     msx2jp,   msx,    0, "Sony", "HB-F1 (Japan)", GAME_NOT_WORKING )
3906COMP(1987, hbf12,    msx2,   0,      msx2,     msx2jp,   msx,    0, "Sony", "HB-F1II (Japan)", GAME_NOT_WORKING )
3907COMP(1987, hbf1xd,   msx2,   0,      msx2,     msx2jp,   msx,    0, "Sony", "HB-F1XD (Japan)", 0)
3908COMP(1988, hbf1xdm2, msx2,   0,      msx2,     msx2jp,   msx,    0, "Sony", "HB-F1XDMK2 (Japan)", 0)
3909COMP(1988, phc23,    msx2,   0,      msx2,     msx2jp,   msx,    0, "Sanyo", "WAVY PHC-23 (Japan)", 0)
39193910
3920COMP(1986, cpc300,   msx2,   0,   msx2,     msx2kr,   msx,    msx, "Daewoo", "IQ-2000 CPC-300 (Korea)", 0)
3921COMP(1986, cpc300e,  msx2,   0,   msx2,     msx2kr,   msx,    msx, "Daewoo", "IQ-2000 CPC-300E (Korea)", 0)
3922COMP(1986, cpc400,   msx2,   0,   msx2,     msx2kr,   msx,    msx, "Daewoo", "X-II CPC-400 (Korea)", 0 )
3923COMP(1986, cpc400s,  msx2,   0,   msx2,     msx2kr,   msx,    msx, "Daewoo", "X-II CPC-400S (Korea)", 0 )
3924COMP(1988, msx2p,    0,      msx,   msx2,     msx2jp,   msx,    msx, "ASCII & Microsoft", "MSX2+", 0)
3925COMP(1988, fsa1fx,   msx2p,   0,      msx2,     msx2jp,   msx,    msx, "Panasonic / Matsushita", "FS-A1FX (Japan)", 0 )
3926COMP(1988, fsa1wx,   msx2p,   0,      msx2,     msx2jp,   msx,    msx, "Panasonic / Matsushita", "FS-A1WX / 1st released version (Japan)", 0 )
3927COMP(1988, fsa1wxa,  msx2p,   0,      msx2,     msx2jp,   msx,    msx, "Panasonic / Matsushita", "FS-A1WX / 2nd released version (Japan)", 0 )
3928COMP(1989, fsa1wsx,  msx2p,   0,      msx2,     msx2jp,   msx,    msx, "Panasonic / Matsushita", "FS-A1WSX (Japan)", 0 )
3929COMP(1988, hbf1xdj,  msx2p,   0,      msx2,     msx2jp,   msx,    msx, "Sony", "HB-F1XDJ (Japan)", 0 )
3930COMP(1989, hbf1xv,   msx2p,   0,      msx2,     msx2jp,   msx,    msx, "Sony", "HB-F1XV (Japan)", 0 )
3931COMP(1988, phc70fd,  msx2p,   0,      msx2,     msx2jp,   msx,    msx, "Sanyo", "WAVY PHC-70FD (Japan)", 0 )
3932COMP(1988, phc70fd2, msx2p,   0,      msx2,     msx2jp,   msx,    msx, "Sanyo", "WAVY PHC-70FD2 (Japan)", 0 )
3933COMP(1989, phc35j,   msx2p,   0,      msx2,     msx2jp,   msx,    msx, "Sanyo", "WAVY PHC-35J (Japan)", 0)
3911COMP(1986, cpc300,   msx2,   0,   msx2,     msx2kr,   msx,    0, "Daewoo", "IQ-2000 CPC-300 (Korea)", 0)
3912COMP(1986, cpc300e,  msx2,   0,   msx2,     msx2kr,   msx,    0, "Daewoo", "IQ-2000 CPC-300E (Korea)", 0)
3913COMP(1986, cpc400,   msx2,   0,   msx2,     msx2kr,   msx,    0, "Daewoo", "X-II CPC-400 (Korea)", 0 )
3914COMP(1986, cpc400s,  msx2,   0,   msx2,     msx2kr,   msx,    0, "Daewoo", "X-II CPC-400S (Korea)", 0 )
3915COMP(1988, msx2p,    0,      msx,   msx2,     msx2jp,   msx,    0, "ASCII & Microsoft", "MSX2+", 0)
3916COMP(1988, fsa1fx,   msx2p,   0,      msx2,     msx2jp,   msx,    0, "Panasonic / Matsushita", "FS-A1FX (Japan)", 0 )
3917COMP(1988, fsa1wx,   msx2p,   0,      msx2,     msx2jp,   msx,    0, "Panasonic / Matsushita", "FS-A1WX / 1st released version (Japan)", 0 )
3918COMP(1988, fsa1wxa,  msx2p,   0,      msx2,     msx2jp,   msx,   0, "Panasonic / Matsushita", "FS-A1WX / 2nd released version (Japan)", 0 )
3919COMP(1989, fsa1wsx,  msx2p,   0,      msx2,     msx2jp,   msx,    0, "Panasonic / Matsushita", "FS-A1WSX (Japan)", 0 )
3920COMP(1988, hbf1xdj,  msx2p,   0,      msx2,     msx2jp,   msx,    0, "Sony", "HB-F1XDJ (Japan)", 0 )
3921COMP(1989, hbf1xv,   msx2p,   0,      msx2,     msx2jp,   msx,    0, "Sony", "HB-F1XV (Japan)", 0 )
3922COMP(1988, phc70fd,  msx2p,   0,      msx2,     msx2jp,   msx,    0, "Sanyo", "WAVY PHC-70FD (Japan)", 0 )
3923COMP(1988, phc70fd2, msx2p,   0,      msx2,     msx2jp,   msx,    0, "Sanyo", "WAVY PHC-70FD2 (Japan)", 0 )
3924COMP(1989, phc35j,   msx2p,   0,      msx2,     msx2jp,   msx,    0, "Sanyo", "WAVY PHC-35J (Japan)", 0)
39343925
src/mess/drivers/prof80.c
r5743r5744
4545
4646INLINE const device_config *get_floppy_image(running_machine *machine, int drive)
4747{
48   return image_from_devtype_and_index(machine, IO_FLOPPY, drive);
48   return floppy_get_device(machine, drive);
4949}
5050
5151/* Keyboard HACK */
r5743r5744
937937   DEVCB_NULL,
938938   NULL,
939939   NULL,
940   NEC765_RDY_PIN_CONNECTED
940   NEC765_RDY_PIN_CONNECTED,
941   {FLOPPY_0,FLOPPY_1, FLOPPY_2, FLOPPY_3}
941942};
942943
943944/* PPI8255 Interface */
r5743r5744
11271128   upd1990a_oe_w(state->upd1990a, 1);
11281129
11291130   /* configure FDC */
1130   floppy_drive_set_index_pulse_callback(image_from_devtype_and_index(machine, IO_FLOPPY, 0), prof80_fdc_index_callback);
1131   floppy_drive_set_index_pulse_callback(floppy_get_device(machine, 0), prof80_fdc_index_callback);
11311132
11321133   /* allocate floppy motor off timer */
11331134   state->floppy_motor_off_timer = timer_alloc(machine, floppy_motor_off_tick, NULL);
r5743r5744
11781179   state->gripc = 0x40;
11791180}
11801181
1181/* Machine Drivers */
1182static FLOPPY_OPTIONS_START(prof80)
1183   // dsk
1184FLOPPY_OPTIONS_END
11821185
1186static const floppy_config prof80_floppy_config =
1187{
1188   FLOPPY_DRIVE_DS_80,
1189   FLOPPY_OPTIONS_NAME(prof80)
1190};
1191
1192/* Machine Drivers */
11831193static MACHINE_DRIVER_START( prof80 )
11841194   MDRV_DRIVER_DATA(prof80_state)
11851195
r5743r5744
12221232
12231233   /* printer */
12241234   MDRV_CENTRONICS_ADD("centronics", standard_centronics)
1235   
1236   MDRV_FLOPPY_4_DRIVES_ADD(prof80_floppy_config)
12251237MACHINE_DRIVER_END
12261238
12271239/* ROMs */
r5743r5744
12551267ROM_END
12561268
12571269/* System Configurations */
1258static FLOPPY_OPTIONS_START(prof80)
1259   // dsk
1260FLOPPY_OPTIONS_END
1261
1262static void prof80_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
1263{
1264   /* floppy */
1265   switch(state)
1266   {
1267      /* --- the following bits of info are returned as 64-bit signed integers --- */
1268      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
1269
1270      /* --- the following bits of info are returned as pointers to data or functions --- */
1271      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_prof80; break;
1272
1273      default:                              floppy_device_getinfo(devclass, state, info); break;
1274   }
1275}
12761270static SYSTEM_CONFIG_START( prof80 )
12771271   CONFIG_RAM_DEFAULT   (128 * 1024)
1278   CONFIG_DEVICE(prof80_floppy_getinfo)
12791272SYSTEM_CONFIG_END
12801273
12811274/* System Drivers */
src/mess/drivers/lisa.c
r5743r5744
1414#include "includes/lisa.h"
1515#include "devices/sonydriv.h"
1616#include "machine/applefdc.h"
17#include "formats/ap_dsk35.h"
1718#include "machine/6522via.h"
1819#include "sound/speaker.h"
1920
r5743r5744
8283   sony_read_status
8384};
8485
86/*
87static void lisa_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
88{
89   switch(state)
90   {
91      case MESS_DEVINFO_INT_SONYDRIV_ALLOWABLE_SIZES:      info->i = SONY_FLOPPY_ALLOW400K | SONY_FLOPPY_ALLOW800K; break;
8592
93      default:                              sonydriv_device_getinfo(devclass, state, info); break;
94   }
95}
96*/
8697
98static const floppy_config lisa_floppy_config =
99{
100   FLOPPY_DRIVE_DS_80,
101   FLOPPY_OPTIONS_NAME(apple35_mac)
102};
103
87104/***************************************************************************
88105    MACHINE DRIVER
89106***************************************************************************/
r5743r5744
124141
125142   /* devices */
126143   MDRV_IWM_ADD("fdc", lisa2_fdc_interface)
127
144   MDRV_FLOPPY_SONY_2_DRIVES_ADD(lisa_floppy_config)
145   
128146   /* via */
129147   MDRV_VIA6522_ADD("via6522_0", 500000, lisa_via6522_0_intf)
130148   MDRV_VIA6522_ADD("via6522_1", 500000, lisa_via6522_1_intf)
r5743r5744
431449   ROM_LOAD( "vidstatem.rom", 0x00, 0x100, BAD_DUMP CRC(75904783) SHA1(3b0023bd90f2ca1be0b099160a566b044856885d))
432450ROM_END
433451
434
435static void lisa_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
436{
437   /* floppy */
438   switch(state)
439   {
440      /* --- the following bits of info are returned as 64-bit signed integers --- */
441      case MESS_DEVINFO_INT_SONYDRIV_ALLOWABLE_SIZES:      info->i = SONY_FLOPPY_ALLOW400K | SONY_FLOPPY_ALLOW800K; break;
442
443      default:                              sonydriv_device_getinfo(devclass, state, info); break;
444   }
445}
446
447static SYSTEM_CONFIG_START(lisa)
448   /* Lisa should eventually support floppies, hard disks, etc. */
449   CONFIG_DEVICE(lisa_floppy_getinfo)
450SYSTEM_CONFIG_END
451
452static SYSTEM_CONFIG_START(lisa210)
453   CONFIG_IMPORT_FROM(lisa)
454   /* actually, there is an additionnal 10 meg HD, but it is not implemented, though the roms for it are loaded... */
455SYSTEM_CONFIG_END
456
457452/*
458453    Lisa drivers boot MacWorks, but do not boot the Lisa OS, which is why we set
459454    the GAME_NOT_WORKING flag...
460455*/
461456/*     YEAR  NAME      PARENT   COMPAT  MACHINE   INPUT  INIT      CONFIG   COMPANY  FULLNAME */
462COMP( 1983, lisa,     0,   0,   lisa,     lisa,    lisa2,    lisa,   "Apple Computer",  "Lisa", GAME_NOT_WORKING )
463COMP( 1984, lisa2,    0,   0,   lisa,     lisa,    lisa2,    lisa,   "Apple Computer",  "Lisa2", GAME_NOT_WORKING )
464COMP( 1984, lisa210,  lisa2,   0,   lisa210,  lisa,    lisa210,  lisa210,   "Apple Computer",  "Lisa2/10", GAME_NOT_WORKING )
465COMP( 1985, macxl,    lisa2,   0,   macxl,    lisa,    mac_xl,   lisa210,   "Apple Computer",  "Macintosh XL", /*GAME_NOT_WORKING*/0 )
457COMP( 1983, lisa,     0,   0,   lisa,     lisa,    lisa2,    0,   "Apple Computer",  "Lisa", GAME_NOT_WORKING )
458COMP( 1984, lisa2,    0,   0,   lisa,     lisa,    lisa2,    0,   "Apple Computer",  "Lisa2", GAME_NOT_WORKING )
459COMP( 1984, lisa210,  lisa2,   0,   lisa210,  lisa,    lisa210,  0,   "Apple Computer",  "Lisa2/10", GAME_NOT_WORKING )
460COMP( 1985, macxl,    lisa2,   0,   macxl,    lisa,    mac_xl,   0,   "Apple Computer",  "Macintosh XL", /*GAME_NOT_WORKING*/0 )
src/mess/drivers/aquarius.c
r5743r5744
433433   MDRV_CARTSLOT_NOT_MANDATORY
434434MACHINE_DRIVER_END
435435
436static FLOPPY_OPTIONS_START(aquarius)
437   /* 128K images, 64K/side */
438FLOPPY_OPTIONS_END
439
440static const floppy_config aquarius_floppy_config =
441{
442   FLOPPY_DRIVE_DS_80,
443   FLOPPY_OPTIONS_NAME(aquarius)
444};
445
436446static MACHINE_DRIVER_START( aquarius_qd )
437447   MDRV_IMPORT_FROM( aquarius )
438448
r5743r5744
440450   MDRV_CPU_IO_MAP(aquarius_qd_io)
441451
442452   MDRV_DEVICE_REMOVE("cart")
453   
454   MDRV_FLOPPY_2_DRIVES_ADD(aquarius_floppy_config)
443455MACHINE_DRIVER_END
444456
445457
r5743r5744
487499/***************************************************************************
488500    SYSTEM CONFIG
489501***************************************************************************/
490static FLOPPY_OPTIONS_START(aquarius)
491   /* 128K images, 64K/side */
492FLOPPY_OPTIONS_END
493
494static void aquarius_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
495{
496   /* floppy */
497   switch(state)
498   {
499      /* --- the following bits of info are returned as 64-bit signed integers --- */
500      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
501
502      /* --- the following bits of info are returned as pointers to data or functions --- */
503      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_aquarius; break;
504
505      default:                              floppy_device_getinfo(devclass, state, info); break;
506   }
507}
508
509502static SYSTEM_CONFIG_START( aquarius )
510503   CONFIG_RAM_DEFAULT( 4 * 1024)
511504   CONFIG_RAM        ( 8 * 1024)
r5743r5744
513506   CONFIG_RAM        (36 * 1024)
514507SYSTEM_CONFIG_END
515508
516static SYSTEM_CONFIG_START( aquarius_qd )
517   CONFIG_IMPORT_FROM(aquarius)
518   CONFIG_DEVICE(aquarius_floppy_getinfo)
519SYSTEM_CONFIG_END
520
521
522509/***************************************************************************
523510    GAME DRIVERS
524511***************************************************************************/
525512
526513/*    YEAR  NAME         PARENT    COMPAT  MACHINE      INPUT     INIT      CONFIG       COMPANY   FULLNAME                         FLAGS */
527514COMP( 1983, aquarius,    0,        0,      aquarius,    aquarius, aquarius, aquarius,    "Mattel", "Aquarius (NTSC)",               0 )
528COMP( 1983, aquarius_qd, aquarius, 0,      aquarius_qd, aquarius, aquarius, aquarius_qd, "Mattel", "Aquarius w/ Quick Disk (NTSC)", 0 )
515COMP( 1983, aquarius_qd, aquarius, 0,      aquarius_qd, aquarius, aquarius, aquarius, "Mattel", "Aquarius w/ Quick Disk (NTSC)", 0 )
529516//COMP(   1984,   aquariu2,   aquarius,   0,      aquarius,   aquarius,   0,      aquarius,   "Mattel",   "Aquarius II",   GAME_NOT_WORKING )
src/mess/drivers/cgenie.c
r5743r5744
399399   CASSETTE_STOPPED
400400};
401401
402// This is currently broken
403FLOPPY_OPTIONS_START(cgenie )
404   FLOPPY_OPTION( cgd, "cgd", "Colour Genie disk image", basicdsk_identify_default, basicdsk_construct_default,
405      HEADS([2])
406      TRACKS([40])
407      SECTORS([10])
408      SECTOR_LENGTH([256])
409      FIRST_SECTOR_ID([1]))   
410FLOPPY_OPTIONS_END
411
412static const floppy_config cgenie_floppy_config =
413{
414   FLOPPY_DRIVE_DS_80,
415   FLOPPY_OPTIONS_NAME(cgenie)
416};
417
402418static MACHINE_DRIVER_START( cgenie )
403419   /* basic machine hardware */
404420   MDRV_CPU_ADD("maincpu", Z80, 2216800)        /* 2,2168 MHz */
r5743r5744
437453
438454   MDRV_WD179X_ADD("wd179x", cgenie_wd17xx_interface )
439455
456   MDRV_FLOPPY_4_DRIVES_ADD(cgenie_floppy_config)
440457   /* cartridge */
441458   MDRV_CARTSLOT_ADD("cart")
442459   MDRV_CARTSLOT_EXTENSION_LIST("rom")
r5743r5744
558575            spt = pd_list[i].SPT / heads;
559576            dir_sector = pd_list[i].DDSL * pd_list[i].GATM * pd_list[i].GPL + pd_list[i].SPT;
560577            dir_length = pd_list[i].DDGA * pd_list[i].GPL;
561            memcpy(memory_region(image->machine, "maincpu") + 0x5A71 + image_index_in_device(image) * sizeof(PDRIVE), &pd_list[i], sizeof(PDRIVE));
578            memcpy(memory_region(image->machine, "maincpu") + 0x5A71 + floppy_get_drive(image) * sizeof(PDRIVE), &pd_list[i], sizeof(PDRIVE));
562579            break;
563580         }
564581      }
r5743r5744
601618   return INIT_PASS;
602619}
603620*/
604// This is currently broken
605FLOPPY_OPTIONS_START(cgenie )
606   FLOPPY_OPTION( cgd, "cgd", "Colour Genie disk image", basicdsk_identify_default, basicdsk_construct_default,
607      HEADS([2])
608      TRACKS([40])
609      SECTORS([10])
610      SECTOR_LENGTH([256])
611      FIRST_SECTOR_ID([1]))   
612FLOPPY_OPTIONS_END
613
614static void cgenie_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
615{
616   /* floppy */
617   switch(state)
618   {
619      /* --- the following bits of info are returned as 64-bit signed integers --- */
620      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
621
622      /* --- the following bits of info are returned as pointers to data or functions --- */
623      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_cgenie; break;
624
625      default:                              floppy_device_getinfo(devclass, state, info); break;
626   }
627}
628
629621static SYSTEM_CONFIG_START(cgenie)
630   CONFIG_DEVICE(cgenie_floppy_getinfo)
631622   CONFIG_RAM_DEFAULT   (16 * 1024)
632623   CONFIG_RAM         (32 * 1024)
633624SYSTEM_CONFIG_END
src/mess/drivers/specpls3.c
r5743r5744
173173   DEVCB_NULL,
174174   NULL,
175175   NULL,
176   NEC765_RDY_PIN_CONNECTED
176   NEC765_RDY_PIN_CONNECTED,
177   {FLOPPY_0,FLOPPY_1, NULL, NULL}
177178};
178179
179180
r5743r5744
318319   /* D3 - Disk motor on/off */
319320   /* D4 - parallel port strobe */
320321
321   floppy_drive_set_motor_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 0), data & (1<<3));
322   floppy_drive_set_motor_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 1), data & (1<<3));
323   floppy_drive_set_ready_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 0), 1, 1);
324   floppy_drive_set_ready_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 1), 1, 1);
322   floppy_drive_set_motor_state(floppy_get_device(space->machine, 0), data & (1<<3));
323   floppy_drive_set_motor_state(floppy_get_device(space->machine, 1), data & (1<<3));
324   floppy_drive_set_ready_state(floppy_get_device(space->machine, 0), 1, 1);
325   floppy_drive_set_ready_state(floppy_get_device(space->machine, 1), 1, 1);
325326
326327   spectrum_plus3_port_1ffd_data = data;
327328
r5743r5744
351352{
352353   memset(mess_ram,0,128*1024);
353354   
354   floppy_drive_set_geometry(image_from_devtype_and_index(machine, IO_FLOPPY, 0), FLOPPY_DRIVE_SS_40);
355   floppy_drive_set_geometry(image_from_devtype_and_index(machine, IO_FLOPPY, 1), FLOPPY_DRIVE_SS_40);
355   floppy_drive_set_geometry(floppy_get_device(machine, 0), FLOPPY_DRIVE_SS_40);
356   floppy_drive_set_geometry(floppy_get_device(machine, 1), FLOPPY_DRIVE_SS_40);
356357
357358   /* Initial configuration */
358359   spectrum_128_port_7ffd_data = 0;
r5743r5744
362363   MACHINE_RESET_CALL(spectrum);
363364}
364365
366static const floppy_config specpls3_floppy_config =
367{
368   FLOPPY_DRIVE_DS_80,
369   FLOPPY_OPTIONS_NAME(dsk)
370};
371
365372static MACHINE_DRIVER_START( spectrum_plus3 )
366373   MDRV_IMPORT_FROM( spectrum_128 )
367374   MDRV_CPU_MODIFY("maincpu")
r5743r5744
372379   MDRV_MACHINE_RESET( spectrum_plus3 )
373380   
374381   MDRV_NEC765A_ADD("nec765", spectrum_plus3_nec765_interface)
382   MDRV_FLOPPY_2_DRIVES_ADD(specpls3_floppy_config)
375383MACHINE_DRIVER_END
376384
377385/***************************************************************************
r5743r5744
450458   ROM_CART_LOAD("cart", 0x10000, 0x4000, ROM_NOCLEAR | ROM_NOMIRROR | ROM_OPTIONAL)
451459ROM_END
452460
453static void specpls3_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
454{
455   /* floppy */
456   switch(state)
457   {
458      /* --- the following bits of info are returned as 64-bit signed integers --- */
459      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
460
461      /* --- the following bits of info are returned as pointers to data or functions --- */
462      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_dsk; break;
463
464      default:                              floppy_device_getinfo(devclass, state, info); break;
465   }
466}
467
468
469461static SYSTEM_CONFIG_START(specpls3)
470   CONFIG_DEVICE(specpls3_floppy_getinfo)
471462   CONFIG_RAM_DEFAULT(128 * 1024)
472463SYSTEM_CONFIG_END
473464
src/mess/drivers/x68k.c
r5743r5744
979979               output_set_indexed_value("eject_drv",drive,(data & 0x40) ? 1 : 0);
980980               if(data & 0x20)  // ejects disk
981981               {
982                  image_unload(image_from_devtype_and_index(space->machine, IO_FLOPPY, drive));
983                  floppy_drive_set_motor_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, drive), 0);  // I'll presume ejecting the disk stops the drive motor :)
982                  image_unload(floppy_get_device(space->machine, drive));
983                  floppy_drive_set_motor_state(floppy_get_device(space->machine, drive), 0);  // I'll presume ejecting the disk stops the drive motor :)
984984               }
985985            }
986986         }
r5743r5744
991991   case 0x03:
992992      x68k_sys.fdc.media_density[data & 0x03] = data & 0x10;
993993      x68k_sys.fdc.motor[data & 0x03] = data & 0x80;
994      floppy_drive_set_motor_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, data & 0x03), (data & 0x80));
994      floppy_drive_set_motor_state(floppy_get_device(space->machine, data & 0x03), (data & 0x80));
995995      if(data & 0x80)
996996      {
997997         for(drive=0;drive<4;drive++) // enable motor for this drive
998998         {
999999            if(drive == (data & 0x03))
10001000            {
1001               floppy_drive_set_motor_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, drive), 1);
1001               floppy_drive_set_motor_state(floppy_get_device(space->machine, drive), 1);
10021002               output_set_indexed_value("access_drv",drive,0);
10031003            }
10041004            else
r5743r5744
10091009      {
10101010         for(drive=0;drive<4;drive++)
10111011         {
1012            floppy_drive_set_motor_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, drive), 0);
1012            floppy_drive_set_motor_state(floppy_get_device(space->machine, drive), 0);
10131013            output_set_indexed_value("access_drv",drive,1);
10141014         }
10151015      }
1016      floppy_drive_set_ready_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 0),1,1);
1017      floppy_drive_set_ready_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 1),1,1);
1018      floppy_drive_set_ready_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 2),1,1);
1019      floppy_drive_set_ready_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 3),1,1);
1016      floppy_drive_set_ready_state(floppy_get_device(space->machine, 0),1,1);
1017      floppy_drive_set_ready_state(floppy_get_device(space->machine, 1),1,1);
1018      floppy_drive_set_ready_state(floppy_get_device(space->machine, 2),1,1);
1019      floppy_drive_set_ready_state(floppy_get_device(space->machine, 3),1,1);
10201020//      for(drive=0;drive<4;drive++)
10211021//      {
1022//         if(floppy_drive_get_flag_state(image_from_devtype_and_index(machine, IO_FLOPPY, drive),FLOPPY_DRIVE_MOTOR_ON))
1022//         if(floppy_drive_get_flag_state(floppy_get_device(machine, drive),FLOPPY_DRIVE_MOTOR_ON))
10231023//            output_set_indexed_value("access_drv",drive,0);
10241024//         else
10251025//            output_set_indexed_value("access_drv",drive,1);
r5743r5744
19011901   DEVCB_LINE(fdc_irq),
19021902   fdc_drq,
19031903   NULL,
1904   NEC765_RDY_PIN_CONNECTED
1904   NEC765_RDY_PIN_CONNECTED,
1905   {FLOPPY_0,FLOPPY_1,FLOPPY_2,FLOPPY_3}
19051906};
19061907
19071908static const ym2151_interface x68k_ym2151_interface =
r5743r5744
22392240      cputag_set_input_line_and_vector(image->machine, "maincpu",1,ASSERT_LINE,current_vector[1]);  // Disk insert/eject interrupt
22402241      logerror("IOC: Disk image inserted\n");
22412242   }
2242   x68k_sys.fdc.disk_inserted[image_index_in_device(image)] = 1;
2243   x68k_sys.fdc.disk_inserted[floppy_get_drive(image)] = 1;
22432244}
22442245
22452246static void x68k_unload_proc(const device_config *image)
r5743r5744
22512252      current_irq_line = 1;
22522253      cputag_set_input_line_and_vector(image->machine, "maincpu",1,ASSERT_LINE,current_vector[1]);  // Disk insert/eject interrupt
22532254   }
2254   x68k_sys.fdc.disk_inserted[image_index_in_device(image)] = 0;
2255   x68k_sys.fdc.disk_inserted[floppy_get_drive(image)] = 0;
22552256}
22562257
22572258FLOPPY_OPTIONS_START( x68k )
r5743r5744
22652266FLOPPY_OPTIONS_END
22662267
22672268
2268static void x68k_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
2269static const floppy_config x68k_floppy_config =
22692270{
2270   /* floppy */
2271   switch(state)
2272   {
2273      /* --- the following bits of info are returned as 64-bit signed integers --- */
2274      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
2271   FLOPPY_DRIVE_DS_80,
2272   FLOPPY_OPTIONS_NAME(x68k)
2273};
22752274
2276      /* --- the following bits of info are returned as pointers to data or functions --- */
2277      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_x68k; break;
2278
2279      default:                              floppy_device_getinfo(devclass, state, info); break;
2280   }
2281}
2282
22832275static MACHINE_RESET( x68000 )
22842276{
22852277   /* The last half of the IPLROM is mapped to 0x000000 on reset only
r5743r5744
23002292   // check for disks
23012293   for(drive=0;drive<4;drive++)
23022294   {
2303      if(image_exists(image_from_devtype_and_index(machine, IO_FLOPPY,drive)))
2295      if(image_exists(floppy_get_device(machine, drive)))
23042296         x68k_sys.fdc.disk_inserted[drive] = 1;
23052297      else
23062298         x68k_sys.fdc.disk_inserted[drive] = 0;
r5743r5744
23442336      output_set_indexed_value("eject_drv",drive,1);
23452337      output_set_indexed_value("ctrl_drv",drive,1);
23462338      output_set_indexed_value("access_drv",drive,1);
2347      floppy_install_unload_proc(image_from_devtype_and_index(machine, IO_FLOPPY, drive), x68k_unload_proc);
2348      floppy_install_load_proc(image_from_devtype_and_index(machine, IO_FLOPPY, drive), x68k_load_proc);
2339      floppy_install_unload_proc(floppy_get_device(machine, drive), x68k_unload_proc);
2340      floppy_install_load_proc(floppy_get_device(machine, drive), x68k_load_proc);
23492341   }
23502342   
23512343   // reset CPU
r5743r5744
24742466   MDRV_NVRAM_HANDLER( generic_0fill )
24752467
24762468   MDRV_NEC72065_ADD("nec72065", fdc_interface)   
2469   MDRV_FLOPPY_4_DRIVES_ADD(x68k_floppy_config)   
24772470MACHINE_DRIVER_END
24782471
24792472static SYSTEM_CONFIG_START(x68000)
2480   CONFIG_DEVICE(x68k_floppy_getinfo)
24812473   CONFIG_RAM(0x100000)
24822474   CONFIG_RAM(0x200000)
24832475   CONFIG_RAM(0x300000)
src/mess/drivers/kaypro.c
r5743r5744
139139   Machine Driver
140140
141141************************************************************/
142static FLOPPY_OPTIONS_START(kayproii)
143   FLOPPY_OPTION(kayproii, "dsk", "Kaypro II disk image", basicdsk_identify_default, basicdsk_construct_default,
144      HEADS([1])
145      TRACKS([40])
146      SECTORS([10])
147      SECTOR_LENGTH([512])
148      FIRST_SECTOR_ID([0]))
149FLOPPY_OPTIONS_END
142150
151static FLOPPY_OPTIONS_START(kaypro2x)
152   FLOPPY_OPTION(kaypro2x, "dsk", "Kaypro 2x disk image", basicdsk_identify_default, basicdsk_construct_default,
153      HEADS([2])
154      TRACKS([80])
155      SECTORS([10])
156      SECTOR_LENGTH([512])
157      FIRST_SECTOR_ID([0]))
158FLOPPY_OPTIONS_END
159
160static const floppy_config kayproii_floppy_config =
161{
162   FLOPPY_DRIVE_DS_80,
163   FLOPPY_OPTIONS_NAME(kayproii)
164};
165static const floppy_config kaypro2x_floppy_config =
166{
167   FLOPPY_DRIVE_DS_80,
168   FLOPPY_OPTIONS_NAME(kaypro2x)
169};
170
143171static MACHINE_DRIVER_START( kayproii )
144172   /* basic machine hardware */
145173   MDRV_CPU_ADD("maincpu", Z80, 2500000)   /* 2.5 MHz */
r5743r5744
175203   MDRV_Z80PIO_ADD( "z80pio_g", kayproii_pio_g_intf )
176204   MDRV_Z80PIO_ADD( "z80pio_s", kayproii_pio_s_intf )
177205   MDRV_Z80SIO_ADD( "z80sio", 4800, kaypro_sio_intf )   /* start at 300 baud */
206   
207   MDRV_FLOPPY_2_DRIVES_ADD(kayproii_floppy_config)
178208MACHINE_DRIVER_END
179209
180210static MACHINE_DRIVER_START( kaypro2x )
r5743r5744
213243   MDRV_CENTRONICS_ADD("centronics", standard_centronics)
214244   MDRV_Z80SIO_ADD( "z80sio", 4800, kaypro_sio_intf )
215245   MDRV_Z80SIO_ADD( "z80sio_2x", 4800, kaypro_sio_intf )   /* extra sio for modem and printer */
246   
247   MDRV_FLOPPY_2_DRIVES_ADD(kaypro2x_floppy_config)
216248MACHINE_DRIVER_END
217249
218250static MACHINE_DRIVER_START( omni2 )
r5743r5744
309341   ROM_LOAD("81-817.u31",   0x0000, 0x1000, CRC(5f72da5b) SHA1(8a597000cce1a7e184abfb7bebcb564c6bf24fb7) )
310342ROM_END
311343
312static FLOPPY_OPTIONS_START(kayproii)
313   FLOPPY_OPTION(kayproii, "dsk", "Kaypro II disk image", basicdsk_identify_default, basicdsk_construct_default,
314      HEADS([1])
315      TRACKS([40])
316      SECTORS([10])
317      SECTOR_LENGTH([512])
318      FIRST_SECTOR_ID([0]))
319FLOPPY_OPTIONS_END
320
321static FLOPPY_OPTIONS_START(kaypro2x)
322   FLOPPY_OPTION(kaypro2x, "dsk", "Kaypro 2x disk image", basicdsk_identify_default, basicdsk_construct_default,
323      HEADS([2])
324      TRACKS([80])
325      SECTORS([10])
326      SECTOR_LENGTH([512])
327      FIRST_SECTOR_ID([0]))
328FLOPPY_OPTIONS_END
329
330static void kayproii_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
331{
332   /* floppy */
333   switch(state)
334   {
335      /* --- the following bits of info are returned as 64-bit signed integers --- */
336      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
337
338      /* --- the following bits of info are returned as pointers to data or functions --- */
339      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_kayproii; break;
340
341      default:                              floppy_device_getinfo(devclass, state, info); break;
342   }
343}
344
345static void kaypro2x_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
346{
347   /* floppy */
348   switch(state)
349   {
350      /* --- the following bits of info are returned as 64-bit signed integers --- */
351      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
352
353      /* --- the following bits of info are returned as pointers to data or functions --- */
354      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_kaypro2x; break;
355
356      default:                              floppy_device_getinfo(devclass, state, info); break;
357   }
358}
359
360static SYSTEM_CONFIG_START(kayproii)
361   CONFIG_DEVICE(kayproii_floppy_getinfo)
362SYSTEM_CONFIG_END
363
364static SYSTEM_CONFIG_START(kaypro2x)
365   CONFIG_DEVICE(kaypro2x_floppy_getinfo)
366SYSTEM_CONFIG_END
367
368344/*    YEAR  NAME      PARENT    COMPAT  MACHINE     INPUT    INIT    CONFIG       COMPANY  FULLNAME */
369COMP( 1982, kayproii,   0,        0,    kayproii, kay_kbd, 0,      kayproii,   "Non Linear Systems",  "Kaypro II - 2/83" , 0 )
370COMP( 1983, kaypro4,    kayproii, 0,    kayproii, kay_kbd, 0,      kaypro2x,    "Non Linear Systems",  "Kaypro 4 - 4/83" , GAME_NOT_WORKING ) // model 81-004
371COMP( 1983, kaypro4p88, kayproii, 0,    kayproii, kay_kbd, 0,      kaypro2x,    "Non Linear Systems",  "Kaypro 4 plus88 - 4/83" , GAME_NOT_WORKING ) // model 81-004 with an added 8088 daughterboard and rom
372COMP( 198?, omni2,      kayproii, 0,    omni2,    kay_kbd, 0,      kaypro2x,    "Non Linear Systems",  "Omni II" , GAME_NOT_WORKING )
373COMP( 1984, kaypro2x,   0,        0,    kaypro2x, kay_kbd, 0,      kaypro2x,    "Non Linear Systems",  "Kaypro 2x" , GAME_NOT_WORKING ) // model 81-025
374COMP( 1984, kaypro4a,   0,        0,    kaypro2x, kay_kbd, 0,      kaypro2x,    "Non Linear Systems",  "Kaypro 4 - 4/84" , GAME_NOT_WORKING ) // model 81-015
345COMP( 1982, kayproii,   0,        0,    kayproii, kay_kbd, 0,      0,   "Non Linear Systems",  "Kaypro II - 2/83" , 0 )
346COMP( 1983, kaypro4,    kayproii, 0,    kayproii, kay_kbd, 0,      0,    "Non Linear Systems",  "Kaypro 4 - 4/83" , GAME_NOT_WORKING ) // model 81-004
347COMP( 1983, kaypro4p88, kayproii, 0,    kayproii, kay_kbd, 0,      0,    "Non Linear Systems",  "Kaypro 4 plus88 - 4/83" , GAME_NOT_WORKING ) // model 81-004 with an added 8088 daughterboard and rom
348COMP( 198?, omni2,      kayproii, 0,    omni2,    kay_kbd, 0,      0,    "Non Linear Systems",  "Omni II" , GAME_NOT_WORKING )
349COMP( 1984, kaypro2x,   0,        0,    kaypro2x, kay_kbd, 0,      0,    "Non Linear Systems",  "Kaypro 2x" , GAME_NOT_WORKING ) // model 81-025
350COMP( 1984, kaypro4a,   0,        0,    kaypro2x, kay_kbd, 0,      0,    "Non Linear Systems",  "Kaypro 4 - 4/84" , GAME_NOT_WORKING ) // model 81-015
375351// Kaypro 4/84 plus 88 goes here, model 81-015 with an added 8088 daughterboard and rom
376COMP( 1983, kaypro10,   0,        0,    kaypro2x, kay_kbd, 0,      kaypro2x,    "Non Linear Systems",  "Kaypro 10" , GAME_NOT_WORKING ) // model 81-005
352COMP( 1983, kaypro10,   0,        0,    kaypro2x, kay_kbd, 0,      0,    "Non Linear Systems",  "Kaypro 10" , GAME_NOT_WORKING ) // model 81-005
src/mess/drivers/geneve.c
r5743r5744
459459   0   /*  first day of week */
460460};
461461
462static const floppy_config geneve_floppy_config =
463{
464   FLOPPY_DRIVE_DS_80,
465   FLOPPY_OPTIONS_NAME(ti99)
466};
467
462468static MACHINE_DRIVER_START(geneve_60hz)
463469   /* basic machine hardware */
464470   /* TMS9995 CPU @ 12.0 MHz */
r5743r5744
510516   MDRV_TMS9902_ADD("tms9902_1", tms9902_params_1)
511517   
512518   MDRV_WD179X_ADD("wd179x", ti99_wd17xx_interface )
519   
520   MDRV_FLOPPY_4_DRIVES_ADD(geneve_floppy_config)
513521MACHINE_DRIVER_END
514522
515523
r5743r5744
560568   ROM_LOAD_OPTIONAL("spchrom.bin", 0x0000, 0x8000, CRC(58b155f7) SHA1(382292295c00dff348d7e17c5ce4da12a1d87763)) /* system speech ROM */
561569ROM_END
562570
563static void geneve_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
564{
565   /* floppy */
566   switch(state)
567   {
568      /* --- the following bits of info are returned as 64-bit signed integers --- */
569      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
570571
571      /* Used within mflopimg.c. */
572                case MESS_DEVINFO_INT_KEEP_DRIVE_GEOMETRY:                                  info->i = 1; break;
573
574      /* --- the following bits of info are returned as pointers to data or functions --- */
575      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_ti99; break;
576
577      default:                              floppy_device_getinfo(devclass, state, info); break;
578   }
579}
580
581572static void geneve_parallel_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
582573{
583574   /* parallel */
r5743r5744
642633   }
643634}
644635
645static SYSTEM_CONFIG_START(geneve)
646   CONFIG_DEVICE(geneve_floppy_getinfo)
636static SYSTEM_CONFIG_START(geneve)   
647637   CONFIG_DEVICE(geneve_parallel_getinfo)
648638   CONFIG_DEVICE(geneve_serial_getinfo)
649639   CONFIG_DEVICE(geneve_memcard_getinfo)
src/mess/drivers/exidy.c
r5743r5744
340340   CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED
341341};
342342
343static FLOPPY_OPTIONS_START(exidy)
344   FLOPPY_OPTION(exidy, "dsk", "Exidy disk image", basicdsk_identify_default, basicdsk_construct_default,
345      HEADS([2])
346      TRACKS([80])
347      SECTORS([9])
348      SECTOR_LENGTH([512])
349      FIRST_SECTOR_ID([1]))
350FLOPPY_OPTIONS_END
351
352static const floppy_config exidy_floppy_config =
353{
354   FLOPPY_DRIVE_DS_80,
355   FLOPPY_OPTIONS_NAME(exidy)
356};
357
343358static MACHINE_DRIVER_START( exidy )
344359   /* basic machine hardware */
345360   MDRV_CPU_ADD("maincpu", Z80, 12638000/6)
r5743r5744
387402   MDRV_CARTSLOT_ADD("cart")
388403   MDRV_CARTSLOT_EXTENSION_LIST("rom")
389404   MDRV_CARTSLOT_NOT_MANDATORY
405   
406   MDRV_FLOPPY_4_DRIVES_ADD(exidy_floppy_config)
390407MACHINE_DRIVER_END
391408
392409static MACHINE_DRIVER_START( exidyd )
r5743r5744
397414
398415   MDRV_MACHINE_START( exidyd )
399416   MDRV_MACHINE_RESET( exidyd )
417   
418   MDRV_FLOPPY_4_DRIVES_REMOVE()
400419MACHINE_DRIVER_END
401420
402421static DRIVER_INIT( exidy )
r5743r5744
410429  Game driver(s)
411430
412431***************************************************************************/
413
414432ROM_START(exidy)
415433   ROM_REGION( 0x10000, "maincpu", 0 )
416434   ROM_LOAD("exmo1-1.dat", 0xe000, 0x0800, CRC(ac924f67) SHA1(72fcad6dd1ed5ec0527f967604401284d0e4b6a1) ) /* monitor roms */
r5743r5744
434452   ROM_LOAD_OPTIONAL("bruce.dat",   0x0000, 0x0020, CRC(fae922cb) SHA1(470a86844cfeab0d9282242e03ff1d8a1b2238d1)) /* video prom */
435453ROM_END
436454
437static FLOPPY_OPTIONS_START(exidy)
438   FLOPPY_OPTION(exidy, "dsk", "Exidy disk image", basicdsk_identify_default, basicdsk_construct_default,
439      HEADS([2])
440      TRACKS([80])
441      SECTORS([9])
442      SECTOR_LENGTH([512])
443      FIRST_SECTOR_ID([1]))
444FLOPPY_OPTIONS_END
445
446static void exidy_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
447{
448   /* floppy */
449   switch(state)
450   {
451      /* --- the following bits of info are returned as 64-bit signed integers --- */
452      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
453
454      /* --- the following bits of info are returned as pointers to data or functions --- */
455      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_exidy; break;
456
457      default:                              floppy_device_getinfo(devclass, state, info); break;
458   }
459}
460
461static SYSTEM_CONFIG_START(exidy)
462   CONFIG_DEVICE(exidy_floppy_getinfo)
463SYSTEM_CONFIG_END
464
465
466455/*    YEAR  NAME    PARENT  COMPAT      MACHINE INPUT   INIT    CONFIG  COMPANY        FULLNAME */
467COMP(1979, exidy,   0,      0,   exidy,   exidy,   exidy,   exidy,   "Exidy Inc", "Sorcerer", 0 )
456COMP(1979, exidy,   0,      0,   exidy,   exidy,   exidy,   0,   "Exidy Inc", "Sorcerer", 0 )
468457COMP(1979, exidyd,  exidy,   0,   exidyd,   exidy,   exidy,   0,   "Exidy Inc", "Sorcerer (Cassette only)", 0 )
469458
src/mess/drivers/pc8801.c
r5743r5744
571571   pc88sr_sound_interupt
572572};
573573
574FLOPPY_OPTIONS_START(pc88 )
575   FLOPPY_OPTION( d88, "d88",   "D88 Floppy Disk image",   fm7_d77_identify,   fm7_d77_construct, NULL)
576FLOPPY_OPTIONS_END
574577
578static const floppy_config pc88_floppy_config =
579{
580   FLOPPY_DRIVE_DS_80,
581   FLOPPY_OPTIONS_NAME(pc88)
582};
583
575584static MACHINE_DRIVER_START( pc88srl )
576585   /* basic machine hardware */
577586
r5743r5744
619628   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
620629   
621630   MDRV_NEC765A_ADD("nec765", pc8801_fdc_interface)
631   
632   MDRV_FLOPPY_2_DRIVES_ADD(pc88_floppy_config)
622633MACHINE_DRIVER_END
623634
624635
r5743r5744
922933   ROM_LOAD( "vadic.rom", 0x00000, 0x80000, CRC(a6108f4d) SHA1(3665db538598abb45d9dfe636423e6728a812b12) )
923934ROM_END
924935
925FLOPPY_OPTIONS_START(pc88 )
926   FLOPPY_OPTION( d88, "d88",   "D88 Floppy Disk image",   fm7_d77_identify,   fm7_d77_construct, NULL)
927FLOPPY_OPTIONS_END
928
929static void pc88_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
930{
931   /* floppy */
932   switch(state)
933   {
934      /* --- the following bits of info are returned as 64-bit signed integers --- */
935      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
936
937      /* --- the following bits of info are returned as pointers to data or functions --- */
938      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_pc88; break;
939
940      default:                              floppy_device_getinfo(devclass, state, info); break;
941   }
942}
943
944static SYSTEM_CONFIG_START(pc88)
945   CONFIG_DEVICE(pc88_floppy_getinfo)
946SYSTEM_CONFIG_END
947
948
949936/*    YEAR  NAME      PARENT    COMPAT  MACHINE   INPUT    INIT  CONFIG  COMPANY FULLNAME */
950937
951COMP( 1979, pc8001,    0,        0,     pc88srl,  pc88sr,  0,    pc88,   "Nippon Electronic Company",  "PC-8001 (Lores display, VSYNC 15KHz)", GAME_NOT_WORKING )
952COMP( 1983, pc8001m2,  0,        0,     pc88srl,  pc88sr,  0,    pc88,   "Nippon Electronic Company",  "PC-8001 Mk2 (Lores display, VSYNC 15KHz)", GAME_NOT_WORKING )   // not sure about this dump
938COMP( 1979, pc8001,    0,        0,     pc88srl,  pc88sr,  0,    0,   "Nippon Electronic Company",  "PC-8001 (Lores display, VSYNC 15KHz)", GAME_NOT_WORKING )
939COMP( 1983, pc8001m2,  0,        0,     pc88srl,  pc88sr,  0,    0,   "Nippon Electronic Company",  "PC-8001 Mk2 (Lores display, VSYNC 15KHz)", GAME_NOT_WORKING )   // not sure about this dump
953940
954COMP( 1981, pc8801,    0,        0,     pc88srl,  pc88sr,  0,    pc88,   "Nippon Electronic Company",  "PC-8801 (Lores display, VSYNC 15KHz)", GAME_NOT_WORKING )
955COMP( 1983, pc88m2,    pc8801,   0,     pc88srl,  pc88sr,  0,    pc88,   "Nippon Electronic Company",  "PC-8001 MkII (Lores display, VSYNC 15KHz)", GAME_NOT_WORKING )   // not sure about this dump
956COMP( 1985, pc88m2sl,  0,        0,     pc88srl,  pc88sr,  0,    pc88,   "Nippon Electronic Company",  "PC-8801 MkIISR (Lores display, VSYNC 15KHz)", 0 )
957COMP( 1985, pc88m2sh,  pc88m2sl, 0,     pc88srh,  pc88sr,  0,    pc88,   "Nippon Electronic Company",  "PC-8801 MkIISR (Hires display, VSYNC 24KHz)", 0 )
958COMP( 1985, pc88m2fr,  pc88m2sl, 0,     pc88srh,  pc88sr,  0,    pc88,   "Nippon Electronic Company",  "PC-8801 MkIIFR (Hires display, VSYNC 24KHz)", 0 )
959COMP( 1985, pc88m2mr,  pc88m2sl, 0,     pc88srh,  pc88sr,  0,    pc88,   "Nippon Electronic Company",  "PC-8801 MkIIMR (Hires display, VSYNC 24KHz)", 0 )
960COMP( 1986, pc8801mh,  pc88m2sl, 0,     pc88srh,  pc88sr,  0,    pc88,   "Nippon Electronic Company",  "PC-8801 MH (Hires display, VSYNC 24KHz)", 0 )
961COMP( 1987, pc8801fa,  pc88m2sl, 0,     pc88srh,  pc88sr,  0,    pc88,   "Nippon Electronic Company",  "PC-8801 FA (Hires display, VSYNC 24KHz)", 0 )
962COMP( 1987, pc8801ma,  pc88m2sl, 0,     pc88srh,  pc88sr,  0,    pc88,   "Nippon Electronic Company",  "PC-8801 MA (Hires display, VSYNC 24KHz)", 0 )
963COMP( 1988, pc8801ma2, pc88m2sl, 0,     pc88srh,  pc88sr,  0,    pc88,   "Nippon Electronic Company",  "PC-8801 MA2 (Hires display, VSYNC 24KHz)", 0 )
964COMP( 1989, pc8801mc,  pc88m2sl, 0,     pc88srh,  pc88sr,  0,    pc88,   "Nippon Electronic Company",  "PC-8801 MC (Hires display, VSYNC 24KHz)", 0 )
941COMP( 1981, pc8801,    0,        0,     pc88srl,  pc88sr,  0,    0,   "Nippon Electronic Company",  "PC-8801 (Lores display, VSYNC 15KHz)", GAME_NOT_WORKING )
942COMP( 1983, pc88m2,    pc8801,   0,     pc88srl,  pc88sr,  0,    0,   "Nippon Electronic Company",  "PC-8001 MkII (Lores display, VSYNC 15KHz)", GAME_NOT_WORKING )   // not sure about this dump
943COMP( 1985, pc88m2sl,  0,        0,     pc88srl,  pc88sr,  0,    0,   "Nippon Electronic Company",  "PC-8801 MkIISR (Lores display, VSYNC 15KHz)", 0 )
944COMP( 1985, pc88m2sh,  pc88m2sl, 0,     pc88srh,  pc88sr,  0,    0,   "Nippon Electronic Company",  "PC-8801 MkIISR (Hires display, VSYNC 24KHz)", 0 )
945COMP( 1985, pc88m2fr,  pc88m2sl, 0,     pc88srh,  pc88sr,  0,    0,   "Nippon Electronic Company",  "PC-8801 MkIIFR (Hires display, VSYNC 24KHz)", 0 )
946COMP( 1985, pc88m2mr,  pc88m2sl, 0,     pc88srh,  pc88sr,  0,    0,   "Nippon Electronic Company",  "PC-8801 MkIIMR (Hires display, VSYNC 24KHz)", 0 )
947COMP( 1986, pc8801mh,  pc88m2sl, 0,     pc88srh,  pc88sr,  0,    0,   "Nippon Electronic Company",  "PC-8801 MH (Hires display, VSYNC 24KHz)", 0 )
948COMP( 1987, pc8801fa,  pc88m2sl, 0,     pc88srh,  pc88sr,  0,    0,   "Nippon Electronic Company",  "PC-8801 FA (Hires display, VSYNC 24KHz)", 0 )
949COMP( 1987, pc8801ma,  pc88m2sl, 0,     pc88srh,  pc88sr,  0,    0,   "Nippon Electronic Company",  "PC-8801 MA (Hires display, VSYNC 24KHz)", 0 )
950COMP( 1988, pc8801ma2, pc88m2sl, 0,     pc88srh,  pc88sr,  0,    0,   "Nippon Electronic Company",  "PC-8801 MA2 (Hires display, VSYNC 24KHz)", 0 )
951COMP( 1989, pc8801mc,  pc88m2sl, 0,     pc88srh,  pc88sr,  0,    0,   "Nippon Electronic Company",  "PC-8801 MC (Hires display, VSYNC 24KHz)", 0 )
965952
966953COMP( 1987, pc88va,    0,        0,     pc88va,   pc88sr,  0,    0,      "Nippon Electronic Company",  "PC-88 VA", GAME_NOT_WORKING )
src/mess/drivers/bw2.c
r5743r5744
4343
4444static const device_config *get_floppy_image(running_machine *machine, int drive)
4545{
46   return image_from_devtype_and_index(machine, IO_FLOPPY, drive);
46   return floppy_get_device(machine, drive);
4747}
4848
4949static int get_ramdisk_size(running_machine *machine)
r5743r5744
782782   bw2_charram_r,
783783};
784784
785static const wd17xx_interface bw2_wd17xx_interface = { bw2_wd17xx_callback, NULL };
785static FLOPPY_OPTIONS_START(bw2)
786   FLOPPY_OPTION(bw2, "dsk", "BW2 340K disk image", basicdsk_identify_default, basicdsk_construct_default,
787      HEADS([1])
788      TRACKS([80])
789      SECTORS([17])
790      SECTOR_LENGTH([256])
791      FIRST_SECTOR_ID([0]))
792   FLOPPY_OPTION(bw2, "dsk", "BW2 360K disk image", basicdsk_identify_default, basicdsk_construct_default,
793      HEADS([1])
794      TRACKS([80])
795      SECTORS([18])
796      SECTOR_LENGTH([256])
797      FIRST_SECTOR_ID([0]))     
798FLOPPY_OPTIONS_END
786799
800static const floppy_config bw2_floppy_config =
801{
802   FLOPPY_DRIVE_DS_80,
803   FLOPPY_OPTIONS_NAME(bw2)
804};
805static const wd17xx_interface bw2_wd17xx_interface = { bw2_wd17xx_callback, NULL, {FLOPPY_0, FLOPPY_1}};
806
787807static MACHINE_DRIVER_START( bw2 )
788808   MDRV_DRIVER_DATA(bw2_state)
789809
r5743r5744
820840   MDRV_MSM8251_ADD(MSM8251_TAG, default_msm8251_interface)
821841
822842   MDRV_WD179X_ADD("wd179x", bw2_wd17xx_interface )
843   
844   MDRV_FLOPPY_2_DRIVES_ADD(bw2_floppy_config)
823845MACHINE_DRIVER_END
824846
825847/***************************************************************************
r5743r5744
839861   ROM_LOAD("ramcard-10.bin", 0x0000, 0x4000, CRC(68cde1ba) SHA1(a776a27d64f7b857565594beb63aa2cd692dcf04))
840862ROM_END
841863
842static FLOPPY_OPTIONS_START(bw2)
843   FLOPPY_OPTION(bw2, "dsk", "BW2 340K disk image", basicdsk_identify_default, basicdsk_construct_default,
844      HEADS([1])
845      TRACKS([80])
846      SECTORS([17])
847      SECTOR_LENGTH([256])
848      FIRST_SECTOR_ID([0]))
849   FLOPPY_OPTION(bw2, "dsk", "BW2 360K disk image", basicdsk_identify_default, basicdsk_construct_default,
850      HEADS([1])
851      TRACKS([80])
852      SECTORS([18])
853      SECTOR_LENGTH([256])
854      FIRST_SECTOR_ID([0]))     
855FLOPPY_OPTIONS_END
856
857static void bw2_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
858{
859   /* floppy */
860   switch(state)
861   {
862      /* --- the following bits of info are returned as 64-bit signed integers --- */
863      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
864
865      /* --- the following bits of info are returned as pointers to data or functions --- */
866      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_bw2; break;
867
868      default:                              floppy_device_getinfo(devclass, state, info); break;
869   }
870}
871864static void bw2_serial_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
872865{
873866   /* serial */
r5743r5744
908901   }
909902}
910903
911static SYSTEM_CONFIG_START( bw2 )
912   CONFIG_DEVICE( bw2_floppy_getinfo )
904static SYSTEM_CONFIG_START( bw2 )   
913905   CONFIG_DEVICE( bw2_serial_getinfo )
914906   CONFIG_RAM_DEFAULT( 64 * 1024 )
915907   CONFIG_RAM( 96 * 1024 )
src/mess/drivers/enterp.c
r5743r5744
176176   const device_config *fdc = devtag_get_device(machine, "wd1770");
177177   cpu_set_input_line_vector(cputag_get_cpu(machine, "maincpu"), 0, 0xff);
178178
179   floppy_drive_set_geometry(image_from_devtype_and_index(machine, IO_FLOPPY, 0), FLOPPY_DRIVE_DS_80);
179   floppy_drive_set_geometry(floppy_get_device(machine, 0), FLOPPY_DRIVE_DS_80);
180180   wd17xx_set_density(fdc, DEN_FM_HI);
181181}
182182
r5743r5744
413413    MACHINE DRIVERS
414414***************************************************************************/
415415
416static const wd17xx_interface enterp_wd1770_interface = { enterp_wd1770_callback, NULL };
416static const wd17xx_interface enterp_wd1770_interface = { enterp_wd1770_callback, NULL, {FLOPPY_0,FLOPPY_1,FLOPPY_2,FLOPPY_3} };
417417
418static FLOPPY_OPTIONS_START(enterprise)
419   FLOPPY_OPTION(enterprise, "dsk,img", "Enterprise disk image", basicdsk_identify_default, basicdsk_construct_default,
420      HEADS([2])
421      TRACKS([80])
422      SECTORS([9])
423      SECTOR_LENGTH([512])
424      FIRST_SECTOR_ID([1]))
425FLOPPY_OPTIONS_END
426
427static const floppy_config enterprise_floppy_config =
428{
429   FLOPPY_DRIVE_DS_80,
430   FLOPPY_OPTIONS_NAME(enterprise)
431};
432
418433static MACHINE_DRIVER_START( ep64 )
419434   /* basic machine hardware */
420435   MDRV_CPU_ADD("maincpu", Z80, ENTERPRISE_XTAL_X1/2) /* 4 MHz, generated by DAVE */
r5743r5744
445460   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
446461
447462   MDRV_WD1770_ADD("wd1770", enterp_wd1770_interface )
463   
464   MDRV_FLOPPY_4_DRIVES_ADD(enterprise_floppy_config)
448465MACHINE_DRIVER_END
449466
450467
r5743r5744
504521/***************************************************************************
505522    SYSTEM CONFIG
506523***************************************************************************/
507static FLOPPY_OPTIONS_START(enterprise)
508   FLOPPY_OPTION(enterprise, "dsk,img", "Enterprise disk image", basicdsk_identify_default, basicdsk_construct_default,
509      HEADS([2])
510      TRACKS([80])
511      SECTORS([9])
512      SECTOR_LENGTH([512])
513      FIRST_SECTOR_ID([1]))
514FLOPPY_OPTIONS_END
515
516static void enterprise_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
517{
518   /* floppy */
519   switch(state)
520   {
521      /* --- the following bits of info are returned as 64-bit signed integers --- */
522      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
523
524      /* --- the following bits of info are returned as pointers to data or functions --- */
525      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_enterprise; break;
526
527      default:                              floppy_device_getinfo(devclass, state, info); break;
528   }
529}
530524static SYSTEM_CONFIG_START(ep64)
531525   CONFIG_RAM_DEFAULT(64*1024)
532   CONFIG_DEVICE(enterprise_floppy_getinfo)
533526SYSTEM_CONFIG_END
534527
535528static SYSTEM_CONFIG_START(ep128)
536529   CONFIG_RAM_DEFAULT(128*1024)
537   CONFIG_DEVICE(enterprise_floppy_getinfo)
538530SYSTEM_CONFIG_END
539531
540532
src/mess/drivers/atom.c
r5743r5744
256256   DEVCB_NULL
257257};
258258
259static FLOPPY_OPTIONS_START(atom)
260   FLOPPY_OPTION(atom, "ssd", "Atom disk image", basicdsk_identify_default, basicdsk_construct_default,
261      HEADS([1])
262      TRACKS([80])
263      SECTORS([10])
264      SECTOR_LENGTH([256])
265      FIRST_SECTOR_ID([0]))
266FLOPPY_OPTIONS_END
259267
268static const floppy_config atom_floppy_config =
269{
270   FLOPPY_DRIVE_DS_80,
271   FLOPPY_OPTIONS_NAME(atom)
272};
273
260274/* machine definition */
261275static MACHINE_DRIVER_START( atom )
262276   /* basic machine hardware */
r5743r5744
296310
297311   /* i8271 */
298312   MDRV_I8271_ADD("i8271", atom_8271_interface)
313   
314   MDRV_FLOPPY_2_DRIVES_ADD(atom_floppy_config)
299315MACHINE_DRIVER_END
300316
301317
r5743r5744
334350   ROM_LOAD ("atomicw.rom",0x018000,0x1000, CRC(a3fd737d) SHA1(d418d9322c69c49106ed2c268ad0864c0f2c4c1b))    // Atomic Windows
335351ROM_END
336352
337static FLOPPY_OPTIONS_START(atom)
338   FLOPPY_OPTION(atom, "ssd", "Atom disk image", basicdsk_identify_default, basicdsk_construct_default,
339      HEADS([1])
340      TRACKS([80])
341      SECTORS([10])
342      SECTOR_LENGTH([256])
343      FIRST_SECTOR_ID([0]))
344FLOPPY_OPTIONS_END
345
346static void atom_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
347{
348   /* floppy */
349   switch(state)
350   {
351      /* --- the following bits of info are returned as 64-bit signed integers --- */
352      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
353
354      /* --- the following bits of info are returned as pointers to data or functions --- */
355      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_atom; break;
356
357      default:                              floppy_device_getinfo(devclass, state, info); break;
358   }
359}
360
361static SYSTEM_CONFIG_START(atom)
362   CONFIG_DEVICE(atom_floppy_getinfo)
363SYSTEM_CONFIG_END
364
365353/*    YEAR  NAME      PARENT    COMPAT  MACHINE   INPUT     INIT      CONFIG   COMPANY   FULLNAME */
366COMP( 1979, atom,     0,        0,      atom,     atom,     0,        atom,    "Acorn",  "Atom" , 0)
367COMP( 1979, atomeb,   atom,     0,      atomeb,   atom,     0,        atom,    "Acorn",  "Atom with Eprom Box" , 0)
354COMP( 1979, atom,     0,        0,      atom,     atom,     0,        0,    "Acorn",  "Atom" , 0)
355COMP( 1979, atomeb,   atom,     0,      atomeb,   atom,     0,        0,    "Acorn",  "Atom with Eprom Box" , 0)
src/mess/drivers/apf.c
r5743r5744
622622   CASSETTE_PLAY
623623};
624624
625static FLOPPY_OPTIONS_START(apfimag)
626   FLOPPY_OPTION(apfimag, "apd", "APF disk image", basicdsk_identify_default, basicdsk_construct_default,
627      HEADS([1])
628      TRACKS([40])
629      SECTORS([8])
630      SECTOR_LENGTH([256])
631      FIRST_SECTOR_ID([1]))
632FLOPPY_OPTIONS_END
625633
634static const floppy_config apfimag_floppy_config =
635{
636   FLOPPY_DRIVE_SS_40,
637   FLOPPY_OPTIONS_NAME(apfimag)
638};
639
626640static MACHINE_DRIVER_START( apf_imagination )
627641   /* basic machine hardware */
628642   //   MDRV_CPU_ADD("maincpu", M6800, 3750000)        /* 7.8336 MHz, only 6800p type used 1 MHz max*/
r5743r5744
652666   MDRV_CASSETTE_ADD( "cassette", apf_cassette_config )
653667   
654668   MDRV_WD179X_ADD("wd179x", default_wd17xx_interface )   
669   
670   MDRV_FLOPPY_2_DRIVES_ADD(apfimag_floppy_config)
655671MACHINE_DRIVER_END
656672
657673static MACHINE_DRIVER_START( apf_m1000 )
r5743r5744
663679
664680   MDRV_DEVICE_REMOVE( "cassette" )
665681   MDRV_CARTSLOT_ADD("cart")
682   MDRV_FLOPPY_2_DRIVES_REMOVE()
666683MACHINE_DRIVER_END
667684
668685
r5743r5744
686703   ROM_CART_LOAD("cart", 0x8000, 0x2000, ROM_OPTIONAL)
687704ROM_END
688705
689static FLOPPY_OPTIONS_START(apfimag)
690   FLOPPY_OPTION(apfimag, "apd", "APF disk image", basicdsk_identify_default, basicdsk_construct_default,
691      HEADS([1])
692      TRACKS([40])
693      SECTORS([8])
694      SECTOR_LENGTH([256])
695      FIRST_SECTOR_ID([1]))
696FLOPPY_OPTIONS_END
697
698static void apfimag_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
699{
700   /* floppy */
701   switch(state)
702   {
703      /* --- the following bits of info are returned as 64-bit signed integers --- */
704      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
705
706      /* --- the following bits of info are returned as pointers to data or functions --- */
707      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_apfimag; break;
708
709      default:                              floppy_device_getinfo(devclass, state, info); break;
710   }
711}
712
713static SYSTEM_CONFIG_START( apfimag )
714   CONFIG_DEVICE(apfimag_floppy_getinfo)
715SYSTEM_CONFIG_END
716
717
718706/***************************************************************************
719707
720708  Game driver(s)
r5743r5744
722710***************************************************************************/
723711
724712/*    YEAR  NAME        PARENT  COMPAT  MACHINE             INPUT               INIT    CONFIG      COMPANY               FULLNAME */
725COMP(1977, apfimag,   0,   0,   apf_imagination,   apf_imagination,   0,   apfimag,   "APF Electronics Inc",  "APF Imagination Machine" , 0 )
713COMP(1977, apfimag,   0,   0,   apf_imagination,   apf_imagination,   0,   0,   "APF Electronics Inc",  "APF Imagination Machine" , 0 )
726714CONS(1978, apfm1000,   0,   0,   apf_m1000,      apf_m1000,      0,   0,      "APF Electronics Inc",  "APF M-1000" ,GAME_NOT_WORKING)
src/mess/drivers/partner.c
r5743r5744
144144   CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED
145145};
146146
147static FLOPPY_OPTIONS_START(partner)
148   FLOPPY_OPTION(partner, "cpm", "Partner disk image", basicdsk_identify_default, basicdsk_construct_default,
149      HEADS([2])
150      TRACKS([80])
151      SECTORS([5])
152      SECTOR_LENGTH([1024])
153      FIRST_SECTOR_ID([1]))
154FLOPPY_OPTIONS_END
147155
156static const floppy_config partner_floppy_config =
157{
158   FLOPPY_DRIVE_DS_80,
159   FLOPPY_OPTIONS_NAME(partner)
160};
161
148162static MACHINE_DRIVER_START( partner )
149163    /* basic machine hardware */
150164    MDRV_CPU_ADD("maincpu", 8080, XTAL_16MHz / 9)
r5743r5744
178192   MDRV_CASSETTE_ADD( "cassette", partner_cassette_config )
179193   
180194   MDRV_WD1793_ADD("wd1793", partner_wd17xx_interface )
195   
196   MDRV_FLOPPY_2_DRIVES_ADD(partner_floppy_config)
181197MACHINE_DRIVER_END
182198
183static FLOPPY_OPTIONS_START(partner)
184   FLOPPY_OPTION(partner, "cpm", "Partner disk image", basicdsk_identify_default, basicdsk_construct_default,
185      HEADS([2])
186      TRACKS([80])
187      SECTORS([5])
188      SECTOR_LENGTH([1024])
189      FIRST_SECTOR_ID([1]))
190FLOPPY_OPTIONS_END
191
192static void partner_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
193{
194   /* floppy */
195   switch(state)
196   {
197      /* --- the following bits of info are returned as 64-bit signed integers --- */
198      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
199
200      /* --- the following bits of info are returned as pointers to data or functions --- */
201      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_partner; break;
202
203      default:                              floppy_device_getinfo(devclass, state, info); break;
204   }
205}
206
207199/* ROM definition */
208200ROM_START( partner )
209201   ROM_REGION( 0x1A000, "maincpu", ROMREGION_ERASEFF )
r5743r5744
218210
219211static SYSTEM_CONFIG_START(partner)
220212   CONFIG_RAM_DEFAULT(64 * 1024)
221   CONFIG_DEVICE(partner_floppy_getinfo);
222213SYSTEM_CONFIG_END
223214
224215/* Driver */
src/mess/drivers/tmc2000e.c
r5743r5744
299299   NULL,
300300   CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED
301301};
302static FLOPPY_OPTIONS_START(tmc2000e)
303   // dsk
304FLOPPY_OPTIONS_END
302305
306static const floppy_config tmc2000e_floppy_config =
307{
308   FLOPPY_DRIVE_DS_80,
309   FLOPPY_OPTIONS_NAME(tmc2000e)
310};
311
303312static MACHINE_DRIVER_START( tmc2000e )
304313   MDRV_DRIVER_DATA(tmc2000e_state)
305314
r5743r5744
328337   /* devices */
329338   MDRV_PRINTER_ADD("printer")
330339   MDRV_CASSETTE_ADD("cassette", tmc2000_cassette_config)
340   
341   MDRV_FLOPPY_4_DRIVES_ADD(tmc2000e_floppy_config)   
331342MACHINE_DRIVER_END
332343
333344/* ROMs */
r5743r5744
341352ROM_END
342353
343354/* System Configuration */
344static FLOPPY_OPTIONS_START(tmc2000e)
345   // dsk
346FLOPPY_OPTIONS_END
347
348static void tmc2000e_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
349{
350   /* floppy */
351   switch(state)
352   {
353      /* --- the following bits of info are returned as 64-bit signed integers --- */
354      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
355
356      /* --- the following bits of info are returned as pointers to data or functions --- */
357      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_tmc2000e; break;
358
359      default:                              floppy_device_getinfo(devclass, state, info); break;
360   }
361}
362
363355static SYSTEM_CONFIG_START( tmc2000e )
364356   CONFIG_RAM_DEFAULT   ( 8 * 1024)
365357   CONFIG_RAM         (40 * 1024)
366   CONFIG_DEVICE(tmc2000e_floppy_getinfo)
367358SYSTEM_CONFIG_END
368359
369360//    YEAR  NAME      PARENT   COMPAT   MACHINE   INPUT     INIT    CONFIG    COMPANY        FULLNAME
src/mess/drivers/bebox.c
r5743r5744
103103   AM_IMPORT_FROM(bebox_mem)
104104ADDRESS_MAP_END
105105
106static const floppy_config bebox_floppy_config =
107{
108   FLOPPY_DRIVE_DS_80,
109   FLOPPY_OPTIONS_NAME(pc)
110};
106111
107112static MACHINE_DRIVER_START( bebox )
108113   /* basic machine hardware */
r5743r5744
155160   MDRV_PCI_BUS_DEVICE(1, NULL, cirrus5430_pci_read, cirrus5430_pci_write)
156161   /*MDRV_PCI_BUS_DEVICE(12, NULL, scsi53c810_pci_read, scsi53c810_pci_write)*/
157162
158   MDRV_SMC37C78_ADD("smc37c78", pc_fdc_nec765_connected_interface)
163   MDRV_SMC37C78_ADD("smc37c78", pc_fdc_nec765_connected_1_drive_interface)
164   
165   MDRV_FLOPPY_DRIVE_ADD(FLOPPY_0, bebox_floppy_config)
159166MACHINE_DRIVER_END
160167
161168static MACHINE_DRIVER_START( bebox2 )
r5743r5744
182189   ROM_LOAD( "bootnub.rom", 0x000000, 0x4000, CRC(5348d09a) SHA1(1b637a3d7a2b072aa128dd5c037bbb440d525c1a) )
183190ROM_END
184191
185static void bebox_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
186{
187   /* floppy */
188   switch(state)
189   {
190      /* --- the following bits of info are returned as 64-bit signed integers --- */
191      case MESS_DEVINFO_INT_COUNT:                     info->i = 1; break;
192
193      /* --- the following bits of info are returned as pointers to data or functions --- */
194      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_pc; break;
195
196      default:         floppy_device_getinfo(devclass, state, info); break;
197   }
198}
199
200
201192static SYSTEM_CONFIG_START(bebox)
202193   CONFIG_RAM(8 * 1024 * 1024)
203194   CONFIG_RAM(16 * 1024 * 1024)
204195   CONFIG_RAM_DEFAULT(32 * 1024 * 1024)
205   CONFIG_DEVICE(bebox_floppy_getinfo)
206196SYSTEM_CONFIG_END
207197
208198
src/mess/drivers/elwro800.c
r5743r5744
4848   DEVCB_NULL,
4949   NULL,
5050   NULL,
51   NEC765_RDY_PIN_CONNECTED
51   NEC765_RDY_PIN_CONNECTED,
52   {FLOPPY_0,FLOPPY_1, NULL, NULL}
5253};
5354
5455static WRITE8_HANDLER(elwro800jr_fdc_control_w)
5556{
5657   const device_config *fdc = devtag_get_device(space->machine, "nec765");
5758
58   floppy_drive_set_motor_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 0), (data & 0x01));
59   floppy_drive_set_motor_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 1), (data & 0x02));
60   floppy_drive_set_ready_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 0), 1,1);
61   floppy_drive_set_ready_state(image_from_devtype_and_index(space->machine, IO_FLOPPY, 1), 1,1);
59   floppy_drive_set_motor_state(floppy_get_device(space->machine, 0), (data & 0x01));
60   floppy_drive_set_motor_state(floppy_get_device(space->machine, 1), (data & 0x02));
61   floppy_drive_set_ready_state(floppy_get_device(space->machine, 0), 1,1);
62   floppy_drive_set_ready_state(floppy_get_device(space->machine, 1), 1,1);
6263
6364   nec765_tc_w(fdc, data & 0x04);
6465
r5743r5744
473474   cpu_set_input_line(device, 0, HOLD_LINE);
474475}
475476
477static const floppy_config elwro800jr_floppy_config =
478{
479   FLOPPY_DRIVE_SS_40,
480   FLOPPY_OPTIONS_NAME(dsk)
481};
482
476483static MACHINE_DRIVER_START( elwro800 )
477484    /* basic machine hardware */
478485    MDRV_CPU_ADD("maincpu",Z80, 3500000)   /* 3.5 MHz */
r5743r5744
512519   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
513520
514521   MDRV_CASSETTE_ADD( "cassette", elwro800jr_cassette_config )
515
522   
523   MDRV_FLOPPY_2_DRIVES_ADD(elwro800jr_floppy_config)
516524MACHINE_DRIVER_END
517525
518static void elwro800jr_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
519{
520   /* floppy */
521   switch(state)
522   {
523      /* --- the following bits of info are returned as 64-bit signed integers --- */
524      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
525
526      /* --- the following bits of info are returned as pointers to data or functions --- */
527      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_dsk; break;
528
529      default:                              floppy_device_getinfo(devclass, state, info); break;
530   }
531}
532
533
534526static SYSTEM_CONFIG_START(elwro800)
535   CONFIG_RAM_DEFAULT(64 * 1024)
536   CONFIG_DEVICE(elwro800jr_floppy_getinfo)
527   CONFIG_RAM_DEFAULT(64 * 1024)   
537528SYSTEM_CONFIG_END
538529
539530/*************************************
src/mess/drivers/special.c
r5743r5744
395395};
396396
397397
398static FLOPPY_OPTIONS_START(specimx)
399   FLOPPY_OPTION(specimx, "odi,img", "Specialist MX disk image", basicdsk_identify_default, basicdsk_construct_default,
400      HEADS([2])
401      TRACKS([80])
402      SECTORS([5])
403      SECTOR_LENGTH([1024])
404      FIRST_SECTOR_ID([1]))
405FLOPPY_OPTIONS_END
406
407static const floppy_config specimx_floppy_config =
408{
409   FLOPPY_DRIVE_DS_80,
410   FLOPPY_OPTIONS_NAME(specimx)
411};
412
398413/* Machine driver */
399414static MACHINE_DRIVER_START( special )
400415    /* basic machine hardware */
r5743r5744
427442   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
428443
429444   MDRV_CASSETTE_ADD( "cassette", special_cassette_config )
445     
430446MACHINE_DRIVER_END
431447
432448static MACHINE_DRIVER_START( specialp )
r5743r5744
462478   MDRV_SOUND_ADD("custom", SPECIMX, 0)
463479   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
464480     
465   MDRV_WD1793_ADD("wd1793", default_wd17xx_interface )   
481   MDRV_WD1793_ADD("wd1793", default_wd17xx_interface_2_drives )
482   
483   MDRV_FLOPPY_2_DRIVES_ADD(specimx_floppy_config)
466484MACHINE_DRIVER_END
467485
468486static MACHINE_DRIVER_START( erik )
r5743r5744
496514
497515   MDRV_CASSETTE_ADD( "cassette", special_cassette_config )
498516   
499   MDRV_WD1793_ADD("wd1793", default_wd17xx_interface )   
517   MDRV_WD1793_ADD("wd1793", default_wd17xx_interface_2_drives )   
518   
519   MDRV_FLOPPY_2_DRIVES_ADD(specimx_floppy_config)
500520MACHINE_DRIVER_END
501521
502522/* ROM definition */
r5743r5744
538558    ROM_LOAD( "erik.bin", 0x10000, 0x10000, CRC(6F3208F4) SHA1(41f6e2763ef60d3c7214c98893e580d25346fa2d))
539559ROM_END
540560
541static FLOPPY_OPTIONS_START(specimx)
542   FLOPPY_OPTION(specimx, "odi,img", "Specialist MX disk image", basicdsk_identify_default, basicdsk_construct_default,
543      HEADS([2])
544      TRACKS([80])
545      SECTORS([5])
546      SECTOR_LENGTH([1024])
547      FIRST_SECTOR_ID([1]))
548FLOPPY_OPTIONS_END
549
550static void specimx_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
551{
552   /* floppy */
553   switch(state)
554   {
555      /* --- the following bits of info are returned as 64-bit signed integers --- */
556      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
557
558      /* --- the following bits of info are returned as pointers to data or functions --- */
559      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_specimx; break;
560
561      default:                              floppy_device_getinfo(devclass, state, info); break;
562   }
563}
564
565561static SYSTEM_CONFIG_START(specimx)
566562    CONFIG_RAM_DEFAULT(128 * 1024)
567   CONFIG_DEVICE(specimx_floppy_getinfo);
568563SYSTEM_CONFIG_END
569564
570565static SYSTEM_CONFIG_START(erik)
571566    CONFIG_RAM_DEFAULT(192 * 1024)
572   CONFIG_DEVICE(specimx_floppy_getinfo);
573567SYSTEM_CONFIG_END
574568
575569/* Driver */
src/mess/drivers/pyl601.c
r5743r5744
147147
148148INLINE const device_config *get_floppy_image(running_machine *machine, int drive)
149149{
150   return image_from_devtype_and_index(machine, IO_FLOPPY, drive);
150   return floppy_get_device(machine, drive);
151151}
152152
153153static NEC765_GET_IMAGE( pyldin_nec765_get_image )
r5743r5744
184184   DEVCB_NULL,                  /* interrupt */
185185   NULL,                  /* DMA request */
186186   pyldin_nec765_get_image,   /* image lookup */
187   NEC765_RDY_PIN_CONNECTED   /* ready pin */
187   NEC765_RDY_PIN_CONNECTED,   /* ready pin */
188   {FLOPPY_0,FLOPPY_1, NULL, NULL}
188189};
189190
190191static ADDRESS_MAP_START(pyl601_mem, ADDRESS_SPACE_PROGRAM, 8)
r5743r5744
461462   cpu_set_input_line(device, 0, HOLD_LINE);
462463}
463464
465static FLOPPY_OPTIONS_START(pyldin)
466   FLOPPY_OPTION(pyldin, "img", "Pyldin disk image", basicdsk_identify_default, basicdsk_construct_default,
467      HEADS([2])
468      TRACKS([80])
469      SECTORS([9])
470      SECTOR_LENGTH([512])
471      FIRST_SECTOR_ID([1]))
472FLOPPY_OPTIONS_END
473
474static const floppy_config pyldin_floppy_config =
475{
476   FLOPPY_DRIVE_DS_80,
477   FLOPPY_OPTIONS_NAME(pyldin)
478};
479
464480static MACHINE_DRIVER_START( pyl601 )
465481   /* basic machine hardware */
466482   MDRV_CPU_ADD("maincpu",M6800, XTAL_1MHz)
r5743r5744
485501   MDRV_VIDEO_UPDATE( pyl601 )   
486502   
487503   MDRV_NEC765A_ADD("nec765", pyldin_nec765_interface)
504   
505   MDRV_FLOPPY_2_DRIVES_ADD(pyldin_floppy_config)
488506MACHINE_DRIVER_END
489507
490508static MACHINE_DRIVER_START( pyl601a )
r5743r5744
494512   MDRV_MC6845_ADD("crtc", MC6845, XTAL_2MHz, pyl601a_crtc6845_interface)
495513MACHINE_DRIVER_END
496514
497static FLOPPY_OPTIONS_START(pyldin)
498   FLOPPY_OPTION(pyldin, "img", "Pyldin disk image", basicdsk_identify_default, basicdsk_construct_default,
499      HEADS([2])
500      TRACKS([80])
501      SECTORS([9])
502      SECTOR_LENGTH([512])
503      FIRST_SECTOR_ID([1]))
504FLOPPY_OPTIONS_END
505
506static void pyldin_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
507{
508   /* floppy */
509   switch(state)
510   {
511      /* --- the following bits of info are returned as 64-bit signed integers --- */
512      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
513
514      /* --- the following bits of info are returned as pointers to data or functions --- */
515      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_pyldin; break;
516
517      default:                              floppy_device_getinfo(devclass, state, info); break;
518   }
519}
520
521515static SYSTEM_CONFIG_START(pyl601)
522516   CONFIG_RAM_DEFAULT((64 +512) * 1024)
523   CONFIG_DEVICE( pyldin_floppy_getinfo )
524517SYSTEM_CONFIG_END
525518
526519/* ROM definition */
src/mess/drivers/apple2.c
r5743r5744
556556   AY8910_DEFAULT_LOADS,
557557   DEVCB_NULL
558558};
559/*
560static void apple2_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
561{
562   switch(state)
563   {
564      case MESS_DEVINFO_INT_APPLE525_SPINFRACT_DIVIDEND:   info->i = 15; break;
565      case MESS_DEVINFO_INT_APPLE525_SPINFRACT_DIVISOR:   info->i = 16; break;
559566
567      case MESS_DEVINFO_STR_NAME+0:                  strcpy(info->s = device_temp_str(), "slot6disk1"); break;
568      case MESS_DEVINFO_STR_NAME+1:                  strcpy(info->s = device_temp_str(), "slot6disk2"); break;
569      case MESS_DEVINFO_STR_SHORT_NAME+0:               strcpy(info->s = device_temp_str(), "s6d1"); break;
570      case MESS_DEVINFO_STR_SHORT_NAME+1:               strcpy(info->s = device_temp_str(), "s6d2"); break;
571      case MESS_DEVINFO_STR_DESCRIPTION+0:               strcpy(info->s = device_temp_str(), "Slot 6 Disk #1"); break;
572      case MESS_DEVINFO_STR_DESCRIPTION+1:               strcpy(info->s = device_temp_str(), "Slot 6 Disk #2"); break;
573
574      default:                              apple525_device_getinfo(devclass, state, info); break;
575   }
576}
577*/
578static const floppy_config apple2_floppy_config =
579{
580   FLOPPY_DRIVE_DS_80,
581   FLOPPY_OPTIONS_NAME(apple2)
582};
583
560584static MACHINE_DRIVER_START( apple2_common )
561585   /* basic machine hardware */
562586   MDRV_CPU_ADD("maincpu", M6502, 1021800)      /* close to actual CPU frequency of 1.020484 MHz */
r5743r5744
598622   MDRV_APPLE2_SLOT_ADD(0, "langcard", apple2_langcard_r, apple2_langcard_w)
599623   MDRV_APPLE2_SLOT_ADD(4, "mockingboard", mockingboard_r, mockingboard_w)
600624   MDRV_APPLE2_SLOT_ADD(6, "fdc", applefdc_r, applefdc_w)
625   
626   MDRV_FLOPPY_APPLE_2_DRIVES_ADD(apple2_floppy_config)
601627MACHINE_DRIVER_END
602628
603629static MACHINE_DRIVER_START( apple2 )
r5743r5744
895921   ROM_LOAD ( "341-0027-a.rom", 0x4500, 0x0100, CRC(ce7144f6) SHA1(d4181c9f046aafc3fb326b381baac809d9e38d16)) /* Disk II ROM - DOS 3.3 version */
896922ROM_END
897923
898static void apple2_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
899{
900   /* floppy */
901   switch(state)
902   {
903      /* --- the following bits of info are returned as 64-bit signed integers --- */
904      case MESS_DEVINFO_INT_APPLE525_SPINFRACT_DIVIDEND:   info->i = 15; break;
905      case MESS_DEVINFO_INT_APPLE525_SPINFRACT_DIVISOR:   info->i = 16; break;
906
907      /* --- the following bits of info are returned as NULL-terminated strings --- */
908      case MESS_DEVINFO_STR_NAME+0:                  strcpy(info->s = device_temp_str(), "slot6disk1"); break;
909      case MESS_DEVINFO_STR_NAME+1:                  strcpy(info->s = device_temp_str(), "slot6disk2"); break;
910      case MESS_DEVINFO_STR_SHORT_NAME+0:               strcpy(info->s = device_temp_str(), "s6d1"); break;
911      case MESS_DEVINFO_STR_SHORT_NAME+1:               strcpy(info->s = device_temp_str(), "s6d2"); break;
912      case MESS_DEVINFO_STR_DESCRIPTION+0:               strcpy(info->s = device_temp_str(), "Slot 6 Disk #1"); break;
913      case MESS_DEVINFO_STR_DESCRIPTION+1:               strcpy(info->s = device_temp_str(), "Slot 6 Disk #2"); break;
914
915      default:                              apple525_device_getinfo(devclass, state, info); break;
916   }
917}
918
919static SYSTEM_CONFIG_START(apple2_common)
920   CONFIG_DEVICE(apple2_floppy_getinfo)
921SYSTEM_CONFIG_END
922
923924static SYSTEM_CONFIG_START(apple2)
924   CONFIG_IMPORT_FROM( apple2_common )
925925   CONFIG_RAM            (4  * 1024)
926926   CONFIG_RAM            (8  * 1024)
927927   CONFIG_RAM            (12 * 1024)
r5743r5744
937937SYSTEM_CONFIG_END
938938
939939static SYSTEM_CONFIG_START(apple2p)
940   CONFIG_IMPORT_FROM( apple2_common )
941940   CONFIG_RAM            (16 * 1024)
942941   CONFIG_RAM            (32 * 1024)
943942   CONFIG_RAM            (48 * 1024)
r5743r5744
947946SYSTEM_CONFIG_END
948947
949948static SYSTEM_CONFIG_START(apple2e)
950   CONFIG_IMPORT_FROM( apple2_common )
951949   CONFIG_RAM            (64  * 1024)
952950   CONFIG_RAM_DEFAULT      (128 * 1024)
953951SYSTEM_CONFIG_END
954952
955953static SYSTEM_CONFIG_START(mprof3)
956   CONFIG_IMPORT_FROM( apple2_common )
957954   CONFIG_RAM_DEFAULT      (128 * 1024)
958955SYSTEM_CONFIG_END
959956
src/mess/drivers/xerox820.c
r5743r5744
3939
4040INLINE const device_config *get_floppy_image(running_machine *machine, int drive)
4141{
42   return image_from_devtype_and_index(machine, IO_FLOPPY, drive);
42   return floppy_get_device(machine, drive);
4343}
4444
4545/* Keyboard HACK */
r5743r5744
519519static const wd17xx_interface wd1771_intf =
520520{
521521   wd1771_callback,
522   NULL
522   NULL,
523   {FLOPPY_0,FLOPPY_1,NULL,NULL}
523524};
524525
525526/* COM8116 Interface */
r5743r5744
650651   
651652   for(drive=0;drive<2;drive++)
652653   {
653      floppy_install_load_proc(image_from_devtype_and_index(machine, IO_FLOPPY, drive), xerox820_load_proc);
654      floppy_install_load_proc(floppy_get_device(machine, drive), xerox820_load_proc);
654655   }
655656
656657
r5743r5744
667668   state_save_register_global(machine, state->dsdd);
668669}
669670
671FLOPPY_OPTIONS_START(xerox820 )
672   FLOPPY_OPTION( sssd8, "dsk", "8\" SSSD", basicdsk_identify_default, basicdsk_construct_default,
673      HEADS([1])
674      TRACKS([77])
675      SECTORS([26])
676      SECTOR_LENGTH([128])
677      FIRST_SECTOR_ID([1]))   
678   FLOPPY_OPTION( ssdd8, "dsk", "8\" SSDD", basicdsk_identify_default, basicdsk_construct_default,
679      HEADS([1])
680      TRACKS([77])
681      SECTORS([26])
682      SECTOR_LENGTH([256])
683      FIRST_SECTOR_ID([1]))
684   FLOPPY_OPTION( sssd5, "dsk", "5.25\" SSSD", basicdsk_identify_default, basicdsk_construct_default,
685      HEADS([1])
686      TRACKS([40])
687      SECTORS([18])
688      SECTOR_LENGTH([128])
689      FIRST_SECTOR_ID([1]))               
690   FLOPPY_OPTION( ssdd5, "dsk", "5.25\" SSDD", basicdsk_identify_default, basicdsk_construct_default,
691      HEADS([2])
692      TRACKS([40])
693      SECTORS([18])
694      SECTOR_LENGTH([128])
695      FIRST_SECTOR_ID([1]))               
696FLOPPY_OPTIONS_END
697
698static const floppy_config xerox820_floppy_config =
699{
700   FLOPPY_DRIVE_DS_80,
701   FLOPPY_OPTIONS_NAME(xerox820)
702};
703
670704/* Machine Drivers */
671705
672706static MACHINE_DRIVER_START( xerox820 )
r5743r5744
701735   MDRV_Z80PIO_ADD(Z80GPPIO_TAG, gppio_intf)
702736   MDRV_Z80CTC_ADD(Z80CTC_TAG, XTAL_20MHz/8, ctc_intf)
703737   MDRV_WD1771_ADD(WD1771_TAG, wd1771_intf)
738   MDRV_FLOPPY_2_DRIVES_ADD(xerox820_floppy_config)   
704739   MDRV_COM8116_ADD(COM8116_TAG, XTAL_5_0688MHz, com8116_intf)
705740MACHINE_DRIVER_END
706741
r5743r5744
746781ROM_END
747782
748783/* System Configuration */
749FLOPPY_OPTIONS_START(xerox820 )
750   FLOPPY_OPTION( sssd8, "dsk", "8\" SSSD", basicdsk_identify_default, basicdsk_construct_default,
751      HEADS([1])
752      TRACKS([77])
753      SECTORS([26])
754      SECTOR_LENGTH([128])
755      FIRST_SECTOR_ID([1]))   
756   FLOPPY_OPTION( ssdd8, "dsk", "8\" SSDD", basicdsk_identify_default, basicdsk_construct_default,
757      HEADS([1])
758      TRACKS([77])
759      SECTORS([26])
760      SECTOR_LENGTH([256])
761      FIRST_SECTOR_ID([1]))
762   FLOPPY_OPTION( sssd5, "dsk", "5.25\" SSSD", basicdsk_identify_default, basicdsk_construct_default,
763      HEADS([1])
764      TRACKS([40])
765      SECTORS([18])
766      SECTOR_LENGTH([128])
767      FIRST_SECTOR_ID([1]))               
768   FLOPPY_OPTION( ssdd5, "dsk", "5.25\" SSDD", basicdsk_identify_default, basicdsk_construct_default,
769      HEADS([2])
770      TRACKS([40])
771      SECTORS([18])
772      SECTOR_LENGTH([128])
773      FIRST_SECTOR_ID([1]))               
774FLOPPY_OPTIONS_END
775
776static void xerox820_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
777{
778   /* floppy */
779   switch(state)
780   {
781      /* --- the following bits of info are returned as 64-bit signed integers --- */
782      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
783
784      /* --- the following bits of info are returned as pointers to data or functions --- */
785      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_xerox820; break;
786
787      default:                              floppy_device_getinfo(devclass, state, info); break;
788   }
789}
790
791784static SYSTEM_CONFIG_START( xerox820 )
792   CONFIG_RAM_DEFAULT   (64 * 1024)
793   CONFIG_DEVICE(xerox820_floppy_getinfo)
785   CONFIG_RAM_DEFAULT   (64 * 1024)   
794786SYSTEM_CONFIG_END
795787/*
796788static SYSTEM_CONFIG_START( xerox820ii )
src/mess/drivers/ti99_4p.c
r5743r5744
231231    b) this is a 2-level output (whereas a DAC provides a 256-level output...)
232232*/
233233
234
235
234static const floppy_config ti99_4p_floppy_config =
235{
236   FLOPPY_DRIVE_DS_80,
237   FLOPPY_OPTIONS_NAME(ti99)
238};
236239/*
237240    machine description.
238241*/
r5743r5744
285288   MDRV_TMS9901_ADD("tms9901", tms9901reset_param_ti99_4x)   
286289   /* tms9902 */
287290   MDRV_TMS9902_ADD("tms9902_0", tms9902_params_0)
288   MDRV_TMS9902_ADD("tms9902_1", tms9902_params_1)   
291   MDRV_TMS9902_ADD("tms9902_1", tms9902_params_1)
292
293   MDRV_FLOPPY_4_DRIVES_ADD(ti99_4p_floppy_config)   
289294MACHINE_DRIVER_END
290295
291296
r5743r5744
314319   ROM_LOAD_OPTIONAL("spchrom.bin", 0x0000, 0x8000, CRC(58b155f7) SHA1(382292295c00dff348d7e17c5ce4da12a1d87763)) /* system speech ROM */
315320ROM_END
316321
317static void ti99_4p_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
318{
319   /* floppy */
320   switch(state)
321   {
322      /* --- the following bits of info are returned as 64-bit signed integers --- */
323      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
324
325      /* --- the following bits of info are returned as pointers to data or functions --- */
326      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_ti99; break;
327
328      default:                              floppy_device_getinfo(devclass, state, info); break;
329   }
330}
331
332322static void ti99_4p_parallel_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
333323{
334324   /* parallel */
r5743r5744
415405}
416406
417407static SYSTEM_CONFIG_START(ti99_4p)
418   CONFIG_DEVICE(ti99_4p_floppy_getinfo)
419   CONFIG_DEVICE(ti99_4p_floppy_getinfo)
420408   CONFIG_DEVICE(ti99_4p_parallel_getinfo)
421409   CONFIG_DEVICE(ti99_4p_serial_getinfo)
422410   /*CONFIG_DEVICE(ti99_4p_quickload_getinfo)*/
src/mess/drivers/pc.c
r5743r5744
15021502   CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED
15031503};
15041504
1505static const floppy_config ibmpc_floppy_config =
1506{
1507   FLOPPY_DRIVE_DS_80,
1508   FLOPPY_OPTIONS_NAME(pc)
1509};
15051510
15061511static MACHINE_DRIVER_START( ibm5150 )
15071512   /* basic machine hardware */
r5743r5744
15611566   MDRV_CASSETTE_ADD( "cassette", ibm5150_cassette_config )
15621567
15631568   MDRV_NEC765A_ADD("nec765", pc_fdc_nec765_not_connected_interface)
1569   
1570   MDRV_FLOPPY_2_DRIVES_ADD(ibmpc_floppy_config)
15641571MACHINE_DRIVER_END
15651572
15661573
r5743r5744
16171624   MDRV_IMPORT_FROM( pc_hdc )
16181625
16191626   MDRV_NEC765A_ADD("nec765", pc_fdc_nec765_not_connected_interface)
1627   
1628   MDRV_FLOPPY_2_DRIVES_ADD(ibmpc_floppy_config)
16201629MACHINE_DRIVER_END
16211630
16221631
r5743r5744
16641673   MDRV_IMPORT_FROM( pc_hdc )
16651674
16661675   MDRV_NEC765A_ADD("nec765", pc_fdc_nec765_not_connected_interface)
1676   
1677   MDRV_FLOPPY_2_DRIVES_ADD(ibmpc_floppy_config)
16671678MACHINE_DRIVER_END
16681679
16691680
r5743r5744
17181729   MDRV_IMPORT_FROM( pc_hdc )
17191730
17201731   MDRV_NEC765A_ADD("nec765", pc_fdc_nec765_not_connected_interface)
1732   
1733   MDRV_FLOPPY_2_DRIVES_ADD(ibmpc_floppy_config)
17211734MACHINE_DRIVER_END
17221735
17231736
r5743r5744
17581771   MDRV_IMPORT_FROM( pc_hdc )
17591772
17601773   MDRV_NEC765A_ADD("nec765", pc_fdc_nec765_not_connected_interface)
1774   
1775   MDRV_FLOPPY_2_DRIVES_ADD(ibmpc_floppy_config)
17611776MACHINE_DRIVER_END
17621777
17631778
r5743r5744
18001815   MDRV_IMPORT_FROM( pc_hdc )
18011816
18021817   MDRV_NEC765A_ADD("nec765", pc_fdc_nec765_not_connected_interface)
1818   
1819   MDRV_FLOPPY_2_DRIVES_ADD(ibmpc_floppy_config)
18031820MACHINE_DRIVER_END
18041821
18051822
r5743r5744
18421859   MDRV_IMPORT_FROM( pc_hdc )
18431860
18441861   MDRV_NEC765A_ADD("nec765", pc_fdc_nec765_not_connected_interface)
1862   
1863   MDRV_FLOPPY_2_DRIVES_ADD(ibmpc_floppy_config)
18451864MACHINE_DRIVER_END
18461865
18471866
r5743r5744
18961915   MDRV_IMPORT_FROM( pc_hdc )
18971916
18981917   MDRV_NEC765A_ADD("nec765", pc_fdc_nec765_not_connected_interface)
1918   
1919   MDRV_FLOPPY_2_DRIVES_ADD(ibmpc_floppy_config)
18991920MACHINE_DRIVER_END
19001921
19011922
r5743r5744
19381959   MDRV_IMPORT_FROM( pc_hdc )
19391960
19401961   MDRV_NEC765A_ADD("nec765", pc_fdc_nec765_not_connected_interface)
1962   
1963   MDRV_FLOPPY_2_DRIVES_ADD(ibmpc_floppy_config)
19411964MACHINE_DRIVER_END
19421965
19431966
r5743r5744
19802003   MDRV_IMPORT_FROM( pc_hdc )
19812004
19822005   MDRV_NEC765A_ADD("nec765", pc_fdc_nec765_not_connected_interface)
2006   
2007   MDRV_FLOPPY_2_DRIVES_ADD(ibmpc_floppy_config)
19832008MACHINE_DRIVER_END
19842009
19852010
r5743r5744
20212046
20222047   MDRV_NEC765A_ADD("nec765", pc_fdc_nec765_not_connected_interface)
20232048
2049   MDRV_FLOPPY_2_DRIVES_ADD(ibmpc_floppy_config)
2050   
20242051   /* cartridge */
20252052   MDRV_CARTSLOT_ADD("cart1")
20262053   MDRV_CARTSLOT_EXTENSION_LIST("jrc")
r5743r5744
26032630   ROM_LOAD("14166.bin", 0x0000, 0x2000, CRC(1aea1b53) SHA1(b75b6d4509036406052157bc34159f7039cdc72e))
26042631ROM_END
26052632
2606
2607static void ibmpc_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
2608{
2609   /* floppy */
2610   switch(state)
2611   {
2612      /* --- the following bits of info are returned as 64-bit signed integers --- */
2613      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
2614
2615      /* --- the following bits of info are returned as pointers to data or functions --- */
2616      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_pc; break;
2617
2618      default:                              floppy_device_getinfo(devclass, state, info); break;
2619   }
2620}
2621
26222633static SYSTEM_CONFIG_START(ibm5150)
26232634   CONFIG_RAM_DEFAULT( 640 * 1024 )
2624   CONFIG_DEVICE(ibmpc_floppy_getinfo)
26252635SYSTEM_CONFIG_END
26262636
2627
26282637static SYSTEM_CONFIG_START(ibm5160)
26292638   CONFIG_RAM_DEFAULT( 640 * 1024 )
2630   CONFIG_DEVICE(ibmpc_floppy_getinfo)
26312639SYSTEM_CONFIG_END
26322640
2633
26342641static SYSTEM_CONFIG_START(pcjr)
26352642//   CONFIG_RAM( 128 * 1024 )
26362643   CONFIG_RAM_DEFAULT( 640 * 1024 )
26372644//   CONFIG_RAM( 768 * 1024 )
2638   CONFIG_DEVICE(ibmpc_floppy_getinfo)
26392645SYSTEM_CONFIG_END
26402646
26412647/***************************************************************************
src/mess/drivers/ti99_4x.c
r5743r5744
514514   0   /*  first day of week */
515515};
516516
517
518static const floppy_config ti99_4_floppy_config =
519{
520   FLOPPY_DRIVE_DS_80,
521   FLOPPY_OPTIONS_NAME(ti99)
522};
523
517524static MACHINE_DRIVER_START(ti99_4_60hz)
518525   /* basic machine hardware */
519526   /* TMS9900 CPU @ 3.0 MHz */
r5743r5744
563570   
564571   MDRV_WD179X_ADD("wd179x", ti99_wd17xx_interface )
565572   
573   MDRV_FLOPPY_4_DRIVES_ADD(ti99_4_floppy_config)   
574   
566575   MDRV_TI99_CARTRIDGE_ADD("ti99_multicart")
567576   
568577MACHINE_DRIVER_END
r5743r5744
613622   MDRV_TMS9902_ADD("tms9902_1", tms9902_params_1)     
614623   
615624   MDRV_WD179X_ADD("wd179x", ti99_wd17xx_interface )
625   MDRV_FLOPPY_4_DRIVES_ADD(ti99_4_floppy_config)   
626   
616627   MDRV_TI99_CARTRIDGE_ADD("ti99_multicart")
617628   
618629MACHINE_DRIVER_END
r5743r5744
664675   MDRV_TMS9902_ADD("tms9902_1", tms9902_params_1)     
665676   
666677   MDRV_WD179X_ADD("wd179x", ti99_wd17xx_interface )   
678   MDRV_FLOPPY_4_DRIVES_ADD(ti99_4_floppy_config)   
667679   
668680   MDRV_TI99_CARTRIDGE_ADD("ti99_multicart")
669681MACHINE_DRIVER_END
r5743r5744
715727   MDRV_TMS9902_ADD("tms9902_1", tms9902_params_1)   
716728   
717729   MDRV_WD179X_ADD("wd179x", ti99_wd17xx_interface )
730   MDRV_FLOPPY_4_DRIVES_ADD(ti99_4_floppy_config)   
718731   
719732   MDRV_TI99_CARTRIDGE_ADD("ti99_multicart")
720733MACHINE_DRIVER_END
r5743r5744
774787   MDRV_TMS9902_ADD("tms9902_1", tms9902_params_1)
775788   
776789   MDRV_WD179X_ADD("wd179x", ti99_wd17xx_interface )   
790   MDRV_FLOPPY_4_DRIVES_ADD(ti99_4_floppy_config)   
777791   MDRV_TI99_CARTRIDGE_ADD("ti99_multicart")
778792   
779793MACHINE_DRIVER_END
r5743r5744
877891#define rom_ti99_4e rom_ti99_4
878892#define rom_ti99_4ae rom_ti99_4a
879893
880static void ti99_4_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
881{
882   /* floppy */
883   switch(state)
884   {
885      /* --- the following bits of info are returned as 64-bit signed integers --- */
886      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
887
888        case MESS_DEVINFO_INT_KEEP_DRIVE_GEOMETRY:                                  info->i = 1; break;
889      /* --- the following bits of info are returned as pointers to data or functions --- */
890      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_ti99; break;
891
892      default:                              floppy_device_getinfo(devclass, state, info); break;
893   }
894}
895
896894static void ti99_4_parallel_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
897895{
898896   /* parallel */
r5743r5744
979977}     
980978   
981979static SYSTEM_CONFIG_START(ti99_4)   
982   CONFIG_DEVICE(ti99_4_floppy_getinfo)
983980   CONFIG_DEVICE(ti99_4_parallel_getinfo)
984981   CONFIG_DEVICE(ti99_4_serial_getinfo)
985982   /*CONFIG_DEVICE(ti99_4_quickload_getinfo)*/
src/mess/drivers/pk8020.c
r5743r5744
145145   CASSETTE_PLAY
146146};
147147
148static FLOPPY_OPTIONS_START(pk8020)
149   FLOPPY_OPTION(pk8020, "kdi", "PK8020 disk image", basicdsk_identify_default, basicdsk_construct_default,
150      HEADS([2])
151      TRACKS([80])
152      SECTORS([5])
153      SECTOR_LENGTH([1024])
154      FIRST_SECTOR_ID([1]))
155FLOPPY_OPTIONS_END
156
157static const floppy_config pk8020_floppy_config =
158{
159   FLOPPY_DRIVE_DS_80,
160   FLOPPY_OPTIONS_NAME(pk8020)
161};
162
148163/* Machine driver */
149164static MACHINE_DRIVER_START( pk8020 )
150165  /* basic machine hardware */
r5743r5744
188203   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
189204   
190205   MDRV_CASSETTE_ADD( "cassette", pk8020_cassette_config )   
206   
207   MDRV_FLOPPY_4_DRIVES_ADD(pk8020_floppy_config)
191208MACHINE_DRIVER_END
192209
193static FLOPPY_OPTIONS_START(pk8020)
194   FLOPPY_OPTION(pk8020, "kdi", "PK8020 disk image", basicdsk_identify_default, basicdsk_construct_default,
195      HEADS([2])
196      TRACKS([80])
197      SECTORS([5])
198      SECTOR_LENGTH([1024])
199      FIRST_SECTOR_ID([1]))
200FLOPPY_OPTIONS_END
201
202static void pk8020_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
203{
204   /* floppy */
205   switch(state)
206   {
207      /* --- the following bits of info are returned as 64-bit signed integers --- */
208      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
209
210      /* --- the following bits of info are returned as pointers to data or functions --- */
211      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_pk8020; break;
212
213      default:                              floppy_device_getinfo(devclass, state, info); break;
214   }
215}
216
217210/* ROM definition */
218211
219212ROM_START( korvet )
r5743r5744
225218
226219static SYSTEM_CONFIG_START(pk8020)
227220    CONFIG_RAM_DEFAULT((64 + 4*48 + 2) * 1024) // Text video ram is 1KB but it is 9bit, so we take 2 KB for that
228    CONFIG_DEVICE(pk8020_floppy_getinfo);
229221SYSTEM_CONFIG_END
230222
231223/* Driver */
src/mess/drivers/bbc.c
r5743r5744
750750   DEVCB_CPU_INPUT_LINE("maincpu", M6502_IRQ_LINE)
751751};
752752
753static FLOPPY_OPTIONS_START(bbc)
754   FLOPPY_OPTION(bbc, "ssd,bbc,img", "BBC disk image", basicdsk_identify_default, basicdsk_construct_default,
755      HEADS([1])
756      TRACKS([80])
757      SECTORS([10])
758      SECTOR_LENGTH([256])
759      FIRST_SECTOR_ID([0]))
760FLOPPY_OPTIONS_END
753761
762static const floppy_config bbc_floppy_config =
763{
764   FLOPPY_DRIVE_DS_80,
765   FLOPPY_OPTIONS_NAME(bbc)
766};
767
754768static MACHINE_DRIVER_START( bbc_cartslot )
755769   MDRV_CARTSLOT_ADD("cart1")
756770   MDRV_CARTSLOT_EXTENSION_LIST("rom")
r5743r5744
812826   /* devices */
813827   MDRV_UPD7002_ADD("upd7002",BBC_uPD7002)
814828   MDRV_VIA6522_ADD("via6522_0", 1000000, bbcb_system_via)
829   MDRV_FLOPPY_2_DRIVES_ADD(bbc_floppy_config)
815830   MDRV_I8271_ADD("i8271", bbc_i8271_interface)
816831MACHINE_DRIVER_END
817832
818
819833static MACHINE_DRIVER_START( bbcb )
820834   MDRV_IMPORT_FROM( bbca )
821835   MDRV_CPU_MODIFY( "maincpu" )
r5743r5744
827841   MDRV_VIA6522_ADD("via6522_1", 1000000, bbcb_user_via)
828842   MDRV_CENTRONICS_ADD("centronics", bbcb_centronics_config)
829843
830   MDRV_WD177X_ADD("wd177x", bbc_wd17xx_interface )
831
844   MDRV_WD177X_ADD("wd177x", bbc_wd17xx_interface )   
832845   MDRV_IMPORT_FROM(bbc_cartslot)
833846MACHINE_DRIVER_END
834847
r5743r5744
911924   MDRV_UPD7002_ADD("upd7002",BBC_uPD7002)
912925   MDRV_VIA6522_ADD("via6522_0", 1000000, bbcb_system_via)
913926   MDRV_VIA6522_ADD("via6522_1", 1000000, bbcb_user_via)
927   
928   MDRV_FLOPPY_2_DRIVES_ADD(bbc_floppy_config)
914929   MDRV_WD177X_ADD("wd177x", bbc_wd17xx_interface )
915930
916931   MDRV_IMPORT_FROM(bbc_cartslot)
917932MACHINE_DRIVER_END
918933
919static FLOPPY_OPTIONS_START(bbc)
920   FLOPPY_OPTION(bbc, "ssd,bbc,img", "BBC disk image", basicdsk_identify_default, basicdsk_construct_default,
921      HEADS([1])
922      TRACKS([80])
923      SECTORS([10])
924      SECTOR_LENGTH([256])
925      FIRST_SECTOR_ID([0]))
926FLOPPY_OPTIONS_END
927
928static void bbc_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
929{
930   /* floppy */
931   switch(state)
932   {
933      /* --- the following bits of info are returned as 64-bit signed integers --- */
934      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
935
936      /* --- the following bits of info are returned as pointers to data or functions --- */
937      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_bbc; break;
938
939      default:                              floppy_device_getinfo(devclass, state, info); break;
940   }
941}
942
943static SYSTEM_CONFIG_START(bbc)
944   CONFIG_DEVICE(bbc_floppy_getinfo)
945SYSTEM_CONFIG_END
946
947934/*     YEAR  NAME      PARENT    COMPAT MACHINE   INPUT  INIT      CONFIG   COMPANY  FULLNAME */
948935COMP ( 1981, bbca,      0,       0,      bbca,     bbca,   bbc,     0,      "Acorn","BBC Micro Model A" , 0)
949COMP ( 1981, bbcb,     bbca,    0,      bbcb,     bbca,   bbc,      bbc,      "Acorn","BBC Micro Model B" , 0)
950COMP ( 1985, bbcbp,    bbca,    0,      bbcbp,    bbca,   bbc,     bbc,      "Acorn","BBC Micro Model B+ 64K" , 0)
951COMP ( 1985, bbcbp128, bbca,     0,      bbcbp128, bbca,   bbc,     bbc,      "Acorn","BBC Micro Model B+ 128k" , 0)
952COMP ( 198?, bbcm,     bbca,     0,      bbcm,     bbca,   bbcm,    bbc,      "Acorn","BBC Master" , 0)
936COMP ( 1981, bbcb,     bbca,    0,      bbcb,     bbca,   bbc,      0,      "Acorn","BBC Micro Model B" , 0)
937COMP ( 1985, bbcbp,    bbca,    0,      bbcbp,    bbca,   bbc,     0,      "Acorn","BBC Micro Model B+ 64K" , 0)
938COMP ( 1985, bbcbp128, bbca,     0,      bbcbp128, bbca,   bbc,     0,      "Acorn","BBC Micro Model B+ 128k" , 0)
939COMP ( 198?, bbcm,     bbca,     0,      bbcm,     bbca,   bbcm,    0,      "Acorn","BBC Master" , 0)
src/mess/drivers/kc.c
r5743r5744
342342   AM_RANGE(0x0fc, 0x0ff) AM_DEVREADWRITE("z80ctc_1", kc85_disk_hw_ctc_r, kc85_disk_hw_ctc_w)
343343ADDRESS_MAP_END
344344
345
346static FLOPPY_OPTIONS_START(kc85)
347   FLOPPY_OPTION(kc85, "img", "KC85 disk image", basicdsk_identify_default, basicdsk_construct_default,
348      HEADS([2])
349      TRACKS([80])
350      SECTORS([9])
351      SECTOR_LENGTH([512])
352      FIRST_SECTOR_ID([1]))
353FLOPPY_OPTIONS_END
354
355static const floppy_config kc85_floppy_config =
356{
357   FLOPPY_DRIVE_DS_80,
358   FLOPPY_OPTIONS_NAME(kc85)
359};
360
361
345362static MACHINE_DRIVER_START( cpu_kc_disc )
346363   MDRV_CPU_ADD("disc", Z80, 4000000)
347364   MDRV_CPU_PROGRAM_MAP(kc85_disc_hw_mem)
r5743r5744
407424   MDRV_VIDEO_UPDATE( kc85_4 )
408425MACHINE_DRIVER_END
409426
410
411427static MACHINE_DRIVER_START( kc85_4d )
412428   MDRV_IMPORT_FROM( kc85_4 )
413429   MDRV_IMPORT_FROM( cpu_kc_disc )
414430   MDRV_QUANTUM_TIME(HZ(120))
415431   MDRV_MACHINE_RESET( kc85_4d )
432   
433   MDRV_FLOPPY_2_DRIVES_ADD(kc85_floppy_config)
416434MACHINE_DRIVER_END
417435
418436
r5743r5744
483501   CONFIG_RAM_DEFAULT      (64 * 1024)
484502SYSTEM_CONFIG_END
485503
486static FLOPPY_OPTIONS_START(kc85)
487   FLOPPY_OPTION(kc85, "img", "KC85 disk image", basicdsk_identify_default, basicdsk_construct_default,
488      HEADS([2])
489      TRACKS([80])
490      SECTORS([9])
491      SECTOR_LENGTH([512])
492      FIRST_SECTOR_ID([1]))
493FLOPPY_OPTIONS_END
494
495static void kc85d_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
496{
497   /* floppy */
498   switch(state)
499   {
500      /* --- the following bits of info are returned as 64-bit signed integers --- */
501      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
502
503      /* --- the following bits of info are returned as pointers to data or functions --- */
504      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:            info->p = (void *) floppyoptions_kc85; break;
505
506      default:                              floppy_device_getinfo(devclass, state, info); break;
507   }
508}
509
510static SYSTEM_CONFIG_START(kc85d)
511   CONFIG_IMPORT_FROM(kc85)
512   CONFIG_DEVICE(kc85d_floppy_getinfo)
513SYSTEM_CONFIG_END
514
515504/*     YEAR  NAME      PARENT   COMPAT  MACHINE  INPUT     INIT  CONFIG  COMPANY   FULLNAME */
516505COMP( 1987, kc85_2,   0,      0,      kc85_3,  kc85,     0,    kc85,   "VEB Mikroelektronik", "HC900 / KC 85/2", GAME_NOT_WORKING)
517506COMP( 1987, kc85_3,   kc85_2,  0,      kc85_3,  kc85,     0,    kc85,   "VEB Mikroelektronik", "KC 85/3", GAME_NOT_WORKING)
518507COMP( 1989, kc85_4,   kc85_2,  0,      kc85_4,  kc85,     0,    kc85,   "VEB Mikroelektronik", "KC 85/4", GAME_NOT_WORKING)
519COMP( 1989, kc85_4d,  kc85_2,  0,      kc85_4d, kc85,     0,    kc85d,  "VEB Mikroelektronik", "KC 85/4 + Disk Interface Module (D004)", GAME_NOT_WORKING)
508COMP( 1989, kc85_4d,  kc85_2,  0,      kc85_4d, kc85,     0,    kc85,  "VEB Mikroelektronik", "KC 85/4 + Disk Interface Module (D004)", GAME_NOT_WORKING)
520509COMP( 1989, kc85_5,   kc85_2,  0,      kc85_4,  kc85,     0,    kc85,   "VEB Mikroelektronik", "KC 85/5", GAME_NOT_WORKING)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team