summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/atarigx2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/atarigx2.c')
-rw-r--r--src/mame/drivers/atarigx2.c127
1 files changed, 54 insertions, 73 deletions
diff --git a/src/mame/drivers/atarigx2.c b/src/mame/drivers/atarigx2.c
index 353f6300348..1b9c6033813 100644
--- a/src/mame/drivers/atarigx2.c
+++ b/src/mame/drivers/atarigx2.c
@@ -81,7 +81,7 @@ static MACHINE_RESET( atarigx2 )
static READ32_HANDLER( special_port2_r )
{
- int temp = input_port_read(machine, "IN2");
+ int temp = input_port_read(machine, "SERVICE");
if (atarigen_cpu_to_sound_ready) temp ^= 0x0020;
if (atarigen_sound_to_cpu_ready) temp ^= 0x0010;
temp ^= 0x0008; /* A2D.EOC always high for now */
@@ -91,7 +91,7 @@ static READ32_HANDLER( special_port2_r )
static READ32_HANDLER( special_port3_r )
{
- int temp = input_port_read(machine, "IN3");
+ int temp = input_port_read(machine, "SPECIAL");
return (temp << 16) | temp;
}
@@ -1163,19 +1163,6 @@ static READ32_HANDLER( atarigx2_protection_r )
/*************************************
*
- * 32-bit stub handlers
- *
- *************************************/
-
-static READ32_HANDLER( inputs_01_r )
-{
- return (input_port_read(machine, "IN0") << 16) | input_port_read(machine, "IN1");
-}
-
-
-
-/*************************************
- *
* Main CPU memory handlers
*
*************************************/
@@ -1198,7 +1185,7 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 32 )
AM_RANGE(0xe08000, 0xe08003) AM_WRITE(latch_w)
AM_RANGE(0xe0c000, 0xe0c003) AM_WRITE(atarigen_video_int_ack32_w)
AM_RANGE(0xe0e000, 0xe0e003) AM_WRITE(SMH_NOP)//watchdog_reset_w },
- AM_RANGE(0xe80000, 0xe80003) AM_READ(inputs_01_r)
+ AM_RANGE(0xe80000, 0xe80003) AM_READ_PORT("P1_P2")
AM_RANGE(0xe82000, 0xe82003) AM_READ(special_port2_r)
AM_RANGE(0xe82004, 0xe82007) AM_READ(special_port3_r)
AM_RANGE(0xe86000, 0xe86003) AM_READ(atarigen_sound_upper32_r)
@@ -1215,29 +1202,27 @@ ADDRESS_MAP_END
*************************************/
static INPUT_PORTS_START( spclords )
- PORT_START_TAG("IN0") /* 68.SW (A1=0) */
- PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) /* BLUE button */
- PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) /* Left thumb */
- PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) /* Left trigger */
- PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) /* Throttle forward */
- PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
- PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
- PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) /* Throttle button */
- PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
-
- PORT_START_TAG("IN1") /* 68.SW (A1=1) */
- PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START2 ) /* RED button */
- PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) /* Right thumb */
- PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) /* Right trigger */
- PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) /* Throttle reverse */
- PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
- PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
- PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
- PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
-
- PORT_START_TAG("IN2") /* 68.STATUS (A2=0) */
+ PORT_START_TAG("P1_P2") /* 68.SW (A1=0,1) */
+ PORT_BIT( 0x000000ff, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_START2 ) /* RED button */
+ PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) /* Right thumb */
+ PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) /* Right trigger */
+ PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) /* Throttle reverse */
+ PORT_BIT( 0x00001000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
+ PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
+ PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
+ PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
+ PORT_BIT( 0x00ff0000, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_START1 ) /* BLUE button */
+ PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) /* Left thumb */
+ PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) /* Left trigger */
+ PORT_BIT( 0x08000000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) /* Throttle forward */
+ PORT_BIT( 0x10000000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
+ PORT_BIT( 0x20000000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
+ PORT_BIT( 0x40000000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) /* Throttle button */
+ PORT_BIT( 0x80000000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
+
+ PORT_START_TAG("SERVICE") /* 68.STATUS (A2=0) */
PORT_BIT( 0x0007, IP_ACTIVE_LOW, IPT_SPECIAL ) /* +5V */
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* A2D.EOC */
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /AUDIRQ */
@@ -1246,7 +1231,7 @@ static INPUT_PORTS_START( spclords )
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_VBLANK )
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START_TAG("IN3") /* 68.STATUS (A2=1) */
+ PORT_START_TAG("SPECIAL") /* 68.STATUS (A2=1) */
PORT_BIT( 0x0003, IP_ACTIVE_LOW, IPT_SPECIAL ) /* +5V */
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /XIRQ */
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /XFULL */
@@ -1276,18 +1261,16 @@ INPUT_PORTS_END
static INPUT_PORTS_START( motofren )
- PORT_START_TAG("IN0") /* 68.SW (A1=0) */
- PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) /* Start/fire */
- PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) /* AUX3 */
- PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) /* AUX2 */
- PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) /* AUX1 */
- PORT_BIT( 0xf000, IP_ACTIVE_LOW, IPT_UNUSED )
-
- PORT_START_TAG("IN1") /* 68.SW (A1=1) */
- PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
-
- PORT_START_TAG("IN2") /* 68.STATUS (A2=0) */
+ PORT_START_TAG("P1_P2") /* 68.SW (A1=0,1) */
+ PORT_BIT( 0x0000ffff, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x00ff0000, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_START1 ) /* Start/fire */
+ PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) /* AUX3 */
+ PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) /* AUX2 */
+ PORT_BIT( 0x08000000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) /* AUX1 */
+ PORT_BIT( 0xf0000000, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_START_TAG("SERVICE") /* 68.STATUS (A2=0) */
PORT_BIT( 0x0007, IP_ACTIVE_LOW, IPT_UNUSED ) /* +5V */
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* A2D.EOC */
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /AUDIRQ */
@@ -1296,7 +1279,7 @@ static INPUT_PORTS_START( motofren )
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_VBLANK )
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START_TAG("IN3") /* 68.STATUS (A2=1) */
+ PORT_START_TAG("SPECIAL") /* 68.STATUS (A2=1) */
PORT_BIT( 0x0003, IP_ACTIVE_LOW, IPT_SPECIAL ) /* +5V */
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /XIRQ */
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /XFULL */
@@ -1322,22 +1305,20 @@ INPUT_PORTS_END
static INPUT_PORTS_START( rrreveng )
- PORT_START_TAG("IN0") /* 68.SW (A1=0) */
- PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
- PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
- PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2)
- PORT_BIT( 0x3000, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
- PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
-
- PORT_START_TAG("IN1") /* 68.SW (A1=1) */
- PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0xfe00, IP_ACTIVE_LOW, IPT_UNUSED )
-
- PORT_START_TAG("IN2") /* 68.STATUS (A2=0) */
+ PORT_START_TAG("P1_P2") /* 68.SW (A1=0,1) */
+ PORT_BIT( 0x000000ff, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_START2 )
+ PORT_BIT( 0x0000fe00, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x00ff0000, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_START1 )
+ PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
+ PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
+ PORT_BIT( 0x08000000, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2)
+ PORT_BIT( 0x30000000, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x40000000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
+ PORT_BIT( 0x80000000, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_START_TAG("SERVICE") /* 68.STATUS (A2=0) */
PORT_BIT( 0x0007, IP_ACTIVE_LOW, IPT_SPECIAL ) /* +5V */
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* A2D.EOC */
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /AUDIRQ */
@@ -1346,7 +1327,7 @@ static INPUT_PORTS_START( rrreveng )
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_VBLANK )
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START_TAG("IN3") /* 68.STATUS (A2=1) */
+ PORT_START_TAG("SPECIAL") /* 68.STATUS (A2=1) */
PORT_BIT( 0x0003, IP_ACTIVE_LOW, IPT_SPECIAL ) /* +5V */
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /XIRQ */
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /XFULL */
@@ -2039,7 +2020,7 @@ ROM_END
static DRIVER_INIT( spclords )
{
atarigen_eeprom_default = NULL;
- atarijsa_init(machine, "IN2", 0x0040);
+ atarijsa_init(machine, "SERVICE", 0x0040);
atarijsa3_init_adpcm(machine, REGION_SOUND1);
atarigx2_playfield_base = 0x000;
@@ -2051,7 +2032,7 @@ static DRIVER_INIT( spclords )
static DRIVER_INIT( motofren )
{
atarigen_eeprom_default = NULL;
- atarijsa_init(machine, "IN2", 0x0040);
+ atarijsa_init(machine, "SERVICE", 0x0040);
atarijsa3_init_adpcm(machine, REGION_SOUND1);
atarigx2_playfield_base = 0x400;
@@ -2089,7 +2070,7 @@ static READ32_HANDLER( rrreveng_prot_r )
static DRIVER_INIT( rrreveng )
{
atarigen_eeprom_default = NULL;
- atarijsa_init(machine, "IN2", 0x0040);
+ atarijsa_init(machine, "SERVICE", 0x0040);
atarijsa3_init_adpcm(machine, REGION_SOUND1);
atarigx2_playfield_base = 0x000;