Previous 15994 Revisions Next

r2375 Saturday 12th April, 2008 at 14:21:47 UTC by Robbbert
[ATARIST] Fixed crash at start. Fixed centronics printing.
[src/mess/drivers]atarist.c
[src/mess/machine]centroni.c

src/mess/machine/centroni.c
r2374r2375
9191   }
9292}
9393
94static const device_config *printer_device(running_machine *machine, int index)
95{
96   const char *tag;
97   switch(index)
98   {
99      case 0:   
100         tag = "printer";
101         break;
102      case 1:   
103         tag = "printer1";
104         break;
105      case 2:   
106         tag = "printer2";
107         break;
108      case 3:   
109         tag = "printer3";
110         break;
111      default:
112         fatalerror("\nInvalid centronics device: %X",index);
113         break;
114   }
115   return device_list_find_by_tag(machine->config->devicelist, PRINTER, tag);
116}
117
94118void centronics_write_handshake(int nr, int data, int mask)
95119{
96120   CENTRONICS *This=cent+nr;
r2374r2375
108132         timer_adjust_oneshot(This->timer, ATTOTIME_IN_USEC(5), nr);
109133
110134         /* output */
111         printer_output(image_from_devtype_and_index(IO_PRINTER, nr), This->data);
135         printer_output(printer_device(Machine, nr), This->data);
112136      }
113137
114138   }
115139   This->control=neu;
116140}
117141
118static const device_config *printer_device(running_machine *machine, int index)
119{
120   const char *tag;
121   switch(index)
122   {
123      case 0:   
124         tag = "printer1";
125         break;
126      case 1:   
127         tag = "printer2";
128         break;
129      case 2:   
130         tag = "printer3";
131         break;
132      default:
133         fatalerror("Invalid device");
134         break;
135   }
136   return device_list_find_by_tag(machine->config->devicelist, PRINTER, tag);
137}
138
139142int centronics_read_handshake(int nr)
140143{
141144   CENTRONICS *This=cent+nr;
r2374r2375
145148   data |= (This->control & CENTRONICS_NOT_BUSY);
146149
147150   if (This->config->type == PRINTER_IBM)
148   {
149151      data |= CENTRONICS_ONLINE;
150   }
151152   else
152153   {
153154      if (This->control & CENTRONICS_SELECT)
154         data|=CENTRONICS_ONLINE;
155         data |= CENTRONICS_ONLINE;
155156   }
157
156158   data |= CENTRONICS_NO_ERROR;
159
157160   if (!printer_is_ready(printer_device(Machine, nr)))
158161      data |= CENTRONICS_NO_PAPER;
159162
160163   /* state of acknowledge */
161   data|=(This->control & CENTRONICS_ACKNOWLEDGE);
164   data |= (This->control & CENTRONICS_ACKNOWLEDGE);
162165
163
164166   return data;
165167}
166168
src/mess/drivers/atarist.c
r2374r2375
22322232/* System Drivers */
22332233
22342234/*     YEAR  NAME    PARENT    COMPAT   MACHINE   INPUT     INIT    CONFIG   COMPANY    FULLNAME */
2235COMP( 1985, atarist,  0,        0,      atarist,  atarist,  0,     atarist,  "Atari", "ST", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
2236COMP( 1987, megast,   atarist,  0,      megast,   atarist,  0,     megast,   "Atari", "Mega ST", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE  )
2235COMP( 1985, atarist,  0,        0,   atarist,  atarist,  0,     atarist,  "Atari", "ST", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
2236COMP( 1987, megast,   atarist,  0,   megast,   atarist,  0,     megast,   "Atari", "Mega ST", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE  )
22372237/*
22382238COMP( 1989, stacy,    atarist,  0,      stacy,    stacy,    0,     stacy,    "Atari", "Stacy", GAME_NOT_WORKING )
22392239*/
22402240COMP( 1989, atariste, 0,      0,      atariste, atariste, 0,     atariste, "Atari", "STE", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE  )
2241COMP( 1990, stbook,   atariste, 0,      stbook,   stbook,   0,     stbook,    "Atari", "STBook", GAME_NOT_WORKING )
2242COMP( 1991, megaste,  atariste, 0,      megaste,  atarist,  0,     megaste,  "Atari", "Mega STE", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE  )
2241COMP( 1990, stbook,   atariste, 0,   stbook,   stbook,   0,     stbook,    "Atari", "STBook", GAME_NOT_WORKING )
2242COMP( 1991, megaste,  atariste, 0,   megaste,  atarist,  0,     megaste,  "Atari", "Mega STE", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE  )
22432243/*
22442244COMP( 1991, stpad,    atariste, 0,      stpad,    stpad,    0,     stpad,    "Atari", "STPad (prototype)", GAME_NOT_WORKING )
22452245COMP( 1990, tt030,    0,        0,      tt030,    tt030,    0,     tt030,    "Atari", "TT030", GAME_NOT_WORKING )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team