trunk/src/mess/drivers/amiga.c
| r20557 | r20558 | |
| 294 | 294 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 295 | 295 | |
| 296 | 296 | PORT_START("JOY0DAT") |
| 297 | | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, amiga_state,amiga_joystick_convert, "P1JOY") |
| 297 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, amiga_state,amiga_joystick_convert, 0) |
| 298 | 298 | PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 299 | 299 | |
| 300 | 300 | PORT_START("JOY1DAT") |
| 301 | | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, amiga_state,amiga_joystick_convert, "P2JOY") |
| 301 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, amiga_state,amiga_joystick_convert, 1) |
| 302 | 302 | PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 303 | 303 | |
| 304 | 304 | PORT_START("POTGO") |
trunk/src/mame/drivers/arcadia.c
| r20557 | r20558 | |
| 244 | 244 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, arcadia_amiga_state,coin_counter_r, 1) |
| 245 | 245 | |
| 246 | 246 | PORT_START("JOY0DAT") |
| 247 | | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, arcadia_amiga_state,amiga_joystick_convert, "P1JOY") |
| 247 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, arcadia_amiga_state,amiga_joystick_convert, 0) |
| 248 | 248 | PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 249 | 249 | |
| 250 | 250 | PORT_START("JOY1DAT") |
| 251 | | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, arcadia_amiga_state,amiga_joystick_convert, "P2JOY") |
| 251 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, arcadia_amiga_state,amiga_joystick_convert, 1) |
| 252 | 252 | PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 253 | 253 | |
| 254 | 254 | PORT_START("POTGO") |
trunk/src/mame/drivers/cd32.c
| r20557 | r20558 | |
| 33 | 33 | #include "machine/6526cia.h" |
| 34 | 34 | #include "machine/i2cmem.h" |
| 35 | 35 | #include "includes/cd32.h" |
| 36 | | #include "sound/cdda.h" |
| 37 | 36 | #include "imagedev/chd_cd.h" |
| 38 | 37 | #include "machine/amigafdc.h" |
| 39 | 38 | |
| r20557 | r20558 | |
| 85 | 84 | |
| 86 | 85 | WRITE8_MEMBER(cd32_state::cd32_cia_0_porta_w) |
| 87 | 86 | { |
| 88 | | device_t *device = machine().device("cia_0"); |
| 89 | 87 | /* bit 1 = cd audio mute */ |
| 90 | | machine().device<cdda_device>("cdda")->set_output_gain( 0, ( data & 1 ) ? 0.0 : 1.0 ); |
| 88 | m_cdda->set_output_gain( 0, ( data & 1 ) ? 0.0 : 1.0 ); |
| 91 | 89 | |
| 92 | 90 | /* bit 2 = Power Led on Amiga */ |
| 93 | 91 | set_led_status(machine(), 0, (data & 2) ? 0 : 1); |
| 94 | 92 | |
| 95 | | handle_cd32_joystick_cia(machine(), data, mos6526_r(device, space, 2)); |
| 93 | handle_cd32_joystick_cia(machine(), data, mos6526_r(m_cia_0, space, 2)); |
| 96 | 94 | } |
| 97 | 95 | |
| 98 | 96 | /************************************* |
| r20557 | r20558 | |
| 239 | 237 | |
| 240 | 238 | CUSTOM_INPUT_MEMBER(cd32_state::cd32_sel_mirror_input) |
| 241 | 239 | { |
| 242 | | UINT8 bits = ioport((const char *)param)->read(); |
| 240 | ioport_port* ports[2]= { m_p1_port, m_p2_port }; |
| 241 | UINT8 bits = ports[(int)param]->read(); |
| 243 | 242 | return (bits & 0x20)>>5; |
| 244 | 243 | } |
| 245 | 244 | |
| r20557 | r20558 | |
| 249 | 248 | PORT_START("CIA0PORTA") |
| 250 | 249 | PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_SPECIAL ) |
| 251 | 250 | /* this is the regular port for reading a single button joystick on the Amiga, many CD32 games require this to mirror the pad start button! */ |
| 252 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cd32_state,cd32_sel_mirror_input, "P2") |
| 253 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cd32_state,cd32_sel_mirror_input, "P1") |
| 251 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cd32_state,cd32_sel_mirror_input, 1) |
| 252 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cd32_state,cd32_sel_mirror_input, 0) |
| 254 | 253 | |
| 255 | 254 | PORT_START("CIA0PORTB") |
| 256 | 255 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 257 | 256 | |
| 258 | 257 | PORT_START("JOY0DAT") |
| 259 | | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cd32_state,amiga_joystick_convert, "P2JOY") |
| 258 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cd32_state,amiga_joystick_convert, 1) |
| 260 | 259 | PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 261 | 260 | |
| 262 | 261 | PORT_START("JOY1DAT") |
| 263 | | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cd32_state,amiga_joystick_convert, "P1JOY") |
| 262 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cd32_state,amiga_joystick_convert, 0) |
| 264 | 263 | PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 265 | 264 | |
| 266 | 265 | PORT_START("POTGO") |
trunk/src/mame/drivers/alg.c
| r20557 | r20558 | |
| 333 | 333 | |
| 334 | 334 | static INPUT_PORTS_START( alg ) |
| 335 | 335 | PORT_START("JOY0DAT") /* read by Amiga core */ |
| 336 | | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, alg_state,amiga_joystick_convert, "P1JOY") |
| 336 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, alg_state,amiga_joystick_convert, 0) |
| 337 | 337 | PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 338 | 338 | |
| 339 | 339 | PORT_START("JOY1DAT") /* read by Amiga core */ |
| 340 | | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, alg_state,amiga_joystick_convert, "P2JOY") |
| 340 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, alg_state,amiga_joystick_convert, 1) |
| 341 | 341 | PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 342 | 342 | |
| 343 | 343 | PORT_START("POTGO") /* read by Amiga core */ |
trunk/src/mame/drivers/mquake.c
| r20557 | r20558 | |
| 164 | 164 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) /* JS1SW */ |
| 165 | 165 | |
| 166 | 166 | PORT_START("JOY0DAT") |
| 167 | | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, amiga_state,amiga_joystick_convert, "P1JOY") |
| 167 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, amiga_state,amiga_joystick_convert, 0) |
| 168 | 168 | PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 169 | 169 | |
| 170 | 170 | PORT_START("JOY1DAT") |
| 171 | | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, amiga_state,amiga_joystick_convert, "P2JOY") |
| 171 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, amiga_state,amiga_joystick_convert, 1) |
| 172 | 172 | PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 173 | 173 | |
| 174 | 174 | PORT_START("P1JOY") |
trunk/src/mame/includes/amiga.h
| r20557 | r20558 | |
| 385 | 385 | m_joy1dat_port(*this, "JOY1DAT"), |
| 386 | 386 | m_potgo_port(*this, "POTGO"), |
| 387 | 387 | m_pot0dat_port(*this, "POT0DAT"), |
| 388 | | m_pot1dat_port(*this, "POT1DAT") |
| 388 | m_pot1dat_port(*this, "POT1DAT"), |
| 389 | m_p1joy_port(*this, "P1JOY"), |
| 390 | m_p2joy_port(*this, "P2JOY") |
| 391 | |
| 389 | 392 | { } |
| 390 | 393 | |
| 391 | 394 | required_device<cpu_device> m_maincpu; |
| r20557 | r20558 | |
| 402 | 405 | optional_ioport m_potgo_port; |
| 403 | 406 | optional_ioport m_pot0dat_port; |
| 404 | 407 | optional_ioport m_pot1dat_port; |
| 408 | optional_ioport m_p1joy_port; |
| 409 | optional_ioport m_p2joy_port; |
| 405 | 410 | |
| 406 | 411 | |
| 407 | 412 | |