src/mess/drivers/einstein.c
| r5873 | r5874 | |
| 390 | 390 | if (BIT(data, 2)) wd17xx_set_drive(device, 2); |
| 391 | 391 | if (BIT(data, 3)) wd17xx_set_drive(device, 3); |
| 392 | 392 | |
| 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 | } |
| 395 | 399 | } |
| 396 | 400 | |
| 397 | 401 | |
| r5873 | r5874 | |
| 557 | 561 | static MACHINE_RESET( einstein ) |
| 558 | 562 | { |
| 559 | 563 | einstein_state *einstein = machine->driver_data; |
| 564 | const device_config *floppy; |
| 565 | UINT8 config = input_port_read(machine, "config"); |
| 560 | 566 | |
| 561 | 567 | /* save pointers to our devices */ |
| 562 | 568 | einstein->color_screen = devtag_get_device(machine, "screen"); |
| r5873 | r5874 | |
| 576 | 582 | einstein->interrupt_mask = 0; |
| 577 | 583 | |
| 578 | 584 | 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); |
| 579 | 595 | } |
| 580 | 596 | |
| 581 | 597 | static MACHINE_RESET( einstein2 ) |
| r5873 | r5874 | |
| 775 | 791 | /* analog joystick 2 Y axis */ |
| 776 | 792 | PORT_START("JOY2_Y") |
| 777 | 793 | 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") |
| 778 | 808 | INPUT_PORTS_END |
| 779 | 809 | |
| 780 | 810 | INPUT_PORTS_START( einstein_80col ) |
| r5873 | r5874 | |
| 899 | 929 | |
| 900 | 930 | /* uart */ |
| 901 | 931 | MDRV_MSM8251_ADD(IC_I060, default_msm8251_interface) |
| 902 | | |
| 932 | |
| 903 | 933 | MDRV_WD1770_ADD(IC_I042, default_wd17xx_interface) |
| 904 | | |
| 934 | |
| 905 | 935 | MDRV_FLOPPY_4_DRIVES_ADD(einstein_floppy_config) |
| 906 | 936 | MACHINE_DRIVER_END |
| 907 | 937 | |
| r5873 | r5874 | |
| 982 | 1012 | ***************************************************************************/ |
| 983 | 1013 | static SYSTEM_CONFIG_START( einstein ) |
| 984 | 1014 | /* 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) |
| 986 | 1016 | SYSTEM_CONFIG_END |
| 987 | 1017 | |
| 988 | 1018 | |