src/mess/drivers/x1.c
| r10882 | r10883 | |
| 29 | 29 | per-game/program specific TODO: |
| 30 | 30 | - Dragon Buster: it crashed to me once with a obj flag hang; |
| 31 | 31 | - Exoa II - Warroid: goes offsync with the PCG beam positions; |
| 32 | - The Goonies (x1 only): goes offsync with the PCG beam positions; |
| 32 | 33 | - Lupin 3 / Take the A-Train / Makai et al (basically anything that uses cz-8fb02 basic): uses x1turbo bankswitch memory RAM, doesn't load due of it; |
| 33 | 34 | - Hydlide 3: can't get the user disk to work properly |
| 34 | 35 | - Legend of Kage / Gandhara: has serious graphic artifacts, pcg doesn't scroll properly, dma bugs? |
| r10882 | r10883 | |
| 42 | 43 | - Thexder: (x1turbo) Can't start a play, keyboard related issue? |
| 43 | 44 | - Graphtol: sets up x1turboz paletteram, graphic garbage due of it; |
| 44 | 45 | - Luna City: text gfxs looks doubled in y-axis |
| 46 | - Shiver Ghost: changes the vertical visible area during scrolling, and that doesn't work too well with current mc6845 core. |
| 47 | - New X1 Demo: needs partial updates to work properly; |
| 45 | 48 | |
| 46 | 49 | Notes: |
| 47 | 50 | - An interesting feature of the Sharp X-1 is the extended i/o bank. When the ppi port c bit 5 |
| r10882 | r10883 | |
| 529 | 532 | pri_mask_val = priority_mixer_pri(machine,color); |
| 530 | 533 | if(pri_mask_val & pri) continue; |
| 531 | 534 | |
| 535 | if((color == 8 && state->scrn_reg.blackclip & 0x10) || (color == 9 && state->scrn_reg.blackclip & 0x20)) // bitmap color clip to black conditions |
| 536 | color = 0; |
| 537 | |
| 532 | 538 | x1_draw_pixel(machine,bitmap,y*(mc6845_tile_height)+yi,x*8+xi,color,0,0); |
| 533 | 539 | } |
| 534 | 540 | } |
| r10882 | r10883 | |
| 560 | 566 | *************************************/ |
| 561 | 567 | |
| 562 | 568 | |
| 563 | | static UINT8 check_keyboard_press(running_machine *machine) |
| 569 | static UINT16 check_keyboard_press(running_machine *machine) |
| 564 | 570 | { |
| 565 | 571 | static const char *const portnames[3] = { "key1","key2","key3" }; |
| 566 | 572 | int i,port_i,scancode; |
| r10882 | r10883 | |
| 613 | 619 | { |
| 614 | 620 | if((f_key >> i) & 0x01) |
| 615 | 621 | { |
| 616 | | return scancode + ((keymod & 0x02) ? 0 : 5); |
| 622 | return (scancode + ((keymod & 0x02) ? 0 : 5)) | 0x100; |
| 617 | 623 | } |
| 618 | 624 | scancode++; |
| 619 | 625 | } |
| r10882 | r10883 | |
| 641 | 647 | if(check_keyboard_press(machine) != 0) |
| 642 | 648 | val &= ~0x40; |
| 643 | 649 | |
| 644 | | if((check_keyboard_press(machine) & 0xf0) == 0x70) |
| 650 | if(check_keyboard_press(machine) & 0x100) //function keys |
| 645 | 651 | val &= ~0x80; |
| 646 | 652 | |
| 647 | 653 | return val; |
| r10882 | r10883 | |
| 891 | 897 | //case 0xe5: //timer irq clear |
| 892 | 898 | // break; |
| 893 | 899 | case 0xe6: //key data readout |
| 894 | | state->sub_val[0] = check_keyboard_shift(space->machine); |
| 895 | | state->sub_val[1] = check_keyboard_press(space->machine); |
| 900 | state->sub_val[0] = check_keyboard_shift(space->machine) & 0xff; |
| 901 | state->sub_val[1] = check_keyboard_press(space->machine) & 0xff; |
| 896 | 902 | state->sub_cmd_length = 2; |
| 897 | 903 | break; |
| 898 | 904 | // case 0xe7: // TV Control |
| r10882 | r10883 | |
| 1372 | 1378 | |
| 1373 | 1379 | static WRITE8_HANDLER( x1_blackclip_w ) |
| 1374 | 1380 | { |
| 1381 | /* |
| 1382 | -x-- ---- replace blanking duration with black |
| 1383 | --x- ---- replace bitmap palette 1 with black |
| 1384 | ---x ---- replace bitmap palette 0 with black |
| 1385 | ---- x--- enable text blackclip |
| 1386 | ---- -xxx palette color number for text black |
| 1387 | */ |
| 1375 | 1388 | x1_state *state = space->machine->driver_data<x1_state>(); |
| 1376 | 1389 | state->scrn_reg.blackclip = data; |
| 1377 | | if(data & 0xf0) |
| 1390 | if(data & 0x40) |
| 1378 | 1391 | printf("Blackclip data access %02x\n",data); |
| 1379 | 1392 | } |
| 1380 | 1393 | |
| r10882 | r10883 | |
| 1813 | 1826 | state->vdisp = (device->machine->primary_screen->vpos() < vblank_line) ? 0x80 : 0x00; |
| 1814 | 1827 | state->vsync = (device->machine->primary_screen->vpos() < vblank_line) ? 0x00 : 0x04; |
| 1815 | 1828 | |
| 1829 | // popmessage("%d",vblank_line); |
| 1830 | |
| 1816 | 1831 | res = (input_port_read(device->machine, "SYSTEM") & 0x10) | state->sub_obf | state->vsync | state->vdisp; |
| 1817 | 1832 | |
| 1818 | 1833 | //popmessage("%d",vblank_line); |