Previous 15994 Revisions Next

r11038 Saturday 2nd April, 2011 at 13:19:31 UTC by Sandro Ronco
[TI8X] Updates:
- Added serial support to TI-73 and TI-83+ (receive only)
- Update ti85_ser.c for for generate correct transfer ID basing on input file signature this allows to support models with backward compatibility (like TI-86 and TI-83+).
[src/mess/drivers]ti85.c
[src/mess/formats]ti85_ser.c ti85_ser.h
[src/mess/includes]ti85.h
[src/mess/machine]ti85.c

src/mess/machine/ti85.c
r11037r11038
2828};
2929
3030
31
32
33
34
35
36
37
38
39
40
41
42
4331static TIMER_CALLBACK(ti85_timer_callback)
4432{
4533   ti85_state *state = machine.driver_data<ti85_state>();
r11037r11038
566554   return data;
567555}
568556
557READ8_HANDLER ( ti73_port_0000_r )
558{
559   ti85_state *state = space->machine().driver_data<ti85_state>();
560   device_t *ti85serial = space->machine().device("ti73serial");;
561
562   ti85_update_serial(ti85serial);
563   return (state->m_white_out<<3)
564      | (state->m_red_out<<2)
565      | ((ti85serial_white_in(ti85serial,0)&(1-state->m_white_out))<<1)
566      | (ti85serial_red_in(ti85serial,0)&(1-state->m_red_out))
567      | state->m_PCR;
568}
569
569570READ8_HANDLER ( ti83p_port_0000_r )
570571{
571   return 0xff; // TODO
572   ti85_state *state = space->machine().driver_data<ti85_state>();
573   device_t *ti85serial = space->machine().device("ti83pserial");;
574
575   ti85_update_serial(ti85serial);
576   return (state->m_white_out<<3)
577      | (state->m_red_out<<2)
578      | ((ti85serial_white_in(ti85serial,0)&(1-state->m_white_out))<<1)
579      | (ti85serial_red_in(ti85serial,0)&(1-state->m_red_out))
580      | state->m_PCR;
572581}
573582
574583 READ8_HANDLER ( ti83p_port_0002_r )
r11037r11038
757766      state->m_LCD_status = data&0x08;
758767}
759768
769WRITE8_HANDLER ( ti73_port_0000_w )
770{
771   ti85_state *state = space->machine().driver_data<ti85_state>();
772   device_t *speaker = space->machine().device("speaker");
773   device_t *ti85serial = space->machine().device("ti73serial");
774
775   speaker_level_w(speaker,( (data>>0)|(data>>1) )&0x01 );
776   state->m_red_out=(data>>0)&0x01;
777   state->m_white_out=(data>>1)&0x01;
778   ti85serial_red_out( ti85serial, 0, state->m_red_out );
779   ti85serial_white_out( ti85serial, 0, state->m_white_out );
780   ti85_update_serial(ti85serial);
781   state->m_PCR = data&0xf0;
782}
783
760784WRITE8_HANDLER ( ti83p_port_0000_w )
761785{
762   //TODO
786   ti85_state *state = space->machine().driver_data<ti85_state>();
787   device_t *speaker = space->machine().device("speaker");
788   device_t *ti85serial = space->machine().device("ti83pserial");
789
790   speaker_level_w(speaker,( (data>>0)|(data>>1) )&0x01 );
791   state->m_red_out=(data>>0)&0x01;
792   state->m_white_out=(data>>1)&0x01;
793   ti85serial_red_out( ti85serial, 0, state->m_red_out );
794   ti85serial_white_out( ti85serial, 0, state->m_white_out );
795   ti85_update_serial(ti85serial);
796   state->m_PCR = data&0xf0;
763797}
764798
765799WRITE8_HANDLER ( ti83p_port_0002_w )
src/mess/includes/ti85.h
r11037r11038
9090 READ8_HANDLER( ti83_port_0000_r );
9191 READ8_HANDLER( ti83_port_0002_r );
9292 READ8_HANDLER( ti83_port_0003_r );
93 READ8_HANDLER( ti73_port_0000_r );
9394 READ8_HANDLER( ti83p_port_0000_r );
9495 READ8_HANDLER( ti83p_port_0002_r );
9596WRITE8_HANDLER( ti85_port_0000_w );
r11037r11038
109110WRITE8_HANDLER( ti83_port_0000_w );
110111WRITE8_HANDLER( ti83_port_0002_w );
111112WRITE8_HANDLER( ti83_port_0003_w );
113WRITE8_HANDLER( ti73_port_0000_w );
112114WRITE8_HANDLER( ti83p_port_0000_w );
113115WRITE8_HANDLER( ti83p_port_0002_w );
114116WRITE8_HANDLER( ti83p_port_0003_w );
src/mess/formats/ti85_ser.c
r11037r11038
3030   TI85_SEND_SCREEN_REQUEST
3131};
3232
33//supported image formats
34enum
35{
36   TI_FILE_UNK,
37   TI_FILE_V1,   //used for TI-85 and TI-86 image
38   TI_FILE_V2,   //used for TI-82, TI-83 and TI-73 image
39   TI_FILE_V3   //used for TI-83+ and TI-84+ image
40};
41
3342#define TI85_HEADER_SIZE      0x37
3443
3544#define TI85_SEND_VARIABLES      1
r11037r11038
4150#define TI85_PC_OK_PACKET_SIZE   4
4251#define TI85_PC_END_PACKET_SIZE   4
4352
44static const UINT8 ti85_pc_ok_packet[] = {0x05, 0x56, 0x00, 0x00};
45static const UINT8 ti82_pc_ok_packet[] = {0x02, 0x56, 0x00, 0x00};
46static const UINT8 ti86_pc_ok_packet[] = {0x06, 0x56, 0x00, 0x00};
47static const UINT8 ti85_pc_continue_packet[] = {0x05, 0x09, 0x00, 0x00};
48static const UINT8 ti82_pc_continue_packet[] = {0x02, 0x09, 0x00, 0x00};
49static const UINT8 ti86_pc_continue_packet[] = {0x06, 0x09, 0x00, 0x00};
50static const UINT8 ti85_pc_screen_request_packet[] = {0x05, 0x6d, 0x00, 0x00};
51static const UINT8 ti85_pc_end_packet[] = {0x05, 0x92, 0x00, 0x00};
52static const UINT8 ti82_pc_end_packet[] = {0x02, 0x92, 0x00, 0x00};
53static const UINT8 ti86_pc_end_packet[] = {0x06, 0x92, 0x00, 0x00};
53//known tranfer ID
54#define TI_TRANFER_ID_TI73      0x07
55#define TI_TRANFER_ID_TI82      0x02
56#define TI_TRANFER_ID_TI83      0x03
57#define TI_TRANFER_ID_TI83P      0x23
58#define TI_TRANFER_ID_TI85      0x05
59#define TI_TRANFER_ID_TI86      0x06
5460
61//packet type
62#define   TI_OK_PACKET            0x56
63#define   TI_CONTINUE_PACKET         0x09
64#define   TI_SCREEN_REQUEST_PACKET   0x6d
65#define   TI_END_PACKET            0x92
66
67static const UINT8 ti73_file_signature[] = {0x2a, 0x2a, 0x54, 0x49, 0x37, 0x33, 0x2a, 0x2a, 0x1a, 0x0a, 0x00};
5568static const UINT8 ti85_file_signature[] = {0x2a, 0x2a, 0x54, 0x49, 0x38, 0x35, 0x2a, 0x2a, 0x1a, 0x0c, 0x00};
5669static const UINT8 ti82_file_signature[] = {0x2a, 0x2a, 0x54, 0x49, 0x38, 0x32, 0x2a, 0x2a, 0x1a, 0x0a, 0x00};
70static const UINT8 ti83_file_signature[] = {0x2a, 0x2a, 0x54, 0x49, 0x38, 0x33, 0x2a, 0x2a, 0x1a, 0x0a, 0x00};
71static const UINT8 ti83p_file_signature[]= {0x2a, 0x2a, 0x54, 0x49, 0x38, 0x33, 0x46, 0x2a, 0x1a, 0x0a, 0x00};
5772static const UINT8 ti86_file_signature[] = {0x2a, 0x2a, 0x54, 0x49, 0x38, 0x36, 0x2a, 0x2a, 0x1a, 0x0a, 0x00};
5873
5974typedef struct {
r11037r11038
87102{
88103   UINT8   status;
89104   int      transfer_type;
105   UINT8   image_type;
106   UINT8   send_id;         /* ID used for PC to TI transfer */
107   UINT8   receive_id;         /* ID used for TI to PC transfer */
90108   UINT8   red_out;         /* signal line from machine */
91109   UINT8   white_out;         /* signal line from machine */
92110   UINT8   red_in;            /* signal line to machine */
r11037r11038
116134INLINE ti85serial_state *get_token(device_t *device)
117135{
118136   assert(device != NULL);
119   assert((device->type() == TI82SERIAL) || (device->type() == TI85SERIAL) || (device->type() == TI86SERIAL));
137   assert((device->type() == TI82SERIAL) ||
138         (device->type() == TI73SERIAL) ||
139         (device->type() == TI83PSERIAL) ||
140         (device->type() == TI85SERIAL) ||
141         (device->type() == TI86SERIAL));
120142   return (ti85serial_state *) downcast<legacy_device_base *>(device)->token();
121143}
122144
r11037r11038
210232
211233static void ti85_variables_read (device_t *device, const UINT8 * ti85_data, unsigned int ti85_data_size, ti85_entry * ti85_entries)
212234{
235   ti85serial_state *ti85serial = get_token( device );
213236   unsigned int pos, i=0;
214237
215238   pos = TI85_HEADER_SIZE;
r11037r11038
218241      ti85_entries[i].head_size = ti85_data[pos+0x00] + ti85_data[pos+0x01]*256;
219242      ti85_entries[i].data_size = ti85_data[pos+0x02] + ti85_data[pos+0x03]*256;
220243      ti85_entries[i].type = ti85_data[pos+0x04];
221      ti85_entries[i].name_size = (device->type() == TI82SERIAL) ? 8 : ti85_data[pos+0x05];
244      ti85_entries[i].name_size = (ti85serial->image_type != TI_FILE_V1) ? 8 : ti85_data[pos+0x05];
222245      ti85_entries[i].offset = pos;
223246      pos += ti85_entries[i].head_size+ti85_entries[i].data_size+4;
224247      i++;
r11037r11038
302325}
303326
304327
328static void ti85_append_head_to_stream (UINT8 transfer_id, UINT8 tranfer_type, UINT8* serial_data)
329{
330   UINT8 tmp_data[4];
331
332   tmp_data[0] = transfer_id;
333   tmp_data[1] = tranfer_type;
334   tmp_data[2] = 0;
335   tmp_data[3] = 0;
336
337   ti85_convert_data_to_stream(tmp_data, sizeof(tmp_data), serial_data);
338}
339
340
305341static void ti85_convert_stream_to_data (const UINT8* serial_data, UINT32 size, UINT8* data)
306342{
307343   UINT32 i;
r11037r11038
330366   UINT8* temp_data_to_convert = NULL;
331367   UINT16 checksum;
332368
369   //verify that the provided file is compatible with the model
370   if (device->type() == TI73SERIAL)
371      if (strncmp((char *) file_data, (char *) ti73_file_signature, 11))
372         return 0;
333373   if (device->type() == TI85SERIAL)
334374      if (strncmp((char *) file_data, (char *) ti85_file_signature, 11))
335375         return 0;
336376   if (device->type() == TI82SERIAL)
337377      if (strncmp((char *) file_data, (char *) ti82_file_signature, 11))
338378         return 0;
339   if (device->type() == TI86SERIAL)
340      if (strncmp((char *) file_data, (char *) ti86_file_signature, 11))
379   if (device->type() == TI83PSERIAL)   //TI-83+ is compatible with TI-83 and TI-82 file
380      if (strncmp((char *) file_data, (char *) ti83p_file_signature, 10) && strncmp((char *) file_data, (char *) ti83_file_signature, 11)
381         && strncmp((char *) file_data, (char *) ti82_file_signature, 11))
341382         return 0;
383   if (device->type() == TI86SERIAL)   //TI-86 is compatible with TI-85 file
384      if (strncmp((char *) file_data, (char *) ti86_file_signature, 11) && strncmp((char *) file_data, (char *) ti85_file_signature, 11))
385         return 0;
342386
387   //identify the image
388   if (!strncmp((char *) file_data, (char *) ti73_file_signature, 11))
389   {
390      ti85serial->send_id = TI_TRANFER_ID_TI73;
391      ti85serial->image_type = TI_FILE_V2;
392   }
393   else if (!strncmp((char *) file_data, (char *) ti85_file_signature, 11))
394   {
395      ti85serial->send_id = TI_TRANFER_ID_TI85;
396      ti85serial->image_type = TI_FILE_V1;
397   }
398   else if (!strncmp((char *) file_data, (char *) ti82_file_signature, 11))
399   {
400      ti85serial->send_id = TI_TRANFER_ID_TI82;
401      ti85serial->image_type = TI_FILE_V2;
402   }
403   else if (!strncmp((char *) file_data, (char *) ti83_file_signature, 11))
404   {
405      ti85serial->send_id = TI_TRANFER_ID_TI83;
406      ti85serial->image_type = TI_FILE_V2;
407   }
408   else if (!strncmp((char *) file_data, (char *) ti83p_file_signature, 11))
409   {
410      ti85serial->send_id = TI_TRANFER_ID_TI83P;
411      ti85serial->image_type = TI_FILE_V3;
412   }
413   else if (!strncmp((char *) file_data, (char *) ti86_file_signature, 11))
414   {
415      ti85serial->send_id = TI_TRANFER_ID_TI86;
416      ti85serial->image_type = TI_FILE_V1;
417   }
418
419   logerror("Image ID: 0x%02x, version: 0x%02x\n", ti85serial->send_id, ti85serial->image_type);
420
343421   /*Serial stream preparing*/
344422   serial_data->end = NULL;
345423
r11037r11038
393471               return 0;
394472            }
395473            serial_data->variables[i].header_size = 0x0f*8;
396            temp_data_to_convert[0] = 0x05;   //PC sends
474            temp_data_to_convert[0] = ti85serial->send_id;   //PC sends
397475            temp_data_to_convert[1] = 0x06;   //header
398476            memcpy(   temp_data_to_convert+0x02, file_data+0x37, 0x0b);
399477            checksum = ti85_calculate_checksum(temp_data_to_convert+4, 0x09);
r11037r11038
424502            return 0;
425503         }
426504
427         if (device->type() == TI85SERIAL || device->type() == TI86SERIAL)
505         if (ti85serial->image_type == TI_FILE_V1)
428506         {
429507            serial_data->variables[i].header_size = (10+ti85_entries[i].name_size)*8;
430508
431            if (device->type() == TI85SERIAL)
432               temp_data_to_convert[0] = 0x05;   //PC to TI-85
433            if (device->type() == TI86SERIAL)
434               temp_data_to_convert[0] = 0x06;   //PC to TI-86
509            temp_data_to_convert[0] = ti85serial->send_id;
435510            temp_data_to_convert[1] = 0x06;   //header
436511            temp_data_to_convert[2] = (4+ti85_entries[i].name_size)&0x00ff;
437512            temp_data_to_convert[3] = ((4+ti85_entries[i].name_size)&0xff00)>>8;
r11037r11038
446521            ti85_convert_data_to_stream(temp_data_to_convert, 10+ti85_entries[i].name_size, serial_data->variables[i].header);
447522         }
448523
449         if (device->type() == TI82SERIAL)
524         if (ti85serial->image_type == TI_FILE_V2 || ti85serial->image_type == TI_FILE_V3)
450525         {
451526            serial_data->variables[i].header_size = (9+ti85_entries[i].name_size)*8;
452527
453            temp_data_to_convert[0] = 0x02;   //PC to TI-82
528            temp_data_to_convert[0] = ti85serial->send_id;
454529            temp_data_to_convert[1] = 0x06;   //header
455530            temp_data_to_convert[2] = (3+ti85_entries[i].name_size)&0x00ff;
456531            temp_data_to_convert[3] = ((3+ti85_entries[i].name_size)&0xff00)>>8;
r11037r11038
474549         free (ti85_entries);
475550         return 0;
476551      }
477      if (device->type() == TI85SERIAL)
478         ti85_convert_data_to_stream(ti85_pc_ok_packet, TI85_PC_OK_PACKET_SIZE, serial_data->variables[i].ok);
479      if (device->type() == TI82SERIAL)
480         ti85_convert_data_to_stream(ti82_pc_ok_packet, TI85_PC_OK_PACKET_SIZE, serial_data->variables[i].ok);
481      if (device->type() == TI86SERIAL)
482         ti85_convert_data_to_stream(ti86_pc_ok_packet, TI85_PC_OK_PACKET_SIZE, serial_data->variables[i].ok);
552      ti85_append_head_to_stream(ti85serial->send_id, TI_OK_PACKET, serial_data->variables[i].ok);
483553      serial_data->variables[i].ok_size = TI85_PC_OK_PACKET_SIZE*8;
484554
485555      /*Data packet*/
r11037r11038
498568      }
499569      serial_data->variables[i].data_size = (6+ti85_entries[i].data_size)*8;
500570
501      if (device->type() == TI85SERIAL)
502         temp_data_to_convert[0] = 0x05;   //PC to TI-85
503      if (device->type() == TI82SERIAL)
504         temp_data_to_convert[0] = 0x02;   //PC to TI-82
505      if (device->type() == TI86SERIAL)
506         temp_data_to_convert[0] = 0x06;   //PC to TI-86
571      temp_data_to_convert[0] = ti85serial->send_id;
507572      temp_data_to_convert[1] = 0x15;   //data
508573      temp_data_to_convert[2] = (ti85_entries[i].data_size)&0x00ff;
509574      temp_data_to_convert[3] = ((ti85_entries[i].data_size)&0xff00)>>8;
510575
511      UINT8 name_start = (device->type() == TI82SERIAL) ? 5 : 6;
576      UINT8 name_start = (ti85serial->image_type != TI_FILE_V1) ? 5 : 6;
577
578      //TI-83+ files have two additional byte used for the file's version and flag
579      if (ti85serial->image_type == TI_FILE_V3)
580         name_start += 2;
581
512582      if (file_data[0x3b]==backup_id)
513583         memcpy(temp_data_to_convert+4, file_data+ti85_entries[i].offset, ti85_entries[i].data_size);
514584      else
r11037r11038
529599      free (ti85_entries);
530600      return 0;
531601   }
532   if (device->type() == TI85SERIAL)
533      ti85_convert_data_to_stream(ti85_pc_end_packet, TI85_PC_END_PACKET_SIZE, serial_data->end);
534   if (device->type() == TI82SERIAL)
535      ti85_convert_data_to_stream(ti82_pc_end_packet, TI85_PC_END_PACKET_SIZE, serial_data->end);
536   if (device->type() == TI86SERIAL)
537      ti85_convert_data_to_stream(ti86_pc_end_packet, TI85_PC_END_PACKET_SIZE, serial_data->end);
602   ti85_append_head_to_stream(ti85serial->send_id, TI_END_PACKET, serial_data->end);
538603   serial_data->end_size = TI85_PC_END_PACKET_SIZE*8;
539604
540605   free (ti85_entries);
r11037r11038
798863               ti85serial->status = TI85_SEND_STOP;
799864               return;
800865            }
801            ti85_convert_data_to_stream (ti85_pc_ok_packet, 4, ti85serial->receive_buffer);
802            ti85_convert_data_to_stream (ti85_pc_continue_packet, 4, ti85serial->receive_buffer+4*8);
866            ti85_append_head_to_stream(ti85serial->receive_id, TI_OK_PACKET, ti85serial->receive_buffer);
867            ti85_append_head_to_stream(ti85serial->receive_id, TI_CONTINUE_PACKET,  ti85serial->receive_buffer+4*8);
803868            ti85serial->status = TI85_SEND_OK_1;
804869         }
805870         break;
r11037r11038
849914               ti85serial->status = TI85_SEND_STOP;
850915               return;
851916            }
852            ti85_convert_data_to_stream (ti85_pc_ok_packet, 4, ti85serial->receive_buffer);
917            ti85_append_head_to_stream(ti85serial->receive_id, TI_OK_PACKET, ti85serial->receive_buffer);
853918            ti85serial->status = TI85_SEND_OK_2;
854919         }
855920         break;
r11037r11038
917982                  ti85serial->status = TI85_SEND_STOP;
918983                  return;
919984               }
920               ti85_convert_data_to_stream (ti85_pc_ok_packet, 4, ti85serial->receive_buffer);
985               ti85_append_head_to_stream(ti85serial->receive_id, TI_OK_PACKET, ti85serial->receive_buffer);
921986               ti85serial->status = TI85_SEND_OK_3;
922987            }
923988         }
r11037r11038
9831048               ti85serial->status = TI85_SEND_STOP;
9841049               return;
9851050            }
986            ti85_convert_data_to_stream (ti85_pc_ok_packet, 4, ti85serial->receive_buffer);
987            ti85_convert_data_to_stream (ti85_pc_continue_packet, 4, ti85serial->receive_buffer+4*8);
1051            ti85_append_head_to_stream(ti85serial->receive_id, TI_OK_PACKET, ti85serial->receive_buffer);
1052            ti85_append_head_to_stream(ti85serial->receive_id, TI_CONTINUE_PACKET, ti85serial->receive_buffer+4*8);
9881053            ti85serial->status = TI85_SEND_OK_1;
9891054         }
9901055         break;
r11037r11038
10451110               ti85serial->status = TI85_SEND_STOP;
10461111               return;
10471112            }
1048            ti85_convert_data_to_stream (ti85_pc_ok_packet, 4, ti85serial->receive_buffer);
1113            ti85_append_head_to_stream(ti85serial->receive_id, TI_OK_PACKET, ti85serial->receive_buffer);
10491114            ti85serial->status = TI85_SEND_OK_2;
10501115         }
10511116         break;
r11037r11038
11031168            ti85serial->status = TI85_SEND_STOP;
11041169            return;
11051170         }
1106         ti85_convert_data_to_stream (ti85_pc_screen_request_packet, 4, ti85serial->receive_buffer);
1171         ti85_append_head_to_stream(ti85serial->receive_id, TI_SCREEN_REQUEST_PACKET, ti85serial->receive_buffer);
11071172         ti85serial->status = TI85_SEND_SCREEN_REQUEST;
11081173         break;
11091174      case TI85_SEND_SCREEN_REQUEST:
r11037r11038
11781243               ti85serial->status = TI85_SEND_STOP;
11791244               return;
11801245            }
1181            ti85_convert_data_to_stream (ti85_pc_ok_packet, 4, ti85serial->receive_buffer);
1246            ti85_append_head_to_stream(ti85serial->receive_id, TI_OK_PACKET, ti85serial->receive_buffer);
11821247            ti85serial->status = TI85_SEND_OK;
11831248         }
11841249         break;
r11037r11038
13331398   ti85serial->backup_file_data = NULL;
13341399   ti85serial->backup_variable_number = 0;
13351400   ti85serial->status = TI85_SEND_STOP;
1401
1402   //initialize the receive_id used for TI to PC transfer
1403   if (device->type() == TI73SERIAL)
1404      ti85serial->receive_id = TI_TRANFER_ID_TI73;
1405   else if (device->type() == TI85SERIAL)
1406      ti85serial->receive_id = TI_TRANFER_ID_TI85;
1407   else if (device->type() == TI82SERIAL)
1408      ti85serial->receive_id = TI_TRANFER_ID_TI82;
1409   else if (device->type() == TI83PSERIAL)
1410      ti85serial->receive_id = TI_TRANFER_ID_TI83P;
1411   else if (device->type() == TI86SERIAL)
1412      ti85serial->receive_id = TI_TRANFER_ID_TI86;
1413
1414   ti85serial->send_id = ti85serial->receive_id;
13361415}
13371416
13381417
r11037r11038
14011480   }
14021481}
14031482
1483DEVICE_GET_INFO( ti73serial )
1484{
1485   switch ( state )
1486   {
1487   case DEVINFO_STR_NAME:                     strcpy(info->s, "TI73 Serial");                                       break;
1488   case DEVINFO_STR_IMAGE_FILE_EXTENSIONS:         strcpy(info->s, "73p,73s,73i,73n,73c,73l,73k,73m,73v,73d,73e,73r,73g");         break;
1489   default:                              DEVICE_GET_INFO_CALL( ti85serial );
1490   }
1491}
14041492
14051493DEVICE_GET_INFO( ti82serial )
14061494{
r11037r11038
14131501}
14141502
14151503
1504DEVICE_GET_INFO( ti83pserial )
1505{
1506   switch ( state )
1507   {
1508   case DEVINFO_STR_NAME:                     strcpy(info->s, "TI83 Plus Serial");                                    break;
1509   case DEVINFO_STR_IMAGE_FILE_EXTENSIONS:         strcpy(info->s, "82p,82s,82i,82n,82c,82l,82k,82m,82v,82d,82e,82r,82g,"   //for TI-82 compatibility
1510                                                   "83p,83s,83i,83n,83c,83l,83k,83m,83v,83d,83e,83r,83g,"   //for TI-83 compatibility
1511                                                   "8xc,8xd,8xg,8xi,8xl,8xm,8xn,8xp,8xs,8xt,8xv,8xw,8xy,8xz");   break;
1512   default:                              DEVICE_GET_INFO_CALL( ti85serial );
1513   }
1514}
1515
14161516DEVICE_GET_INFO( ti86serial )
14171517{
14181518   switch ( state )
14191519   {
14201520   case DEVINFO_STR_NAME:                     strcpy(info->s, "TI86 Serial");                                       break;
1421   case DEVINFO_STR_IMAGE_FILE_EXTENSIONS:         strcpy(info->s, "86p,86s,86i,86n,86c,86l,86k,86m,86v,86d,86e,86r,86g");         break;
1521   case DEVINFO_STR_IMAGE_FILE_EXTENSIONS:         strcpy(info->s, "85p,85s,85i,85n,85c,85l,85k,85m,85v,85d,85e,85r,85g,85b" //for TI-85 compatibility
1522                                                   "86p,86s,86i,86n,86c,86l,86k,86m,86v,86d,86e,86r,86g");         break;
14221523   default:                              DEVICE_GET_INFO_CALL( ti85serial );
14231524   }
14241525}
14251526
14261527DEFINE_LEGACY_IMAGE_DEVICE(TI85SERIAL, ti85serial);
1528DEFINE_LEGACY_IMAGE_DEVICE(TI73SERIAL, ti73serial);
14271529DEFINE_LEGACY_IMAGE_DEVICE(TI82SERIAL, ti82serial);
1530DEFINE_LEGACY_IMAGE_DEVICE(TI83PSERIAL, ti83pserial);
14281531DEFINE_LEGACY_IMAGE_DEVICE(TI86SERIAL, ti86serial);
src/mess/formats/ti85_ser.h
r11037r11038
44
55
66DECLARE_LEGACY_IMAGE_DEVICE(TI85SERIAL, ti85serial);
7DECLARE_LEGACY_IMAGE_DEVICE(TI73SERIAL, ti73serial);
78DECLARE_LEGACY_IMAGE_DEVICE(TI82SERIAL, ti82serial);
9DECLARE_LEGACY_IMAGE_DEVICE(TI83PSERIAL, ti83pserial);
810DECLARE_LEGACY_IMAGE_DEVICE(TI86SERIAL, ti86serial);
911
1012extern void ti85_update_serial(device_t *device);
r11037r11038
1214#define MCFG_TI85SERIAL_ADD( _tag ) \
1315      MCFG_DEVICE_ADD( _tag, TI85SERIAL, 0 )
1416
17#define MCFG_TI73SERIAL_ADD( _tag ) \
18      MCFG_DEVICE_ADD( _tag, TI73SERIAL, 0 )
19
1520#define MCFG_TI82SERIAL_ADD( _tag ) \
1621      MCFG_DEVICE_ADD( _tag, TI82SERIAL, 0 )
1722
23#define MCFG_TI83PSERIAL_ADD( _tag ) \
24      MCFG_DEVICE_ADD( _tag, TI83PSERIAL, 0 )
25
1826#define MCFG_TI86SERIAL_ADD( _tag ) \
1927      MCFG_DEVICE_ADD( _tag, TI86SERIAL, 0 )
2028
src/mess/drivers/ti85.c
r11037r11038
251251   AM_RANGE(0x0014, 0x0014) AM_READ_PORT( "BATTERY" )
252252ADDRESS_MAP_END
253253
254static ADDRESS_MAP_START( ti73_io, AS_IO, 8)
255   ADDRESS_MAP_GLOBAL_MASK(0xff)
256   AM_RANGE(0x0000, 0x0000) AM_READWRITE( ti73_port_0000_r, ti73_port_0000_w)
257   AM_RANGE(0x0001, 0x0001) AM_READWRITE( ti8x_keypad_r, ti8x_keypad_w )
258   AM_RANGE(0x0002, 0x0002) AM_READWRITE( ti83p_port_0002_r, ti83p_port_0002_w )
259   AM_RANGE(0x0003, 0x0003) AM_READWRITE( ti83_port_0003_r, ti83p_port_0003_w )
260   AM_RANGE(0x0004, 0x0004) AM_READWRITE( ti83_port_0003_r, ti83p_port_0004_w )
261   AM_RANGE(0x0006, 0x0006) AM_READWRITE( ti86_port_0005_r, ti83p_port_0006_w )
262   AM_RANGE(0x0007, 0x0007) AM_READWRITE( ti86_port_0006_r, ti83p_port_0007_w )
263   AM_RANGE(0x0010, 0x0010) AM_READWRITE( ti82_port_0010_r, ti83p_port_0010_w )
264   AM_RANGE(0x0011, 0x0011) AM_READWRITE( ti82_port_0011_r, ti82_port_0011_w )
265ADDRESS_MAP_END
266
254267static ADDRESS_MAP_START( ti83p_io, AS_IO, 8)
255268   ADDRESS_MAP_GLOBAL_MASK(0xff)
256   AM_RANGE(0x0000, 0x0000) AM_READWRITE( ti83p_port_0000_r, ti83p_port_0000_w)   //TODO
269   AM_RANGE(0x0000, 0x0000) AM_READWRITE( ti83p_port_0000_r, ti83p_port_0000_w)
257270   AM_RANGE(0x0001, 0x0001) AM_READWRITE( ti8x_keypad_r, ti8x_keypad_w )
258271   AM_RANGE(0x0002, 0x0002) AM_READWRITE( ti83p_port_0002_r, ti83p_port_0002_w )
259272   AM_RANGE(0x0003, 0x0003) AM_READWRITE( ti83_port_0003_r, ti83p_port_0003_w )
r11037r11038
612625
613626   MCFG_DEVICE_REMOVE("nvram")
614627   MCFG_NVRAM_HANDLER(ti83p)
628
629   MCFG_SPEAKER_STANDARD_MONO("mono")
630   MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
631   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
632
633   MCFG_TI83PSERIAL_ADD( "ti83pserial" )
615634MACHINE_CONFIG_END
616635
636static MACHINE_CONFIG_DERIVED( ti73, ti83p )
637   MCFG_CPU_MODIFY("maincpu")
638   MCFG_CPU_IO_MAP(ti73_io)
639
640   MCFG_DEVICE_REMOVE("ti83pserial")
641   MCFG_TI73SERIAL_ADD( "ti73serial" )
642MACHINE_CONFIG_END
643
617644static MACHINE_CONFIG_DERIVED( ti86d, ti86 )
618645   MCFG_SNAPSHOT_ADD("snapshot", ti8x, "sav", 0)
619646   MCFG_TI86SERIAL_ADD( "ti85serial" )
r11037r11038
767794COMP( 1994, ti81v2,     ti81,   0,      ti81v2, ti81,   0,     "Texas Instruments",    "TI-81 v2.0",                   GAME_NO_SOUND )
768795COMP( 1996, ti83,       0,      0,      ti83,   ti83,   0,     "Texas Instruments",    "TI-83",                        GAME_NO_SOUND )
769796COMP( 1997, ti86,       0,      0,      ti86d,  ti85,   0,     "Texas Instruments",    "TI-86",                        GAME_NO_SOUND )
770COMP( 1998, ti73,       0,      0,      ti83p,  ti82,   0,     "Texas Instruments",    "TI-73",                        GAME_NOT_WORKING | GAME_NO_SOUND)
797COMP( 1998, ti73,       0,      0,      ti73,   ti82,   0,     "Texas Instruments",    "TI-73",                        GAME_NOT_WORKING | GAME_NO_SOUND)
771798COMP( 1999, ti83p,      0,      0,      ti83p,  ti82,   0,     "Texas Instruments",    "TI-83 Plus",                   GAME_NO_SOUND )
772799COMP( 2001, ti83pse,    0,      0,      ti85,   ti85,   0,     "Texas Instruments",    "TI-83 Plus Silver Edition",    GAME_NOT_WORKING | GAME_NO_SOUND)
773800//COMP( 2004, ti84p,      0,      0,      ti85,   ti85,   0,   "Texas Instruments",    "TI-84 Plus",                   GAME_NOT_WORKING | GAME_NO_SOUND)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team