src/mess/drivers/fmtowns.c
| r6371 | r6372 | |
| 612 | 612 | * Known bits: |
| 613 | 613 | * bit 7 = always 1 |
| 614 | 614 | * bit 4 = key release |
| 615 | | * bit 3 = ctrl (yet to be confirmed) |
| 616 | | * bit 2 = shift (yet to be confirmed) |
| 615 | * bit 3 = ctrl |
| 616 | * bit 2 = shift |
| 617 | 617 | * |
| 618 | 618 | * Second byte has the MSB reset, and contains the scancode of the key |
| 619 | 619 | * pressed or released. |
| r6371 | r6372 | |
| 629 | 629 | case 0: // key press |
| 630 | 630 | towns_kb_output = 0x80; |
| 631 | 631 | towns_kb_extend = scancode & 0x7f; |
| 632 | if(input_port_read(machine,"key3") & 0x00080000) |
| 633 | towns_kb_output |= 0x04; |
| 634 | if(input_port_read(machine,"key3") & 0x00040000) |
| 635 | towns_kb_output |= 0x08; |
| 632 | 636 | break; |
| 633 | 637 | case 1: // key release |
| 634 | 638 | towns_kb_output = 0x90; |
| 635 | 639 | towns_kb_extend = scancode & 0x7f; |
| 640 | if(input_port_read(machine,"key3") & 0x00080000) |
| 641 | towns_kb_output |= 0x04; |
| 642 | if(input_port_read(machine,"key3") & 0x00040000) |
| 643 | towns_kb_output |= 0x08; |
| 636 | 644 | break; |
| 637 | 645 | case 2: // extended byte |
| 638 | 646 | towns_kb_output = scancode; |
| r6371 | r6372 | |
| 1809 | 1817 | { towns_fdc_dma_w, 0, 0, 0 } |
| 1810 | 1818 | }; |
| 1811 | 1819 | |
| 1812 | | // for debugging |
| 1813 | 1820 | static const gfx_layout fnt_chars_16x16 = |
| 1814 | 1821 | { |
| 1815 | 1822 | 16,16, |
| r6371 | r6372 | |
| 1832 | 1839 | 8*16 |
| 1833 | 1840 | }; |
| 1834 | 1841 | |
| 1835 | | /* decoded for debugging purpose, this will be nuked in the end... */ |
| 1836 | 1842 | static GFXDECODE_START( towns ) |
| 1837 | 1843 | GFXDECODE_ENTRY( "user", 0x180000 + 0x3d800, text_chars, 0, 16 ) |
| 1838 | 1844 | GFXDECODE_ENTRY( "user", 0x180000, fnt_chars_16x16, 0, 16 ) |