trunk/src/mame/drivers/namcos23.c
| r32266 | r32267 | |
| 1376 | 1376 | m_p2(*this, "P2"), |
| 1377 | 1377 | m_screen(*this, "screen"), |
| 1378 | 1378 | m_palette(*this, "palette"), |
| 1379 | | m_generic_paletteram_32(*this, "paletteram") |
| 1379 | m_generic_paletteram_32(*this, "paletteram"), |
| 1380 | m_adc_inp(*this, "ADC") |
| 1380 | 1381 | { } |
| 1381 | 1382 | |
| 1382 | 1383 | required_device<mips3_device> m_maincpu; |
| r32266 | r32267 | |
| 1401 | 1402 | required_device<screen_device> m_screen; |
| 1402 | 1403 | required_device<palette_device> m_palette; |
| 1403 | 1404 | required_shared_ptr<UINT32> m_generic_paletteram_32; |
| 1405 | optional_ioport_array<4> m_adc_inp; |
| 1404 | 1406 | |
| 1405 | 1407 | c404_t m_c404; |
| 1406 | 1408 | c361_t m_c361; |
| r32266 | r32267 | |
| 2960 | 2962 | |
| 2961 | 2963 | READ16_MEMBER(namcos23_state::iob_analog_r) |
| 2962 | 2964 | { |
| 2963 | | static const char *const portnames[] = { "ADC0", "ADC1", "ADC2", "ADC3" }; |
| 2964 | | return ioport(portnames[offset >> 1 & 3])->read_safe(0); |
| 2965 | return m_adc_inp[offset & 3]->read_safe(0); |
| 2965 | 2966 | } |
| 2966 | 2967 | |
| 2967 | 2968 | |
| r32266 | r32267 | |
| 3106 | 3107 | PORT_SERVICE_DIPLOC(0x80, IP_ACTIVE_LOW, "DIP:1" ) PORT_NAME("User Service Mode") |
| 3107 | 3108 | |
| 3108 | 3109 | #if 0 // need to hook these up properly |
| 3109 | | PORT_START("ADC0") |
| 3110 | PORT_START("ADC.0") |
| 3110 | 3111 | PORT_BIT( 0xffff, 0x8000, IPT_PADDLE ) PORT_SENSITIVITY(100) PORT_KEYDELTA(100) PORT_NAME("ADC0") // rear r |
| 3111 | | PORT_START("ADC1") |
| 3112 | PORT_START("ADC.1") |
| 3112 | 3113 | PORT_BIT( 0xffff, 0x8000, IPT_PADDLE ) PORT_SENSITIVITY(100) PORT_KEYDELTA(100) PORT_NAME("ADC1") // rear l |
| 3113 | | PORT_START("ADC2") |
| 3114 | PORT_START("ADC.2") |
| 3114 | 3115 | PORT_BIT( 0xffff, 0x8000, IPT_PADDLE ) PORT_SENSITIVITY(100) PORT_KEYDELTA(100) PORT_NAME("ADC2") // front r |
| 3115 | | PORT_START("ADC3") |
| 3116 | PORT_START("ADC.3") |
| 3116 | 3117 | PORT_BIT( 0xffff, 0x8000, IPT_PADDLE ) PORT_SENSITIVITY(100) PORT_KEYDELTA(100) PORT_NAME("ADC3") // front l |
| 3117 | 3118 | #endif |
| 3118 | 3119 | INPUT_PORTS_END |
| r32266 | r32267 | |
| 3126 | 3127 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) |
| 3127 | 3128 | |
| 3128 | 3129 | #if 0 // need to hook these up properly |
| 3129 | | PORT_START("ADC0") |
| 3130 | PORT_START("ADC.0") |
| 3130 | 3131 | PORT_BIT( 0xffff, 0x8000, IPT_PADDLE ) PORT_SENSITIVITY(100) PORT_KEYDELTA(100) PORT_NAME("ADC0") |
| 3131 | | PORT_START("ADC1") |
| 3132 | PORT_START("ADC.1") |
| 3132 | 3133 | PORT_BIT( 0xffff, 0x8000, IPT_PADDLE ) PORT_SENSITIVITY(100) PORT_KEYDELTA(100) PORT_NAME("ADC1") |
| 3133 | | PORT_START("ADC2") |
| 3134 | PORT_START("ADC.2") |
| 3134 | 3135 | PORT_BIT( 0xffff, 0x8000, IPT_PADDLE ) PORT_SENSITIVITY(100) PORT_KEYDELTA(100) PORT_NAME("ADC2") |
| 3135 | | PORT_START("ADC3") |
| 3136 | PORT_START("ADC.3") |
| 3136 | 3137 | PORT_BIT( 0xffff, 0x8000, IPT_PADDLE ) PORT_SENSITIVITY(100) PORT_KEYDELTA(100) PORT_NAME("ADC3") |
| 3137 | 3138 | #endif |
| 3138 | 3139 | INPUT_PORTS_END |