Previous 15994 Revisions Next

r11166 Wednesday 13th April, 2011 at 21:44:08 UTC by Sandro Ronco
[TI85] Moved device input ports into ti85_ser.c (no whatsnew)
[src/mess/drivers]ti85.c
[src/mess/formats]ti85_ser.c

src/mess/formats/ti85_ser.c
r11165r11166
12681268
12691269   if (ti85serial->status == TI85_SEND_STOP)
12701270   {
1271      if (input_port_read(device->machine(), "SERIAL") & 0x01)
1271      if (input_port_read(device, "SERIAL") & 0x01)
12721272      {
12731273         if(!ti85_alloc_serial_data_memory(device, 15)) return;
12741274         if(!ti85_receive_serial (device, ti85serial->receive_buffer, 7*8))
r11165r11166
12871287      {
12881288         ti85_receive_serial(device, NULL, 0);
12891289         ti85_free_serial_data_memory(device);
1290         if (input_port_read(device->machine(), "DUMP") & 0x01)
1290         if (input_port_read(device, "DUMP") & 0x01)
12911291         {
12921292            ti85serial->status = TI85_PREPARE_SCREEN_REQUEST;
12931293            ti85serial->transfer_type = TI85_RECEIVE_SCREEN;
r11165r11166
14601460}
14611461
14621462
1463static INPUT_PORTS_START ( ti85serial )
1464   PORT_START("SERIAL")   /* receive data from calculator */
1465      PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Receive data") PORT_CODE(KEYCODE_R)
1466   PORT_START("DUMP")   /* screen dump requesting */
1467      PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Screen dump request") PORT_CODE(KEYCODE_S)
1468INPUT_PORTS_END
1469
1470
14631471DEVICE_GET_INFO( ti85serial )
14641472{
14651473   switch ( state )
r11165r11166
14751483   case DEVINFO_FCT_STOP:                     info->stop = DEVICE_STOP_NAME( ti85serial );                           break;
14761484   case DEVINFO_FCT_IMAGE_LOAD:               info->f = (genf *) DEVICE_IMAGE_LOAD_NAME( ti85serial );                  break;
14771485   case DEVINFO_FCT_IMAGE_UNLOAD:               info->f = (genf *) DEVICE_IMAGE_UNLOAD_NAME( ti85serial );                  break;
1486   case DEVINFO_PTR_INPUT_PORTS:               info->ipt = INPUT_PORTS_NAME( ti85serial );                              break;
14781487   case DEVINFO_STR_IMAGE_BRIEF_INSTANCE_NAME:      strcpy(info->s, "ser");                                             break;
14791488   case DEVINFO_STR_IMAGE_INSTANCE_NAME:
14801489   case DEVINFO_STR_NAME:                     strcpy(info->s, "TI85 Serial");                                       break;
src/mess/drivers/ti85.c
r11165r11166
415415      PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("MORE    (MODE)") PORT_CODE(KEYCODE_TILDE)
416416   PORT_START("ON")   /* ON */
417417      PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ON/OFF") PORT_CODE(KEYCODE_Q)
418   PORT_START("SERIAL")   /* receive data from calculator */
419      PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Receive data") PORT_CODE(KEYCODE_R)
420   PORT_START("DUMP")   /* screen dump requesting */
421      PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Screen dump request") PORT_CODE(KEYCODE_S)
422418INPUT_PORTS_END
423419
424420static INPUT_PORTS_START (ti82)
r11165r11166
481477      PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("DEL") PORT_CODE(KEYCODE_DEL)
482478   PORT_START("ON")   /* ON */
483479      PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ON/OFF") PORT_CODE(KEYCODE_Q)
484   PORT_START("SERIAL")   /* receive data from calculator */
485      PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Receive data") PORT_CODE(KEYCODE_R)
486   PORT_START("DUMP")   /* screen dump requesting */
487      PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Screen dump request") PORT_CODE(KEYCODE_S)
488480INPUT_PORTS_END
489481
490482static INPUT_PORTS_START (ti83)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team