mirror of
https://github.com/holub/mame
synced 2025-05-24 23:05:32 +03:00
Updated a few more drivers to use EEPROM device: cps1, cps2, konamigq and zr107.
More to come in the next few days...
This commit is contained in:
parent
5258619fcb
commit
59fdf8232b
@ -233,7 +233,7 @@ Stephh's log (2006.09.20) :
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "cpu/pic16c5x/pic16c5x.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "machine/eeprom.h"
|
||||
#include "machine/eepromdev.h"
|
||||
#include "sound/2151intf.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "sound/qsound.h"
|
||||
@ -430,37 +430,13 @@ static const eeprom_interface pang3_eeprom_interface =
|
||||
"0101", /* write command */
|
||||
"0111" /* erase command */
|
||||
};
|
||||
|
||||
static NVRAM_HANDLER( qsound )
|
||||
{
|
||||
if (read_or_write)
|
||||
eeprom_save(file);
|
||||
else
|
||||
{
|
||||
eeprom_init(machine, &qsound_eeprom_interface);
|
||||
|
||||
if (file)
|
||||
eeprom_load(file);
|
||||
}
|
||||
}
|
||||
|
||||
static NVRAM_HANDLER( pang3 )
|
||||
{
|
||||
if (read_or_write)
|
||||
eeprom_save(file);
|
||||
else
|
||||
{
|
||||
eeprom_init(machine, &pang3_eeprom_interface);
|
||||
|
||||
if (file)
|
||||
eeprom_load(file);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// FIXME: these are still needed by pang3
|
||||
static READ16_HANDLER( cps1_eeprom_port_r )
|
||||
{
|
||||
return eeprom_read_bit();
|
||||
const device_config *eeprom = devtag_get_device(space->machine, "eeprom");
|
||||
return eepromdev_read_bit(eeprom);
|
||||
}
|
||||
|
||||
static WRITE16_HANDLER( cps1_eeprom_port_w )
|
||||
@ -472,9 +448,7 @@ static WRITE16_HANDLER( cps1_eeprom_port_w )
|
||||
bit 6 = clock
|
||||
bit 7 = cs
|
||||
*/
|
||||
eeprom_write_bit(data & 0x01);
|
||||
eeprom_set_cs_line((data & 0x80) ? CLEAR_LINE : ASSERT_LINE);
|
||||
eeprom_set_clock_line((data & 0x40) ? ASSERT_LINE : CLEAR_LINE);
|
||||
input_port_write(space->machine, "EEPROMOUT", data, 0xff);
|
||||
}
|
||||
}
|
||||
|
||||
@ -654,7 +628,7 @@ static ADDRESS_MAP_START( qsound_main_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0xf1c000, 0xf1c001) AM_READ_PORT("IN2") /* Player 3 controls (later games) */
|
||||
AM_RANGE(0xf1c002, 0xf1c003) AM_READ_PORT("IN3") /* Player 4 controls ("Muscle Bombers") */
|
||||
AM_RANGE(0xf1c004, 0xf1c005) AM_WRITE(cpsq_coinctrl2_w) /* Coin control2 (later games) */
|
||||
AM_RANGE(0xf1c006, 0xf1c007) AM_READWRITE(cps1_eeprom_port_r, cps1_eeprom_port_w)
|
||||
AM_RANGE(0xf1c006, 0xf1c007) AM_READ_PORT("EEPROMIN") AM_WRITE_PORT("EEPROMOUT")
|
||||
AM_RANGE(0xf1e000, 0xf1ffff) AM_READWRITE(qsound_sharedram2_r, qsound_sharedram2_w) /* Q RAM */
|
||||
AM_RANGE(0xff0000, 0xffffff) AM_RAM
|
||||
ADDRESS_MAP_END
|
||||
@ -2257,10 +2231,18 @@ static INPUT_PORTS_START( wof )
|
||||
|
||||
PORT_START("IN3") /* Player 4 - not used */
|
||||
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START( "EEPROMIN" )
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE("eeprom", eepromdev_read_bit)
|
||||
|
||||
PORT_START( "EEPROMOUT" )
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eepromdev_write_bit)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eepromdev_set_clock_line)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eepromdev_set_cs_line)
|
||||
INPUT_PORTS_END
|
||||
|
||||
/* Needs further checking */
|
||||
static INPUT_PORTS_START( dino )
|
||||
static INPUT_PORTS_START( dinopic )
|
||||
PORT_INCLUDE( cps1_3players )
|
||||
|
||||
PORT_MODIFY("IN0")
|
||||
@ -2282,8 +2264,20 @@ static INPUT_PORTS_START( dino )
|
||||
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( dino )
|
||||
PORT_INCLUDE( dinopic )
|
||||
|
||||
PORT_START( "EEPROMIN" )
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE("eeprom", eepromdev_read_bit)
|
||||
|
||||
PORT_START( "EEPROMOUT" )
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eepromdev_write_bit)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eepromdev_set_clock_line)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eepromdev_set_cs_line)
|
||||
INPUT_PORTS_END
|
||||
|
||||
/* Needs further checking */
|
||||
static INPUT_PORTS_START( punisher )
|
||||
static INPUT_PORTS_START( punipic )
|
||||
PORT_INCLUDE( cps1_2b )
|
||||
|
||||
PORT_MODIFY("IN0")
|
||||
@ -2308,7 +2302,19 @@ static INPUT_PORTS_START( punisher )
|
||||
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
INPUT_PORTS_END
|
||||
|
||||
/* Needs further checking */
|
||||
static INPUT_PORTS_START( punisher )
|
||||
PORT_INCLUDE( punipic )
|
||||
|
||||
PORT_START( "EEPROMIN" )
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE("eeprom", eepromdev_read_bit)
|
||||
|
||||
PORT_START( "EEPROMOUT" )
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eepromdev_write_bit)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eepromdev_set_clock_line)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eepromdev_set_cs_line)
|
||||
INPUT_PORTS_END
|
||||
|
||||
/* Needs further checking */
|
||||
static INPUT_PORTS_START( slammast )
|
||||
PORT_INCLUDE( cps1_4players )
|
||||
|
||||
@ -2332,6 +2338,14 @@ static INPUT_PORTS_START( slammast )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_BIT( 0xf7, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_START( "EEPROMIN" )
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE("eeprom", eepromdev_read_bit)
|
||||
|
||||
PORT_START( "EEPROMOUT" )
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eepromdev_write_bit)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eepromdev_set_clock_line)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eepromdev_set_cs_line)
|
||||
INPUT_PORTS_END
|
||||
|
||||
/* Needs further checking */
|
||||
@ -2561,6 +2575,14 @@ static INPUT_PORTS_START( pang3 )
|
||||
PORT_DIPNAME( 0x08, 0x08, "Freeze" )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
|
||||
PORT_START( "EEPROMIN" )
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE("eeprom", eepromdev_read_bit)
|
||||
|
||||
PORT_START( "EEPROMOUT" )
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eepromdev_write_bit)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eepromdev_set_clock_line)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eepromdev_set_cs_line)
|
||||
INPUT_PORTS_END
|
||||
|
||||
/* Needs further checking */
|
||||
@ -2808,7 +2830,7 @@ static MACHINE_DRIVER_START( pang3 )
|
||||
/* basic machine hardware */
|
||||
MDRV_IMPORT_FROM(cps1_12MHz)
|
||||
|
||||
MDRV_NVRAM_HANDLER(pang3)
|
||||
MDRV_EEPROM_NODEFAULT_ADD("eeprom", pang3_eeprom_interface)
|
||||
MACHINE_DRIVER_END
|
||||
|
||||
static MACHINE_DRIVER_START( qsound )
|
||||
@ -2824,7 +2846,7 @@ static MACHINE_DRIVER_START( qsound )
|
||||
MDRV_CPU_PROGRAM_MAP(qsound_sub_map)
|
||||
MDRV_CPU_PERIODIC_INT(irq0_line_hold, 250) /* ?? */
|
||||
|
||||
MDRV_NVRAM_HANDLER(qsound)
|
||||
MDRV_EEPROM_NODEFAULT_ADD("eeprom", qsound_eeprom_interface)
|
||||
|
||||
/* sound hardware */
|
||||
MDRV_DEVICE_REMOVE("mono")
|
||||
@ -2878,7 +2900,7 @@ static MACHINE_DRIVER_START( wofhfh )
|
||||
/* basic machine hardware */
|
||||
MDRV_IMPORT_FROM(cps1_12MHz)
|
||||
|
||||
MDRV_NVRAM_HANDLER(qsound)
|
||||
MDRV_EEPROM_NODEFAULT_ADD("eeprom", qsound_eeprom_interface)
|
||||
MACHINE_DRIVER_END
|
||||
|
||||
/* incomplete */
|
||||
@ -8814,16 +8836,16 @@ GAME( 1992, wofu, wof, qsound, wof, wof, ROT0, "Capcom"
|
||||
GAME( 1992, wofj, wof, qsound, wof, wof, ROT0, "Capcom", "Tenchi wo Kurau II - Sekiheki no Tatakai (Japan 921031)", 0 )
|
||||
GAME( 1999, wofhfh, wof, wofhfh, wofhfh, cps1, ROT0, "bootleg","Sangokushi II: Huo Fenghuang (Chinese bootleg)", 0 )
|
||||
GAME( 1993, dino, 0, qsound, dino, dino, ROT0, "Capcom", "Cadillacs and Dinosaurs (World 930201)" , 0) // "ETC"
|
||||
GAME( 1993, dinou, dino, qsound, dino, dino , ROT0, "Capcom", "Cadillacs and Dinosaurs (US 930201)", 0 )
|
||||
GAME( 1993, dinoj, dino, qsound, dino, dino , ROT0, "Capcom", "Cadillacs Kyouryuu-Shinseiki (Japan 930201)", 0 )
|
||||
GAME( 1993, dinopic, dino, cpspicb, dino, dino , ROT0, "bootleg", "Cadillacs and Dinosaurs (bootleg with PIC16c57, set 1)", GAME_NOT_WORKING )
|
||||
GAME( 1993, dinopic2, dino, cpspicb, dino, dino , ROT0, "bootleg", "Cadillacs and Dinosaurs (bootleg with PIC16c57, set 2)", GAME_NOT_WORKING )
|
||||
GAME( 1993, dinou, dino, qsound, dino, dino, ROT0, "Capcom", "Cadillacs and Dinosaurs (US 930201)", 0 )
|
||||
GAME( 1993, dinoj, dino, qsound, dino, dino, ROT0, "Capcom", "Cadillacs Kyouryuu-Shinseiki (Japan 930201)", 0 )
|
||||
GAME( 1993, dinopic, dino, cpspicb, dinopic, dino, ROT0, "bootleg", "Cadillacs and Dinosaurs (bootleg with PIC16c57, set 1)", GAME_NOT_WORKING )
|
||||
GAME( 1993, dinopic2, dino, cpspicb, dinopic, dino, ROT0, "bootleg", "Cadillacs and Dinosaurs (bootleg with PIC16c57, set 2)", GAME_NOT_WORKING )
|
||||
GAME( 1993, punisher, 0, qsound, punisher, punisher, ROT0, "Capcom", "The Punisher (World 930422)" , 0) // "ETC"
|
||||
GAME( 1993, punisheru,punisher, qsound, punisher, punisher, ROT0, "Capcom", "The Punisher (US 930422)", 0 )
|
||||
GAME( 1993, punisherj,punisher, qsound, punisher, punisher, ROT0, "Capcom", "The Punisher (Japan 930422)", 0 )
|
||||
GAME( 1993, punipic, punisher, cpspicb, punisher, punisher, ROT0, "Capcom", "The Punisher (bootleg with PIC16c57, set 1)" , GAME_NOT_WORKING)
|
||||
GAME( 1993, punipic2, punisher, cpspicb, punisher, punisher, ROT0, "Capcom", "The Punisher (bootleg with PIC16c57, set 2)" , GAME_NOT_WORKING)
|
||||
GAME( 1993, punipic3, punisher, cpspicb, punisher, punisher, ROT0, "Capcom", "The Punisher (bootleg with PIC16c57, set 3)" , GAME_NOT_WORKING)
|
||||
GAME( 1993, punipic, punisher, cpspicb, punipic, punisher, ROT0, "Capcom", "The Punisher (bootleg with PIC16c57, set 1)" , GAME_NOT_WORKING)
|
||||
GAME( 1993, punipic2, punisher, cpspicb, punipic, punisher, ROT0, "Capcom", "The Punisher (bootleg with PIC16c57, set 2)" , GAME_NOT_WORKING)
|
||||
GAME( 1993, punipic3, punisher, cpspicb, punipic, punisher, ROT0, "Capcom", "The Punisher (bootleg with PIC16c57, set 3)" , GAME_NOT_WORKING)
|
||||
|
||||
GAME( 1993, slammast, 0, qsound, slammast, slammast, ROT0, "Capcom", "Saturday Night Slam Masters (World 930713)" , 0) // "ETC"
|
||||
GAME( 1993, slammastu,slammast, qsound, slammast, slammast, ROT0, "Capcom", "Saturday Night Slam Masters (US 930713)", 0 )
|
||||
|
@ -586,7 +586,7 @@ Stephh's inputs notes (based on some tests on the "parent" set) :
|
||||
#include "driver.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "deprecat.h"
|
||||
#include "machine/eeprom.h"
|
||||
#include "machine/eepromdev.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "sound/qsound.h"
|
||||
#include "sound/okim6295.h" // gigamn2 bootleg
|
||||
@ -708,59 +708,44 @@ static const eeprom_interface cps2_eeprom_interface =
|
||||
"0111" /* erase command */
|
||||
};
|
||||
|
||||
static NVRAM_HANDLER( cps2 )
|
||||
{
|
||||
if (read_or_write)
|
||||
eeprom_save(file);
|
||||
else
|
||||
{
|
||||
eeprom_init(machine, &cps2_eeprom_interface);
|
||||
|
||||
if (file)
|
||||
eeprom_load(file);
|
||||
}
|
||||
}
|
||||
|
||||
static WRITE16_HANDLER( cps2_eeprom_port_w )
|
||||
{
|
||||
if (ACCESSING_BITS_8_15)
|
||||
{
|
||||
/* bit 0 - Unused */
|
||||
/* bit 1 - Unused */
|
||||
/* bit 2 - Unused */
|
||||
/* bit 3 - Unused? */
|
||||
/* bit 4 - Eeprom data */
|
||||
/* bit 5 - Eeprom clock */
|
||||
/* bit 6 - */
|
||||
/* bit 7 - */
|
||||
if (ACCESSING_BITS_8_15)
|
||||
{
|
||||
/* bit 0 - Unused */
|
||||
/* bit 1 - Unused */
|
||||
/* bit 2 - Unused */
|
||||
/* bit 3 - Unused? */
|
||||
/* bit 4 - Eeprom data */
|
||||
/* bit 5 - Eeprom clock */
|
||||
/* bit 6 - */
|
||||
/* bit 7 - */
|
||||
|
||||
/* EEPROM */
|
||||
eeprom_write_bit(data & 0x1000);
|
||||
eeprom_set_clock_line((data & 0x2000) ? ASSERT_LINE : CLEAR_LINE);
|
||||
eeprom_set_cs_line((data & 0x4000) ? CLEAR_LINE : ASSERT_LINE);
|
||||
/* EEPROM */
|
||||
input_port_write(space->machine, "EEPROMOUT", data, 0xffff);
|
||||
}
|
||||
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
/* bit 0 - coin counter 1 */
|
||||
/* bit 0 - coin counter 2 */
|
||||
/* bit 2 - Unused */
|
||||
/* bit 3 - Allows access to Z80 address space (Z80 reset) */
|
||||
/* bit 4 - lock 1 */
|
||||
/* bit 5 - lock 2 */
|
||||
/* bit 6 - */
|
||||
/* bit 7 - */
|
||||
/* bit 0 - coin counter 1 */
|
||||
/* bit 0 - coin counter 2 */
|
||||
/* bit 2 - Unused */
|
||||
/* bit 3 - Allows access to Z80 address space (Z80 reset) */
|
||||
/* bit 4 - lock 1 */
|
||||
/* bit 5 - lock 2 */
|
||||
/* bit 6 - */
|
||||
/* bit 7 - */
|
||||
|
||||
/* Z80 Reset */
|
||||
if (cputag_get_cpu(space->machine, "audiocpu"))
|
||||
cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_RESET, (data & 0x0008) ? CLEAR_LINE : ASSERT_LINE);
|
||||
/* Z80 Reset */
|
||||
if (cputag_get_cpu(space->machine, "audiocpu"))
|
||||
cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_RESET, (data & 0x0008) ? CLEAR_LINE : ASSERT_LINE);
|
||||
|
||||
coin_counter_w(0, data & 0x0001);
|
||||
if( (strncmp(space->machine->gamedrv->name,"pzloop2",8)==0) ||
|
||||
(strncmp(space->machine->gamedrv->name,"pzloop2j",8)==0) )
|
||||
{
|
||||
// Puzz Loop 2 uses coin counter 2 input to switch between stick and paddle controls
|
||||
readpaddle = data & 0x0002;
|
||||
coin_counter_w(0, data & 0x0001);
|
||||
if( (strncmp(space->machine->gamedrv->name,"pzloop2",8)==0) ||
|
||||
(strncmp(space->machine->gamedrv->name,"pzloop2j",8)==0) )
|
||||
{
|
||||
// Puzz Loop 2 uses coin counter 2 input to switch between stick and paddle controls
|
||||
readpaddle = data & 0x0002;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -907,55 +892,60 @@ ADDRESS_MAP_END
|
||||
|
||||
/* 4 players and 4 buttons */
|
||||
static INPUT_PORTS_START( cps2_4p4b )
|
||||
PORT_START("IN0") /* IN0 (0x00) */
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
|
||||
PORT_START("IN0") /* IN0 (0x00) */
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
|
||||
|
||||
PORT_START("IN1") /* IN1 (0x10) */
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3)
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3)
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3)
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3)
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3)
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(3)
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4)
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4)
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4)
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4)
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4)
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4)
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4)
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(4)
|
||||
PORT_START("IN1") /* IN1 (0x10) */
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3)
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3)
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3)
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3)
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3)
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(3)
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4)
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4)
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4)
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4)
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4)
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4)
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4)
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(4)
|
||||
|
||||
PORT_START("IN2") /* IN2 (0x20) */
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(eeprom_bit_r, NULL)
|
||||
PORT_START("IN2") /* IN2 (0x20) */
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE("eeprom", eepromdev_read_bit)
|
||||
PORT_SERVICE_NO_TOGGLE( 0x0002, IP_ACTIVE_LOW )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 )
|
||||
PORT_BIT( 0x00f8, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 )
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START3 )
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_START4 )
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_COIN3 )
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN4 )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 )
|
||||
PORT_BIT( 0x00f8, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 )
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START3 )
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_START4 )
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_COIN3 )
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN4 )
|
||||
|
||||
PORT_START( "EEPROMOUT" )
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eepromdev_write_bit)
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eepromdev_set_clock_line)
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eepromdev_set_cs_line)
|
||||
INPUT_PORTS_END
|
||||
|
||||
/* 4 players and 3 buttons */
|
||||
@ -963,12 +953,12 @@ static INPUT_PORTS_START( cps2_4p3b )
|
||||
PORT_INCLUDE(cps2_4p4b)
|
||||
|
||||
PORT_MODIFY("IN0")
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON4 PORT_PLAYER(1) */
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON4 PORT_PLAYER(2) */
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON4 PORT_PLAYER(1) */
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON4 PORT_PLAYER(2) */
|
||||
|
||||
PORT_MODIFY("IN1")
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON4 PORT_PLAYER(3) */
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON4 PORT_PLAYER(4) */
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON4 PORT_PLAYER(3) */
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON4 PORT_PLAYER(4) */
|
||||
INPUT_PORTS_END
|
||||
|
||||
/* 4 players and 2 buttons */
|
||||
@ -976,12 +966,12 @@ static INPUT_PORTS_START( cps2_4p2b )
|
||||
PORT_INCLUDE(cps2_4p3b)
|
||||
|
||||
PORT_MODIFY("IN0")
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON3 PORT_PLAYER(1) */
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON3 PORT_PLAYER(2) */
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON3 PORT_PLAYER(1) */
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON3 PORT_PLAYER(2) */
|
||||
|
||||
PORT_MODIFY("IN1")
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON3 PORT_PLAYER(3) */
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON3 PORT_PLAYER(4) */
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON3 PORT_PLAYER(3) */
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON3 PORT_PLAYER(4) */
|
||||
INPUT_PORTS_END
|
||||
|
||||
/* 3 players and 4 buttons */
|
||||
@ -989,11 +979,11 @@ static INPUT_PORTS_START( cps2_3p4b )
|
||||
PORT_INCLUDE(cps2_4p4b)
|
||||
|
||||
PORT_MODIFY("IN1")
|
||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) /* PORT_PLAYER(4) inputs */
|
||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) /* PORT_PLAYER(4) inputs */
|
||||
|
||||
PORT_MODIFY("IN2")
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED ) /* START4 */
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) /* COIN4 */
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED ) /* START4 */
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) /* COIN4 */
|
||||
INPUT_PORTS_END
|
||||
|
||||
/* 3 players and 3 buttons */
|
||||
@ -1001,11 +991,11 @@ static INPUT_PORTS_START( cps2_3p3b )
|
||||
PORT_INCLUDE(cps2_3p4b)
|
||||
|
||||
PORT_MODIFY("IN0")
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON4 PORT_PLAYER(1) */
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON4 PORT_PLAYER(2) */
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON4 PORT_PLAYER(1) */
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON4 PORT_PLAYER(2) */
|
||||
|
||||
PORT_MODIFY("IN1")
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON4 PORT_PLAYER(3) */
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON4 PORT_PLAYER(3) */
|
||||
INPUT_PORTS_END
|
||||
|
||||
/* 3 players and 2 buttons */
|
||||
@ -1014,11 +1004,11 @@ static INPUT_PORTS_START( cps2_3p2b )
|
||||
PORT_INCLUDE(cps2_3p3b)
|
||||
|
||||
PORT_MODIFY("IN0")
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON3 PORT_PLAYER(1) */
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON3 PORT_PLAYER(2) */
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON3 PORT_PLAYER(1) */
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON3 PORT_PLAYER(2) */
|
||||
|
||||
PORT_MODIFY("IN1")
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON3 PORT_PLAYER(3) */
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON3 PORT_PLAYER(3) */
|
||||
INPUT_PORTS_END
|
||||
#endif
|
||||
|
||||
@ -1027,11 +1017,11 @@ static INPUT_PORTS_START( cps2_2p4b )
|
||||
PORT_INCLUDE(cps2_3p4b)
|
||||
|
||||
PORT_MODIFY("IN1")
|
||||
PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED ) /* PORT_PLAYER(3) inputs */
|
||||
PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED ) /* PORT_PLAYER(3) inputs */
|
||||
|
||||
PORT_MODIFY("IN2")
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED ) /* START3 */
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED ) /* COIN3 */
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED ) /* START3 */
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED ) /* COIN3 */
|
||||
INPUT_PORTS_END
|
||||
|
||||
/* 2 players and 3 buttons */
|
||||
@ -1039,8 +1029,8 @@ static INPUT_PORTS_START( cps2_2p3b )
|
||||
PORT_INCLUDE(cps2_2p4b)
|
||||
|
||||
PORT_MODIFY("IN0")
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON4 PORT_PLAYER(1) */
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON4 PORT_PLAYER(2) */
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON4 PORT_PLAYER(1) */
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON4 PORT_PLAYER(2) */
|
||||
INPUT_PORTS_END
|
||||
|
||||
/* 2 players and 2 buttons */
|
||||
@ -1048,8 +1038,8 @@ static INPUT_PORTS_START( cps2_2p2b )
|
||||
PORT_INCLUDE(cps2_2p3b)
|
||||
|
||||
PORT_MODIFY("IN0")
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON3 PORT_PLAYER(1) */
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON3 PORT_PLAYER(2) */
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON3 PORT_PLAYER(1) */
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON3 PORT_PLAYER(2) */
|
||||
INPUT_PORTS_END
|
||||
|
||||
/* 2 players and 1 button */
|
||||
@ -1057,8 +1047,8 @@ static INPUT_PORTS_START( cps2_2p1b )
|
||||
PORT_INCLUDE(cps2_2p2b)
|
||||
|
||||
PORT_MODIFY("IN0")
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON2 PORT_PLAYER(1) */
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON2 PORT_PLAYER(2) */
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON2 PORT_PLAYER(1) */
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON2 PORT_PLAYER(2) */
|
||||
INPUT_PORTS_END
|
||||
|
||||
/* 2 players and 6 buttons (2 rows of 3 buttons) */
|
||||
@ -1066,14 +1056,14 @@ static INPUT_PORTS_START( cps2_2p6b )
|
||||
PORT_INCLUDE(cps2_2p3b)
|
||||
|
||||
PORT_MODIFY("IN1")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2)
|
||||
|
||||
PORT_MODIFY("IN2")
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2)
|
||||
INPUT_PORTS_END
|
||||
|
||||
/* 1 player and 4 buttons */
|
||||
@ -1081,11 +1071,11 @@ static INPUT_PORTS_START( cps2_1p4b )
|
||||
PORT_INCLUDE(cps2_2p4b)
|
||||
|
||||
PORT_MODIFY("IN0")
|
||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) /* PORT_PLAYER(2) inputs */
|
||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) /* PORT_PLAYER(2) inputs */
|
||||
|
||||
PORT_MODIFY("IN2")
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNUSED ) /* START2 */
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNUSED ) /* COIN2 */
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNUSED ) /* START2 */
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNUSED ) /* COIN2 */
|
||||
INPUT_PORTS_END
|
||||
|
||||
/* 1 player and 3 buttons */
|
||||
@ -1093,7 +1083,7 @@ static INPUT_PORTS_START( cps2_1p3b )
|
||||
PORT_INCLUDE(cps2_1p4b)
|
||||
|
||||
PORT_MODIFY("IN0")
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON4 PORT_PLAYER(1) */
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON4 PORT_PLAYER(1) */
|
||||
INPUT_PORTS_END
|
||||
|
||||
/* 1 player and 2 buttons */
|
||||
@ -1101,7 +1091,7 @@ static INPUT_PORTS_START( cps2_1p2b )
|
||||
PORT_INCLUDE(cps2_1p3b)
|
||||
|
||||
PORT_MODIFY("IN0")
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON3 PORT_PLAYER(1) */
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON3 PORT_PLAYER(1) */
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
@ -1116,14 +1106,14 @@ static INPUT_PORTS_START( cybots )
|
||||
PORT_INCLUDE(cps2_2p6b)
|
||||
|
||||
PORT_MODIFY("IN1")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON5 PORT_PLAYER(1) */
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON6 PORT_PLAYER(1) */
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON5 PORT_PLAYER(2) */
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON5 PORT_PLAYER(1) */
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON6 PORT_PLAYER(1) */
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON5 PORT_PLAYER(2) */
|
||||
|
||||
PORT_MODIFY("IN2")
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON6 PORT_PLAYER(2) */
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON6 PORT_PLAYER(2) */
|
||||
INPUT_PORTS_END
|
||||
|
||||
/* 2 players, no joysticks which are replaced with 4 buttons, no other buttons */
|
||||
@ -1131,16 +1121,16 @@ static INPUT_PORTS_START( qndream )
|
||||
PORT_INCLUDE(cps2_2p4b)
|
||||
|
||||
PORT_MODIFY("IN0")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x00f0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0xf000, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x00f0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0xf000, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
INPUT_PORTS_END
|
||||
|
||||
/* 2 players and 1 button - either 2 8-way joysticks, 2 2-way joysticks, or 2 paddles */
|
||||
@ -1159,7 +1149,7 @@ static INPUT_PORTS_START( choko )
|
||||
PORT_INCLUDE(cps2_1p3b)
|
||||
|
||||
PORT_MODIFY("IN2")
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
@ -1219,7 +1209,7 @@ static MACHINE_DRIVER_START( cps2 )
|
||||
MDRV_CPU_PROGRAM_MAP(qsound_sub_map)
|
||||
MDRV_CPU_PERIODIC_INT(irq0_line_hold, 251) /* 251 is good (see 'mercy mercy mercy'section of sgemf attract mode for accurate sound sync */
|
||||
|
||||
MDRV_NVRAM_HANDLER(cps2)
|
||||
MDRV_EEPROM_NODEFAULT_ADD("eeprom", cps2_eeprom_interface)
|
||||
|
||||
/* video hardware */
|
||||
MDRV_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
|
||||
|
@ -50,7 +50,7 @@
|
||||
#include "cpu/mips/psx.h"
|
||||
#include "includes/psx.h"
|
||||
#include "konamigx.h"
|
||||
#include "machine/eeprom.h"
|
||||
#include "machine/eepromdev.h"
|
||||
#include "machine/am53cf96.h"
|
||||
#include "harddisk.h"
|
||||
#include "sound/k054539.h"
|
||||
@ -104,46 +104,25 @@ static READ32_HANDLER( mb89371_r )
|
||||
|
||||
/* EEPROM */
|
||||
|
||||
static NVRAM_HANDLER( konamigq_93C46 )
|
||||
static const UINT8 konamigq_def_eeprom[128] =
|
||||
{
|
||||
if( read_or_write )
|
||||
{
|
||||
eeprom_save( file );
|
||||
}
|
||||
else
|
||||
{
|
||||
eeprom_init( machine, &eeprom_interface_93C46 );
|
||||
if( file )
|
||||
{
|
||||
eeprom_load( file );
|
||||
}
|
||||
else
|
||||
{
|
||||
static const UINT8 def_eeprom[ 128 ] =
|
||||
{
|
||||
0x29, 0x2b, 0x52, 0x56, 0x20, 0x94, 0x41, 0x55, 0x00, 0x41, 0x14, 0x14, 0x00, 0x03, 0x01, 0x01,
|
||||
0x01, 0x03, 0x00, 0x00, 0x07, 0x07, 0x00, 0x01, 0xaa, 0x00, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
|
||||
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
|
||||
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
|
||||
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
|
||||
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
|
||||
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
|
||||
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
|
||||
};
|
||||
|
||||
eeprom_set_data( def_eeprom, 128 );
|
||||
}
|
||||
}
|
||||
}
|
||||
0x29, 0x2b, 0x52, 0x56, 0x20, 0x94, 0x41, 0x55, 0x00, 0x41, 0x14, 0x14, 0x00, 0x03, 0x01, 0x01,
|
||||
0x01, 0x03, 0x00, 0x00, 0x07, 0x07, 0x00, 0x01, 0xaa, 0x00, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
|
||||
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
|
||||
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
|
||||
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
|
||||
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
|
||||
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
|
||||
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
|
||||
};
|
||||
|
||||
static WRITE32_HANDLER( eeprom_w )
|
||||
{
|
||||
eeprom_write_bit( ( data & 0x01 ) ? 1 : 0 );
|
||||
eeprom_set_clock_line( ( data & 0x04 ) ? ASSERT_LINE : CLEAR_LINE );
|
||||
eeprom_set_cs_line( ( data & 0x02 ) ? CLEAR_LINE : ASSERT_LINE );
|
||||
input_port_write(space->machine, "EEPROMOUT", data & 0x07, 0xff);
|
||||
cputag_set_input_line(space->machine, "soundcpu", INPUT_LINE_RESET, ( data & 0x40 ) ? CLEAR_LINE : ASSERT_LINE );
|
||||
}
|
||||
|
||||
|
||||
/* PCM RAM */
|
||||
|
||||
static UINT8 *m_p_n_pcmram;
|
||||
@ -390,7 +369,7 @@ static MACHINE_DRIVER_START( konamigq )
|
||||
|
||||
MDRV_MACHINE_START( konamigq )
|
||||
MDRV_MACHINE_RESET( konamigq )
|
||||
MDRV_NVRAM_HANDLER( konamigq_93C46 )
|
||||
MDRV_EEPROM_93C46_ADD("eeprom", 128, konamigq_def_eeprom)
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
@ -496,7 +475,12 @@ static INPUT_PORTS_START( konamigq )
|
||||
PORT_DIPSETTING( 0x00, "Independent" )
|
||||
PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x00010000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM( eeprom_bit_r, NULL )
|
||||
PORT_BIT( 0x00010000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE("eeprom", eepromdev_read_bit)
|
||||
|
||||
PORT_START( "EEPROMOUT" )
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eepromdev_write_bit)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eepromdev_set_cs_line)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eepromdev_set_clock_line)
|
||||
INPUT_PORTS_END
|
||||
|
||||
ROM_START( cryptklr )
|
||||
|
@ -171,7 +171,7 @@ Check gticlub.c for details on the bottom board.
|
||||
#include "machine/konppc.h"
|
||||
#include "machine/konamiic.h"
|
||||
#include "machine/adc083x.h"
|
||||
#include "machine/eeprom.h"
|
||||
#include "machine/eepromdev.h"
|
||||
#include "video/konamiic.h"
|
||||
#include "video/gticlub.h"
|
||||
|
||||
@ -328,9 +328,7 @@ static WRITE8_HANDLER( sysreg_w )
|
||||
0x02 = EEPCLK
|
||||
0x01 = EEPDI
|
||||
*/
|
||||
eeprom_write_bit((data & 0x01) ? 1 : 0);
|
||||
eeprom_set_clock_line((data & 0x02) ? ASSERT_LINE : CLEAR_LINE);
|
||||
eeprom_set_cs_line((data & 0x04) ? CLEAR_LINE : ASSERT_LINE);
|
||||
input_port_write(space->machine, "EEPROMOUT", data & 0x07, 0xff);
|
||||
cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE);
|
||||
mame_printf_debug("System register 0 = %02X\n", data);
|
||||
break;
|
||||
@ -541,7 +539,12 @@ static INPUT_PORTS_START( zr107 )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* PARAACK */
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE("adc0838",adc083x_sars_read)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(eeprom_bit_r, NULL)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE("eeprom",eepromdev_read_bit)
|
||||
|
||||
PORT_START("EEPROMOUT")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eepromdev_write_bit)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eepromdev_set_clock_line)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eepromdev_set_cs_line)
|
||||
|
||||
PORT_START("OUT4")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("adc0838", adc083x_cs_write)
|
||||
@ -711,7 +714,7 @@ static MACHINE_DRIVER_START( zr107 )
|
||||
|
||||
MDRV_QUANTUM_TIME(HZ(30000))
|
||||
|
||||
MDRV_NVRAM_HANDLER(93C46)
|
||||
MDRV_EEPROM_93C46_NODEFAULT_ADD("eeprom")
|
||||
MDRV_MACHINE_START(zr107)
|
||||
MDRV_MACHINE_RESET(zr107)
|
||||
|
||||
@ -758,7 +761,7 @@ static MACHINE_DRIVER_START( jetwave )
|
||||
|
||||
MDRV_QUANTUM_TIME(HZ(30000))
|
||||
|
||||
MDRV_NVRAM_HANDLER(93C46)
|
||||
MDRV_EEPROM_93C46_NODEFAULT_ADD("eeprom")
|
||||
MDRV_MACHINE_START(zr107)
|
||||
MDRV_MACHINE_RESET(zr107)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user