Previous 15994 Revisions Next

r6372 Saturday 14th November, 2009 at 07:09:28 UTC by Barry Rodewald
[FMTOWNS] Added Shift and Ctrl key flags.
[src/mess/drivers]fmtowns.c

src/mess/drivers/fmtowns.c
r6371r6372
612612 *    Known bits:
613613 *      bit 7 = always 1
614614 *      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
617617 *
618618 *  Second byte has the MSB reset, and contains the scancode of the key
619619 *  pressed or released.
r6371r6372
629629      case 0:  // key press
630630         towns_kb_output = 0x80;
631631         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;
632636         break;
633637      case 1:  // key release
634638         towns_kb_output = 0x90;
635639         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;
636644         break;
637645      case 2:  // extended byte
638646         towns_kb_output = scancode;
r6371r6372
18091817   { towns_fdc_dma_w, 0, 0, 0 }
18101818};
18111819
1812// for debugging
18131820static const gfx_layout fnt_chars_16x16 =
18141821{
18151822   16,16,
r6371r6372
18321839   8*16
18331840};
18341841
1835/* decoded for debugging purpose, this will be nuked in the end... */
18361842static GFXDECODE_START( towns )
18371843   GFXDECODE_ENTRY( "user",   0x180000 + 0x3d800, text_chars,  0, 16 )
18381844   GFXDECODE_ENTRY( "user",   0x180000, fnt_chars_16x16,  0, 16 )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team