Previous 15994 Revisions Next

r2798 Sunday 1st June, 2008 at 15:52:29 UTC by Fabio Priuli
[MEKD2] added tentative inputs to get rid of the last input_port_read_indexed occurrence
[src/mess/drivers]mekd2.c
[src/mess/video]mekd2.c

src/mess/video/mekd2.c
r2797r2798
5353{
5454   int width = video_screen_get_width(screen);
5555    int x, y;
56   char port[5];
5657
5758    for (x = 0; x < 6; x++)
5859    {
r2797r2798
8283            int sx = width - 182 + x * 37;
8384            int color, code = layout[y][x];
8485
85            color = (input_port_read_indexed(screen->machine, code / 7) & (0x40 >> (code % 7))) ? 0 : 1;
86         sprintf(port, "KEY%d", code / 7);
87            color = (input_port_read(screen->machine, port) & (0x40 >> (code % 7))) ? 0 : 1;
8688
8789            videoram[6 * 2 + code] = color;
8890            drawgfx (bitmap, screen->machine->gfx[1],
src/mess/drivers/mekd2.c
r2797r2798
9696   AM_RANGE(0xe000, 0xe3ff) AM_ROM AM_MIRROR(0x1c00)   /* JBUG ROM */
9797ADDRESS_MAP_END
9898
99/* 2008-05 FP: Among the 8 Unknown inputs there are 4 command keys, the other inputs being unused:
100  - P : Punch data from memory to magnetic tape
101  - L : Load memory from magnetic tape
102  - N : Trace one instruction
103  - V : Set (and remove) breakpoints
104 */
99105static INPUT_PORTS_START( mekd2 )
100   PORT_START         /* IN0 keys row 0 */
106   PORT_START_TAG("KEY0")
107   PORT_BIT(0x80, 0x80, IPT_UNUSED)
108   PORT_BIT(0x40, 0x40, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0)
109   PORT_BIT(0x20, 0x20, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1)
110   PORT_BIT(0x10, 0x10, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2)
111   PORT_BIT(0x08, 0x08, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3)
112   PORT_BIT(0x04, 0x04, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4)
113   PORT_BIT(0x02, 0x02, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5)
114   PORT_BIT(0x01, 0x01, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6)
115   
116   PORT_START_TAG("KEY1")
117   PORT_BIT(0x80, 0x80, IPT_UNUSED)
118   PORT_BIT(0x40, 0x40, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7)
119   PORT_BIT(0x20, 0x20, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8)
120   PORT_BIT(0x10, 0x10, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9)
121   PORT_BIT(0x08, 0x08, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A)
122   PORT_BIT(0x04, 0x04, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B)
123   PORT_BIT(0x02, 0x02, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C)
124   PORT_BIT(0x01, 0x01, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D)
125
126   PORT_START_TAG("KEY2")
127   PORT_BIT(0x80, 0x80, IPT_UNUSED)
128   PORT_BIT(0x40, 0x40, IPT_KEYBOARD) PORT_NAME("E (hex)") PORT_CODE(KEYCODE_E)
129   PORT_BIT(0x20, 0x20, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F)
130   PORT_BIT(0x10, 0x10, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M)
131   PORT_BIT(0x08, 0x08, IPT_KEYBOARD) PORT_NAME("E (escape)") PORT_CODE(KEYCODE_H)
132   PORT_BIT(0x04, 0x04, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R)
133   PORT_BIT(0x02, 0x02, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G)
134   PORT_BIT(0x01, 0x01, IPT_KEYBOARD) PORT_NAME("Unknown 1")
135
136   PORT_START_TAG("KEY3")
137   PORT_BIT(0x80, 0x80, IPT_UNUSED)
138   PORT_BIT(0x40, 0x40, IPT_KEYBOARD) PORT_NAME("Unknown 2")
139   PORT_BIT(0x20, 0x20, IPT_KEYBOARD) PORT_NAME("Unknown 3") // this one corresponds to the 'square' key in the current code
140   PORT_BIT(0x10, 0x10, IPT_KEYBOARD) PORT_NAME("Unknown 4")
141   PORT_BIT(0x08, 0x08, IPT_KEYBOARD) PORT_NAME("Unknown 5")
142   PORT_BIT(0x04, 0x04, IPT_KEYBOARD) PORT_NAME("Unknown 6")
143   PORT_BIT(0x02, 0x02, IPT_KEYBOARD) PORT_NAME("Unknown 7")
144   PORT_BIT(0x01, 0x01, IPT_KEYBOARD) PORT_NAME("Unknown 8")
101145INPUT_PORTS_END
102146
103147static const gfx_layout led_layout =

Previous 15994 Revisions Next


© 1998-2018 The MESS Team