Previous 15994 Revisions Next

r2496 Monday 28th April, 2008 at 19:33:21 UTC by Miodrag Milanović
[SPECTRUM] Motor is now started, by pressing PLAY button in UI
[src/mess/drivers]spectrum.c

src/mess/drivers/spectrum.c
r2495r2496
177177 bit 2-0: border colour
178178*/
179179
180static int      motor_toggle_previous = 0;
181static int      cassette_motor_mode = 0;
182
183180int PreviousFE = 0;
184181
185182static WRITE8_HANDLER(spectrum_port_fe_w)
r2495r2496
233230   int ss_extra1 = input_port_read(machine, "PLUS3") & 0x1f;
234231   int ss_extra2 = input_port_read(machine, "PLUS4") & 0x1f;
235232
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
246233   /* Caps - V */
247234   if ((lines & 1)==0)
248235   {
r2495r2496
19031890   PORT_DIPSETTING(0x00, "Enabled" )
19041891   PORT_DIPSETTING(0x20, "Disabled" )
19051892   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
19101893INPUT_PORTS_END
19111894
19121895#define ZX_COL_0   MAKE_RGB(0x00, 0x00, 0x00)
r2495r2496
22892272   {
22902273      /* --- the following bits of info are returned as 64-bit signed integers --- */
22912274      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;
22932276      case MESS_DEVINFO_PTR_CASSETTE_FORMATS:      info->p = (void *)tzx_cassette_formats; break;
22942277      default:               cassette_device_getinfo(devclass, state, info); break;
22952278   }

Previous 15994 Revisions Next


© 1998-2018 The MESS Team