src/mame/machine/n64.c
| r6595 | r6596 | |
| 156 | 156 | } |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | | UINT8 is64_buffer[0x10000]; |
| 159 | static UINT8 is64_buffer[0x10000]; |
| 160 | 160 | |
| 161 | 161 | READ32_HANDLER( n64_is64_r ) |
| 162 | 162 | { |
| r6595 | r6596 | |
| 1384 | 1384 | } |
| 1385 | 1385 | |
| 1386 | 1386 | // RDRAM Interface |
| 1387 | | UINT32 ri_mode = 0; |
| 1388 | | UINT32 ri_config = 0; |
| 1389 | | UINT32 ri_current_load = 0; |
| 1390 | | UINT32 ri_select = 0; |
| 1391 | | UINT32 ri_count = 0; |
| 1392 | | UINT32 ri_latency = 0; |
| 1393 | | UINT32 ri_rerror = 0; |
| 1394 | | UINT32 ri_werror = 0; |
| 1387 | static UINT32 ri_mode = 0; |
| 1388 | static UINT32 ri_config = 0; |
| 1389 | static UINT32 ri_current_load = 0; |
| 1390 | static UINT32 ri_select = 0; |
| 1391 | static UINT32 ri_count = 0; |
| 1392 | static UINT32 ri_latency = 0; |
| 1393 | static UINT32 ri_rerror = 0; |
| 1394 | static UINT32 ri_werror = 0; |
| 1395 | 1395 | |
| 1396 | 1396 | READ32_HANDLER( n64_ri_reg_r ) |
| 1397 | 1397 | { |
| r6595 | r6596 | |
| 1542 | 1542 | switch (channel) |
| 1543 | 1543 | { |
| 1544 | 1544 | case 0: |
| 1545 | case 1: |
| 1545 | 1546 | { |
| 1546 | 1547 | rdata[0] = 0x05; |
| 1547 | 1548 | rdata[1] = 0x00; |
| 1548 | 1549 | rdata[2] = 0x02; |
| 1549 | 1550 | return 0; |
| 1550 | 1551 | } |
| 1551 | | case 1: |
| 1552 | 1552 | case 2: |
| 1553 | 1553 | case 3: |
| 1554 | 1554 | { |
| r6595 | r6596 | |
| 1580 | 1580 | { |
| 1581 | 1581 | UINT16 buttons = 0; |
| 1582 | 1582 | INT8 x = 0, y = 0; |
| 1583 | | /* add here tags for P2, P3 and P4 when implemented */ |
| 1584 | | static const char *const portnames[] = { "P1", "P1_ANALOG_X", "P1_ANALOG_Y" }; |
| 1583 | /* add here tags for P3 and P4 when implemented */ |
| 1584 | static const char *const portnames[] = { "P1", "P1_ANALOG_X", "P1_ANALOG_Y", "P2", "P2_ANALOG_X", "P2_ANALOG_Y" }; |
| 1585 | 1585 | |
| 1586 | 1586 | if (slength != 1 || rlength != 4) |
| 1587 | 1587 | { |
| r6595 | r6596 | |
| 1590 | 1590 | |
| 1591 | 1591 | switch (channel) |
| 1592 | 1592 | { |
| 1593 | | case 0: |
| 1593 | case 0: //p1 inputs |
| 1594 | case 1: //p2 inputs |
| 1594 | 1595 | { |
| 1595 | 1596 | buttons = input_port_read(machine, portnames[(channel*3) + 0]); |
| 1596 | 1597 | x = input_port_read(machine, portnames[(channel*3) + 1]) - 128; |
| r6595 | r6596 | |
| 1602 | 1603 | rdata[3] = (UINT8)(y); |
| 1603 | 1604 | return 0; |
| 1604 | 1605 | } |
| 1605 | | case 1: |
| 1606 | 1606 | case 2: |
| 1607 | 1607 | case 3: |
| 1608 | 1608 | { |
src/mess/drivers/n64.c
| r6595 | r6596 | |
| 60 | 60 | |
| 61 | 61 | PORT_START("P1_ANALOG_Y") |
| 62 | 62 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) PORT_PLAYER(1) PORT_REVERSE |
| 63 | |
| 64 | PORT_START("P2") |
| 65 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("Button A") |
| 66 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("Button B") |
| 67 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME("Button Z") |
| 68 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(2) PORT_NAME("Start") |
| 69 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_NAME("Joypad \xE2\x86\x91") /* Up */ |
| 70 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_NAME("Joypad \xE2\x86\x93") /* Down */ |
| 71 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_NAME("Joypad \xE2\x86\x90") /* Left */ |
| 72 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_NAME("Joypad \xE2\x86\x92") /* Right */ |
| 73 | PORT_BIT( 0x00c0, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 74 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_NAME("Button L") |
| 75 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_PLAYER(2) PORT_NAME("Button R") |
| 76 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_PLAYER(2) PORT_NAME("Button C \xE2\x86\x91") /* Up */ |
| 77 | PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_PLAYER(2) PORT_NAME("Button C \xE2\x86\x93") /* Down */ |
| 78 | PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_PLAYER(2) PORT_NAME("Button C \xE2\x86\x90") /* Left */ |
| 79 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_PLAYER(2) PORT_NAME("Button C \xE2\x86\x92") /* Right */ |
| 80 | |
| 81 | PORT_START("P2_ANALOG_X") |
| 82 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) PORT_PLAYER(2) |
| 83 | |
| 84 | PORT_START("P2_ANALOG_Y") |
| 85 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) PORT_PLAYER(2) PORT_REVERSE |
| 86 | |
| 63 | 87 | INPUT_PORTS_END |
| 64 | 88 | |
| 65 | 89 | /* ?? */ |