Previous 15994 Revisions Next

r10071 Monday 17th January, 2011 at 14:42:30 UTC by Angelo Salese
[PC-8801]: Implemented joystick inputs, used by Mappy
[src/mess/drivers]pc8801.c

src/mess/drivers/pc8801.c
r10070r10071
11491149   PORT_DIPSETTING(    0x80, "9600bps" )
11501150   PORT_DIPSETTING(    0x90, "19200bps" )
11511151
1152   PORT_START("OPNA")
1153   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
1154   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
1155   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
1156   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
1157   PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
1158
1159   PORT_START("OPNB")
1160   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
1161   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
1162   PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED )
1163
11521164   PORT_START("MEM")
11531165   PORT_CONFNAME( 0x1f, 0x00, "Extension memory" )
11541166   PORT_CONFSETTING(    0x00, DEF_STR( None ) )
r10070r10071
12121224      pc8801_raise_irq(device->machine,4);
12131225}
12141226
1227/* TODO: mouse routing (that's why I don't use DEVCB_INPUT_PORT here) */
1228static READ8_DEVICE_HANDLER( opn_porta_r ) { return input_port_read(device->machine, "OPNA"); }
1229static READ8_DEVICE_HANDLER( opn_portb_r ) { return input_port_read(device->machine, "OPNB"); }
12151230
1216static READ8_DEVICE_HANDLER( opn_dummy_input ) { return 0xff; }
1217
12181231static const ym2203_interface pc88_ym2203_intf =
12191232{
12201233   {
12211234      AY8910_LEGACY_OUTPUT,
12221235      AY8910_DEFAULT_LOADS,
1223      DEVCB_HANDLER(opn_dummy_input),
1224      DEVCB_HANDLER(opn_dummy_input),
1236      DEVCB_HANDLER(opn_porta_r),
1237      DEVCB_HANDLER(opn_portb_r),
12251238      DEVCB_NULL,
12261239      DEVCB_NULL
12271240   },

Previous 15994 Revisions Next


© 1998-2018 The MESS Team