Previous 15994 Revisions Next

r2240 Thursday 3rd April, 2008 at 22:45:43 UTC by Stefano Priore
Converted to tagged inputs
[src/mess/drivers]a2600.c glasgow.c gmaster.c

src/mess/drivers/glasgow.c
r2239r2240
318318{
319319  UINT16 data;
320320  data=0x0300;
321  key_low=readinputport(0x00);
322  key_hi=readinputport(0x01);
321  key_low = readinputportbytag("LINE0");
322  key_hi =  readinputportbytag("LINE1");
323323//logerror("Keyboard Offset = %x Data = %x\n  ",offset,data);
324324  if (key_select==key_low){data=data&0x100;}
325325  if (key_select==key_hi){data=data&0x200;}
r2239r2240
330330{
331331 UINT16 data;
332332
333 if (key_selector==0) data=readinputport(0x00);else data=readinputport(0x01);
333 if (key_selector==0) data=readinputportbytag("LINE0");else data=readinputportbytag("LINE1");
334334 logerror("read Keyboard Offset = %x Data = %x   Select = %x \n  ",offset,data,key_selector);
335335 data=data<<8;
336336 return data ;
r2239r2240
493493static READ32_HANDLER(read_newkeys32) // Dallas 32, Roma 32
494494{
495495 UINT32 data;
496 if (key_selector==0) data=readinputport(0x00);else data=readinputport(0x01);
497 //if (key_selector==1) data=readinputport(0x00);else data=0;
496 if (key_selector==0) data=readinputportbytag("LINE0");else data=readinputportbytag("LINE1");
497 //if (key_selector==1) data=readinputportbytag("LINE0");else data=0;
498498 logerror("read Keyboard Offset = %x Data = %x\n  ",offset,data);
499499 data=data<<24;
500500 return data ;
r2239r2240
605605   if (my_cursor != NULL)
606606      set_cursor (my_cursor);
607607
608   m_button1=readinputport(0x04);
609    m_button2=readinputport(0x05);
608    m_button1=readinputportbytag("BUTTON_L");
609    m_button2=readinputportbytag("BUTTON_R");
610610
611611    if ( m_button1) MOUSE_BUTTON1_WAIT = 0;
612612
r2239r2240
780780ADDRESS_MAP_END
781781
782782static INPUT_PORTS_START( new_keyboard ) //Amsterdam, Dallas 32, Roma, Roma 32
783  PORT_START
783  PORT_START_TAG("LINE0")
784784  PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("A1")  PORT_CODE(KEYCODE_A )
785785  PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("B2")  PORT_CODE(KEYCODE_B )
786786  PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("C3")  PORT_CODE(KEYCODE_C )
r2239r2240
795795  PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F6")  PORT_CODE(KEYCODE_6 )
796796  PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("0")   PORT_CODE(KEYCODE_9 )
797797  PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("9")   PORT_CODE(KEYCODE_0 )
798  PORT_START
798  PORT_START_TAG("LINE1")
799799  PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("INF") PORT_CODE(KEYCODE_F1 )
800800  PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("POS") PORT_CODE(KEYCODE_F2 )
801801  PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("LEV") PORT_CODE(KEYCODE_F3 )
r2239r2240
807807  PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("G7")  PORT_CODE(KEYCODE_7 )
808808  PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("H8")  PORT_CODE(KEYCODE_8 )
809809
810  PORT_START
811   PORT_BIT( 0xffff, 0x00, IPT_MOUSE_X)  PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_MINMAX(0, 65535)    PORT_PLAYER(1)
810  PORT_START_TAG("MOUSE_X")
811  PORT_BIT( 0xffff, 0x00, IPT_MOUSE_X)  PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_MINMAX(0, 65535)    PORT_PLAYER(1)
812812
813    PORT_START
814   PORT_BIT( 0xffff, 0x00, IPT_MOUSE_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_MINMAX(0, 65535)    PORT_PLAYER(1)
813  PORT_START_TAG("MOUSE_Y")
814  PORT_BIT( 0xffff, 0x00, IPT_MOUSE_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_MINMAX(0, 65535)    PORT_PLAYER(1)
815815
816   PORT_START
817   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_CODE(MOUSECODE_BUTTON1) PORT_NAME("left button")
816  PORT_START_TAG("BUTTON_L")
817  PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_CODE(MOUSECODE_BUTTON1) PORT_NAME("left button")
818818
819      PORT_START
820   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_CODE(MOUSECODE_BUTTON2) PORT_NAME("right button")
819  PORT_START_TAG("BUTTON_R")
820  PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_CODE(MOUSECODE_BUTTON2) PORT_NAME("right button")
821821INPUT_PORTS_END
822822
823823
824824
825825static INPUT_PORTS_START( old_keyboard )   //Glasgow,Dallas
826  PORT_START
826  PORT_START_TAG("LINE0")
827827    PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9")   PORT_CODE(KEYCODE_9 )
828828    PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CL")  PORT_CODE(KEYCODE_F5 )
829829    PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C3")  PORT_CODE(KEYCODE_C )
r2239r2240
837837    PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F6")  PORT_CODE(KEYCODE_6 )
838838    PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B2")  PORT_CODE(KEYCODE_B )
839839    PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B2")  PORT_CODE(KEYCODE_2 )
840  PORT_START
840  PORT_START_TAG("LINE1")
841841    PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E5")  PORT_CODE(KEYCODE_E )
842842    PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E5")  PORT_CODE(KEYCODE_5 )
843843    PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("INF") PORT_CODE(KEYCODE_F1 )
r2239r2240
850850    PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G7")  PORT_CODE(KEYCODE_7 )
851851    PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("MEM") PORT_CODE(KEYCODE_F4)
852852
853      PORT_START
854   PORT_BIT( 0xffff, 0x00, IPT_MOUSE_X)  PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_MINMAX(0, 65535)    PORT_PLAYER(1)
853  PORT_START_TAG("MOUSE_X")
854    PORT_BIT( 0xffff, 0x00, IPT_MOUSE_X)  PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_MINMAX(0, 65535)    PORT_PLAYER(1)
855855
856    PORT_START
857   PORT_BIT( 0xffff, 0x00, IPT_MOUSE_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_MINMAX(0, 65535)    PORT_PLAYER(1)
856  PORT_START_TAG("MOUSE_Y")
857    PORT_BIT( 0xffff, 0x00, IPT_MOUSE_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_MINMAX(0, 65535)    PORT_PLAYER(1)
858858
859   PORT_START
860   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_CODE(MOUSECODE_BUTTON1) PORT_NAME("left button")
859  PORT_START_TAG("BUTTON_L")
860    PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_CODE(MOUSECODE_BUTTON1) PORT_NAME("left button")
861861
862      PORT_START
863   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_CODE(MOUSECODE_BUTTON2) PORT_NAME("right button")
864
865
862  PORT_START_TAG("BUTTON_R")
863    PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_CODE(MOUSECODE_BUTTON2) PORT_NAME("right button")
866864INPUT_PORTS_END
867865
868866
r2239r2240
991989   static float diff_x, diff_y, del_x, del_y;
992990
993991    save_x = m_x;
994   save_y = m_y;
992    save_y = m_y;
995993
996    m_x=readinputport(0x02);
997    m_y=readinputport(0x03);
994    m_x=readinputportbytag("MOUSE_X");
995    m_y=readinputportbytag("MOUSE_Y");
998996
999997//    logerror("m_x   = %d \n  ",m_x);
1000998//    logerror("m_y   = %d \n  ",m_y);
src/mess/drivers/a2600.c
r2239r2240
10701070static WRITE8_HANDLER( switch_A_w )
10711071{
10721072   /* Left controller port */
1073   if ( readinputport(9) / CATEGORY_SELECT == 0x03 ) {
1073   if ( readinputportbytag("CONTROLLERS") / CATEGORY_SELECT == 0x03 ) {
10741074      keypad_left_column = data / 16;
10751075   }
10761076
10771077   /* Right controller port */
1078   switch( readinputport(9) % CATEGORY_SELECT ) {
1078   switch( readinputportbytag("CONTROLLERS") % CATEGORY_SELECT ) {
10791079   case 0x03:   /* Keypad */
10801080      keypad_right_column = data & 0x0F;
10811081      break;
r2239r2240
10911091   UINT8 val = 0;
10921092
10931093   /* Left controller port PINs 1-4 ( 4321 ) */
1094   switch( readinputport(9) / CATEGORY_SELECT ) {
1094   switch( readinputportbytag("CONTROLLERS") / CATEGORY_SELECT ) {
10951095   case 0x00:  /* Joystick */
10961096   case 0x05:   /* Joystick w/Boostergrip */
1097      val |= readinputport(6) & 0xF0;
1097      val |= readinputportbytag("SWA_JOY") & 0xF0;
10981098      break;
10991099   case 0x01:  /* Paddle */
1100      val |= readinputport(7) & 0xF0;
1100      val |= readinputportbytag("SWA_PAD") & 0xF0;
11011101      break;
11021102   case 0x02:   /* Driving */
11031103      val |= 0xC0;
1104      val |= ( driving_lookup[ ( readinputport(12) & 0x18 ) >> 3 ] << 4 );
1104      val |= ( driving_lookup[ ( readinputportbytag("WHEEL_L") & 0x18 ) >> 3 ] << 4 );
11051105      break;
11061106   case 0x06:   /* Trakball CX-22 */
11071107   case 0x07:   /* Trakball CX-80 / ST mouse */
r2239r2240
11121112   }
11131113
11141114   /* Right controller port PINs 1-4 ( 4321 ) */
1115   switch( readinputport(9) % CATEGORY_SELECT ) {
1115   switch( readinputportbytag("CONTROLLERS") % CATEGORY_SELECT ) {
11161116   case 0x00:   /* Joystick */
11171117   case 0x05:   /* Joystick w/Boostergrip */
1118      val |= readinputport(6) & 0x0F;
1118      val |= readinputportbytag("SWA_JOY") & 0x0F;
11191119      break;
11201120   case 0x01:   /* Paddle */
1121      val |= readinputport(7) & 0x0F;
1121      val |= readinputportbytag("SWA_PAD") & 0x0F;
11221122      break;
11231123   case 0x02:   /* Driving */
11241124      val |= 0x0C;
1125      val |= ( driving_lookup[ ( readinputport(13) & 0x18 ) >> 3 ] );
1125      val |= ( driving_lookup[ ( readinputportbytag("WHEEL_R") & 0x18 ) >> 3 ] );
11261126      break;
11271127   case 0x06:   /* Trakball CX-22 */
11281128   case 0x07:   /* Trakball CX-80 / ST mouse */
r2239r2240
11791179
11801180   switch( offset ) {
11811181   case 0:   /* Left controller port PIN 5 */
1182      switch ( readinputport(9) / CATEGORY_SELECT ) {
1182      switch ( readinputportbytag("CONTROLLERS") / CATEGORY_SELECT ) {
11831183      case 0x00:   /* Joystick */
11841184         return TIA_INPUT_PORT_ALWAYS_OFF;
11851185      case 0x01:   /* Paddle */
1186         return readinputport(0);
1186         return readinputportbytag("PADDLE1");
11871187      case 0x03:   /* Keypad */
11881188         for ( i = 0; i < 4; i++ ) {
11891189            if ( ! ( ( keypad_left_column >> i ) & 0x01 ) ) {
1190               if ( ( readinputport(10) >> 3*i ) & 0x01 ) {
1190               if ( ( readinputportbytag("KEYPAD_L") >> 3*i ) & 0x01 ) {
11911191                  return TIA_INPUT_PORT_ALWAYS_ON;
11921192               } else {
11931193                  return TIA_INPUT_PORT_ALWAYS_OFF;
r2239r2240
11961196         }
11971197         return TIA_INPUT_PORT_ALWAYS_ON;
11981198      case 0x05:   /* Boostergrip joystick */
1199         return ( readinputport(4) & 0x40 ) ? TIA_INPUT_PORT_ALWAYS_OFF : TIA_INPUT_PORT_ALWAYS_ON;
1199         return ( readinputportbytag("BUTTONS_L") & 0x40 ) ? TIA_INPUT_PORT_ALWAYS_OFF : TIA_INPUT_PORT_ALWAYS_ON;
12001200      default:
12011201         return TIA_INPUT_PORT_ALWAYS_OFF;
12021202      }
12031203      break;
12041204   case 1:   /* Right controller port PIN 5 */
1205      switch ( readinputport(9) / CATEGORY_SELECT ) {
1205      switch ( readinputportbytag("CONTROLLERS") / CATEGORY_SELECT ) {
12061206      case 0x00:   /* Joystick */
12071207         return TIA_INPUT_PORT_ALWAYS_OFF;
12081208      case 0x01:   /* Paddle */
1209         return readinputport(1);
1209         return readinputportbytag("PADDLE3");
12101210      case 0x03:   /* Keypad */
12111211         for ( i = 0; i < 4; i++ ) {
12121212            if ( ! ( ( keypad_left_column >> i ) & 0x01 ) ) {
1213               if ( ( readinputport(10) >> 3*i ) & 0x02 ) {
1213               if ( ( readinputportbytag("KEYPAD_L") >> 3*i ) & 0x02 ) {
12141214                  return TIA_INPUT_PORT_ALWAYS_ON;
12151215               } else {
12161216                  return TIA_INPUT_PORT_ALWAYS_OFF;
r2239r2240
12191219         }
12201220         return TIA_INPUT_PORT_ALWAYS_ON;
12211221      case 0x05:   /* Joystick w/Boostergrip */
1222         return ( readinputport(4) & 0x20 ) ? TIA_INPUT_PORT_ALWAYS_OFF : TIA_INPUT_PORT_ALWAYS_ON;
1222         return ( readinputportbytag("BUTTONS_L") & 0x20 ) ? TIA_INPUT_PORT_ALWAYS_OFF : TIA_INPUT_PORT_ALWAYS_ON;
12231223      default:
12241224         return TIA_INPUT_PORT_ALWAYS_OFF;
12251225      }
12261226      break;
12271227   case 2:   /* Left controller port PIN 9 */
1228      switch ( readinputport(9) % CATEGORY_SELECT ) {
1228      switch ( readinputportbytag("CONTROLLERS") % CATEGORY_SELECT ) {
12291229      case 0x00:   /* Joystick */
12301230         return TIA_INPUT_PORT_ALWAYS_OFF;
12311231      case 0x01:   /* Paddle */
1232         return readinputport(2);
1232         return readinputportbytag("PADDLE2");
12331233      case 0x03:   /* Keypad */
12341234         for ( i = 0; i < 4; i++ ) {
12351235            if ( ! ( ( keypad_right_column >> i ) & 0x01 ) ) {
1236               if ( ( readinputport(11) >> 3*i ) & 0x01 ) {
1236               if ( ( readinputportbytag("KEYPAD_R") >> 3*i ) & 0x01 ) {
12371237                  return TIA_INPUT_PORT_ALWAYS_ON;
12381238               } else {
12391239                  return TIA_INPUT_PORT_ALWAYS_OFF;
r2239r2240
12421242         }
12431243         return TIA_INPUT_PORT_ALWAYS_ON;
12441244      case 0x05:   /* Joystick w/Boostergrip */
1245         return ( readinputport(5) & 0x40 ) ? TIA_INPUT_PORT_ALWAYS_OFF : TIA_INPUT_PORT_ALWAYS_ON;
1245         return ( readinputportbytag("BUTTONS_R") & 0x40 ) ? TIA_INPUT_PORT_ALWAYS_OFF : TIA_INPUT_PORT_ALWAYS_ON;
12461246      default:
12471247         return TIA_INPUT_PORT_ALWAYS_OFF;
12481248      }
12491249      break;
12501250   case 3:   /* Right controller port PIN 9 */
1251      switch ( readinputport(9) % CATEGORY_SELECT ) {
1251      switch ( readinputportbytag("CONTROLLERS") % CATEGORY_SELECT ) {
12521252      case 0x00:   /* Joystick */
12531253         return TIA_INPUT_PORT_ALWAYS_OFF;
12541254      case 0x01:   /* Paddle */
1255         return readinputport(3);
1255         return readinputportbytag("PADDLE4");
12561256      case 0x03:   /* Keypad */
12571257         for ( i = 0; i < 4; i++ ) {
12581258            if ( ! ( ( keypad_right_column >> i ) & 0x01 ) ) {
1259               if ( ( readinputport(11) >> 3*i ) & 0x02 ) {
1259               if ( ( readinputportbytag("KEYPAD_R") >> 3*i ) & 0x02 ) {
12601260                  return TIA_INPUT_PORT_ALWAYS_ON;
12611261               } else {
12621262                  return TIA_INPUT_PORT_ALWAYS_OFF;
r2239r2240
12651265         }
12661266         return TIA_INPUT_PORT_ALWAYS_ON;
12671267      case 0x05:   /* Joystick w/Boostergrip */
1268         return ( readinputport(5) & 0x20 ) ? TIA_INPUT_PORT_ALWAYS_OFF : TIA_INPUT_PORT_ALWAYS_ON;
1268         return ( readinputportbytag("BUTTONS_R") & 0x20 ) ? TIA_INPUT_PORT_ALWAYS_OFF : TIA_INPUT_PORT_ALWAYS_ON;
12691269      default:
12701270         return TIA_INPUT_PORT_ALWAYS_OFF;
12711271      }
12721272      break;
12731273   case 4:   /* Left controller port PIN 6 */
1274      switch ( readinputport(9) / CATEGORY_SELECT ) {
1274      switch ( readinputportbytag("CONTROLLERS") / CATEGORY_SELECT ) {
12751275      case 0x00:   /* Joystick */
12761276      case 0x05:   /* Joystick w/Boostergrip */
1277         return readinputport(4);
1277         return readinputportbytag("BUTTONS_L");
12781278      case 0x01:   /* Paddle */
12791279         return 0xff;
12801280      case 0x02:   /* Driving */
1281         return readinputport(4) << 3;
1281         return readinputportbytag("BUTTONS_L") << 3;
12821282      case 0x03:   /* Keypad */
12831283         for ( i = 0; i < 4; i++ ) {
12841284            if ( ! ( ( keypad_left_column >> i ) & 0x01 ) ) {
1285               if ( ( readinputport(10) >> 3*i ) & 0x04 ) {
1285               if ( ( readinputportbytag("KEYPAD_L") >> 3*i ) & 0x04 ) {
12861286                  return 0xff;
12871287               } else {
12881288                  return 0x00;
r2239r2240
12911291         }
12921292         return 0xff;
12931293      case 0x06:   /* Trakball CX-22 */
1294         return readinputport(4) << 4;
1294         return readinputportbytag("BUTTONS_L") << 4;
12951295      default:
12961296         return 0xff;
12971297      }
12981298      break;
12991299   case 5:   /* Right controller port PIN 6 */
1300      switch ( readinputport(9) % CATEGORY_SELECT ) {
1300      switch ( readinputportbytag("CONTROLLERS") % CATEGORY_SELECT ) {
13011301      case 0x00:   /* Joystick */
13021302      case 0x05:   /* Joystick w/Boostergrip */
1303         return readinputport(5);
1303         return readinputportbytag("BUTTONS_R");
13041304      case 0x01:   /* Paddle */
13051305         return 0xff;
13061306      case 0x02:   /* Driving */
1307         return readinputport(5) << 3;
1307         return readinputportbytag("BUTTONS_R") << 3;
13081308      case 0x03:   /* Keypad */
13091309         for ( i = 0; i < 4; i++ ) {
13101310            if ( ! ( ( keypad_right_column >> i ) & 0x01 ) ) {
1311               if ( ( readinputport(11) >> 3*i ) & 0x04 ) {
1311               if ( ( readinputportbytag("KEYPAD_R") >> 3*i ) & 0x04 ) {
13121312                  return 0xff;
13131313               } else {
13141314                  return 0x00;
r2239r2240
13171317         }
13181318         return 0xff;
13191319      case 0x06:   /* Trakball CX-22 */
1320         return readinputport(5) << 4;
1320         return readinputportbytag("BUTTONS_R") << 4;
13211321      default:
13221322         return 0xff;
13231323      }
r2239r2240
17871787
17881788static INPUT_PORTS_START( a2600 )
17891789
1790   PORT_START /* [0] */
1790   PORT_START_TAG("PADDLE1") /* [0] */
17911791   PORT_BIT( 0xff, 0x80, IPT_PADDLE) PORT_SENSITIVITY(40) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_CATEGORY(11) PORT_PLAYER(1) PORT_REVERSE
1792   PORT_START /* [1] */
1792   PORT_START_TAG("PADDLE3") /* [1] */
17931793   PORT_BIT( 0xff, 0x80, IPT_PADDLE) PORT_SENSITIVITY(40) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_CATEGORY(11) PORT_PLAYER(3) PORT_REVERSE
1794   PORT_START /* [2] */
1794   PORT_START_TAG("PADDLE2") /* [2] */
17951795   PORT_BIT( 0xff, 0x80, IPT_PADDLE) PORT_SENSITIVITY(40) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_CATEGORY(21) PORT_PLAYER(2) PORT_REVERSE
1796   PORT_START /* [3] */
1796   PORT_START_TAG("PADDLE4") /* [3] */
17971797   PORT_BIT( 0xff, 0x80, IPT_PADDLE) PORT_SENSITIVITY(40) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_CATEGORY(21) PORT_PLAYER(4) PORT_REVERSE PORT_CODE_DEC(KEYCODE_4_PAD) PORT_CODE_INC(KEYCODE_6_PAD)
17981798
1799   PORT_START /* [4] left port button(s) */
1799   PORT_START_TAG("BUTTONS_L") /* [4] left port button(s) */
18001800//  PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3) PORT_CATEGORY(15) PORT_PLAYER(1)
18011801//  PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_CATEGORY(15) PORT_PLAYER(1)
18021802   PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_CATEGORY(15) PORT_PLAYER(1)
r2239r2240
18051805   PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_CATEGORY(10) PORT_PLAYER(1)
18061806   PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_CATEGORY(10) PORT_PLAYER(1)
18071807
1808   PORT_START /* [5] right port button(s) */
1808   PORT_START_TAG("BUTTONS_R") /* [5] right port button(s) */
18091809//  PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3) PORT_CATEGORY(25) PORT_PLAYER(2)
18101810//  PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_CATEGORY(25) PORT_PLAYER(2)
18111811   PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_CATEGORY(25) PORT_PLAYER(2)
r2239r2240
18141814   PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_CATEGORY(20) PORT_PLAYER(2)
18151815   PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_CATEGORY(20) PORT_PLAYER(2)
18161816
1817   PORT_START /* [6] SWCHA joystick */
1817   PORT_START_TAG("SWA_JOY") /* [6] SWCHA joystick */
18181818   PORT_BIT ( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_CATEGORY(20) PORT_PLAYER(2)
18191819   PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_CATEGORY(20) PORT_PLAYER(2)
18201820   PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_CATEGORY(20) PORT_PLAYER(2)
r2239r2240
18241824   PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_CATEGORY(10) PORT_PLAYER(1)
18251825   PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_CATEGORY(10) PORT_PLAYER(1)
18261826
1827   PORT_START /* [7] SWCHA paddles */
1827   PORT_START_TAG("SWA_PAD") /* [7] SWCHA paddles */
18281828   PORT_BIT ( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
18291829   PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
18301830   PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_CATEGORY(21) PORT_PLAYER(4)
r2239r2240
18341834   PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_CATEGORY(11) PORT_PLAYER(3)
18351835   PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_CATEGORY(11) PORT_PLAYER(1)
18361836
1837   PORT_START /* [8] SWCHB */
1837   PORT_START_TAG("SWB") /* [8] SWCHB */
18381838   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Reset Game") PORT_CODE(KEYCODE_2)
18391839   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START) PORT_NAME("Select Game")
18401840   PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
r2239r2240
18501850   PORT_DIPSETTING(    0x80, "A" )
18511851   PORT_DIPSETTING(    0x00, "B" )
18521852
1853   PORT_START /* [9] */
1853   PORT_START_TAG("CONTROLLERS") /* [9] */
18541854   PORT_CATEGORY_CLASS( 0xf0, 0x00, STR_LEFT_CONTROLLER )
18551855   PORT_CATEGORY_ITEM(    0x00, DEF_STR( Joystick ), 10 )
18561856   PORT_CATEGORY_ITEM(    0x10, STR_PADDLES, 11 )
r2239r2240
18761876   PORT_CATEGORY_ITEM(    0x0a, STR_KIDVID, 30 )
18771877   //PORT_CATEGORY_ITEM(    0x0b, "Save Key", 31 )
18781878
1879   PORT_START   /* [10] left keypad */
1879   PORT_START_TAG("KEYPAD_L")   /* [10] left keypad */
18801880   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CATEGORY(13) PORT_NAME("left 1") PORT_CODE(KEYCODE_7_PAD)
18811881   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CATEGORY(13) PORT_NAME("left 2") PORT_CODE(KEYCODE_8_PAD)
18821882   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CATEGORY(13) PORT_NAME("left 3") PORT_CODE(KEYCODE_9_PAD)
r2239r2240
18901890   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CATEGORY(13) PORT_NAME("left 0") PORT_CODE(KEYCODE_DEL_PAD)
18911891   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CATEGORY(13) PORT_NAME("left #") PORT_CODE(KEYCODE_ENTER_PAD)
18921892
1893   PORT_START  /* [11] right keypad */
1893   PORT_START_TAG("KEYPAD_R")  /* [11] right keypad */
18941894   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CATEGORY(23) PORT_NAME("right 1") PORT_CODE(KEYCODE_5)
18951895   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CATEGORY(23) PORT_NAME("right 2") PORT_CODE(KEYCODE_6)
18961896   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CATEGORY(23) PORT_NAME("right 3") PORT_CODE(KEYCODE_7)
r2239r2240
19041904   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CATEGORY(23) PORT_NAME("right 0") PORT_CODE(KEYCODE_B)
19051905   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CATEGORY(23) PORT_NAME("right #") PORT_CODE(KEYCODE_N)
19061906
1907   PORT_START   /* [12] left driving controller */
1907   PORT_START_TAG("WHEEL_L")   /* [12] left driving controller */
19081908   PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_CATEGORY(12) PORT_SENSITIVITY(40) PORT_KEYDELTA(5) PORT_PLAYER(1)
19091909
1910   PORT_START   /* [13] right driving controller */
1910   PORT_START_TAG("WHEEL_R")   /* [13] right driving controller */
19111911   PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_CATEGORY(22) PORT_SENSITIVITY(40) PORT_KEYDELTA(5) PORT_PLAYER(2)
19121912
1913   PORT_START   /* [14] left light gun X */
1913   PORT_START_TAG("GUNX_L")   /* [14] left light gun X */
19141914//  PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CATEGORY(14) PORT_CROSSHAIR( X, 1.0, 0.0, 0 ) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1)
19151915
1916   PORT_START   /* [15] left light gun Y */
1916   PORT_START_TAG("GUNY_L")   /* [15] left light gun Y */
19171917//  PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CATEGORY(14) PORT_CROSSHAIR( Y, 1.0, 0.0, 0 ) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1)
19181918
1919   PORT_START   /* [16] right light gun X */
1919   PORT_START_TAG("GUNX_R")   /* [16] right light gun X */
19201920//  PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CATEGORY(24) PORT_CROSSHAIR( X, 1.0, 0.0, 0 ) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(2)
19211921
1922   PORT_START   /* [17] right light gun Y */
1922   PORT_START_TAG("GUNY_R")   /* [17] right light gun Y */
19231923//  PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CATEGORY(24) PORT_CROSSHAIR( Y, 1.0, 0.0, 0 ) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(2)
19241924
1925   PORT_START   /* [18] left trak ball X */
1925   PORT_START_TAG("TRAKX_L")   /* [18] left trak ball X */
19261926   PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_CATEGORY(15) PORT_SENSITIVITY(40) PORT_KEYDELTA(5) PORT_PLAYER(1)
19271927
1928   PORT_START   /* [19] left trak ball Y */
1928   PORT_START_TAG("TRAKY_L")   /* [19] left trak ball Y */
19291929   PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_CATEGORY(15) PORT_SENSITIVITY(40) PORT_KEYDELTA(5) PORT_PLAYER(1)
19301930
1931   PORT_START   /* [20] right trak ball X */
1931   PORT_START_TAG("TRAKX_R")   /* [20] right trak ball X */
19321932   PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_CATEGORY(25) PORT_SENSITIVITY(40) PORT_KEYDELTA(5) PORT_PLAYER(2)
19331933
1934   PORT_START   /* [21] right trak ball Y */
1934   PORT_START_TAG("TRAKY_R")   /* [21] right trak ball Y */
19351935   PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_CATEGORY(25) PORT_SENSITIVITY(40) PORT_KEYDELTA(5) PORT_PLAYER(2)
19361936
19371937INPUT_PORTS_END
src/mess/drivers/gmaster.c
r2239r2240
106106    UINT8 data=0xff;
107107    switch (offset) {
108108    case UPD7810_PORTA:
109   data=readinputport(0);
109   data=readinputportbytag("JOY");
110110   break;
111111    default:
112112      logerror("%.4x port %d read %.2x\n",(int)activecpu_get_reg(CPUINFO_INT_PC),offset,data);
r2239r2240
137137ADDRESS_MAP_END
138138
139139static INPUT_PORTS_START( gmaster )
140    PORT_START
140    PORT_START_TAG("JOY")
141141    PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT)
142142    PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
143143    PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
144144    PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP   )
145     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_NAME("B")
146     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_NAME("A")
147     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SELECT)  PORT_NAME("select")
148     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START) PORT_NAME("start")
145    PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_NAME("B")
146    PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_NAME("A")
147    PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SELECT)  PORT_NAME("select")
148    PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START) PORT_NAME("start")
149149INPUT_PORTS_END
150150
151151/* palette in red, green, blue tribles */
152152static unsigned char gmaster_palette[2][3] =
153153{
154154#if 1
155    // ziemlich schwierig den lcd touch rüberzubringen
156    // es ist hauptsächlich die das fleckige grünlich, bläuliche
155    // ziemlich schwierig den lcd touch r�berzubringen
156    // es ist haupts�chlich die das fleckige gr�nlich, bl�uliche
157157    { 130, 159, 166 },
158158    { 45,45,43 }
159159#else

Previous 15994 Revisions Next


© 1998-2018 The MESS Team