trunk/src/mame/drivers/namcos22.c
| r20682 | r20683 | |
| 2659 | 2659 | set_led_status(machine(), 0, data & 2); |
| 2660 | 2660 | } |
| 2661 | 2661 | |
| 2662 | | READ8_MEMBER(namcos22_state::propcycle_mcu_adc_r) |
| 2662 | READ8_MEMBER(namcos22_state::namcos22s_mcu_adc_r) |
| 2663 | 2663 | { |
| 2664 | | // H+L = horizontal, 1 H+L = vertical |
| 2665 | | UINT16 ddx, ddy; |
| 2666 | | |
| 2667 | | ddx = ioport("STICKX")->read(); |
| 2668 | | if (ddx > 0) ddx -= 1; |
| 2669 | | ddy = ioport("STICKY")->read(); |
| 2670 | | if (ddy > 0) ddy -= 1; |
| 2671 | | |
| 2672 | | ddx <<= 2; |
| 2673 | | ddy <<= 2; |
| 2674 | | |
| 2675 | | switch (offset) |
| 2676 | | { |
| 2677 | | case 0: |
| 2678 | | return (ddx & 0xff); |
| 2679 | | case 1: |
| 2680 | | return (ddx>>8); |
| 2681 | | case 2: |
| 2682 | | return (ddy & 0xff); |
| 2683 | | case 3: |
| 2684 | | return (ddy>>8); |
| 2685 | | default: |
| 2686 | | return 0; |
| 2687 | | } |
| 2664 | static const char *const portnames[] = { "ADC0", "ADC1", "ADC2", "ADC3" }; |
| 2665 | if (offset & 1) |
| 2666 | return (ioport(portnames[offset >> 1 & 3])->read_safe(0) << 2) >> 8 & 0xff; |
| 2667 | else |
| 2668 | return (ioport(portnames[offset >> 1 & 3])->read_safe(0) << 2) & 0xff; |
| 2688 | 2669 | } |
| 2689 | 2670 | |
| 2690 | 2671 | TIMER_CALLBACK_MEMBER(namcos22_state::alpine_steplock_callback) |
| r20682 | r20683 | |
| 2715 | 2696 | } |
| 2716 | 2697 | } |
| 2717 | 2698 | |
| 2718 | | READ8_MEMBER(namcos22_state::alpineracer_mcu_adc_r) |
| 2719 | | { |
| 2720 | | // 0 H+L = swing, 1 H+L = edge |
| 2721 | | UINT16 swing = ioport("SWING")->read()<<2; |
| 2722 | | UINT16 edge = ioport("EDGE" )->read()<<2; |
| 2723 | | |
| 2724 | | switch (offset) |
| 2725 | | { |
| 2726 | | case 0: |
| 2727 | | return swing & 0xff; |
| 2728 | | |
| 2729 | | case 1: |
| 2730 | | return (swing>>8); |
| 2731 | | |
| 2732 | | case 2: |
| 2733 | | return edge & 0xff; |
| 2734 | | |
| 2735 | | case 3: |
| 2736 | | return (edge>>8); |
| 2737 | | |
| 2738 | | default: |
| 2739 | | return 0; |
| 2740 | | } |
| 2741 | | } |
| 2742 | | |
| 2743 | | READ8_MEMBER(namcos22_state::cybrcycc_mcu_adc_r) |
| 2744 | | { |
| 2745 | | UINT16 gas,brake,steer; |
| 2746 | | ReadAnalogDrivingPorts( machine(), &gas, &brake, &steer ); |
| 2747 | | |
| 2748 | | gas <<= 2; |
| 2749 | | brake <<= 2; |
| 2750 | | steer <<= 2; |
| 2751 | | |
| 2752 | | switch (offset) |
| 2753 | | { |
| 2754 | | case 0: |
| 2755 | | return steer & 0xff; |
| 2756 | | |
| 2757 | | case 1: |
| 2758 | | return (steer>>8); |
| 2759 | | |
| 2760 | | case 2: |
| 2761 | | return gas & 0xff; |
| 2762 | | |
| 2763 | | case 3: |
| 2764 | | return (gas>>8); |
| 2765 | | |
| 2766 | | case 4: |
| 2767 | | return brake & 0xff; |
| 2768 | | |
| 2769 | | case 5: |
| 2770 | | return (brake>>8); |
| 2771 | | |
| 2772 | | default: |
| 2773 | | return 0; |
| 2774 | | } |
| 2775 | | } |
| 2776 | | |
| 2777 | | READ8_MEMBER(namcos22_state::tokyowar_mcu_adc_r) |
| 2778 | | { |
| 2779 | | UINT16 gas,brake,steer; |
| 2780 | | ReadAnalogDrivingPorts( machine(), &gas, &brake, &steer ); |
| 2781 | | |
| 2782 | | gas <<= 2; |
| 2783 | | brake <<= 2; |
| 2784 | | steer <<= 2; |
| 2785 | | |
| 2786 | | switch (offset) |
| 2787 | | { |
| 2788 | | case 0: |
| 2789 | | return steer & 0xff; |
| 2790 | | |
| 2791 | | case 1: |
| 2792 | | return (steer>>8); |
| 2793 | | |
| 2794 | | case 4: |
| 2795 | | return gas & 0xff; |
| 2796 | | |
| 2797 | | case 5: |
| 2798 | | return (gas>>8); |
| 2799 | | |
| 2800 | | case 6: |
| 2801 | | return brake & 0xff; |
| 2802 | | |
| 2803 | | case 7: |
| 2804 | | return (brake>>8); |
| 2805 | | |
| 2806 | | default: |
| 2807 | | return 0; |
| 2808 | | } |
| 2809 | | } |
| 2810 | | |
| 2811 | | READ8_MEMBER(namcos22_state::aquajet_mcu_adc_r) |
| 2812 | | { |
| 2813 | | UINT16 gas, steer, ddy; |
| 2814 | | |
| 2815 | | gas = ioport("GAS")->read() ^ 0x7f; |
| 2816 | | steer = ioport("STEER")->read() ^ 0xff; |
| 2817 | | ddy = ioport("STICKY")->read(); |
| 2818 | | if (ddy > 0) ddy -= 1; |
| 2819 | | |
| 2820 | | gas <<= 2; |
| 2821 | | steer <<= 2; |
| 2822 | | ddy <<= 2; |
| 2823 | | |
| 2824 | | /* |
| 2825 | | 0 & 1 = handle left/right |
| 2826 | | 2 & 3 = accelerator |
| 2827 | | 4 & 5 = handle pole (Y axis) |
| 2828 | | */ |
| 2829 | | |
| 2830 | | switch (offset) |
| 2831 | | { |
| 2832 | | case 0: |
| 2833 | | return steer & 0xff; |
| 2834 | | |
| 2835 | | case 1: |
| 2836 | | return (steer>>8); |
| 2837 | | |
| 2838 | | case 2: |
| 2839 | | return gas & 0xff; |
| 2840 | | |
| 2841 | | case 3: |
| 2842 | | return (gas>>8); |
| 2843 | | |
| 2844 | | case 4: |
| 2845 | | return ddy & 0xff; |
| 2846 | | |
| 2847 | | case 5: |
| 2848 | | return (ddy>>8); |
| 2849 | | |
| 2850 | | default: |
| 2851 | | return 0; |
| 2852 | | } |
| 2853 | | } |
| 2854 | | |
| 2855 | | READ8_MEMBER(namcos22_state::adillor_mcu_adc_r) |
| 2856 | | { |
| 2857 | | // unused |
| 2858 | | return 0; |
| 2859 | | } |
| 2860 | | |
| 2861 | | READ8_MEMBER(namcos22_state::airco22_mcu_adc_r) |
| 2862 | | { |
| 2863 | | UINT16 pedal, x, y; |
| 2864 | | |
| 2865 | | pedal = ioport("PEDAL")->read()<<2; |
| 2866 | | x = ioport("STICKX")->read()<<2; |
| 2867 | | y = ioport("STICKY")->read()<<2; |
| 2868 | | |
| 2869 | | switch (offset) |
| 2870 | | { |
| 2871 | | case 0: |
| 2872 | | return x & 0xff; |
| 2873 | | |
| 2874 | | case 1: |
| 2875 | | return (x>>8); |
| 2876 | | |
| 2877 | | case 2: |
| 2878 | | return y & 0xff; |
| 2879 | | |
| 2880 | | case 3: |
| 2881 | | return (y>>8); |
| 2882 | | |
| 2883 | | case 4: |
| 2884 | | return pedal & 0xff; |
| 2885 | | |
| 2886 | | case 5: |
| 2887 | | return (pedal>>8); |
| 2888 | | |
| 2889 | | default: |
| 2890 | | return 0; |
| 2891 | | } |
| 2892 | | } |
| 2893 | | |
| 2894 | 2699 | static ADDRESS_MAP_START( mcu_io, AS_IO, 8, namcos22_state ) |
| 2895 | 2700 | AM_RANGE(M37710_PORT4, M37710_PORT4) AM_READ(mcu_port4_r ) AM_WRITE(mcu_port4_w ) |
| 2896 | 2701 | AM_RANGE(M37710_PORT5, M37710_PORT5) AM_READ(mcu_port5_r ) AM_WRITE(mcu_port5_w ) |
| 2897 | 2702 | AM_RANGE(M37710_PORT6, M37710_PORT6) AM_READ(mcu_port6_r ) AM_WRITE(mcu_port6_w ) |
| 2898 | 2703 | AM_RANGE(M37710_PORT7, M37710_PORT7) AM_READ(mcu_port7_r ) AM_WRITE(mcu_port7_w ) |
| 2704 | AM_RANGE(M37710_ADC0_L, M37710_ADC3_H) AM_READ(namcos22s_mcu_adc_r) |
| 2705 | AM_RANGE(M37710_ADC4_L, M37710_ADC7_H) AM_READNOP |
| 2899 | 2706 | ADDRESS_MAP_END |
| 2900 | 2707 | |
| 2901 | 2708 | READ8_MEMBER(namcos22_state::mcu_port4_s22_r) |
| r20682 | r20683 | |
| 4977 | 4784 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_16WAY // R Selection |
| 4978 | 4785 | PORT_BIT( 0x80, IP_ACTIVE_HIGH,IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, namcos22_state,alpine_motor_read, (void *)0) // steps are free |
| 4979 | 4786 | |
| 4980 | | PORT_START("SWING") |
| 4981 | | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_NAME("Steps Swing") |
| 4982 | | |
| 4983 | | PORT_START("EDGE") |
| 4984 | | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_NAME("Steps Edge") |
| 4985 | | |
| 4986 | 4787 | PORT_START("MCUP5B") |
| 4987 | 4788 | PORT_BIT( 0x01, IP_ACTIVE_HIGH,IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, namcos22_state,alpine_motor_read, (void *)1) // steps are locked |
| 4988 | 4789 | PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4790 | |
| 4791 | PORT_START("ADC0") |
| 4792 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_NAME("Steps Swing") |
| 4793 | |
| 4794 | PORT_START("ADC1") |
| 4795 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_NAME("Steps Edge") |
| 4989 | 4796 | INPUT_PORTS_END /* Alpine Racer */ |
| 4990 | 4797 | |
| 4991 | 4798 | static INPUT_PORTS_START( airco22 ) |
| r20682 | r20683 | |
| 5015 | 4822 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 5016 | 4823 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 5017 | 4824 | |
| 5018 | | PORT_START("PEDAL") |
| 5019 | | PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) |
| 5020 | | |
| 5021 | | PORT_START("STICKX") |
| 5022 | | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) |
| 5023 | | |
| 5024 | | PORT_START("STICKY") |
| 5025 | | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) |
| 5026 | | |
| 5027 | 4825 | PORT_START("MCUP5A") |
| 5028 | 4826 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 5029 | 4827 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r20682 | r20683 | |
| 5036 | 4834 | |
| 5037 | 4835 | PORT_START("MCUP5B") |
| 5038 | 4836 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4837 | |
| 4838 | PORT_START("ADC0") |
| 4839 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) |
| 4840 | |
| 4841 | PORT_START("ADC1") |
| 4842 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) |
| 4843 | |
| 4844 | PORT_START("ADC2") |
| 4845 | PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) |
| 5039 | 4846 | INPUT_PORTS_END /* Air Combat22 */ |
| 5040 | 4847 | |
| 5041 | 4848 | static INPUT_PORTS_START( cybrcycc ) |
| r20682 | r20683 | |
| 5078 | 4885 | PORT_START("MCUP5B") |
| 5079 | 4886 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5080 | 4887 | |
| 5081 | | DRIVING_ANALOG_PORTS |
| 4888 | PORT_START("ADC0") |
| 4889 | PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Steering Wheel") |
| 4890 | |
| 4891 | PORT_START("ADC1") |
| 4892 | PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Gas Pedal") |
| 4893 | |
| 4894 | PORT_START("ADC2") |
| 4895 | PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Brake Pedal") |
| 5082 | 4896 | INPUT_PORTS_END /* Cyber Cycles */ |
| 5083 | 4897 | |
| 5084 | 4898 | static INPUT_PORTS_START( dirtdash ) |
| r20682 | r20683 | |
| 5121 | 4935 | PORT_START("MCUP5B") |
| 5122 | 4936 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5123 | 4937 | |
| 5124 | | DRIVING_ANALOG_PORTS |
| 5125 | | PORT_MODIFY("STEER") // default is too sensitive |
| 4938 | PORT_START("ADC0") |
| 5126 | 4939 | PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(100) PORT_KEYDELTA(3) PORT_NAME("Steering Wheel") |
| 4940 | |
| 4941 | PORT_START("ADC1") |
| 4942 | PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Gas Pedal") |
| 4943 | |
| 4944 | PORT_START("ADC2") |
| 4945 | PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Brake Pedal") |
| 5127 | 4946 | INPUT_PORTS_END /* Dirt Dash */ |
| 5128 | 4947 | |
| 5129 | 4948 | static INPUT_PORTS_START( tokyowar ) |
| r20682 | r20683 | |
| 5166 | 4985 | PORT_START("MCUP5B") |
| 5167 | 4986 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5168 | 4987 | |
| 5169 | | DRIVING_ANALOG_PORTS |
| 4988 | PORT_START("ADC0") |
| 4989 | PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Steering Wheel") |
| 4990 | |
| 4991 | PORT_START("ADC2") |
| 4992 | PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Gas Pedal") |
| 4993 | |
| 4994 | PORT_START("ADC3") |
| 4995 | PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Brake Pedal") |
| 5170 | 4996 | INPUT_PORTS_END /* Tokyo Wars */ |
| 5171 | 4997 | |
| 5172 | 4998 | static INPUT_PORTS_START( aquajet ) |
| r20682 | r20683 | |
| 5196 | 5022 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 5197 | 5023 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 5198 | 5024 | |
| 5199 | | PORT_START("GAS") |
| 5200 | | PORT_BIT( 0x7f, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) |
| 5201 | | |
| 5202 | | PORT_START("STEER") |
| 5203 | | PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) |
| 5204 | | |
| 5205 | | PORT_START("STICKY") |
| 5206 | | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) |
| 5207 | | |
| 5208 | 5025 | PORT_START("MCUP5A") |
| 5209 | 5026 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 5210 | 5027 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r20682 | r20683 | |
| 5217 | 5034 | |
| 5218 | 5035 | PORT_START("MCUP5B") |
| 5219 | 5036 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5037 | |
| 5038 | PORT_START("ADC0") |
| 5039 | PORT_BIT( 0xff, 0x7f, IPT_PADDLE ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE |
| 5040 | |
| 5041 | PORT_START("ADC1") |
| 5042 | PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00, 0x80) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE |
| 5043 | |
| 5044 | PORT_START("ADC2") |
| 5045 | PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE |
| 5220 | 5046 | INPUT_PORTS_END /* Aqua Jet */ |
| 5221 | 5047 | |
| 5222 | 5048 | static INPUT_PORTS_START( adillor ) |
| r20682 | r20683 | |
| 5261 | 5087 | PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5262 | 5088 | |
| 5263 | 5089 | PORT_START("TRACKX") |
| 5264 | | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x01, 0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(20) |
| 5090 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x01, 0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(20) PORT_NAME("Trackball X") |
| 5265 | 5091 | |
| 5266 | 5092 | PORT_START("TRACKY") |
| 5267 | | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(0x01, 0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(20) |
| 5093 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(0x01, 0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(20) PORT_NAME("Trackball Y") |
| 5268 | 5094 | INPUT_PORTS_END /* Armadillo Racing */ |
| 5269 | 5095 | |
| 5270 | 5096 | static INPUT_PORTS_START( propcycl ) |
| r20682 | r20683 | |
| 5294 | 5120 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 5295 | 5121 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 5296 | 5122 | |
| 5297 | | PORT_START("PEDAL") |
| 5298 | | PORT_BIT( 0x7f, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) |
| 5299 | | |
| 5300 | | PORT_START("STICKX") |
| 5301 | | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE |
| 5302 | | |
| 5303 | | PORT_START("STICKY") |
| 5304 | | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) |
| 5305 | | |
| 5306 | 5123 | PORT_START("MCUP5A") |
| 5307 | 5124 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 5308 | 5125 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r20682 | r20683 | |
| 5316 | 5133 | PORT_START("MCUP5B") |
| 5317 | 5134 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) |
| 5318 | 5135 | PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5136 | |
| 5137 | PORT_START("ADC0") |
| 5138 | PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_X ) PORT_MINMAX(0x00, 0xfe) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE |
| 5139 | |
| 5140 | PORT_START("ADC1") |
| 5141 | PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_Y ) PORT_MINMAX(0x00, 0xfe) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) |
| 5142 | |
| 5143 | PORT_START("PEDAL") |
| 5144 | PORT_BIT( 0x7f, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) |
| 5319 | 5145 | INPUT_PORTS_END /* Prop Cycle */ |
| 5320 | 5146 | |
| 5321 | 5147 | static INPUT_PORTS_START( timecris ) |
| r20682 | r20683 | |
| 5343 | 5169 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 5344 | 5170 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) |
| 5345 | 5171 | |
| 5346 | | PORT_START( "LIGHTX" ) // tuned for CRT |
| 5347 | | PORT_BIT( 0xfff, 68+626/2, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_MINMAX(68, 68+626) PORT_SENSITIVITY(48) PORT_KEYDELTA(10) |
| 5348 | | PORT_START( "LIGHTY" ) // tuned for CRT - can't shoot below the statusbar? |
| 5349 | | PORT_BIT( 0xfff, 43+241/2, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_MINMAX(43, 43+241) PORT_SENSITIVITY(64) PORT_KEYDELTA(4) |
| 5350 | | |
| 5351 | 5172 | PORT_START("MCUP5A") |
| 5352 | 5173 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 5353 | 5174 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r20682 | r20683 | |
| 5360 | 5181 | |
| 5361 | 5182 | PORT_START("MCUP5B") |
| 5362 | 5183 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5184 | |
| 5185 | PORT_START( "LIGHTX" ) // tuned for CRT |
| 5186 | PORT_BIT( 0xfff, 68+626/2, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_MINMAX(68, 68+626) PORT_SENSITIVITY(48) PORT_KEYDELTA(10) |
| 5187 | |
| 5188 | PORT_START( "LIGHTY" ) // tuned for CRT - can't shoot below the statusbar? |
| 5189 | PORT_BIT( 0xfff, 43+241/2, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_MINMAX(43, 43+241) PORT_SENSITIVITY(64) PORT_KEYDELTA(4) |
| 5363 | 5190 | INPUT_PORTS_END /* Time Crisis */ |
| 5364 | 5191 | |
| 5365 | 5192 | /*****************************************************************************************************/ |
| r20682 | r20683 | |
| 5742 | 5569 | namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 5743 | 5570 | namcos22_init(machine, game_type); |
| 5744 | 5571 | |
| 5745 | | state->m_mcu->space(AS_IO).install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::alpineracer_mcu_adc_r),state)); |
| 5746 | 5572 | state->m_mcu->space(AS_IO).install_write_handler(M37710_PORT5, M37710_PORT5, write8_delegate(FUNC(namcos22_state::alpine_mcu_port5_w),state)); |
| 5747 | 5573 | |
| 5748 | 5574 | state->m_motor_timer = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(namcos22_state::alpine_steplock_callback),state)); |
| r20682 | r20683 | |
| 5784 | 5610 | namcos22_init(machine(), NAMCOS22_AIR_COMBAT22); |
| 5785 | 5611 | |
| 5786 | 5612 | // S22-BIOS ver1.20 namco all rights reserved 94/12/21 |
| 5787 | | m_mcu->space(AS_IO).install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::airco22_mcu_adc_r),this)); |
| 5788 | 5613 | } |
| 5789 | 5614 | |
| 5790 | 5615 | DRIVER_INIT_MEMBER(namcos22_state,propcycl) |
| r20682 | r20683 | |
| 5807 | 5632 | // pROM[0x22296/4] |= 0x00004e75; |
| 5808 | 5633 | |
| 5809 | 5634 | namcos22_init(machine(), NAMCOS22_PROP_CYCLE); |
| 5810 | | m_mcu->space(AS_IO).install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::propcycle_mcu_adc_r),this)); |
| 5811 | 5635 | m_mcu->space(AS_IO).install_write_handler(M37710_PORT5, M37710_PORT5, write8_delegate(FUNC(namcos22_state::propcycle_mcu_port5_w),this)); |
| 5812 | 5636 | install_141_speedup(machine()); |
| 5813 | 5637 | } |
| r20682 | r20683 | |
| 5868 | 5692 | { |
| 5869 | 5693 | namcos22_init(machine(), NAMCOS22_CYBER_CYCLES); |
| 5870 | 5694 | |
| 5871 | | m_mcu->space(AS_IO).install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::cybrcycc_mcu_adc_r),this)); |
| 5872 | 5695 | install_130_speedup(machine()); |
| 5873 | 5696 | |
| 5874 | 5697 | m_keycus_id = 0x0387; |
| r20682 | r20683 | |
| 5885 | 5708 | { |
| 5886 | 5709 | namcos22_init(machine(), NAMCOS22_TOKYO_WARS); |
| 5887 | 5710 | |
| 5888 | | m_mcu->space(AS_IO).install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::tokyowar_mcu_adc_r),this)); |
| 5889 | 5711 | install_141_speedup(machine()); |
| 5890 | 5712 | |
| 5891 | 5713 | m_keycus_id = 0x01a8; |
| r20682 | r20683 | |
| 5894 | 5716 | DRIVER_INIT_MEMBER(namcos22_state,aquajet) |
| 5895 | 5717 | { |
| 5896 | 5718 | namcos22_init(machine(), NAMCOS22_AQUA_JET); |
| 5897 | | m_mcu->space(AS_IO).install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::aquajet_mcu_adc_r),this)); |
| 5898 | 5719 | install_141_speedup(machine()); |
| 5899 | 5720 | } |
| 5900 | 5721 | |
| 5901 | 5722 | DRIVER_INIT_MEMBER(namcos22_state,adillor) |
| 5902 | 5723 | { |
| 5903 | 5724 | namcos22_init(machine(), NAMCOS22_ARMADILLO_RACING); |
| 5904 | | m_mcu->space(AS_IO).install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::adillor_mcu_adc_r),this)); |
| 5905 | 5725 | install_141_speedup(machine()); |
| 5906 | 5726 | |
| 5907 | 5727 | m_keycus_id = 0x59b7; |
| r20682 | r20683 | |
| 5911 | 5731 | { |
| 5912 | 5732 | namcos22_init(machine(), NAMCOS22_DIRT_DASH); |
| 5913 | 5733 | |
| 5914 | | m_mcu->space(AS_IO).install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::cybrcycc_mcu_adc_r),this)); |
| 5915 | 5734 | install_141_speedup(machine()); |
| 5916 | 5735 | |
| 5917 | 5736 | m_keycus_id = 0x01a2; |