src/mess/drivers/spectrum.c
| r2495 | r2496 | |
| 177 | 177 | bit 2-0: border colour |
| 178 | 178 | */ |
| 179 | 179 | |
| 180 | | static int motor_toggle_previous = 0; |
| 181 | | static int cassette_motor_mode = 0; |
| 182 | | |
| 183 | 180 | int PreviousFE = 0; |
| 184 | 181 | |
| 185 | 182 | static WRITE8_HANDLER(spectrum_port_fe_w) |
| r2495 | r2496 | |
| 233 | 230 | int ss_extra1 = input_port_read(machine, "PLUS3") & 0x1f; |
| 234 | 231 | int ss_extra2 = input_port_read(machine, "PLUS4") & 0x1f; |
| 235 | 232 | |
| 236 | | if ( input_port_read(machine, "MOTOR") & 0x01 ) { |
| 237 | | if ( motor_toggle_previous == 0 ) { |
| 238 | | cassette_motor_mode = cassette_motor_mode ^ 0x01; |
| 239 | | cassette_change_state( image_from_devtype_and_index( IO_CASSETTE, 0 ), cassette_motor_mode ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR ); |
| 240 | | } |
| 241 | | motor_toggle_previous = 1; |
| 242 | | } else { |
| 243 | | motor_toggle_previous = 0; |
| 244 | | } |
| 245 | | |
| 246 | 233 | /* Caps - V */ |
| 247 | 234 | if ((lines & 1)==0) |
| 248 | 235 | { |
| r2495 | r2496 | |
| 1903 | 1890 | PORT_DIPSETTING(0x00, "Enabled" ) |
| 1904 | 1891 | PORT_DIPSETTING(0x20, "Disabled" ) |
| 1905 | 1892 | PORT_BIT(0x1f, IP_ACTIVE_LOW, IPT_UNUSED) |
| 1906 | | |
| 1907 | | PORT_START_TAG("MOTOR") /* [17] Toggle cassette motor */ |
| 1908 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Motor") PORT_CODE(KEYCODE_F1) |
| 1909 | | |
| 1910 | 1893 | INPUT_PORTS_END |
| 1911 | 1894 | |
| 1912 | 1895 | #define ZX_COL_0 MAKE_RGB(0x00, 0x00, 0x00) |
| r2495 | r2496 | |
| 2289 | 2272 | { |
| 2290 | 2273 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 2291 | 2274 | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; |
| 2292 | | case MESS_DEVINFO_INT_CASSETTE_DEFAULT_STATE: info->i = CASSETTE_PLAY | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_DISABLED; break; |
| 2275 | case MESS_DEVINFO_INT_CASSETTE_DEFAULT_STATE: info->i = CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED; break; |
| 2293 | 2276 | case MESS_DEVINFO_PTR_CASSETTE_FORMATS: info->p = (void *)tzx_cassette_formats; break; |
| 2294 | 2277 | default: cassette_device_getinfo(devclass, state, info); break; |
| 2295 | 2278 | } |