Previous 15994 Revisions Next

r5874 Thursday 24th September, 2009 at 10:58:53 UTC by Dirk Best
[EINSTEIN] Made it possible to select single or double sided disk drives.
[src/mess/drivers]einstein.c

src/mess/drivers/einstein.c
r5873r5874
390390   if (BIT(data, 2)) wd17xx_set_drive(device, 2);
391391   if (BIT(data, 3)) wd17xx_set_drive(device, 3);
392392
393   /* bit 4 selects the side */
394   wd17xx_set_side(device, BIT(data, 4));
393   /* double sided drive connected? */
394   if (input_port_read(device->machine, "config") & data)
395   {
396      /* bit 4 selects the side then */
397      wd17xx_set_side(device, BIT(data, 4));
398   }
395399}
396400
397401
r5873r5874
557561static MACHINE_RESET( einstein )
558562{
559563   einstein_state *einstein = machine->driver_data;
564   const device_config *floppy;
565   UINT8 config = input_port_read(machine, "config");
560566
561567   /* save pointers to our devices */
562568   einstein->color_screen = devtag_get_device(machine, "screen");
r5873r5874
576582   einstein->interrupt_mask = 0;
577583
578584   einstein->ctc_trigger = 0;
585
586   /* configure floppy drives */
587   floppy = devtag_get_device(machine, "floppy0");
588   floppy_drive_set_geometry(floppy, config & 0x01 ? FLOPPY_DRIVE_DS_80 : FLOPPY_DRIVE_SS_40);
589   floppy = devtag_get_device(machine, "floppy1");
590   floppy_drive_set_geometry(floppy, config & 0x02 ? FLOPPY_DRIVE_DS_80 : FLOPPY_DRIVE_SS_40);
591   floppy = devtag_get_device(machine, "floppy2");
592   floppy_drive_set_geometry(floppy, config & 0x04 ? FLOPPY_DRIVE_DS_80 : FLOPPY_DRIVE_SS_40);
593   floppy = devtag_get_device(machine, "floppy3");
594   floppy_drive_set_geometry(floppy, config & 0x08 ? FLOPPY_DRIVE_DS_80 : FLOPPY_DRIVE_SS_40);
579595}
580596
581597static MACHINE_RESET( einstein2 )
r5873r5874
775791   /* analog joystick 2 Y axis */
776792   PORT_START("JOY2_Y")
777793   PORT_BIT(0xff, 0x80, IPT_AD_STICK_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_MINMAX(1,0xff) PORT_CODE_DEC(JOYCODE_Y_UP_SWITCH) PORT_CODE_INC(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(2) PORT_REVERSE
794
795   PORT_START("config")
796   PORT_CONFNAME(0x01, 0x00, "Floppy drive #1")
797   PORT_CONFSETTING(0x00, "Single sided")
798   PORT_CONFSETTING(0x01, "Double sided")
799   PORT_CONFNAME(0x02, 0x00, "Floppy drive #2")
800   PORT_CONFSETTING(0x00, "Single sided")
801   PORT_CONFSETTING(0x02, "Double sided")
802   PORT_CONFNAME(0x04, 0x00, "Floppy drive #3")
803   PORT_CONFSETTING(0x00, "Single sided")
804   PORT_CONFSETTING(0x04, "Double sided")
805   PORT_CONFNAME(0x08, 0x00, "Floppy drive #4")
806   PORT_CONFSETTING(0x00, "Single sided")
807   PORT_CONFSETTING(0x08, "Double sided")
778808INPUT_PORTS_END
779809
780810INPUT_PORTS_START( einstein_80col )
r5873r5874
899929
900930   /* uart */
901931   MDRV_MSM8251_ADD(IC_I060, default_msm8251_interface)
902   
932
903933   MDRV_WD1770_ADD(IC_I042, default_wd17xx_interface)
904   
934
905935   MDRV_FLOPPY_4_DRIVES_ADD(einstein_floppy_config)
906936MACHINE_DRIVER_END
907937
r5873r5874
9821012***************************************************************************/
9831013static SYSTEM_CONFIG_START( einstein )
9841014   /* RAM is provided by 8k DRAM ICs i009, i010, i011, i012, i013, i014, i015 and i016 */
985   CONFIG_RAM_DEFAULT(8 * 8 * 1024)   
1015   CONFIG_RAM_DEFAULT(8 * 8 * 1024)
9861016SYSTEM_CONFIG_END
9871017
9881018

Previous 15994 Revisions Next


© 1998-2018 The MESS Team