src/mess/machine/994x_ser.c
| r5785 | r5786 | |
| 26 | 26 | #include "tms9902.h" |
| 27 | 27 | #include "994x_ser.h" |
| 28 | 28 | |
| 29 | | #define MAX_RS232_CARDS 1/*2*/ |
| 29 | #include "machine/tms9902.h" |
| 30 | 30 | |
| 31 | 31 | /* prototypes */ |
| 32 | 32 | static int rs232_cru_r(running_machine *machine, int offset); |
| r5785 | r5786 | |
| 37 | 37 | /* pointer to the rs232 ROM data */ |
| 38 | 38 | static UINT8 *rs232_DSR; |
| 39 | 39 | |
| 40 | | static int pio_direction; // a.k.a. PIOOC pio in output mode if 0 |
| 41 | | static int pio_handshakeout; |
| 42 | | static int pio_handshakein; |
| 43 | | static int pio_spareout; |
| 44 | | static int pio_sparein; |
| 45 | | static int flag0; // spare |
| 46 | | static int cts1; // a.k.a. flag1 |
| 47 | | static int cts2; // a.k.a. flag2 |
| 48 | | static int led; // a.k.a. flag3 |
| 49 | | static int pio_out_buffer; |
| 50 | | static int pio_in_buffer; |
| 40 | typedef struct _pio_t pio_t; |
| 41 | struct _pio_t |
| 42 | { |
| 43 | int pio_direction; // a.k.a. PIOOC pio in output mode if 0 |
| 44 | int pio_handshakeout; |
| 45 | int pio_handshakein; |
| 46 | int pio_spareout; |
| 47 | int pio_sparein; |
| 48 | int flag0; // spare |
| 49 | int cts1; // a.k.a. flag1 |
| 50 | int cts2; // a.k.a. flag2 |
| 51 | int led; // a.k.a. flag3 |
| 52 | int pio_out_buffer; |
| 53 | int pio_in_buffer; |
| 54 | int pio_readable; |
| 55 | int pio_writable; |
| 56 | int pio_write; // 1 if image is to be written to |
| 57 | }; |
| 51 | 58 | |
| 52 | | static const device_config *pio_fp; |
| 53 | | static int pio_readable; |
| 54 | | static int pio_writable; |
| 55 | | static int pio_write = 1/*0*/; // 1 if image is to be written to |
| 59 | typedef struct _card_t card_t; |
| 60 | struct _card_t |
| 61 | { |
| 62 | int i; |
| 63 | }; |
| 56 | 64 | |
| 57 | | static const device_config *rs232_fp; |
| 65 | INLINE pio_t *get_safe_token_pio(const device_config *device) |
| 66 | { |
| 67 | assert(device != NULL); |
| 68 | assert(device->token != NULL); |
| 69 | assert(device->type == TI99_4_PIO); |
| 58 | 70 | |
| 71 | return (pio_t *)device->token; |
| 72 | } |
| 73 | |
| 59 | 74 | static const ti99_peb_card_handlers_t rs232_handlers = |
| 60 | 75 | { |
| 61 | 76 | rs232_cru_r, |
| r5785 | r5786 | |
| 67 | 82 | /* |
| 68 | 83 | Initialize pio unit and open image |
| 69 | 84 | */ |
| 70 | | DEVICE_IMAGE_LOAD( ti99_4_pio ) |
| 85 | static DEVICE_IMAGE_LOAD( ti99_4_pio ) |
| 71 | 86 | { |
| 72 | | int id = image_index_in_device(image); |
| 73 | | if ((id < 0) || (id >= MAX_RS232_CARDS)) |
| 74 | | return INIT_FAIL; |
| 75 | | |
| 76 | | pio_fp = image; |
| 87 | pio_t *pio = get_safe_token_pio(image); |
| 77 | 88 | /* tell whether the image is writable */ |
| 78 | | pio_readable = ! image_has_been_created(image); |
| 89 | pio->pio_readable = ! image_has_been_created(image); |
| 79 | 90 | /* tell whether the image is writable */ |
| 80 | | pio_writable = image_is_writable(image); |
| 81 | | if (pio_write && pio_writable) |
| 82 | | pio_handshakein = 0; /* receiver ready */ |
| 91 | pio->pio_writable = image_is_writable(image); |
| 92 | |
| 93 | if (pio->pio_write && pio->pio_writable) |
| 94 | pio->pio_handshakein = 0; /* receiver ready */ |
| 83 | 95 | else |
| 84 | | pio_handshakein = 1; |
| 96 | pio->pio_handshakein = 1; |
| 85 | 97 | |
| 86 | 98 | return INIT_PASS; |
| 87 | 99 | } |
| r5785 | r5786 | |
| 89 | 101 | /* |
| 90 | 102 | close a pio image |
| 91 | 103 | */ |
| 92 | | DEVICE_IMAGE_UNLOAD( ti99_4_pio ) |
| 104 | static DEVICE_IMAGE_UNLOAD( ti99_4_pio ) |
| 93 | 105 | { |
| 94 | | int id = image_index_in_device(image); |
| 95 | | if ((id < 0) || (id >= MAX_RS232_CARDS)) |
| 96 | | return; |
| 106 | pio_t *pio = get_safe_token_pio(image); |
| 107 | pio->pio_writable = 0; |
| 108 | pio->pio_handshakein = 1; /* receiver not ready */ |
| 109 | pio->pio_sparein = 0; |
| 110 | } |
| 97 | 111 | |
| 98 | | pio_fp = NULL; |
| 99 | | pio_writable = 0; |
| 100 | | pio_handshakein = 1; /* receiver not ready */ |
| 101 | | pio_sparein = 0; |
| 112 | static DEVICE_START( ti99_4_pio ) |
| 113 | { |
| 102 | 114 | } |
| 103 | 115 | |
| 116 | static DEVICE_RESET( ti99_4_pio ) |
| 117 | { |
| 118 | pio_t *pio = get_safe_token_pio(device); |
| 119 | pio->pio_direction = 0; |
| 120 | pio->pio_handshakeout = 0; |
| 121 | pio->pio_spareout = 0; |
| 122 | pio->flag0 = 0; |
| 123 | pio->cts1 = 0; |
| 124 | pio->cts2 = 0; |
| 125 | pio->led = 0; |
| 126 | pio->pio_write = 1; |
| 127 | } |
| 104 | 128 | /* |
| 105 | 129 | Initialize rs232 unit and open image |
| 106 | 130 | */ |
| 107 | | DEVICE_IMAGE_LOAD( ti99_4_rs232 ) |
| 131 | static DEVICE_IMAGE_LOAD( ti99_4_rs232 ) |
| 108 | 132 | { |
| 109 | 133 | const device_config *tms9902 = NULL; |
| 110 | | |
| 111 | | int id = image_index_in_device(image); |
| 112 | | |
| 113 | | /*if ((id < 0) || (id >= 2*MAX_RS232_CARDS)) |
| 114 | | return INIT_FAIL;*/ |
| 115 | | if (id != 0) |
| 116 | | return INIT_FAIL; |
| 117 | | |
| 118 | | if (id==0) { |
| 119 | | tms9902 = devtag_get_device(image->machine, "tms9902_0"); |
| 134 | |
| 135 | if (strcmp(image->tag, "port0")) { |
| 136 | tms9902 = devtag_get_device(image->machine, "rs232:tms9902_0"); |
| 120 | 137 | } |
| 121 | | if (id==1) { |
| 122 | | tms9902 = devtag_get_device(image->machine, "tms9902_1"); |
| 138 | if (strcmp(image->tag, "port1")) { |
| 139 | tms9902 = devtag_get_device(image->machine, "rs232:tms9902_1"); |
| 123 | 140 | } |
| 124 | | |
| 125 | | rs232_fp = image; |
| 126 | | |
| 127 | | if (rs232_fp) |
| 141 | |
| 142 | if (image) |
| 128 | 143 | { |
| 129 | 144 | tms9902_set_cts(tms9902, 1); |
| 130 | 145 | tms9902_set_dsr(tms9902, 1); |
| r5785 | r5786 | |
| 141 | 156 | /* |
| 142 | 157 | close a rs232 image |
| 143 | 158 | */ |
| 144 | | DEVICE_IMAGE_UNLOAD( ti99_4_rs232 ) |
| 145 | | { |
| 146 | | /*int id = image_index_in_device(image);*/ |
| 147 | | |
| 148 | | /*if ((id < 0) || (id >= 2*MAX_RS232_CARDS)) |
| 149 | | return;*/ |
| 150 | | /*if (id != 0) |
| 151 | | return;*/ |
| 152 | | |
| 153 | | rs232_fp = NULL; |
| 159 | static DEVICE_IMAGE_UNLOAD( ti99_4_rs232 ) |
| 160 | { |
| 154 | 161 | } |
| 155 | 162 | |
| 156 | 163 | /* |
| 157 | 164 | Initializes rs232 card, set up handlers |
| 158 | 165 | */ |
| 159 | | void ti99_rs232_init(running_machine *machine) |
| 166 | static DEVICE_START( ti99_4_rs232 ) |
| 160 | 167 | { |
| 161 | | rs232_DSR = memory_region(machine, region_dsr) + offset_rs232_dsr; |
| 168 | rs232_DSR = memory_region(device->machine, region_dsr) + offset_rs232_dsr; |
| 162 | 169 | } |
| 163 | 170 | |
| 164 | 171 | /* |
| 165 | 172 | Reset rs232 card, set up handlers |
| 166 | 173 | */ |
| 167 | | void ti99_rs232_reset(running_machine *machine) |
| 174 | static DEVICE_RESET( ti99_4_rs232 ) |
| 168 | 175 | { |
| 169 | | rs232_DSR = memory_region(machine, region_dsr) + offset_rs232_dsr; |
| 176 | rs232_DSR = memory_region(device->machine, region_dsr) + offset_rs232_dsr; |
| 170 | 177 | |
| 171 | 178 | ti99_peb_set_card_handlers(0x1300, & rs232_handlers); |
| 172 | | |
| 173 | | pio_direction = 0; |
| 174 | | pio_handshakeout = 0; |
| 175 | | pio_spareout = 0; |
| 176 | | flag0 = 0; |
| 177 | | cts1 = 0; |
| 178 | | cts2 = 0; |
| 179 | | led = 0; |
| 180 | 179 | } |
| 181 | 180 | |
| 182 | | /* |
| 183 | | rs232 interrupt handler |
| 184 | | */ |
| 185 | | static TMS9902_INT_CALLBACK( int_callback_0 ) |
| 181 | static READ8_DEVICE_HANDLER(ti99_4_pio_r) |
| 186 | 182 | { |
| 187 | | ti99_peb_set_ila_bit(device->machine, inta_rs232_1_bit, INT); |
| 183 | pio_t *pio = get_safe_token_pio(device); |
| 184 | UINT8 reply = 0x00; |
| 185 | if (pio->pio_direction) |
| 186 | reply |= 0x02; |
| 187 | if (pio->pio_handshakein) |
| 188 | reply |= 0x04; |
| 189 | if (pio->pio_sparein) |
| 190 | reply |= 0x08; |
| 191 | if (pio->flag0) |
| 192 | reply |= 0x10; |
| 193 | if (pio->cts1) |
| 194 | reply |= 0x20; |
| 195 | if (pio->cts2) |
| 196 | reply |= 0x40; |
| 197 | if (pio->led) |
| 198 | reply |= 0x80; |
| 199 | return reply; |
| 188 | 200 | } |
| 189 | 201 | |
| 190 | | static TMS9902_INT_CALLBACK( int_callback_1 ) |
| 202 | static READ8_DEVICE_HANDLER(ti99_4_pio_buf_r) |
| 191 | 203 | { |
| 192 | | ti99_peb_set_ila_bit(device->machine, inta_rs232_2_bit, INT); |
| 204 | pio_t *pio = get_safe_token_pio(device); |
| 205 | return pio->pio_direction ? pio->pio_in_buffer : pio->pio_out_buffer; |
| 193 | 206 | } |
| 194 | 207 | |
| 195 | | static TMS9902_XMIT_CALLBACK( xmit_callback_0 ) |
| 208 | static WRITE8_DEVICE_HANDLER(ti99_4_pio_buf_w) |
| 196 | 209 | { |
| 197 | | UINT8 buf = data; |
| 198 | | |
| 199 | | if (rs232_fp) |
| 200 | | image_fwrite(rs232_fp, &buf, 1); |
| 210 | pio_t *pio = get_safe_token_pio(device); |
| 211 | pio->pio_out_buffer = data; |
| 201 | 212 | } |
| 202 | 213 | |
| 203 | | static TMS9902_XMIT_CALLBACK( xmit_callback_1 ) |
| 214 | static WRITE8_DEVICE_HANDLER(ti99_4_pio_w) |
| 204 | 215 | { |
| 205 | | UINT8 buf = data; |
| 216 | pio_t *pio = get_safe_token_pio(device); |
| 217 | switch (offset & 7) |
| 218 | { |
| 219 | case 0: |
| 220 | /* WRITE to rs232 card enable bit (bit 0) */ |
| 221 | /* handled in xxx_peb_cru_w() */ |
| 222 | break; |
| 206 | 223 | |
| 207 | | if (rs232_fp) |
| 208 | | image_fwrite(rs232_fp, &buf, 1); |
| 209 | | } |
| 224 | case 1: |
| 225 | pio->pio_direction = data; |
| 226 | break; |
| 210 | 227 | |
| 228 | case 2: |
| 229 | if (data != pio->pio_handshakeout) |
| 230 | { |
| 231 | pio->pio_handshakeout = data; |
| 232 | if (pio->pio_write && pio->pio_writable && (! pio->pio_direction)) |
| 233 | { /* PIO in output mode */ |
| 234 | if (!pio->pio_handshakeout) |
| 235 | { /* write data strobe */ |
| 236 | /* write data and acknowledge */ |
| 237 | UINT8 buf = pio->pio_out_buffer; |
| 238 | if (image_fwrite(device, &buf, 1)) |
| 239 | pio->pio_handshakein = 1; |
| 240 | } |
| 241 | else |
| 242 | { |
| 243 | /* end strobe */ |
| 244 | /* we can write some data: set receiver ready */ |
| 245 | pio->pio_handshakein = 0; |
| 246 | } |
| 247 | } |
| 248 | if ((!pio->pio_write) && pio->pio_readable /*&& pio_direction*/) |
| 249 | { /* PIO in input mode */ |
| 250 | if (!pio->pio_handshakeout) |
| 251 | { /* receiver ready */ |
| 252 | /* send data and strobe */ |
| 253 | UINT8 buf; |
| 254 | if (image_fread(device, &buf, 1)) |
| 255 | pio->pio_in_buffer = buf; |
| 256 | pio->pio_handshakein = 0; |
| 257 | } |
| 258 | else |
| 259 | { |
| 260 | /* data acknowledge */ |
| 261 | /* we can send some data: set transmitter ready */ |
| 262 | pio->pio_handshakein = 1; |
| 263 | } |
| 264 | } |
| 265 | } |
| 266 | break; |
| 211 | 267 | |
| 268 | case 3: |
| 269 | pio->pio_spareout = data; |
| 270 | break; |
| 271 | |
| 272 | case 4: |
| 273 | pio->flag0 = data; |
| 274 | break; |
| 275 | |
| 276 | case 5: |
| 277 | pio->cts1 = data; |
| 278 | break; |
| 279 | |
| 280 | case 6: |
| 281 | pio->cts2 = data; |
| 282 | break; |
| 283 | |
| 284 | case 7: |
| 285 | pio->led = data; |
| 286 | break; |
| 287 | } |
| 288 | } |
| 212 | 289 | /* |
| 213 | 290 | Read rs232 card CRU interface |
| 214 | 291 | |
| r5785 | r5786 | |
| 226 | 303 | switch (offset) |
| 227 | 304 | { |
| 228 | 305 | case 0: |
| 229 | | reply = 0x00; |
| 230 | | if (pio_direction) |
| 231 | | reply |= 0x02; |
| 232 | | if (pio_handshakein) |
| 233 | | reply |= 0x04; |
| 234 | | if (pio_sparein) |
| 235 | | reply |= 0x08; |
| 236 | | if (flag0) |
| 237 | | reply |= 0x10; |
| 238 | | if (cts1) |
| 239 | | reply |= 0x20; |
| 240 | | if (cts2) |
| 241 | | reply |= 0x40; |
| 242 | | if (led) |
| 243 | | reply |= 0x80; |
| 306 | reply = ti99_4_pio_r(devtag_get_device(machine, "rs232:pio"), offset); |
| 244 | 307 | break; |
| 245 | 308 | |
| 246 | 309 | default: |
| r5785 | r5786 | |
| 251 | 314 | |
| 252 | 315 | case 1: |
| 253 | 316 | /* first 9902 */ |
| 254 | | reply = tms9902_cru_r(devtag_get_device(machine, "tms9902_0"), offset); |
| 317 | reply = tms9902_cru_r(devtag_get_device(machine, "rs232:tms9902_0"), offset); |
| 255 | 318 | break; |
| 256 | 319 | |
| 257 | 320 | case 2: |
| 258 | 321 | /* second 9902 */ |
| 259 | | reply = tms9902_cru_r(devtag_get_device(machine, "tms9902_1"), offset); |
| 322 | reply = tms9902_cru_r(devtag_get_device(machine, "rs232:tms9902_1"), offset); |
| 260 | 323 | break; |
| 261 | 324 | |
| 262 | 325 | default: |
| r5785 | r5786 | |
| 277 | 340 | { |
| 278 | 341 | case 0: |
| 279 | 342 | /* custom buffer */ |
| 280 | | switch (offset) |
| 281 | | { |
| 282 | | case 0: |
| 283 | | /* WRITE to rs232 card enable bit (bit 0) */ |
| 284 | | /* handled in xxx_peb_cru_w() */ |
| 285 | | break; |
| 286 | | |
| 287 | | case 1: |
| 288 | | pio_direction = data; |
| 289 | | break; |
| 290 | | |
| 291 | | case 2: |
| 292 | | if (data != pio_handshakeout) |
| 293 | | { |
| 294 | | pio_handshakeout = data; |
| 295 | | if (pio_write && pio_writable && (! pio_direction)) |
| 296 | | { /* PIO in output mode */ |
| 297 | | if (!pio_handshakeout) |
| 298 | | { /* write data strobe */ |
| 299 | | /* write data and acknowledge */ |
| 300 | | UINT8 buf = pio_out_buffer; |
| 301 | | if (image_fwrite(pio_fp, &buf, 1)) |
| 302 | | pio_handshakein = 1; |
| 303 | | } |
| 304 | | else |
| 305 | | { |
| 306 | | /* end strobe */ |
| 307 | | /* we can write some data: set receiver ready */ |
| 308 | | pio_handshakein = 0; |
| 309 | | } |
| 310 | | } |
| 311 | | if ((!pio_write) && pio_readable /*&& pio_direction*/) |
| 312 | | { /* PIO in input mode */ |
| 313 | | if (!pio_handshakeout) |
| 314 | | { /* receiver ready */ |
| 315 | | /* send data and strobe */ |
| 316 | | UINT8 buf; |
| 317 | | if (image_fread(pio_fp, &buf, 1)) |
| 318 | | pio_in_buffer = buf; |
| 319 | | pio_handshakein = 0; |
| 320 | | } |
| 321 | | else |
| 322 | | { |
| 323 | | /* data acknowledge */ |
| 324 | | /* we can send some data: set transmitter ready */ |
| 325 | | pio_handshakein = 1; |
| 326 | | } |
| 327 | | } |
| 328 | | } |
| 329 | | break; |
| 330 | | |
| 331 | | case 3: |
| 332 | | pio_spareout = data; |
| 333 | | break; |
| 334 | | |
| 335 | | case 4: |
| 336 | | flag0 = data; |
| 337 | | break; |
| 338 | | |
| 339 | | case 5: |
| 340 | | cts1 = data; |
| 341 | | break; |
| 342 | | |
| 343 | | case 6: |
| 344 | | cts2 = data; |
| 345 | | break; |
| 346 | | |
| 347 | | case 7: |
| 348 | | led = data; |
| 349 | | break; |
| 350 | | } |
| 343 | ti99_4_pio_w(devtag_get_device(machine, "rs232:pio"), offset, data); |
| 351 | 344 | break; |
| 352 | 345 | |
| 353 | 346 | case 1: |
| 354 | 347 | /* first 9902 */ |
| 355 | | tms9902_cru_w(devtag_get_device(machine, "tms9902_0"), offset, data); |
| 348 | tms9902_cru_w(devtag_get_device(machine, "rs232:tms9902_0"), offset, data); |
| 356 | 349 | break; |
| 357 | 350 | |
| 358 | 351 | case 2: |
| 359 | 352 | /* second 9902 */ |
| 360 | | tms9902_cru_w(devtag_get_device(machine, "tms9902_1"), offset, data); |
| 353 | tms9902_cru_w(devtag_get_device(machine, "rs232:tms9902_1"), offset, data); |
| 361 | 354 | break; |
| 362 | 355 | |
| 363 | 356 | default: |
| r5785 | r5786 | |
| 382 | 375 | else |
| 383 | 376 | { |
| 384 | 377 | /* PIO */ |
| 385 | | reply = pio_direction ? pio_in_buffer : pio_out_buffer; |
| 378 | reply = ti99_4_pio_buf_r(devtag_get_device(space->machine, "rs232:pio"), offset); |
| 386 | 379 | } |
| 387 | 380 | |
| 388 | 381 | return reply; |
| r5785 | r5786 | |
| 395 | 388 | { |
| 396 | 389 | if (offset >= 0x1000) |
| 397 | 390 | { |
| 398 | | /* PIO */ |
| 399 | | pio_out_buffer = data; |
| 391 | /* PIO */ |
| 392 | ti99_4_pio_buf_w(devtag_get_device(space->machine, "rs232:pio"), offset, data); |
| 400 | 393 | } |
| 401 | 394 | else |
| 402 | 395 | { |
| r5785 | r5786 | |
| 404 | 397 | } |
| 405 | 398 | } |
| 406 | 399 | |
| 400 | /* |
| 401 | rs232 interrupt handler |
| 402 | */ |
| 403 | static TMS9902_INT_CALLBACK( int_callback_0 ) |
| 404 | { |
| 405 | ti99_peb_set_ila_bit(device->machine, inta_rs232_1_bit, INT); |
| 406 | } |
| 407 | static TMS9902_INT_CALLBACK( int_callback_1 ) |
| 408 | { |
| 409 | ti99_peb_set_ila_bit(device->machine, inta_rs232_2_bit, INT); |
| 410 | } |
| 411 | |
| 412 | static TMS9902_XMIT_CALLBACK( xmit_callback_0 ) |
| 413 | { |
| 414 | UINT8 buf = data; |
| 415 | const device_config *rs232_fp = devtag_get_device(device->machine, "rs232:port0"); |
| 416 | |
| 417 | if (rs232_fp) |
| 418 | image_fwrite(rs232_fp, &buf, 1); |
| 419 | } |
| 420 | |
| 421 | static TMS9902_XMIT_CALLBACK( xmit_callback_1 ) |
| 422 | { |
| 423 | UINT8 buf = data; |
| 424 | const device_config *rs232_fp = devtag_get_device(device->machine, "rs232:port1"); |
| 425 | |
| 426 | if (rs232_fp) |
| 427 | image_fwrite(rs232_fp, &buf, 1); |
| 428 | } |
| 407 | 429 | const tms9902_interface tms9902_params_0 = |
| 408 | 430 | { |
| 409 | 431 | 3000000., /* clock rate (3MHz) */ |
| r5785 | r5786 | |
| 421 | 443 | NULL,//brk_callback, /* called when BReaK state changes */ |
| 422 | 444 | xmit_callback_1 /* called when a character is transmitted */ |
| 423 | 445 | }; |
| 446 | |
| 447 | DEVICE_GET_INFO( ti99_4_rs232 ) |
| 448 | { |
| 449 | switch ( state ) |
| 450 | { |
| 451 | case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; |
| 452 | case DEVINFO_INT_TOKEN_BYTES: info->i = sizeof(card_t); break; |
| 453 | case DEVINFO_INT_INLINE_CONFIG_BYTES: info->i = 0; break; |
| 454 | case DEVINFO_INT_IMAGE_TYPE: info->i = IO_SERIAL; break; |
| 455 | case DEVINFO_INT_IMAGE_READABLE: info->i = 1; break; |
| 456 | case DEVINFO_INT_IMAGE_WRITEABLE: info->i = 1; break; |
| 457 | case DEVINFO_INT_IMAGE_CREATABLE: info->i = 1; break; |
| 458 | |
| 459 | case DEVINFO_FCT_START: info->start = DEVICE_START_NAME( ti99_4_rs232 ); break; |
| 460 | case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME( ti99_4_rs232 ); break; |
| 461 | case DEVINFO_FCT_IMAGE_LOAD: info->f = (genf *) DEVICE_IMAGE_LOAD_NAME( ti99_4_rs232 ); break; |
| 462 | case DEVINFO_FCT_IMAGE_UNLOAD: info->f = (genf *) DEVICE_IMAGE_UNLOAD_NAME(ti99_4_rs232 ); break; |
| 463 | case DEVINFO_STR_NAME: strcpy( info->s, "TI99 RS232 port"); break; |
| 464 | case DEVINFO_STR_FAMILY: strcpy(info->s, "TI99 RS232 port"); break; |
| 465 | case DEVINFO_STR_IMAGE_FILE_EXTENSIONS: strcpy(info->s, ""); break; |
| 466 | case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; |
| 467 | case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; |
| 468 | case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright the MESS Team"); break; |
| 469 | } |
| 470 | } |
| 471 | |
| 472 | DEVICE_GET_INFO( ti99_4_rs232 ); |
| 473 | |
| 474 | #define TI99_4_RS232 DEVICE_GET_INFO_NAME(ti99_4_rs232) |
| 475 | |
| 476 | #define MDRV_TI99_4_RS232_ADD(_tag) \ |
| 477 | MDRV_DEVICE_ADD(_tag, TI99_4_RS232, 0) |
| 478 | |
| 479 | |
| 480 | DEVICE_GET_INFO( ti99_4_pio ) |
| 481 | { |
| 482 | switch ( state ) |
| 483 | { |
| 484 | case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; |
| 485 | case DEVINFO_INT_TOKEN_BYTES: info->i = sizeof(pio_t); break; |
| 486 | case DEVINFO_INT_INLINE_CONFIG_BYTES: info->i = 0; break; |
| 487 | case DEVINFO_INT_IMAGE_TYPE: info->i = IO_PARALLEL; break; |
| 488 | case DEVINFO_INT_IMAGE_READABLE: info->i = 1; break; |
| 489 | case DEVINFO_INT_IMAGE_WRITEABLE: info->i = 1; break; |
| 490 | case DEVINFO_INT_IMAGE_CREATABLE: info->i = 1; break; |
| 491 | |
| 492 | case DEVINFO_FCT_START: info->start = DEVICE_START_NAME( ti99_4_pio ); break; |
| 493 | case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME( ti99_4_pio ); break; |
| 494 | case DEVINFO_FCT_IMAGE_LOAD: info->f = (genf *) DEVICE_IMAGE_LOAD_NAME( ti99_4_pio ); break; |
| 495 | case DEVINFO_FCT_IMAGE_UNLOAD: info->f = (genf *) DEVICE_IMAGE_UNLOAD_NAME(ti99_4_pio ); break; |
| 496 | case DEVINFO_STR_NAME: strcpy( info->s, "TI99 PIO port"); break; |
| 497 | case DEVINFO_STR_FAMILY: strcpy(info->s, "TI99 PIO port"); break; |
| 498 | case DEVINFO_STR_IMAGE_FILE_EXTENSIONS: strcpy(info->s, ""); break; |
| 499 | case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; |
| 500 | case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; |
| 501 | case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright the MESS Team"); break; |
| 502 | } |
| 503 | } |
| 504 | |
| 505 | /* device interface */ |
| 506 | DEVICE_GET_INFO( ti99_4_pio ); |
| 507 | |
| 508 | #define TI99_4_PIO DEVICE_GET_INFO_NAME(ti99_4_pio) |
| 509 | |
| 510 | #define MDRV_TI99_4_PIO_ADD(_tag) \ |
| 511 | MDRV_DEVICE_ADD(_tag, TI99_4_PIO, 0) |
| 512 | |
| 513 | |
| 514 | static MACHINE_DRIVER_START( ti99_4_rs232 ) |
| 515 | MDRV_TMS9902_ADD("tms9902_0", tms9902_params_0) |
| 516 | MDRV_TMS9902_ADD("tms9902_1", tms9902_params_1) |
| 517 | MDRV_TI99_4_RS232_ADD("port1") |
| 518 | MDRV_TI99_4_RS232_ADD("port2") |
| 519 | MDRV_TI99_4_PIO_ADD("pio") |
| 520 | MACHINE_DRIVER_END |
| 521 | |
| 522 | static DEVICE_START( ti99_4_rs232_card ) |
| 523 | { |
| 524 | } |
| 525 | |
| 526 | static DEVICE_RESET( ti99_4_rs232_card ) |
| 527 | { |
| 528 | } |
| 529 | |
| 530 | DEVICE_GET_INFO( ti99_4_rs232_card ) |
| 531 | { |
| 532 | switch ( state ) |
| 533 | { |
| 534 | case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; |
| 535 | case DEVINFO_INT_TOKEN_BYTES: info->i = sizeof(card_t); break; |
| 536 | case DEVINFO_INT_INLINE_CONFIG_BYTES: info->i = 0; break; |
| 537 | case DEVINFO_FCT_START: info->start = DEVICE_START_NAME( ti99_4_rs232_card ); break; |
| 538 | case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME( ti99_4_rs232_card ); break; |
| 539 | |
| 540 | case DEVINFO_PTR_MACHINE_CONFIG: info->machine_config = MACHINE_DRIVER_NAME(ti99_4_rs232); break; |
| 541 | case DEVINFO_STR_NAME: strcpy( info->s, "TI99 RS232 card"); break; |
| 542 | case DEVINFO_STR_FAMILY: strcpy(info->s, "TI99 RS232 card"); break; |
| 543 | case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; |
| 544 | case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; |
| 545 | case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright the MESS Team"); break; |
| 546 | } |
| 547 | } |
src/mess/drivers/ti99_8.c
| r5785 | r5786 | |
| 480 | 480 | MDRV_FLOPPY_4_DRIVES_ADD(ti99_8_floppy_config) |
| 481 | 481 | |
| 482 | 482 | MDRV_TI99_CARTRIDGE_ADD("ti99_multicart") |
| 483 | MDRV_SMARTMEDIA_ADD("smartmedia") |
| 484 | MDRV_TI99_4_RS232_CARD_ADD("rs232") |
| 483 | 485 | MACHINE_DRIVER_END |
| 484 | 486 | |
| 485 | 487 | |
| r5785 | r5786 | |
| 531 | 533 | |
| 532 | 534 | MDRV_TI99_CARTRIDGE_ADD("ti99_multicart") |
| 533 | 535 | MDRV_SMARTMEDIA_ADD("smartmedia") |
| 536 | MDRV_TI99_4_RS232_CARD_ADD("rs232") |
| 534 | 537 | MACHINE_DRIVER_END |
| 535 | 538 | |
| 536 | 539 | /* |
| r5785 | r5786 | |
| 566 | 569 | |
| 567 | 570 | #define rom_ti99_8e rom_ti99_8 |
| 568 | 571 | |
| 569 | | static void ti99_8_parallel_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 570 | | { |
| 571 | | /* parallel */ |
| 572 | | switch(state) |
| 573 | | { |
| 574 | | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 575 | | case MESS_DEVINFO_INT_TYPE: info->i = IO_PARALLEL; break; |
| 576 | | case MESS_DEVINFO_INT_READABLE: info->i = 1; break; |
| 577 | | case MESS_DEVINFO_INT_WRITEABLE: info->i = 1; break; |
| 578 | | case MESS_DEVINFO_INT_CREATABLE: info->i = 1; break; |
| 579 | | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; |
| 580 | | |
| 581 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 582 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(ti99_4_pio); break; |
| 583 | | case MESS_DEVINFO_PTR_UNLOAD: info->unload = DEVICE_IMAGE_UNLOAD_NAME(ti99_4_pio); break; |
| 584 | | |
| 585 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 586 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), ""); break; |
| 587 | | } |
| 588 | | } |
| 589 | | |
| 590 | | static void ti99_8_serial_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 591 | | { |
| 592 | | /* serial */ |
| 593 | | switch(state) |
| 594 | | { |
| 595 | | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 596 | | case MESS_DEVINFO_INT_TYPE: info->i = IO_SERIAL; break; |
| 597 | | case MESS_DEVINFO_INT_READABLE: info->i = 1; break; |
| 598 | | case MESS_DEVINFO_INT_WRITEABLE: info->i = 1; break; |
| 599 | | case MESS_DEVINFO_INT_CREATABLE: info->i = 1; break; |
| 600 | | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; |
| 601 | | |
| 602 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 603 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(ti99_4_rs232); break; |
| 604 | | case MESS_DEVINFO_PTR_UNLOAD: info->unload = DEVICE_IMAGE_UNLOAD_NAME(ti99_4_rs232); break; |
| 605 | | |
| 606 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 607 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), ""); break; |
| 608 | | } |
| 609 | | } |
| 610 | | |
| 611 | | |
| 612 | | static SYSTEM_CONFIG_START(ti99_8) |
| 613 | | /* one cartridge port */ |
| 614 | | /* one cassette unit port */ |
| 615 | | /* Hex-bus disk controller: supports up to 4 floppy disk drives */ |
| 616 | | /* expansion port (similar to 99/4(a) - yet slightly different) */ |
| 617 | | CONFIG_DEVICE(ti99_8_parallel_getinfo) |
| 618 | | CONFIG_DEVICE(ti99_8_serial_getinfo) |
| 619 | | /*CONFIG_DEVICE(ti99_8_quickload_getinfo)*/ |
| 620 | | SYSTEM_CONFIG_END |
| 621 | | |
| 622 | 572 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME */ |
| 623 | | COMP( 1983, ti99_8, 0, 0, ti99_8_60hz,ti99_8, ti99_8, ti99_8, "Texas Instruments", "TI-99/8 Computer (US)" , 0) |
| 624 | | COMP( 1983, ti99_8e, ti99_8, 0, ti99_8_50hz,ti99_8, ti99_8, ti99_8, "Texas Instruments", "TI-99/8 Computer (Europe)" , 0 ) |
| 573 | COMP( 1983, ti99_8, 0, 0, ti99_8_60hz,ti99_8, ti99_8, 0, "Texas Instruments", "TI-99/8 Computer (US)" , 0) |
| 574 | COMP( 1983, ti99_8e, ti99_8, 0, ti99_8_50hz,ti99_8, ti99_8, 0, "Texas Instruments", "TI-99/8 Computer (Europe)" , 0 ) |
src/mess/drivers/geneve.c
| r5785 | r5786 | |
| 511 | 511 | |
| 512 | 512 | /* tms9901 */ |
| 513 | 513 | MDRV_TMS9901_ADD("tms9901", tms9901reset_param_ti99) |
| 514 | | /* tms9902 */ |
| 515 | | MDRV_TMS9902_ADD("tms9902_0", tms9902_params_0) |
| 516 | | MDRV_TMS9902_ADD("tms9902_1", tms9902_params_1) |
| 517 | 514 | |
| 518 | 515 | MDRV_WD179X_ADD("wd179x", ti99_wd17xx_interface ) |
| 519 | 516 | |
| 520 | 517 | MDRV_FLOPPY_4_DRIVES_ADD(geneve_floppy_config) |
| 521 | 518 | |
| 522 | 519 | MDRV_SMARTMEDIA_ADD("smartmedia") |
| 520 | |
| 521 | MDRV_TI99_4_RS232_CARD_ADD("rs232") |
| 523 | 522 | MACHINE_DRIVER_END |
| 524 | 523 | |
| 525 | 524 | |
| r5785 | r5786 | |
| 570 | 569 | ROM_LOAD_OPTIONAL("spchrom.bin", 0x0000, 0x8000, CRC(58b155f7) SHA1(382292295c00dff348d7e17c5ce4da12a1d87763)) /* system speech ROM */ |
| 571 | 570 | ROM_END |
| 572 | 571 | |
| 573 | | |
| 574 | | static void geneve_parallel_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 575 | | { |
| 576 | | /* parallel */ |
| 577 | | switch(state) |
| 578 | | { |
| 579 | | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 580 | | case MESS_DEVINFO_INT_TYPE: info->i = IO_PARALLEL; break; |
| 581 | | case MESS_DEVINFO_INT_READABLE: info->i = 1; break; |
| 582 | | case MESS_DEVINFO_INT_WRITEABLE: info->i = 1; break; |
| 583 | | case MESS_DEVINFO_INT_CREATABLE: info->i = 1; break; |
| 584 | | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; |
| 585 | | |
| 586 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 587 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(ti99_4_pio); break; |
| 588 | | case MESS_DEVINFO_PTR_UNLOAD: info->unload = DEVICE_IMAGE_UNLOAD_NAME(ti99_4_pio); break; |
| 589 | | |
| 590 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 591 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), ""); break; |
| 592 | | } |
| 593 | | } |
| 594 | | |
| 595 | | static void geneve_serial_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 596 | | { |
| 597 | | /* serial */ |
| 598 | | switch(state) |
| 599 | | { |
| 600 | | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 601 | | case MESS_DEVINFO_INT_TYPE: info->i = IO_SERIAL; break; |
| 602 | | case MESS_DEVINFO_INT_READABLE: info->i = 1; break; |
| 603 | | case MESS_DEVINFO_INT_WRITEABLE: info->i = 1; break; |
| 604 | | case MESS_DEVINFO_INT_CREATABLE: info->i = 1; break; |
| 605 | | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; |
| 606 | | |
| 607 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 608 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(ti99_4_rs232); break; |
| 609 | | case MESS_DEVINFO_PTR_UNLOAD: info->unload = DEVICE_IMAGE_UNLOAD_NAME(ti99_4_rs232); break; |
| 610 | | |
| 611 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 612 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), ""); break; |
| 613 | | } |
| 614 | | } |
| 615 | | |
| 616 | | static SYSTEM_CONFIG_START(geneve) |
| 617 | | CONFIG_DEVICE(geneve_parallel_getinfo) |
| 618 | | CONFIG_DEVICE(geneve_serial_getinfo) |
| 619 | | SYSTEM_CONFIG_END |
| 620 | | |
| 621 | 572 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME */ |
| 622 | | COMP( 1987,geneve, 0, 0, geneve_60hz, geneve, geneve, geneve, "Myarc", "Geneve 9640" , 0) |
| 623 | | COMP( 1990,genmod, geneve, 0, geneve_60hz, geneve, genmod, geneve, "Myarc", "Geneve 9640 (with Genmod modification)" , 0) |
| 573 | COMP( 1987,geneve, 0, 0, geneve_60hz, geneve, geneve, 0, "Myarc", "Geneve 9640" , 0) |
| 574 | COMP( 1990,genmod, geneve, 0, geneve_60hz, geneve, genmod, 0, "Myarc", "Geneve 9640 (with Genmod modification)" , 0) |
| 624 | 575 | |
src/mess/drivers/ti99_4p.c
| r5785 | r5786 | |
| 286 | 286 | |
| 287 | 287 | /* tms9901 */ |
| 288 | 288 | MDRV_TMS9901_ADD("tms9901", tms9901reset_param_ti99_4x) |
| 289 | | /* tms9902 */ |
| 290 | | MDRV_TMS9902_ADD("tms9902_0", tms9902_params_0) |
| 291 | | MDRV_TMS9902_ADD("tms9902_1", tms9902_params_1) |
| 292 | 289 | |
| 293 | 290 | MDRV_FLOPPY_4_DRIVES_ADD(ti99_4p_floppy_config) |
| 294 | 291 | |
| 295 | 292 | MDRV_SMARTMEDIA_ADD("smartmedia") |
| 293 | |
| 294 | MDRV_TI99_4_RS232_CARD_ADD("rs232") |
| 296 | 295 | MACHINE_DRIVER_END |
| 297 | 296 | |
| 298 | 297 | |
| r5785 | r5786 | |
| 321 | 320 | ROM_LOAD_OPTIONAL("spchrom.bin", 0x0000, 0x8000, CRC(58b155f7) SHA1(382292295c00dff348d7e17c5ce4da12a1d87763)) /* system speech ROM */ |
| 322 | 321 | ROM_END |
| 323 | 322 | |
| 324 | | static void ti99_4p_parallel_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 325 | | { |
| 326 | | /* parallel */ |
| 327 | | switch(state) |
| 328 | | { |
| 329 | | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 330 | | case MESS_DEVINFO_INT_TYPE: info->i = IO_PARALLEL; break; |
| 331 | | case MESS_DEVINFO_INT_READABLE: info->i = 1; break; |
| 332 | | case MESS_DEVINFO_INT_WRITEABLE: info->i = 1; break; |
| 333 | | case MESS_DEVINFO_INT_CREATABLE: info->i = 1; break; |
| 334 | | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; |
| 335 | | |
| 336 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 337 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(ti99_4_pio); break; |
| 338 | | case MESS_DEVINFO_PTR_UNLOAD: info->unload = DEVICE_IMAGE_UNLOAD_NAME(ti99_4_pio); break; |
| 339 | | |
| 340 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 341 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), ""); break; |
| 342 | | } |
| 343 | | } |
| 344 | | |
| 345 | | static void ti99_4p_serial_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 346 | | { |
| 347 | | /* serial */ |
| 348 | | switch(state) |
| 349 | | { |
| 350 | | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 351 | | case MESS_DEVINFO_INT_TYPE: info->i = IO_SERIAL; break; |
| 352 | | case MESS_DEVINFO_INT_READABLE: info->i = 1; break; |
| 353 | | case MESS_DEVINFO_INT_WRITEABLE: info->i = 1; break; |
| 354 | | case MESS_DEVINFO_INT_CREATABLE: info->i = 1; break; |
| 355 | | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; |
| 356 | | |
| 357 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 358 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(ti99_4_rs232); break; |
| 359 | | case MESS_DEVINFO_PTR_UNLOAD: info->unload = DEVICE_IMAGE_UNLOAD_NAME(ti99_4_rs232); break; |
| 360 | | |
| 361 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 362 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), ""); break; |
| 363 | | } |
| 364 | | } |
| 365 | | |
| 366 | | #if 0 |
| 367 | | static void ti99_4p_quickload_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 368 | | { |
| 369 | | /* quickload */ |
| 370 | | switch(state) |
| 371 | | { |
| 372 | | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 373 | | case MESS_DEVINFO_INT_TYPE: info->i = IO_QUICKLOAD; break; |
| 374 | | case MESS_DEVINFO_INT_READABLE: info->i = 1; break; |
| 375 | | case MESS_DEVINFO_INT_WRITEABLE: info->i = 1; break; |
| 376 | | case MESS_DEVINFO_INT_CREATABLE: info->i = 1; break; |
| 377 | | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; |
| 378 | | case MESS_DEVINFO_INT_RESET_ON_LOAD: info->i = 1; break; |
| 379 | | |
| 380 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 381 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(ti99_hsgpl); break; |
| 382 | | case MESS_DEVINFO_PTR_UNLOAD: info->unload = DEVICE_IMAGE_UNLOAD_NAME(ti99_hsgpl); break; |
| 383 | | } |
| 384 | | } |
| 385 | | #endif |
| 386 | | |
| 387 | | |
| 388 | | static SYSTEM_CONFIG_START(ti99_4p) |
| 389 | | CONFIG_DEVICE(ti99_4p_parallel_getinfo) |
| 390 | | CONFIG_DEVICE(ti99_4p_serial_getinfo) |
| 391 | | /*CONFIG_DEVICE(ti99_4p_quickload_getinfo)*/ |
| 392 | | SYSTEM_CONFIG_END |
| 393 | | |
| 394 | 323 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME */ |
| 395 | | COMP( 1996, ti99_4p, 0, 0, ti99_4p_60hz, ti99_4p, ti99_4p, ti99_4p,"snug", "SGCPU (a.k.a. 99/4P)" , GAME_NOT_WORKING ) |
| 324 | COMP( 1996, ti99_4p, 0, 0, ti99_4p_60hz, ti99_4p, ti99_4p, 0,"snug", "SGCPU (a.k.a. 99/4P)" , GAME_NOT_WORKING ) |
src/mess/drivers/ti99_4x.c
| r5785 | r5786 | |
| 564 | 564 | MDRV_MM58274C_ADD("mm58274c_floppy", floppy_mm58274c_interface) |
| 565 | 565 | /* tms9901 */ |
| 566 | 566 | MDRV_TMS9901_ADD("tms9901", tms9901reset_param_ti99_4x) |
| 567 | | /* tms9902 */ |
| 568 | | MDRV_TMS9902_ADD("tms9902_0", tms9902_params_0) |
| 569 | | MDRV_TMS9902_ADD("tms9902_1", tms9902_params_1) |
| 570 | 567 | |
| 571 | 568 | MDRV_WD179X_ADD("wd179x", ti99_wd17xx_interface ) |
| 572 | 569 | |
| r5785 | r5786 | |
| 574 | 571 | |
| 575 | 572 | MDRV_TI99_CARTRIDGE_ADD("ti99_multicart") |
| 576 | 573 | |
| 574 | MDRV_SMARTMEDIA_ADD("smartmedia") |
| 575 | |
| 576 | MDRV_TI99_4_RS232_CARD_ADD("rs232") |
| 577 | 577 | MACHINE_DRIVER_END |
| 578 | 578 | |
| 579 | 579 | static MACHINE_DRIVER_START(ti99_4_50hz) |
| r5785 | r5786 | |
| 617 | 617 | MDRV_MM58274C_ADD("mm58274c_floppy", floppy_mm58274c_interface) |
| 618 | 618 | /* tms9901 */ |
| 619 | 619 | MDRV_TMS9901_ADD("tms9901", tms9901reset_param_ti99_4x) |
| 620 | | /* tms9902 */ |
| 621 | | MDRV_TMS9902_ADD("tms9902_0", tms9902_params_0) |
| 622 | | MDRV_TMS9902_ADD("tms9902_1", tms9902_params_1) |
| 623 | 620 | |
| 624 | 621 | MDRV_WD179X_ADD("wd179x", ti99_wd17xx_interface ) |
| 625 | 622 | MDRV_FLOPPY_4_DRIVES_ADD(ti99_4_floppy_config) |
| 626 | 623 | |
| 627 | 624 | MDRV_TI99_CARTRIDGE_ADD("ti99_multicart") |
| 628 | 625 | |
| 626 | MDRV_SMARTMEDIA_ADD("smartmedia") |
| 627 | |
| 628 | MDRV_TI99_4_RS232_CARD_ADD("rs232") |
| 629 | 629 | MACHINE_DRIVER_END |
| 630 | 630 | |
| 631 | 631 | static MACHINE_DRIVER_START(ti99_4a_60hz) |
| r5785 | r5786 | |
| 670 | 670 | |
| 671 | 671 | /* tms9901 */ |
| 672 | 672 | MDRV_TMS9901_ADD("tms9901", tms9901reset_param_ti99_4x) |
| 673 | | /* tms9902 */ |
| 674 | | MDRV_TMS9902_ADD("tms9902_0", tms9902_params_0) |
| 675 | | MDRV_TMS9902_ADD("tms9902_1", tms9902_params_1) |
| 676 | 673 | |
| 677 | 674 | MDRV_WD179X_ADD("wd179x", ti99_wd17xx_interface ) |
| 678 | 675 | MDRV_FLOPPY_4_DRIVES_ADD(ti99_4_floppy_config) |
| 679 | 676 | |
| 680 | 677 | MDRV_TI99_CARTRIDGE_ADD("ti99_multicart") |
| 678 | |
| 679 | MDRV_SMARTMEDIA_ADD("smartmedia") |
| 680 | |
| 681 | MDRV_TI99_4_RS232_CARD_ADD("rs232") |
| 681 | 682 | MACHINE_DRIVER_END |
| 682 | 683 | |
| 683 | 684 | |
| r5785 | r5786 | |
| 722 | 723 | MDRV_MM58274C_ADD("mm58274c_floppy", floppy_mm58274c_interface) |
| 723 | 724 | /* tms9901 */ |
| 724 | 725 | MDRV_TMS9901_ADD("tms9901", tms9901reset_param_ti99_4x) |
| 725 | | /* tms9902 */ |
| 726 | | MDRV_TMS9902_ADD("tms9902_0", tms9902_params_0) |
| 727 | | MDRV_TMS9902_ADD("tms9902_1", tms9902_params_1) |
| 728 | 726 | |
| 729 | 727 | MDRV_WD179X_ADD("wd179x", ti99_wd17xx_interface ) |
| 730 | 728 | MDRV_FLOPPY_4_DRIVES_ADD(ti99_4_floppy_config) |
| 731 | 729 | |
| 732 | 730 | MDRV_TI99_CARTRIDGE_ADD("ti99_multicart") |
| 731 | |
| 732 | MDRV_SMARTMEDIA_ADD("smartmedia") |
| 733 | |
| 734 | MDRV_TI99_4_RS232_CARD_ADD("rs232") |
| 733 | 735 | MACHINE_DRIVER_END |
| 734 | 736 | |
| 735 | 737 | |
| r5785 | r5786 | |
| 782 | 784 | MDRV_MM58274C_ADD("mm58274c_floppy", floppy_mm58274c_interface) |
| 783 | 785 | /* tms9901 */ |
| 784 | 786 | MDRV_TMS9901_ADD("tms9901", tms9901reset_param_ti99_4x) |
| 785 | | /* tms9902 */ |
| 786 | | MDRV_TMS9902_ADD("tms9902_0", tms9902_params_0) |
| 787 | | MDRV_TMS9902_ADD("tms9902_1", tms9902_params_1) |
| 788 | 787 | |
| 789 | 788 | MDRV_WD179X_ADD("wd179x", ti99_wd17xx_interface ) |
| 790 | 789 | MDRV_FLOPPY_4_DRIVES_ADD(ti99_4_floppy_config) |
| 791 | 790 | MDRV_TI99_CARTRIDGE_ADD("ti99_multicart") |
| 792 | 791 | MDRV_SMARTMEDIA_ADD("smartmedia") |
| 792 | |
| 793 | MDRV_TI99_4_RS232_CARD_ADD("rs232") |
| 793 | 794 | MACHINE_DRIVER_END |
| 794 | 795 | |
| 795 | 796 | |
| r5785 | r5786 | |
| 891 | 892 | #define rom_ti99_4e rom_ti99_4 |
| 892 | 893 | #define rom_ti99_4ae rom_ti99_4a |
| 893 | 894 | |
| 894 | | static void ti99_4_parallel_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 895 | | { |
| 896 | | /* parallel */ |
| 897 | | switch(state) |
| 898 | | { |
| 899 | | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 900 | | case MESS_DEVINFO_INT_TYPE: info->i = IO_PARALLEL; break; |
| 901 | | case MESS_DEVINFO_INT_READABLE: info->i = 1; break; |
| 902 | | case MESS_DEVINFO_INT_WRITEABLE: info->i = 1; break; |
| 903 | | case MESS_DEVINFO_INT_CREATABLE: info->i = 1; break; |
| 904 | | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; |
| 905 | 895 | |
| 906 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 907 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(ti99_4_pio); break; |
| 908 | | case MESS_DEVINFO_PTR_UNLOAD: info->unload = DEVICE_IMAGE_UNLOAD_NAME(ti99_4_pio); break; |
| 909 | | |
| 910 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 911 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), ""); break; |
| 912 | | } |
| 913 | | } |
| 914 | | |
| 915 | | static void ti99_4_serial_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 916 | | { |
| 917 | | /* serial */ |
| 918 | | switch(state) |
| 919 | | { |
| 920 | | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 921 | | case MESS_DEVINFO_INT_TYPE: info->i = IO_SERIAL; break; |
| 922 | | case MESS_DEVINFO_INT_READABLE: info->i = 1; break; |
| 923 | | case MESS_DEVINFO_INT_WRITEABLE: info->i = 1; break; |
| 924 | | case MESS_DEVINFO_INT_CREATABLE: info->i = 1; break; |
| 925 | | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; |
| 926 | | |
| 927 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 928 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(ti99_4_rs232); break; |
| 929 | | case MESS_DEVINFO_PTR_UNLOAD: info->unload = DEVICE_IMAGE_UNLOAD_NAME(ti99_4_rs232); break; |
| 930 | | |
| 931 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 932 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), ""); break; |
| 933 | | } |
| 934 | | } |
| 935 | | |
| 936 | | #if 0 |
| 937 | | static void ti99_4_quickload_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 938 | | { |
| 939 | | /* quickload */ |
| 940 | | switch(state) |
| 941 | | { |
| 942 | | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 943 | | case MESS_DEVINFO_INT_TYPE: info->i = IO_QUICKLOAD; break; |
| 944 | | case MESS_DEVINFO_INT_READABLE: info->i = 1; break; |
| 945 | | case MESS_DEVINFO_INT_WRITEABLE: info->i = 1; break; |
| 946 | | case MESS_DEVINFO_INT_CREATABLE: info->i = 1; break; |
| 947 | | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; |
| 948 | | case MESS_DEVINFO_INT_RESET_ON_LOAD: info->i = 1; break; |
| 949 | | |
| 950 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 951 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(ti99_hsgpl); break; |
| 952 | | case MESS_DEVINFO_PTR_UNLOAD: info->unload = DEVICE_IMAGE_UNLOAD_NAME(ti99_hsgpl); break; |
| 953 | | } |
| 954 | | } |
| 955 | | #endif |
| 956 | | |
| 957 | | static SYSTEM_CONFIG_START(ti99_4) |
| 958 | | CONFIG_DEVICE(ti99_4_parallel_getinfo) |
| 959 | | CONFIG_DEVICE(ti99_4_serial_getinfo) |
| 960 | | /*CONFIG_DEVICE(ti99_4_quickload_getinfo)*/ |
| 961 | | SYSTEM_CONFIG_END |
| 962 | | |
| 963 | 896 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME */ |
| 964 | | COMP( 1979, ti99_4, 0, 0, ti99_4_60hz, ti99_4, ti99_4, ti99_4, "Texas Instruments", "TI99/4 Home Computer (US)" , 0) |
| 965 | | COMP( 1980, ti99_4e, ti99_4, 0, ti99_4_50hz, ti99_4, ti99_4, ti99_4, "Texas Instruments", "TI99/4 Home Computer (Europe)" , 0) |
| 966 | | COMP( 1981, ti99_4a, 0, 0, ti99_4a_60hz, ti99_4a, ti99_4a, ti99_4, "Texas Instruments", "TI99/4A Home Computer (US)" , 0) |
| 967 | | COMP( 1981, ti99_4ae, ti99_4a, 0, ti99_4a_50hz, ti99_4a, ti99_4a, ti99_4, "Texas Instruments", "TI99/4A Home Computer (Europe)" , 0) |
| 968 | | COMP( 1994, ti99_4ev, ti99_4a, 0, ti99_4ev_60hz,ti99_4a, ti99_4ev,ti99_4, "Texas Instruments", "TI99/4A Home Computer with EVPC" , 0) |
| 897 | COMP( 1979, ti99_4, 0, 0, ti99_4_60hz, ti99_4, ti99_4, 0, "Texas Instruments", "TI99/4 Home Computer (US)" , 0) |
| 898 | COMP( 1980, ti99_4e, ti99_4, 0, ti99_4_50hz, ti99_4, ti99_4, 0, "Texas Instruments", "TI99/4 Home Computer (Europe)" , 0) |
| 899 | COMP( 1981, ti99_4a, 0, 0, ti99_4a_60hz, ti99_4a, ti99_4a, 0, "Texas Instruments", "TI99/4A Home Computer (US)" , 0) |
| 900 | COMP( 1981, ti99_4ae, ti99_4a, 0, ti99_4a_50hz, ti99_4a, ti99_4a, 0, "Texas Instruments", "TI99/4A Home Computer (Europe)" , 0) |
| 901 | COMP( 1994, ti99_4ev, ti99_4a, 0, ti99_4ev_60hz,ti99_4a, ti99_4ev,0, "Texas Instruments", "TI99/4A Home Computer with EVPC" , 0) |