src/mess/video/i8275.c
| r2784 | r2785 | |
| 104 | 104 | |
| 105 | 105 | UINT8 fifo_buffer_1[16]; |
| 106 | 106 | UINT8 fifo_buffer_2[16]; |
| 107 | | UINT8 fifo_pos_1; |
| 108 | | UINT8 fifo_pos_2; |
| 107 | UINT8 fifo_write; |
| 109 | 108 | |
| 110 | 109 | int ypos; |
| 111 | 110 | int current_row; |
| r2784 | r2785 | |
| 113 | 112 | UINT8 cursor_blink_cnt; |
| 114 | 113 | UINT8 char_blink_cnt; |
| 115 | 114 | |
| 115 | UINT8 next_in_fifo; |
| 116 | |
| 117 | UINT8 lineattr; |
| 118 | UINT8 rvv; |
| 119 | UINT8 gpa; |
| 120 | UINT8 hlgt; |
| 121 | UINT8 underline; |
| 122 | UINT8 blink; |
| 123 | |
| 124 | UINT8 last_data; |
| 116 | 125 | }; |
| 117 | 126 | |
| 118 | 127 | INLINE i8275_t *get_safe_token(const device_config *device) |
| r2784 | r2785 | |
| 321 | 330 | UINT8 lc = 0; |
| 322 | 331 | UINT8 vsp = 0; |
| 323 | 332 | UINT8 lten = 0; |
| 324 | | |
| 333 | UINT8 fifo_read = 0; |
| 325 | 334 | for(line=0;line<=i8275->lines_per_row;line++) { |
| 326 | 335 | if (i8275->undeline_line_num & 0x08) { |
| 327 | 336 | vsp = (line==0 || line==i8275->lines_per_row) ? 1 : 0; |
| 328 | 337 | } |
| 329 | 338 | // If line counter is 1 then select right values |
| 330 | 339 | lc = (i8275->line_counter_mode==1) ? (line - 1) % i8275->lines_per_row : line; |
| 331 | | |
| 340 | fifo_read = 0; |
| 332 | 341 | for(xpos=0;xpos<=i8275->chars_per_row;xpos++) { |
| 333 | 342 | UINT8 chr = (i8275->buffer_used==0) ? i8275->row_buffer_2[xpos] : i8275->row_buffer_1[xpos]; |
| 334 | 343 | |
| 344 | if ((chr & 0x80)==0x80) { |
| 345 | if ((chr & 0xc0)==0xc0) { |
| 346 | // character attribute code |
| 347 | i8275->lineattr = 0; |
| 348 | } else { |
| 349 | // field attribute code |
| 350 | i8275->hlgt = chr & 1; |
| 351 | i8275->blink = (chr >> 1) & 1; |
| 352 | i8275->gpa = (chr >> 2) & 3; |
| 353 | i8275->rvv = (chr >> 4) & 1; |
| 354 | i8275->underline = (chr >> 5) & 1; |
| 355 | } |
| 356 | |
| 357 | if (i8275->field_attribute_mode==0) { |
| 358 | chr = (i8275->buffer_used==0) ? i8275->fifo_buffer_2[fifo_read] : i8275->fifo_buffer_1[fifo_read]; |
| 359 | fifo_read = (fifo_read + 1 ) % 16; |
| 360 | } else { |
| 361 | vsp = 1; |
| 362 | } |
| 363 | } |
| 364 | |
| 335 | 365 | if ((i8275->current_row == i8275->cursor_row) && (xpos == i8275->cursor_col)) { |
| 336 | 366 | int vis = 1; |
| 337 | 367 | if ((i8275->cursor_format & 2)==0) { |
| r2784 | r2785 | |
| 351 | 381 | i8275->ypos, // y position on screen |
| 352 | 382 | lc, // current line of char |
| 353 | 383 | (chr & 0x7f), // char code to be displayed |
| 354 | | 0, // line attribute code |
| 355 | | lten, // light enable signal |
| 356 | | 0, // reverse video signal |
| 384 | i8275->lineattr, // line attribute code |
| 385 | lten | i8275->underline, // light enable signal |
| 386 | i8275->rvv, // reverse video signal |
| 357 | 387 | vsp, // video suppression |
| 358 | | 0, // general purpose attribute code |
| 359 | | 0 // highlight |
| 388 | i8275->gpa, // general purpose attribute code |
| 389 | i8275->hlgt // highlight |
| 360 | 390 | ); |
| 361 | 391 | } |
| 362 | 392 | i8275->ypos++; |
| r2784 | r2785 | |
| 366 | 396 | |
| 367 | 397 | void i8275_dack_set_data(const device_config *device, UINT8 data) |
| 368 | 398 | { |
| 369 | | i8275_t *i8275 = get_safe_token(device); |
| 370 | | if(i8275->buffer_used == 0) { |
| 371 | | i8275->row_buffer_1[i8275->row_pos++] = data; |
| 372 | | } else { |
| 373 | | i8275->row_buffer_2[i8275->row_pos++] = data; |
| 399 | i8275_t *i8275 = get_safe_token(device); |
| 400 | |
| 401 | if (i8275->next_in_fifo == 1) |
| 402 | { |
| 403 | i8275->next_in_fifo = 0; |
| 404 | |
| 405 | if(i8275->buffer_used == 0) |
| 406 | { |
| 407 | i8275->fifo_buffer_1[i8275->fifo_write] = data & 0x7f; |
| 408 | } |
| 409 | else |
| 410 | { |
| 411 | i8275->fifo_buffer_2[i8275->fifo_write] = data & 0x7f; |
| 412 | } |
| 413 | i8275->fifo_write = (i8275->fifo_write + 1) % 16; |
| 414 | |
| 415 | if (i8275->last_data == 0xf1) { |
| 416 | i8275->row_pos = i8275->chars_per_row + 1; |
| 417 | } |
| 374 | 418 | } |
| 375 | | if ((i8275->row_pos - 1)==i8275->chars_per_row ) { |
| 419 | else |
| 420 | { |
| 421 | if(i8275->buffer_used == 0) |
| 422 | { |
| 423 | i8275->row_buffer_1[i8275->row_pos++] = data; |
| 424 | } |
| 425 | else |
| 426 | { |
| 427 | i8275->row_buffer_2[i8275->row_pos++] = data; |
| 428 | } |
| 429 | if (i8275->field_attribute_mode==0) |
| 430 | { |
| 431 | if ((data & 0x80)==0x80) |
| 432 | { |
| 433 | i8275->last_data = data; |
| 434 | i8275->next_in_fifo = 1; |
| 435 | } |
| 436 | } |
| 437 | } |
| 438 | |
| 439 | if ((i8275->row_pos - 1)==i8275->chars_per_row ) |
| 440 | { |
| 376 | 441 | i8275->buffer_used = (i8275->buffer_used==0) ? 1 : 0; |
| 377 | 442 | i8275->row_pos = 0; |
| 443 | i8275->fifo_write = 0; |
| 378 | 444 | i8275_draw_char_line(device); |
| 379 | 445 | } |
| 380 | | if (i8275->ypos >= (i8275->lines_per_row+1) * (i8275->rows_per_frame + 1)) { |
| 446 | if (i8275->current_row == (i8275->rows_per_frame + 1)) |
| 447 | { |
| 381 | 448 | i8275->ypos = 0; |
| 382 | 449 | i8275->current_row = 0; |
| 383 | 450 | i8275->intf->dma_request(device,0); |
| r2784 | r2785 | |
| 388 | 455 | void i8275_update(const device_config *device, bitmap_t *bitmap, const rectangle *cliprect) |
| 389 | 456 | { |
| 390 | 457 | i8275_t *i8275 = get_safe_token(device); |
| 458 | i8275->ypos = 0; |
| 459 | i8275->lineattr = 0; |
| 460 | i8275->rvv = 0; |
| 461 | i8275->gpa = 0; |
| 462 | i8275->hlgt = 0; |
| 463 | i8275->underline = 0; |
| 464 | i8275->blink = 0; |
| 465 | i8275->row_pos = 0; |
| 466 | i8275->fifo_write = 0; |
| 467 | |
| 391 | 468 | if ((i8275->status_reg & I8275_STATUS_VIDEO_ENABLE)==0) { |
| 392 | 469 | fillbitmap(bitmap, get_black_pen(device->machine), cliprect); |
| 393 | 470 | } else { |
| r2784 | r2785 | |
| 397 | 474 | // if value < 32 it is visible otherwise not |
| 398 | 475 | i8275->char_blink_cnt++; |
| 399 | 476 | if(i8275->char_blink_cnt==64) i8275->char_blink_cnt = 0; |
| 400 | | |
| 401 | 477 | i8275->intf->dma_request(device,1); |
| 402 | 478 | } |
| 403 | 479 | if (i8275->status_reg & I8275_STATUS_INTERRUPT_ENABLE) { |
| r2784 | r2785 | |
| 490 | 566 | i8275->row_pos = 0; |
| 491 | 567 | i8275->buffer_used = 0; |
| 492 | 568 | |
| 493 | | i8275->fifo_pos_1 = 0; |
| 494 | | i8275->fifo_pos_2 = 0; |
| 569 | i8275->fifo_write = 0; |
| 495 | 570 | |
| 496 | 571 | i8275->ypos = 0; |
| 497 | 572 | i8275->current_row = 0; |
| 498 | 573 | |
| 499 | 574 | i8275->cursor_blink_cnt = 0; |
| 500 | 575 | i8275->char_blink_cnt = 0; |
| 576 | i8275->next_in_fifo = 0; |
| 577 | |
| 578 | i8275->lineattr = 0; |
| 579 | i8275->rvv = 0; |
| 580 | i8275->gpa = 0; |
| 581 | i8275->hlgt = 0; |
| 582 | i8275->underline = 0; |
| 583 | i8275->blink = 0; |
| 501 | 584 | } |
| 502 | 585 | |
| 503 | 586 | static DEVICE_SET_INFO( i8275 ) |
src/mess/machine/radio86.c
| r2784 | r2785 | |
| 32 | 32 | READ8_HANDLER (radio86_8255_portb_r2 ) |
| 33 | 33 | { |
| 34 | 34 | UINT8 key = 0xff; |
| 35 | | if ((radio86_keyboard_mask & 0x01)!=0) { key &= input_port_read_indexed(machine,0); } |
| 36 | | if ((radio86_keyboard_mask & 0x02)!=0) { key &= input_port_read_indexed(machine,1); } |
| 37 | | if ((radio86_keyboard_mask & 0x04)!=0) { key &= input_port_read_indexed(machine,2); } |
| 38 | | if ((radio86_keyboard_mask & 0x08)!=0) { key &= input_port_read_indexed(machine,3); } |
| 39 | | if ((radio86_keyboard_mask & 0x10)!=0) { key &= input_port_read_indexed(machine,4); } |
| 40 | | if ((radio86_keyboard_mask & 0x20)!=0) { key &= input_port_read_indexed(machine,5); } |
| 41 | | if ((radio86_keyboard_mask & 0x40)!=0) { key &= input_port_read_indexed(machine,6); } |
| 42 | | if ((radio86_keyboard_mask & 0x80)!=0) { key &= input_port_read_indexed(machine,7); } |
| 35 | if ((radio86_keyboard_mask & 0x01)!=0) { key &= input_port_read(machine,"LINE0"); } |
| 36 | if ((radio86_keyboard_mask & 0x02)!=0) { key &= input_port_read(machine,"LINE1"); } |
| 37 | if ((radio86_keyboard_mask & 0x04)!=0) { key &= input_port_read(machine,"LINE2"); } |
| 38 | if ((radio86_keyboard_mask & 0x08)!=0) { key &= input_port_read(machine,"LINE3"); } |
| 39 | if ((radio86_keyboard_mask & 0x10)!=0) { key &= input_port_read(machine,"LINE4"); } |
| 40 | if ((radio86_keyboard_mask & 0x20)!=0) { key &= input_port_read(machine,"LINE5"); } |
| 41 | if ((radio86_keyboard_mask & 0x40)!=0) { key &= input_port_read(machine,"LINE6"); } |
| 42 | if ((radio86_keyboard_mask & 0x80)!=0) { key &= input_port_read(machine,"LINE7"); } |
| 43 | 43 | return key; |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | READ8_HANDLER (radio86_8255_portc_r2 ) |
| 47 | 47 | { |
| 48 | | return input_port_read_indexed(machine, 8); |
| 48 | double level = cassette_input(image_from_devtype_and_index(IO_CASSETTE, 0)); |
| 49 | UINT8 dat = input_port_read(machine,"LINE8"); |
| 50 | if (level < 0) { |
| 51 | dat ^= 0x10; |
| 52 | } |
| 53 | return dat; |
| 49 | 54 | } |
| 50 | 55 | |
| 51 | 56 | WRITE8_HANDLER (radio86_8255_porta_w2 ) |
| r2784 | r2785 | |
| 117 | 122 | dma8257_config(0, &radio86_dma); |
| 118 | 123 | dma8257_reset(); |
| 119 | 124 | } |
| 120 | | |
| 121 | | READ8_HANDLER( radio86_keyboard_r ) |
| 122 | | { |
| 123 | | return ppi8255_r((device_config*)device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_1" ), offset & 3); |
| 124 | | } |
| 125 | | |
| 126 | | WRITE8_HANDLER( radio86_keyboard_w ) |
| 127 | | { |
| 128 | | ppi8255_w((device_config*)device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_1" ),offset^0x03, data); |
| 129 | | } |
| 130 | | |
| 131 | | READ8_HANDLER( radio86_tape_r ) |
| 132 | | { |
| 133 | | double level = cassette_input(image_from_devtype_and_index(IO_CASSETTE, 0)); |
| 134 | | if (level < 0) { |
| 135 | | return 0x00; |
| 136 | | } |
| 137 | | return 0xff; |
| 138 | | } |
| 139 | | |
src/mess/drivers/radio86.c
| r2784 | r2785 | |
| 12 | 12 | #include "machine/8255ppi.h" |
| 13 | 13 | #include "machine/8257dma.h" |
| 14 | 14 | #include "video/i8275.h" |
| 15 | #include "devices/cassette.h" |
| 16 | #include "formats/rk_cas.h" |
| 15 | 17 | #include "includes/radio86.h" |
| 16 | 18 | |
| 17 | 19 | /* Address maps */ |
| r2784 | r2785 | |
| 27 | 29 | |
| 28 | 30 | /* Input ports */ |
| 29 | 31 | INPUT_PORTS_START( radio86 ) |
| 30 | | PORT_START /* line 0 */ |
| 32 | PORT_START_TAG("LINE0") |
| 31 | 33 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Home") PORT_CODE(KEYCODE_HOME) |
| 32 | 34 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ins") PORT_CODE(KEYCODE_INSERT) |
| 33 | 35 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC) |
| r2784 | r2785 | |
| 36 | 38 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3") PORT_CODE(KEYCODE_F3) |
| 37 | 39 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F4") PORT_CODE(KEYCODE_F4) |
| 38 | 40 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F5") PORT_CODE(KEYCODE_F5) |
| 39 | | PORT_START /* line 1 */ |
| 41 | PORT_START_TAG("LINE1") |
| 40 | 42 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Tab") PORT_CODE(KEYCODE_TAB) |
| 41 | 43 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("End") PORT_CODE(KEYCODE_END) |
| 42 | 44 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER) |
| r2784 | r2785 | |
| 45 | 47 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP) |
| 46 | 48 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT) |
| 47 | 49 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN) |
| 48 | | PORT_START /* line 2 */ |
| 50 | PORT_START_TAG("LINE2") |
| 49 | 51 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) |
| 50 | 52 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) |
| 51 | 53 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) |
| r2784 | r2785 | |
| 54 | 56 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) |
| 55 | 57 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) |
| 56 | 58 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) |
| 57 | | PORT_START /* line 3 */ |
| 59 | PORT_START_TAG("LINE3") |
| 58 | 60 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) |
| 59 | 61 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) |
| 60 | 62 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(":") PORT_CODE(KEYCODE_EQUALS) |
| r2784 | r2785 | |
| 63 | 65 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS) |
| 64 | 66 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(">") PORT_CODE(KEYCODE_STOP) |
| 65 | 67 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("?") PORT_CODE(KEYCODE_SLASH) |
| 66 | | PORT_START /* line 4 */ |
| 68 | PORT_START_TAG("LINE4") |
| 67 | 69 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("~") PORT_CODE(KEYCODE_TILDE) |
| 68 | 70 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) |
| 69 | 71 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) |
| r2784 | r2785 | |
| 72 | 74 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) |
| 73 | 75 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) |
| 74 | 76 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) |
| 75 | | PORT_START /* line 5 */ |
| 77 | PORT_START_TAG("LINE5") |
| 76 | 78 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) |
| 77 | 79 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) |
| 78 | 80 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) |
| r2784 | r2785 | |
| 81 | 83 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) |
| 82 | 84 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) |
| 83 | 85 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) |
| 84 | | PORT_START /* line 6 */ |
| 86 | PORT_START_TAG("LINE6") |
| 85 | 87 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) |
| 86 | 88 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) |
| 87 | 89 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) |
| r2784 | r2785 | |
| 90 | 92 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) |
| 91 | 93 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) |
| 92 | 94 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) |
| 93 | | PORT_START /* line 7 */ |
| 95 | PORT_START_TAG("LINE7") |
| 94 | 96 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) |
| 95 | 97 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) |
| 96 | 98 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) |
| r2784 | r2785 | |
| 99 | 101 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("]") PORT_CODE(KEYCODE_CLOSEBRACE) |
| 100 | 102 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("'") PORT_CODE(KEYCODE_QUOTE) |
| 101 | 103 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) |
| 102 | | PORT_START /* line 8 */ |
| 103 | | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 104 | | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 105 | | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 106 | | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 107 | | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 104 | PORT_START_TAG("LINE8") |
| 105 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 106 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) |
| 107 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED) |
| 108 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) |
| 109 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) |
| 108 | 110 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) |
| 109 | 111 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) |
| 110 | 112 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Rus/Lat") PORT_CODE(KEYCODE_LALT) PORT_CODE(KEYCODE_RALT) |
| r2784 | r2785 | |
| 132 | 134 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 133 | 135 | MDRV_SCREEN_SIZE(78*6, 30*10) |
| 134 | 136 | MDRV_SCREEN_VISIBLE_AREA(0, 78*6-1, 0, 30*10-1) |
| 135 | | MDRV_PALETTE_LENGTH(2) |
| 136 | | MDRV_PALETTE_INIT(black_and_white) |
| 137 | MDRV_PALETTE_LENGTH(3) |
| 138 | MDRV_PALETTE_INIT(radio86) |
| 137 | 139 | |
| 138 | 140 | MDRV_VIDEO_START(generic_bitmapped) |
| 139 | 141 | MDRV_VIDEO_UPDATE(radio86) |
| 140 | | |
| 142 | |
| 143 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 144 | MDRV_SOUND_ADD(WAVE, 0) |
| 145 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 141 | 146 | MACHINE_DRIVER_END |
| 142 | 147 | |
| 148 | static void radio86_cassette_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 149 | { |
| 150 | /* cassette */ |
| 151 | switch(state) |
| 152 | { |
| 153 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 154 | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; |
| 155 | case MESS_DEVINFO_INT_CASSETTE_DEFAULT_STATE: info->i = CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED; break; |
| 156 | case MESS_DEVINFO_PTR_CASSETTE_FORMATS: info->p = (void *)rkr_cassette_formats; break; |
| 157 | |
| 158 | default: cassette_device_getinfo(devclass, state, info); break; |
| 159 | } |
| 160 | } |
| 161 | |
| 143 | 162 | /* ROM definition */ |
| 144 | 163 | ROM_START( radio86 ) |
| 145 | 164 | ROM_REGION( 0x10000, REGION_CPU1, ROMREGION_ERASEFF ) |
| r2784 | r2785 | |
| 164 | 183 | ROM_LOAD ("radio86.fnt", 0x0000, 0x0400, CRC(7666bd5e) SHA1(8652787603bee9b4da204745e3b2aa07a4783dfc)) |
| 165 | 184 | ROM_END |
| 166 | 185 | |
| 186 | SYSTEM_CONFIG_START(radio86) |
| 187 | CONFIG_DEVICE(radio86_cassette_getinfo); |
| 188 | SYSTEM_CONFIG_END |
| 189 | |
| 167 | 190 | /* Driver */ |
| 168 | 191 | |
| 169 | 192 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */ |
| 170 | | COMP( 1986, radio86, 0, 0, radio86, radio86,radio86, NULL, "", "Radio-86RK", 0) |
| 171 | | COMP( 1986, radio4k, radio86, 0, radio86, radio86,radio86, NULL, "", "Radio-86RK 4k", 0) |
| 172 | | COMP( 1986, spektr01,radio86, 0, radio86, radio86,radio86, NULL, "", "Spektr-001", 0) |
| 193 | COMP( 1986, radio86, 0, 0, radio86, radio86,radio86, radio86, "", "Radio-86RK", 0) |
| 194 | COMP( 1986, radio4k, radio86, 0, radio86, radio86,radio86, radio86, "", "Radio-86RK 4k", 0) |
| 195 | COMP( 1986, spektr01,radio86, 0, radio86, radio86,radio86, radio86, "", "Spektr-001", 0) |