Previous 15994 Revisions Next

r4636 Wednesday 6th May, 2009 at 06:18:07 UTC by Barry Rodewald
[X68000] Added support for XPD-1LR dual D-pad controller.
[docs]messnew.txt
[src/mess/drivers]x68k.c

src/mess/drivers/x68k.c
r4635r4636
814814   return 0xff;
815815}
816816
817// XPD-1LR dual D-pad controller.
818// Sold with Video Game Anthology Vol 4: Libble Rabble.
819// Also compatible with Video Game Anthology Vol 5: Crazy Climber 1 & 2
820// Uses the same input multiplexer hardware as Megadrive controllers
821// Output is the same as for standard controllers, but when ctl is high,
822// the directions refer to the right D-pad, and when low, the left D-pad
823// The buttons are read the same as normal, regardless of ctl.
824static UINT8 xpd1lr_r(const device_config* device, int port)
825{
826   if(port == 1)
827   {
828      UINT8 porta = input_port_read(device->machine,"xpd1lr") & 0xff;
829      UINT8 portb = (input_port_read(device->machine,"xpd1lr") >> 8) & 0xff;
830      if(x68k_sys.mdctrl.mux1 & 0x10)
831      {   
832         return porta;
833      }
834      else
835      {   
836         return portb | (porta & 0x60);
837      }
838   }
839   if(port == 2)
840   {
841      UINT8 porta = (input_port_read(device->machine,"xpd1lr") >> 16) & 0xff;
842      UINT8 portb = (input_port_read(device->machine,"xpd1lr") >> 24) & 0xff;
843      if(x68k_sys.mdctrl.mux2 & 0x20)
844      {   
845         return porta;
846      }
847      else
848      {   
849         return portb | (porta & 0x60);
850      }
851   }
852   return 0xff;
853}
854
817855// Judging from the XM6 source code, PPI ports A and B are joystick inputs
818856static READ8_DEVICE_HANDLER( ppi_port_a_r )
819857{
r4635r4636
830868         return md_3button_r(device,1);
831869      case 0x02:  // 6-button Megadrive gamepad
832870         return md_6button_r(device,1);
871      case 0x03:  // XPD-1LR
872         return xpd1lr_r(device,1);
833873   }
834874   
835875   return 0xff;
r4635r4636
850890         return md_3button_r(device,2);
851891      case 0x20:  // 6-button Megadrive gamepad
852892         return md_6button_r(device,2);
893      case 0x30:  // XPD-1LR
894         return xpd1lr_r(device,2);
853895   }
854896   
855897   return 0xff;
r4635r4636
18841926   PORT_CATEGORY_ITEM(0x00,"Standard 2-button MSX/FM-Towns joystick",10)
18851927   PORT_CATEGORY_ITEM(0x01,"3-button Megadrive gamepad",11)
18861928   PORT_CATEGORY_ITEM(0x02,"6-button Megadrive gamepad",12)
1929   PORT_CATEGORY_ITEM(0x03,"XPD-1LR dual D-pad gamepad",13)
18871930   PORT_CATEGORY_CLASS(0xf0,0x00,"Joystick Port 2")
18881931   PORT_CATEGORY_ITEM(0x00,"Standard 2-button MSX/FM-Towns joystick",20)
18891932   PORT_CATEGORY_ITEM(0x10,"3-button Megadrive gamepad",21)
18901933   PORT_CATEGORY_ITEM(0x20,"6-button Megadrive gamepad",22)
1891// TODO: XPD-1LR (Dual D-pad) support
1934   PORT_CATEGORY_ITEM(0x30,"XPD-1LR dual D-pad gamepad",23)
18921935// TODO: Sharp Cyber Stick (CZ-8NJ2) support
18931936
18941937   PORT_START( "joy1" )
r4635r4636
21442187   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_NAME("MD Pad 2 X Button") PORT_CATEGORY(22)
21452188   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER(2) PORT_NAME("MD Pad 2 Mode Button") PORT_CATEGORY(22)
21462189
2190   // Dempa/Micomsoft XPD-1LR (dual D-pad gamepad sold with Libble Rabble)
2191   PORT_START("xpd1lr")
2192   PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_NAME("XPD Pad 1 Left/Up") PORT_8WAY PORT_PLAYER(1) PORT_CATEGORY(13)
2193   PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_NAME("XPD Pad 1 Left/Down") PORT_8WAY PORT_PLAYER(1) PORT_CATEGORY(13)
2194   PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_NAME("XPD Pad 1 Left/Left") PORT_8WAY PORT_PLAYER(1) PORT_CATEGORY(13)
2195   PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_NAME("XPD Pad 1 Left/Right") PORT_8WAY PORT_PLAYER(1) PORT_CATEGORY(13)
2196   PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CATEGORY(13)
2197   PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("XPD Pad 1 B Button") PORT_CATEGORY(13)
2198   PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("XPD Pad 1 A Button") PORT_CATEGORY(13)
2199   PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CATEGORY(13)
2200
2201   PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP ) PORT_NAME("XPD Pad 1 Right/Up") PORT_8WAY PORT_PLAYER(1) PORT_CATEGORY(13)
2202   PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) PORT_NAME("XPD Pad 1 Right/Down") PORT_8WAY PORT_PLAYER(1) PORT_CATEGORY(13)
2203   PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT ) PORT_NAME("XPD Pad 1 Right/Left") PORT_8WAY PORT_PLAYER(1) PORT_CATEGORY(13)
2204   PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT ) PORT_NAME("XPD Pad 1 Right/Right") PORT_8WAY PORT_PLAYER(1) PORT_CATEGORY(13)
2205   PORT_BIT( 0x00001000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CATEGORY(13)
2206   PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CATEGORY(13)
2207   PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CATEGORY(13)
2208   PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CATEGORY(13)
2209
2210   PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_NAME("XPD Pad 2 Left/Up") PORT_8WAY PORT_PLAYER(2) PORT_CATEGORY(23)
2211   PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_NAME("XPD Pad 2 Left/Down") PORT_8WAY PORT_PLAYER(2) PORT_CATEGORY(23)
2212   PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_NAME("XPD Pad 2 Left/Left") PORT_8WAY PORT_PLAYER(2) PORT_CATEGORY(23)
2213   PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_NAME("XPD Pad 2 Left/Right") PORT_8WAY PORT_PLAYER(2) PORT_CATEGORY(23)
2214   PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CATEGORY(23)
2215   PORT_BIT( 0x00200000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("XPD Pad 2 B Button") PORT_CATEGORY(23)
2216   PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("XPD Pad 2 A Button") PORT_CATEGORY(23)
2217   PORT_BIT( 0x00800000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CATEGORY(23)
2218
2219   PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP ) PORT_NAME("XPD Pad 2 Right/Up") PORT_8WAY PORT_PLAYER(2) PORT_CATEGORY(23)
2220   PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) PORT_NAME("XPD Pad 2 Right/Down") PORT_8WAY PORT_PLAYER(2) PORT_CATEGORY(23)
2221   PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT ) PORT_NAME("XPD Pad 2 Right/Left") PORT_8WAY PORT_PLAYER(2) PORT_CATEGORY(23)
2222   PORT_BIT( 0x08000000, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT ) PORT_NAME("XPD Pad 2 Right/Right") PORT_8WAY PORT_PLAYER(2) PORT_CATEGORY(23)
2223   PORT_BIT( 0x10000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CATEGORY(23)
2224   PORT_BIT( 0x20000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CATEGORY(23)
2225   PORT_BIT( 0x40000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CATEGORY(23)
2226   PORT_BIT( 0x80000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CATEGORY(23)
2227
21472228INPUT_PORTS_END
21482229
21492230static void dimdsk_set_geometry(const device_config* image)
docs/messnew.txt
r4635r4636
1010----------------------
1111- [CRVISION] Added support for stereo tapes. [Curt Coder]
1212
13- [X68000] Added support for the XPD-1LR dual D-pad controller.  [Barry Rodewald]
1314
1415
16
1517User Interface Changes:
1618-----------------------
1719(none)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team