src/mess/machine/centroni.c
| r2374 | r2375 | |
| 91 | 91 | } |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | static 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 | |
| 94 | 118 | void centronics_write_handshake(int nr, int data, int mask) |
| 95 | 119 | { |
| 96 | 120 | CENTRONICS *This=cent+nr; |
| r2374 | r2375 | |
| 108 | 132 | timer_adjust_oneshot(This->timer, ATTOTIME_IN_USEC(5), nr); |
| 109 | 133 | |
| 110 | 134 | /* output */ |
| 111 | | printer_output(image_from_devtype_and_index(IO_PRINTER, nr), This->data); |
| 135 | printer_output(printer_device(Machine, nr), This->data); |
| 112 | 136 | } |
| 113 | 137 | |
| 114 | 138 | } |
| 115 | 139 | This->control=neu; |
| 116 | 140 | } |
| 117 | 141 | |
| 118 | | static 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 | | |
| 139 | 142 | int centronics_read_handshake(int nr) |
| 140 | 143 | { |
| 141 | 144 | CENTRONICS *This=cent+nr; |
| r2374 | r2375 | |
| 145 | 148 | data |= (This->control & CENTRONICS_NOT_BUSY); |
| 146 | 149 | |
| 147 | 150 | if (This->config->type == PRINTER_IBM) |
| 148 | | { |
| 149 | 151 | data |= CENTRONICS_ONLINE; |
| 150 | | } |
| 151 | 152 | else |
| 152 | 153 | { |
| 153 | 154 | if (This->control & CENTRONICS_SELECT) |
| 154 | | data|=CENTRONICS_ONLINE; |
| 155 | data |= CENTRONICS_ONLINE; |
| 155 | 156 | } |
| 157 | |
| 156 | 158 | data |= CENTRONICS_NO_ERROR; |
| 159 | |
| 157 | 160 | if (!printer_is_ready(printer_device(Machine, nr))) |
| 158 | 161 | data |= CENTRONICS_NO_PAPER; |
| 159 | 162 | |
| 160 | 163 | /* state of acknowledge */ |
| 161 | | data|=(This->control & CENTRONICS_ACKNOWLEDGE); |
| 164 | data |= (This->control & CENTRONICS_ACKNOWLEDGE); |
| 162 | 165 | |
| 163 | | |
| 164 | 166 | return data; |
| 165 | 167 | } |
| 166 | 168 | |
src/mess/drivers/atarist.c
| r2374 | r2375 | |
| 2232 | 2232 | /* System Drivers */ |
| 2233 | 2233 | |
| 2234 | 2234 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME */ |
| 2235 | | COMP( 1985, atarist, 0, 0, atarist, atarist, 0, atarist, "Atari", "ST", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) |
| 2236 | | COMP( 1987, megast, atarist, 0, megast, atarist, 0, megast, "Atari", "Mega ST", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) |
| 2235 | COMP( 1985, atarist, 0, 0, atarist, atarist, 0, atarist, "Atari", "ST", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) |
| 2236 | COMP( 1987, megast, atarist, 0, megast, atarist, 0, megast, "Atari", "Mega ST", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) |
| 2237 | 2237 | /* |
| 2238 | 2238 | COMP( 1989, stacy, atarist, 0, stacy, stacy, 0, stacy, "Atari", "Stacy", GAME_NOT_WORKING ) |
| 2239 | 2239 | */ |
| 2240 | 2240 | COMP( 1989, atariste, 0, 0, atariste, atariste, 0, atariste, "Atari", "STE", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) |
| 2241 | | COMP( 1990, stbook, atariste, 0, stbook, stbook, 0, stbook, "Atari", "STBook", GAME_NOT_WORKING ) |
| 2242 | | COMP( 1991, megaste, atariste, 0, megaste, atarist, 0, megaste, "Atari", "Mega STE", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) |
| 2241 | COMP( 1990, stbook, atariste, 0, stbook, stbook, 0, stbook, "Atari", "STBook", GAME_NOT_WORKING ) |
| 2242 | COMP( 1991, megaste, atariste, 0, megaste, atarist, 0, megaste, "Atari", "Mega STE", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) |
| 2243 | 2243 | /* |
| 2244 | 2244 | COMP( 1991, stpad, atariste, 0, stpad, stpad, 0, stpad, "Atari", "STPad (prototype)", GAME_NOT_WORKING ) |
| 2245 | 2245 | COMP( 1990, tt030, 0, 0, tt030, tt030, 0, tt030, "Atari", "TT030", GAME_NOT_WORKING ) |