// license:BSD-3-Clause
// copyright-holders:Paul Leaman
/***************************************************************************
Capcom System 1
===============
Driver provided by:
Paul Leaman (paul@vortexcomputing.demon.co.uk)
68000 for game, Z80, YM-2151 and OKIM6295 for sound.
68000 clock speeds are unknown for all games (except where commented)
todo: move the bootleg sets with modified hardware into their own
drivers, like capcom/fcrash.cpp
Notes
-----
- Most of the original PALs are protected. The images loaded in the ROM definitions are
mostly logically equivalent replacements with a GAL16V8 target. The actual pld types
found on the boards can also be PAL16P8, PAL16L8 etc.
- There are five PALs on the A-Board, they are the same across all A-Board
revisions, but their location varies.
The A-Boards are interchangeable, so the IC locations are not specified in
the ROM definitions and are listed here instead:
PAL ID 88617A 89626A
------ ------ ------
PRG1 12H 9K
IOA1 12F 4A
BUF1 16H 13K
ROM1 15H 14K
SOU1 13E 10F
For Q-Sound games, the A-Board misses the Z80, Oki and amp, which are replaced
by the D-Board; the SOU1 PAL is missing as well, while PRG1 is replaced by
PRG2. The other PALs are the same.
- The BPRG1 PAL found on later B-boards allows the use of a larger program ROM space.
- The B-board usually has two PALs (later revisions have three). The first PAL
is used to map tile codes to the graphics ROMs, and changes from game to game.
The other doesn't change from game to game and there are only two versions,
called LWIO and IOB1, which are almost identical, the only difference being
that outputs o16 and o17 are R/W in IOB1 and Write only in LWIO. Since those
outputs are not used anyway except that in Forgotten Worlds, one wonders why
they were changed.
SF2 revision "E" World and USA 910228 maps CPS-B at 8001C0 instead of 800140
and seems to be the only one that uses the IOB2 and C632B PALs instead of the
IOB1 and C632, while STF29 PAL is confirmed to be the same as the other SF2 sets.
pin 1 CN2 D9 = /IOCS (i.e. address 8xxxxx)
pin 2 CN2 D7 = /RDB
pin 3 CN2 C6 = /UDSWR
pin 4 CN2 D6 = /LDSWR
pin 5 CN2 C19 = A8
pin 6 CN2 C20 = A7
pin 7 CN2 C21 = A6
pin 8 CN2 C22 = A5
pin 9 CN2 C23 = A4
pin 10 GND
pin 11 CN2 C24 = A3
pin 12 CN2 C25 = A2
LWIO:
/o19 = /i1 * /i2 * /i5 * /i6 * i7 * i8 * /i9 800060-80006f R not used
/o18 = /i1 * /i2 * /i5 * /i6 * i7 * /i8 * i9 800050-80005f R forgotten worlds dial (on 88618B & 88621B B-boards)
o17 = /i1 * /i4 * /i5 * /i6 * i7 * /i8 * /i9 * /i11 800040-800047 W forgotten worlds dial (on 88618B & 88621B B-boards)
o16 = /i1 * /i4 * /i5 * /i6 * i7 * /i8 * /i9 * i11 800048-80004f W forgotten worlds dial (on 88618B & 88621B B-boards)
/o15 = /i1 * i5 * /i6 * i7 800140-80017f R/W CPS-B
/o14 = /i1 * /i4 * /i5 * /i6 * /i7 * i8 * i9 * /i11 800030-800037 W not used (overlaps coinctrl on A-board)
/o13 = /i1 * /i2 * /i5 * /i6 * /i7 * /i8 * /i9 * i11 800008-80000f R not used
/o12 = /i1 * /i2 * /i5 * /i6 * /i7 * /i8 * i9 * i11 800018-80001f R not used (overlaps system/dsw inputs on A-board)
IOB1:
/o19 = /i1 * /i2 * /i5 * /i6 * i7 * i8 * /i9 800060-80006f R not used
/o18 = /i1 * /i2 * /i5 * /i6 * i7 * /i8 * i9 800050-80005f R not used
o17 = /i1 * /i5 * /i6 * i7 * /i8 * /i9 * /i11 800040-800047 R/W not used
o16 = /i1 * /i5 * /i6 * i7 * /i8 * /i9 * i11 800048-80004f R/W not used
/o15 = /i1 * i5 * /i6 * i7 800140-80017f R/W CPS-B
/o14 = /i1 * /i4 * /i5 * /i6 * /i7 * i8 * i9 * /i11 800030-800037 W not used (overlaps coinctrl on A-board)
/o13 = /i1 * /i2 * /i5 * /i6 * /i7 * /i8 * /i9 * i11 800008-80000f R not used
/o12 = /i1 * /i2 * /i5 * /i6 * /i7 * /i8 * i9 * i11 800018-80001f R not used (overlaps system/dsw inputs on A-board)
- The C-board ioc1 has been dumped from an unprotected pal16l8 device.
Stephh's notes (based on the games M68000 code and some tests) :
1) 'forgottn' and clones
- Keys in the "scroll 1 test" screen :
* P1 UP : char code += 0x0200
* P1 DOWN : char code -= 0x0200
* P1 RIGHT : attribute ^= 0x20 ; also affects Hflip
* P1 LEFT : attribute ^= 0x40 ; also affects Vflip
* P1 button 1 : (attribute++) & 0x1f ; also affects color
* P1 button 2 : (attribute--) & 0x1f ; also affects color
2) 'ghouls' and clones
2a) 'ghouls'
- NO debug features
2b) 'ghoulsu'
- How to activate the debug features :
* set "Game Mode" Dip Switch to "Game"
* set both "Coin A" and "Coin B" Dip Switches to 1C_1C
* reset the game (F3 key)
* insert a coin
* set "Game Mode" Dip Switch to "Test"
* set the debug Dip Switches to what you want
* start a 1 player game
- Some debug features :
* "Armor on New Life" is effective at the beginning of a new life
Note that even when you start without armor, you need to be hit twice
* "Starting Weapon" is effective only when you start a new game
or when you continue play
* "Starting Level" is effective only when you start a new game
(you must NOT continue play !)
* "Slow Motion" and "Invulnerability" can be changed at any time
2c) 'daimakai'
- NO debug features
- Different Dip Switches than in 'ghouls'
3) 'strider' and clones
- TO DO !
4) 'dynwar' and clones
4a) 'dynwar'
- According to code at 0x0125fa and 0x012634, bits 0 and 1 of DSWC also affect the energy cost
(table at 0x012662) when you press button 3 ("tactics" in the manual) :
bit 0 bit 1 cost possible BCD values (based on kind of "tactics")
OFF OFF normal 0x10 (rockslide) 0x08 (ambush) 0x14 (flame) 0x12 (explosion)
ON OFF very low 0x03 0x02 0x05 0x04
OFF ON low 0x06 0x04 0x10 0x08
ON ON high 0x13 0x10 0x19 0x16
So IMO, there might be an ingame bug at 0x000c7e which should read bits 2 and 3 of DSWC
(instead of having them unused) :
000C7E: 0240 0003 andi.w #$3, D0
should be
000C7E: 0240 000c andi.w #$c, D0
However, only bits 4 to 7 are tested while you are in the "test mode".
Note that code at 0x000c7e is only executed once when you reset the machine;
this means that you can change the "Freeze" and "Turbo Mode" Dip Switches before
reseting the game to change the energy cost settings, then put them back to "Off"
after the startup routine (when screen is black) so you can play the game.
- Both "Coin A" and "Coin B" Dip Switches must be set to "2 Coins/1 Credit" to make
this mode available. If only one Dip Switch is set to it, it is the same as 2C_1C.
4b) 'dynwarj'
- The "energy cost" bug also exists in this version as well as code at 0x000c7e;
in fact, only code that reads these settings is at a different address :
check code at 0x01267a and 0x0126b4 and table at 0x0126e2.
- Both "Coin A" and "Coin B" Dip Switches must be set to "2 Coins/1 Credit" to make
this mode available. If only one Dip Switch is set to it, it is the same as 2C_1C.
5) 'willow' and clones
- How to activate the debug features :
* set "Game Mode" Dip Switch to "Game"
* set both "Coin A" and "Coin B" Dip Switches to 1C_1C
* reset the game (F3 key)
* insert a coin
* set "Game Mode" Dip Switch to "Test"
* set the debug Dip Switches to what you want
* start a 1 player game
- Some debug features :
* "Starting Level" is effective only when you start a new game
(you must NOT continue play !)
* Once you set "Maximum magic/sword power" to "On", setting it to "Off" won't have
any effect until you start a new game (you must NOT continue play !)
* "Slow Motion Delay" is effective only when "Slow Motion" is set to "On"
* Even if "Freeze" Dip Switch is set to "On" a message will be displayed to its end.
* I can't tell what kind of infos are displayed when "Display Debug Infos"
Dip Switch is sry to "On" :( Any hint about them are welcome !
- Both "Coin A" and "Coin B" Dip Switches must be set to "2 Coins/1 Credit" to make
this mode available. If only one Dip Switch is set to it, it is the same as 2C_1C.
- When the "Stage Magic Continue" Dip Switch is set to "On", your magic and sword power
will be increased at the end of the level if you haven't bought the magic/sword item.
But you won't notice this before you use the character again.
For example, magic power will be increased at the end of level 1 but you won't notice
it before level 3, and sword power will be increased at the end of level 2 but you
won't notice it before level 4.
6) 'ganbare'
- Using the payout setting dip switch results in some occasional hopper errors, if this
happens, then the clear ram dip switch needs to be used. This needs to be resolved.
TO DO (2006.09.20) :
- Check 'strider' and its clones and add debug features
- Check other games to see if there are some debug or hidden features
- Add addresses from routines with debug features in the notes
- Look at what IN2 and IN3 do for the following sets :
* 'cworld2j' (IN2 only)
* 'qad' and 'qadjr'
* 'qtono2j'
- Check daimakar dip switches. E.g. changing the number of lives also changes the
starting level.
Stephh's log (2006.09.20) :
- Changed the "readinputport" reads by "readinputportbytag" reads.
This way, inputs and Dip Switch can be in any order
(and I don't have the nasty conditional Dip Switch bug).
BTW, I've slightly changed the read memory map :
* one handler for the 3 Dip Switches banks : cps1_dsw_r
* one handler for the system inputs (IN0) : cps1_in0_r
* one handler for the player inputs (IN1) : cps1_in1_r
* renamed cps1_input2_r to cps_in2_r
* renamed cps1_input3_r to cps_in3_r
- Applied these changes to src/drivers/fcrash.c as well.
- Added debug features in the following sets :
* 'ghoulsu'
* 'willowu', 'willowou' and 'willowj'
- Checked sets with no debug features :
* 'forgottnua' and 'lostwrld'
* 'ghouls' and 'daimakai'
* 'dynwar' and 'dynwarj'
2008-07:
- replaced input read handler with direct AM_READ_PORT where suitable
***************************************************************************/
#include "emu.h"
#include "cps1.h"
#include "cpu/z80/z80.h"
#include "cpu/pic16c5x/pic16c5x.h"
#include "cpu/m68000/m68000.h"
#include "machine/eepromser.h"
#include "machine/upd4701.h"
#include "sound/okim6295.h"
#include "sound/qsound.h"
#include "sound/ymopm.h"
#include "kabuki.h"
#include "speaker.h"
uint16_t cps_state::cps1_dsw_r(offs_t offset)
{
static const char *const dswname[] = { "IN0", "DSWA", "DSWB", "DSWC" };
int in = ioport(dswname[offset])->read();
return (in << 8) | 0xff;
}
uint16_t cps_state::cps1_hack_dsw_r(offs_t offset)
{
static const char *const dswname[] = { "IN0", "DSWA", "DSWB", "DSWC" };
int in = ioport(dswname[offset])->read();
return (in << 8) | in;
}
uint16_t cps_state::cps1_in1_r()
{
int in = ioport("IN1")->read();
return (in << 8) | in;
}
uint16_t cps_state::cps1_in2_r()
{
int in = ioport("IN2")->read();
return (in << 8) | in;
}
uint16_t cps_state::cps1_in3_r()
{
int in = ioport("IN3")->read();
return (in << 8) | in;
}
void cps_state::cps1_snd_bankswitch_w(uint8_t data)
{
membank("bank1")->set_entry(data & 0x01);
}
void cps_state::cps1_oki_pin7_w(uint8_t data)
{
m_oki->set_pin7(data & 1);
}
void cps_state::cps1_soundlatch_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
if (ACCESSING_BITS_0_7)
m_soundlatch->write(data & 0xff);
else
m_soundlatch->write(data >> 8);
}
void cps_state::cps1_soundlatch2_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
if (ACCESSING_BITS_0_7)
m_soundlatch2->write(data & 0xff);
}
void cps_state::cps1_coinctrl_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
if (ACCESSING_BITS_8_15)
{
machine().bookkeeping().coin_counter_w(0, data & 0x0100);
machine().bookkeeping().coin_counter_w(1, data & 0x0200);
machine().bookkeeping().coin_lockout_w(0, ~data & 0x0400);
machine().bookkeeping().coin_lockout_w(1, ~data & 0x0800);
// bit 15 = CPS-A custom reset?
}
}
void cps_state::cpsq_coinctrl2_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
if (ACCESSING_BITS_0_7)
{
machine().bookkeeping().coin_counter_w(2, data & 0x01);
machine().bookkeeping().coin_lockout_w(2, ~data & 0x02);
machine().bookkeeping().coin_counter_w(3, data & 0x04);
machine().bookkeeping().coin_lockout_w(3, ~data & 0x08);
}
}
INTERRUPT_GEN_MEMBER(cps_state::cps1_interrupt)
{
/* Strider also has a IRQ4 handler. It is input port related, but the game */
/* works without it. It is the *only* CPS1 game to have that. */
/* ...until we found out that ganbare relies on it, see below */
device.execute().set_input_line(2, ASSERT_LINE);
}
/*
/INT2 (IRQ4) is tied high on some early B boards (eg. 89624B-3),
On later B boards (90629B-2, 91634B-2, 91635B-2) it is passed to the C board via connector CNA pin 9.
On the later cps-b-21 based C boards (92631C-6, 90631C-5, 92641C-1) it then passes to pin 57 of the cps-b-21 via jumper JP1.
Ganbare! Marine Kun (B:91634B-2, C:92631C-6) is only game known to use it, requires a cps-b-21 C-board (90631C-5, 92631C-6, 92641C-1) with JP1 closed.
Strider has a handler but no h/w support to call it, perhaps a remnant of some dev tool?
*/
TIMER_DEVICE_CALLBACK_MEMBER(cps_state::ganbare_interrupt)
{
/* not sure on the timing or source of this - the game needs it once per frame, */
/* otherwise you get a "HARD ERROR" after boot */
/* appears to be generated by the cps-b-21 custom on the c-board */
if (param == 0)
m_maincpu->set_input_line(4, ASSERT_LINE);
}
void cps_state::cpu_space_map(address_map &map)
{
// Eventually add the sync to E due to vpa
map(0xfffff2, 0xffffff).lr16(
[this] (offs_t offset) -> u16
{
// clear the IPL1 and IPL2 flip-flops
m_maincpu->set_input_line(2, CLEAR_LINE);
m_maincpu->set_input_line(4, CLEAR_LINE);
return m68000_device::autovector(offset + 1);
},
"autovectors");
}
/********************************************************************
*
* Q Sound
* =======
*
********************************************************************/
uint16_t cps_state::qsound_rom_r(offs_t offset)
{
if (memregion("user1") != nullptr)
{
uint8_t *rom = memregion("user1")->base();
return rom[offset] | 0xff00;
}
else
{
popmessage("%06x: read sound ROM byte %04x", m_maincpu->pc(), offset);
return 0;
}
}
uint16_t cps_state::qsound_sharedram1_r(offs_t offset)
{
return m_qsound_sharedram1[offset] | 0xff00;
}
void cps_state::qsound_sharedram1_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
if (ACCESSING_BITS_0_7)
m_qsound_sharedram1[offset] = data;
}
uint16_t cps_state::qsound_sharedram2_r(offs_t offset)
{
return m_qsound_sharedram2[offset] | 0xff00;
}
void cps_state::qsound_sharedram2_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
if (ACCESSING_BITS_0_7)
m_qsound_sharedram2[offset] = data;
}
void cps_state::qsound_banksw_w(uint8_t data)
{
/* Z80 bank register for music note data. It's odd that it isn't encrypted though. */
int bank = data & 0x0f;
if ((0x10000 + (bank * 0x4000)) >= memregion("audiocpu")->bytes())
{
logerror("WARNING: Q sound bank overflow (%02x)\n", data);
bank = 0;
}
membank("bank1")->set_entry(bank);
}
/********************************************************************
*
* EEPROM
* ======
*
* The EEPROM is accessed by a serial protocol using the register
* 0xf1c006
*
********************************************************************/
/*
PAL PRG1 (16P8B @ 12H):
I0 = AS
I1 = /BGACKB
I2 = A23
I3 = A22
I4 = A21
I5 = A20
I6 = A19
I7 = A18
I8 = A17
I9 = A16
n.c. = pin19 = ( !I0 & I1 )
n.c. = pin18 = ( !I0 & I1 )
n.c. = pin17 = ! ( I0 & I1 & (!I2 | !I3 | !I4 | !I5 | !I6 | !I7) )
n.c. = pin16 = ! ( I2 & I3 & I4 & I5 & I6 & I7 )
/IOCS = pin15 = ! ( I0 & I1 & I2 & !I3 & !I4 & !I5 )
/ONE WAIT = pin14 = ! ( I0 & I1 & ( I2 | !I3) )
/databus = pin13 = ! ( I0 & I1 & (!I2 | !I3 | !I4 | !I5 | !I6 | !I7) )
/workram = pin12 = ! ( I0 & I1 & I2 & I3 & I4 & I5 & I6 & I7 )
In Q-Sound games, PRG1 is replaced by PRG2:
/IOCS = pin 15 = ! ( I0 & I1 & I2 & !I3 & !I4 & !I5 )
/ONE WAIT = pin 14 = ! ( I0 & I1 & (!I2 | !I3 | !I4 | !I5 | ( I6 & I7 & I8 & I9)) )
/databus = pin 13 = ! ( I0 & I1 & (!I2 | !I3 | !I4 | !I5 | (!I6 & !I7 & !I8)) )
/workram = pin 12 = ! ( I0 & I1 & I2 & I3 & I4 & I5 & I6 & I7 & I8 & I9 )
PAL IOA1 (16P8B @ 12F):
I0 = /IOCS
I1 = /RDB
I2 = /UDSWR
I3 = /LDSWR
I4 = AB8
I5 = AB7
I6 = AB6
I7 = AB5
I8 = AB4
I9 = AB3
player input = pin19 = ! ( !I0 & !I1 & !I4 & !I5 & !I6 & !I7 & !I8 & !I9 )
system input/dips = pin18 = ! ( !I0 & !I1 & !I4 & !I5 & !I6 & !I7 & I8 & I9 )
outputs = pin17 = ! ( !I0 & !I2 & !I4 & !I5 & !I6 & I7 & I8 & !I9 )
sound 1B = pin16 = ! ( !I0 & !I3 & I4 & I5 & !I6 & !I7 & !I8 & I9 )
sound 0B = pin15 = ! ( !I0 & !I3 & I4 & I5 & !I6 & !I7 & !I8 & !I9 )
n.c. = pin14 = ( !I1 & !I2 )
/PPU1 = pin13 = ! ( !I0 & I4 & !I5 & !I6 )
n.c. = pin12 = ( !I1 & !I2 )
PAL BUF1 (16P8B @ 16H):
I0 = A23 (all address lines can come both from 68000 and CPS-A custom)
I1 = A22
I2 = A21
I3 = A20
I4 = A19
I5 = A18
I6 = A17
I7 = A16
I8 = ASB
BUF0 = pin19 = ! ( I0 & !I1 & !I2 & I3 & !I4 & !I5 & !I6 & !I7 )
BUF1 = pin18 = ! ( I0 & !I1 & !I2 & I3 & !I4 & !I5 & !I6 & I7 )
BUF2 = pin17 = ! ( I0 & !I1 & !I2 & I3 & !I4 & !I5 & I6 & !I7 )
BUF3 = pin16 = ! ( I0 & !I1 & !I2 & I3 & !I4 & !I5 & I6 & I7 )
BUF4 = pin15 = ! ( I0 & !I1 & !I2 & I3 & !I4 & I5 & !I6 & !I7 )
BUF5 = pin14 = ! ( I0 & !I1 & !I2 & I3 & !I4 & I5 & !I6 & I7 )
BUF6 = pin13 = ! ( I0 & !I1 & !I2 & I3 & !I4 & I5 & I6 & !I7 )
/RDB = pin12 = ( I0 & !I1 & !I2 & I3 & !I8 )
BUF0-BUF2 are gfxram on A-board. BUF3-BUF6 go to B-board (provision for expansion, never used)
PAL ROM1 (16P8B @ 15H):
I0 = A23 (all address lines can come both from 68000 and CPS-A custom)
I1 = A22
I2 = A21
I3 = A20
I4 = A19
I5 = A18
I6 = A17
I7 = A16
I8 = ASB
PRG0 = pin17 = ! ( !I8 & !I0 & !I1 & !I2 & !I3 & !I4 & !I5 )
PRG1 = pin16 = ! ( !I8 & !I0 & !I1 & !I2 & !I3 & !I4 & I5 )
PRG2 = pin15 = ! ( !I8 & !I0 & !I1 & !I2 & !I3 & I4 & !I5 )
PRG3 = pin14 = ! ( !I8 & !I0 & !I1 & !I2 & !I3 & I4 & I5 )
PRG4 = pin19 = ! ( !I8 & !I0 & !I1 & !I2 & I3 & !I4 )
PRG5 = pin18 = ! ( !I8 & !I0 & !I1 & !I2 & I3 & I4 )
PRG6 = pin13 = ! ( !I8 & !I0 & !I1 & I2 & !I3 & !I4 )
/RDB = pin12 = ( !I8 & !I0 & !I1 )
All PRGx go to B-board. Provision for up to 4MB of ROM space, which was never used in full.
*/
void cps_state::main_map(address_map &map)
{
map(0x000000, 0x3fffff).rom();
map(0x800000, 0x800007).portr("IN1"); /* Player input ports */
/* forgottn, willow, cawing, nemo, varth read from 800010. Probably debug input leftover from development */
map(0x800018, 0x80001f).r(FUNC(cps_state::cps1_dsw_r)); /* System input ports / Dip Switches */
map(0x800020, 0x800021).nopr(); /* ? Used by Rockman ? not mapped according to PAL */
map(0x800030, 0x800037).w(FUNC(cps_state::cps1_coinctrl_w));
/* Forgotten Worlds has dial controls on B-board mapped at 800040-80005f. See below */
map(0x800100, 0x80013f).w(FUNC(cps_state::cps1_cps_a_w)).share("cps_a_regs"); /* CPS-A custom */
/* CPS-B custom is mapped by the PAL IOB2 on the B-board. SF2 revision "E" World and USA 910228 has it at a different
address, see DRIVER_INIT */
map(0x800140, 0x80017f).rw(FUNC(cps_state::cps1_cps_b_r), FUNC(cps_state::cps1_cps_b_w)).share("cps_b_regs");
map(0x800180, 0x800187).w(FUNC(cps_state::cps1_soundlatch_w)); /* Sound command */
map(0x800188, 0x80018f).w(FUNC(cps_state::cps1_soundlatch2_w)); /* Sound timer fade */
map(0x900000, 0x92ffff).ram().w(FUNC(cps_state::cps1_gfxram_w)).share("gfxram"); /* SF2CE executes code from here */
map(0xff0000, 0xffffff).ram().share("mainram");
}
/* Forgotten Worlds has a NEC uPD4701AC on the B-board handling dial inputs from the CN-MOWS connector. */
/* The memory mapping is handled by PAL LWIO */
void cps_state::forgottn_map(address_map &map)
{
main_map(map);
map(0x800041, 0x800041).w("upd4701", FUNC(upd4701_device::reset_x_w));
map(0x800049, 0x800049).w("upd4701", FUNC(upd4701_device::reset_y_w));
map(0x800052, 0x800055).r("upd4701", FUNC(upd4701_device::read_x)).umask16(0x00ff);
map(0x80005a, 0x80005d).r("upd4701", FUNC(upd4701_device::read_y)).umask16(0x00ff);
}
/*
PAL SOU1 (16P8 @ 13E):
I0 = /MREQ
I1 = A15
I2 = A14
I3 = A13
I4 = A12
I5 = bank latch
I6 = /RD
I7 = /WR
I8 = /BANK
bank latch = pin19 = ! ( !I0 & !I7 & !I8 )
/SWR = pin18 = ! ( !I0 & !I7 )
/SRD = pin17 = ! ( !I0 & !I6 )
ls138 = pin16 = ! ( !I0 & I1 & I2 & I3 & I4 )
workram = pin15 = ! ( !I0 & I1 & I2 & !I3 & I4 )
SOUNDA14 = pin14 = ! ( !I0 & ((!I1 & !I2) | ( I1 & !I2 & !I5)) )
SOUNDA15 = pin13 = ( I1 )
/SOUNDCE = pin12 = ! ( !I0 & (!I1 | ( I1 & !I2)) )
*/
void cps_state::sub_map(address_map &map)
{
map(0x0000, 0x7fff).rom();
map(0x8000, 0xbfff).bankr("bank1");
map(0xd000, 0xd7ff).ram();
map(0xf000, 0xf001).rw("2151", FUNC(ym2151_device::read), FUNC(ym2151_device::write));
map(0xf002, 0xf002).rw(m_oki, FUNC(okim6295_device::read), FUNC(okim6295_device::write));
map(0xf004, 0xf004).w(FUNC(cps_state::cps1_snd_bankswitch_w));
map(0xf006, 0xf006).w(FUNC(cps_state::cps1_oki_pin7_w)); /* controls pin 7 of OKI chip */
map(0xf008, 0xf008).r(m_soundlatch, FUNC(generic_latch_8_device::read)); /* Sound command */
map(0xf00a, 0xf00a).r(m_soundlatch2, FUNC(generic_latch_8_device::read)); /* Sound timer fade */
}
void cps_state::qsound_main_map(address_map &map)
{
map(0x000000, 0x1fffff).rom();
map(0x800000, 0x800007).portr("IN1"); /* Player input ports */
map(0x800018, 0x80001f).r(FUNC(cps_state::cps1_dsw_r)); /* System input ports / Dip Switches */
map(0x800030, 0x800037).w(FUNC(cps_state::cps1_coinctrl_w));
map(0x800100, 0x80013f).w(FUNC(cps_state::cps1_cps_a_w)).share("cps_a_regs"); /* CPS-A custom */
map(0x800140, 0x80017f).rw(FUNC(cps_state::cps1_cps_b_r), FUNC(cps_state::cps1_cps_b_w)).share("cps_b_regs"); /* CPS-B custom (mapped by LWIO/IOB1 PAL on B-board) */
map(0x900000, 0x92ffff).ram().w(FUNC(cps_state::cps1_gfxram_w)).share("gfxram"); /* SF2CE executes code from here */
map(0xf00000, 0xf0ffff).r(FUNC(cps_state::qsound_rom_r)); /* Slammasters protection */
map(0xf18000, 0xf19fff).rw(FUNC(cps_state::qsound_sharedram1_r), FUNC(cps_state::qsound_sharedram1_w)); /* Q RAM */
map(0xf1c000, 0xf1c001).portr("IN2"); /* Player 3 controls (later games) */
map(0xf1c002, 0xf1c003).portr("IN3"); /* Player 4 controls ("Muscle Bombers") */
map(0xf1c004, 0xf1c005).w(FUNC(cps_state::cpsq_coinctrl2_w)); /* Coin control2 (later games) */
map(0xf1c006, 0xf1c007).portr("EEPROMIN").portw("EEPROMOUT");
map(0xf1e000, 0xf1ffff).rw(FUNC(cps_state::qsound_sharedram2_r), FUNC(cps_state::qsound_sharedram2_w)); /* Q RAM */
map(0xff0000, 0xffffff).ram().share("mainram");
}
void cps_state::qsound_sub_map(address_map &map)
{ // used by cps2.c too
map(0x0000, 0x7fff).rom();
map(0x8000, 0xbfff).bankr("bank1"); /* banked (contains music data) */
map(0xc000, 0xcfff).ram().share("qsound_ram1");
map(0xd000, 0xd002).w("qsound", FUNC(qsound_device::qsound_w));
map(0xd003, 0xd003).w(FUNC(cps_state::qsound_banksw_w));
map(0xd007, 0xd007).r("qsound", FUNC(qsound_device::qsound_r));
map(0xf000, 0xffff).ram().share("qsound_ram2");
}
void cps_state::qsound_decrypted_opcodes_map(address_map &map)
{
map(0x0000, 0x7fff).bankr("decrypted");
}
void cps_state::sf2m3_map(address_map &map)
{
map(0x000000, 0x3fffff).rom();
map(0x800010, 0x800011).portr("IN1"); /* Player input ports */
map(0x800028, 0x80002f).r(FUNC(cps_state::cps1_hack_dsw_r)); /* System input ports / Dip Switches */
map(0x800030, 0x800037).w(FUNC(cps_state::cps1_coinctrl_w));
map(0x800100, 0x80013f).w(FUNC(cps_state::cps1_cps_a_w)).share("cps_a_regs"); /* CPS-A custom */
map(0x800140, 0x80017f).rw(FUNC(cps_state::cps1_cps_b_r), FUNC(cps_state::cps1_cps_b_w)).share("cps_b_regs"); /* CPS-B custom */
map(0x800186, 0x800187).r(FUNC(cps_state::cps1_in2_r)); /* Buttons 4,5,6 for both players */
map(0x800190, 0x800197).w(FUNC(cps_state::cps1_soundlatch_w)); /* Sound command */
map(0x800198, 0x80019f).w(FUNC(cps_state::cps1_soundlatch2_w)); /* Sound timer fade */
map(0x8001a0, 0x8001c3).w(FUNC(cps_state::cps1_cps_a_w));
map(0x8001c4, 0x8001c5).w(FUNC(cps_state::sf2m3_layer_w));
map(0x900000, 0x92ffff).ram().w(FUNC(cps_state::cps1_gfxram_w)).share("gfxram");
map(0xff0000, 0xffffff).ram();
}
void cps_state::sf2cems6_map(address_map &map)
{
sf2m3_map(map);
map(0x8001ee, 0x8001ef).nopw(); // writes 0xFFFF
}
void cps_state::sf2m10_map(address_map &map)
{
map(0x000000, 0x3fffff).rom();
map(0x800000, 0x800007).portr("IN1");
map(0x800018, 0x80001f).r(FUNC(cps_state::cps1_hack_dsw_r));
map(0x800020, 0x800021).nopr();
map(0x800030, 0x800037).w(FUNC(cps_state::cps1_coinctrl_w));
map(0x800100, 0x80013f).w(FUNC(cps_state::cps1_cps_a_w)).share("cps_a_regs");
map(0x800140, 0x80017f).rw(FUNC(cps_state::cps1_cps_b_r), FUNC(cps_state::cps1_cps_b_w)).share("cps_b_regs");
map(0x800180, 0x800187).w(FUNC(cps_state::cps1_soundlatch_w));
map(0x800188, 0x80018f).w(FUNC(cps_state::cps1_soundlatch2_w));
map(0x8001a2, 0x8001b3).w(FUNC(cps_state::cps1_cps_a_w)); // make 8001b2 point at 800110
map(0x8001fe, 0x8001ff).nopw(); // writes FFFF here a lot
map(0x900000, 0x92ffff).ram().w(FUNC(cps_state::cps1_gfxram_w)).share("gfxram");
map(0xe00000, 0xefffff).ram(); // it writes to the whole range at start
map(0xf1c000, 0xf1c001).r(FUNC(cps_state::cps1_in2_r));
map(0xfeff00, 0xfeffff).ram(); // fix stack crash at start
map(0xff0000, 0xffffff).ram().share("mainram");
}
void cps_state::varthb2_map(address_map &map)
{
map(0x000000, 0x3fffff).rom();
map(0x800000, 0x800007).portr("IN1"); /* Player input ports */
map(0x800018, 0x80001f).r(FUNC(cps_state::cps1_hack_dsw_r)); /* System input ports / Dip Switches */
map(0x800030, 0x800037).w(FUNC(cps_state::cps1_coinctrl_w));
map(0x800100, 0x80013f).w(FUNC(cps_state::varthb2_cps_a_w)).share("cps_a_regs"); /* CPS-A custom */
map(0x800140, 0x80017f).rw(FUNC(cps_state::cps1_cps_b_r), FUNC(cps_state::cps1_cps_b_w)).share("cps_b_regs");
map(0x800180, 0x800187).w(FUNC(cps_state::cps1_soundlatch_w)); /* Sound command */
map(0x800188, 0x80018f).w(FUNC(cps_state::cps1_soundlatch2_w)); /* Sound timer fade */
map(0x900000, 0x92ffff).ram().w(FUNC(cps_state::cps1_gfxram_w)).share("gfxram");
map(0xff0000, 0xffffff).ram().share("mainram");
}
void cps_state::varthb3_map(address_map &map) // TODO: check everything
{
map(0x000000, 0x3fffff).rom();
map(0x880000, 0x880007).portr("IN1"); /* Player input ports */
map(0x880008, 0x88000f).r(FUNC(cps_state::cps1_hack_dsw_r)); /* System input ports / Dip Switches */
map(0x800030, 0x800037).w(FUNC(cps_state::cps1_coinctrl_w));
map(0x800100, 0x80013f).w(FUNC(cps_state::cps1_cps_a_w)).share("cps_a_regs"); /* CPS-A custom */
map(0x800140, 0x80017f).rw(FUNC(cps_state::cps1_cps_b_r), FUNC(cps_state::cps1_cps_b_w)).share("cps_b_regs");
map(0x800180, 0x800187).w(FUNC(cps_state::cps1_soundlatch_w)); /* Sound command */
map(0x800188, 0x80018f).w(FUNC(cps_state::cps1_soundlatch2_w)); /* Sound timer fade */
map(0x900000, 0x92ffff).ram().w(FUNC(cps_state::cps1_gfxram_w)).share("gfxram");
map(0xff0000, 0xffffff).ram().share("mainram");
}
/***********************************************************
INPUT PORTS, DIPs
***********************************************************/
#define CPS1_COINAGE_1(diploc) \
PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) PORT_DIPLOCATION(diploc ":1,2,3") \
PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) \
PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) ) \
PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) ) \
PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) ) \
PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) ) \
PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) ) \
PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) ) \
PORT_DIPSETTING( 0x03, DEF_STR( 1C_6C ) ) \
PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) ) PORT_DIPLOCATION(diploc ":4,5,6") \
PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) \
PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) ) \
PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) \
PORT_DIPSETTING( 0x38, DEF_STR( 1C_1C ) ) \
PORT_DIPSETTING( 0x30, DEF_STR( 1C_2C ) ) \
PORT_DIPSETTING( 0x28, DEF_STR( 1C_3C ) ) \
PORT_DIPSETTING( 0x20, DEF_STR( 1C_4C ) ) \
PORT_DIPSETTING( 0x18, DEF_STR( 1C_6C ) )
#define CPS1_COINAGE_2(diploc) \
PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) PORT_DIPLOCATION(diploc ":1,2,3") \
PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) \
PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) ) \
PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) ) \
PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) ) \
PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) ) \
PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) ) \
PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) ) \
PORT_DIPSETTING( 0x03, DEF_STR( 1C_6C ) )
#define CPS1_COINAGE_3(diploc) \
PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) PORT_DIPLOCATION(diploc ":1,2,3") \
PORT_DIPSETTING( 0x01, DEF_STR( 4C_1C ) ) \
PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) \
PORT_DIPSETTING( 0x03, DEF_STR( 2C_1C ) ) \
PORT_DIPSETTING( 0x00, "2 Coins/1 Credit (1 to continue)" ) \
PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) ) \
PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) ) \
PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) ) \
PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) ) \
PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) ) PORT_DIPLOCATION(diploc ":4,5,6") \
PORT_DIPSETTING( 0x08, DEF_STR( 4C_1C ) ) \
PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) \
PORT_DIPSETTING( 0x18, DEF_STR( 2C_1C ) ) \
PORT_DIPSETTING( 0x00, "2 Coins/1 Credit (1 to continue)" ) \
PORT_DIPSETTING( 0x38, DEF_STR( 1C_1C ) ) \
PORT_DIPSETTING( 0x30, DEF_STR( 1C_2C ) ) \
PORT_DIPSETTING( 0x28, DEF_STR( 1C_3C ) ) \
PORT_DIPSETTING( 0x20, DEF_STR( 1C_4C ) )
#define CPS1_DIFFICULTY_1(diploc) \
PORT_DIPNAME( 0x07, 0x04, DEF_STR( Difficulty ) ) PORT_DIPLOCATION(diploc ":1,2,3") \
PORT_DIPSETTING( 0x07, "0 (Easiest)" ) \
PORT_DIPSETTING( 0x06, "1" ) \
PORT_DIPSETTING( 0x05, "2" ) \
PORT_DIPSETTING( 0x04, "3 (Normal)" ) \
PORT_DIPSETTING( 0x03, "4" ) \
PORT_DIPSETTING( 0x02, "5" ) \
PORT_DIPSETTING( 0x01, "6" ) \
PORT_DIPSETTING( 0x00, "7 (Hardest)" )
#define CPS1_DIFFICULTY_2(diploc) \
PORT_DIPNAME( 0x07, 0x07, DEF_STR( Difficulty ) ) PORT_DIPLOCATION(diploc ":1,2,3") \
PORT_DIPSETTING( 0x04, "1 (Easiest)" ) \
PORT_DIPSETTING( 0x05, "2" ) \
PORT_DIPSETTING( 0x06, "3" ) \
PORT_DIPSETTING( 0x07, "4 (Normal)" ) \
PORT_DIPSETTING( 0x03, "5" ) \
PORT_DIPSETTING( 0x02, "6" ) \
PORT_DIPSETTING( 0x01, "7" ) \
PORT_DIPSETTING( 0x00, "8 (Hardest)" )
/* CPS1 games with 2 players and 3 buttons each */
static INPUT_PORTS_START( cps1_3b )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_SERVICE( 0x40, IP_ACTIVE_LOW )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN1")
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_UNKNOWN )
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_UNKNOWN )
INPUT_PORTS_END
/* CPS1 games with 2 players and 2 buttons each */
static INPUT_PORTS_START( cps1_2b )
PORT_INCLUDE( cps1_3b )
PORT_MODIFY("IN1")
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) // no button 3
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // no button 3
INPUT_PORTS_END
/* CPS1 games with 2 players, 4-way joysticks and 2 buttons each */
static INPUT_PORTS_START( cps1_2b_4way )
PORT_INCLUDE( cps1_2b )
PORT_MODIFY("IN1")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(1)
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(1)
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(1)
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(1)
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(2)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(2)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(2)
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(2)
INPUT_PORTS_END
/* CPS1 games with 2 players and 1 button each */
static INPUT_PORTS_START( cps1_1b )
PORT_INCLUDE( cps1_2b )
PORT_MODIFY("IN1")
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) // no button 2
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // no button 2
INPUT_PORTS_END
/* CPS1 games with 3 players and 2 buttons each */
static INPUT_PORTS_START( cps1_3players )
PORT_INCLUDE( cps1_2b )
PORT_START("IN2") /* Player 3 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START3 )
INPUT_PORTS_END
/* CPS1 games with 4 players and 2 buttons each */
static INPUT_PORTS_START( cps1_4players )
PORT_INCLUDE( cps1_3players )
PORT_START("IN3") /* Player 4 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN4 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 )
INPUT_PORTS_END
/* CPS1 games with 2 players and 6 buttons each */
static INPUT_PORTS_START( cps1_6b )
PORT_INCLUDE( cps1_3b )
PORT_MODIFY("IN1")
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Jab Punch") PORT_PLAYER(1)
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Strong Punch") PORT_PLAYER(1)
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P1 Fierce Punch") PORT_PLAYER(1)
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 Jab Punch") PORT_PLAYER(2)
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P2 Strong Punch") PORT_PLAYER(2)
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P2 Fierce Punch") PORT_PLAYER(2)
PORT_START("IN2") /* Extra buttons */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P1 Short Kick") PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P1 Forward Kick") PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P1 Roundhouse Kick") PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P2 Short Kick") PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P2 Forward Kick") PORT_PLAYER(2)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P2 Roundhouse Kick") PORT_PLAYER(2)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
/* CPS1 quiz games */
static INPUT_PORTS_START( cps1_quiz )
PORT_INCLUDE( cps1_3b )
PORT_MODIFY("IN1") /* no joystick and 4th button */
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
INPUT_PORTS_END
static INPUT_PORTS_START( forgottn )
PORT_INCLUDE( cps1_1b )
PORT_MODIFY("IN0")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("DSWC") // The manual only mentions two DIP switch banks.
PORT_DIPUNUSED( 0x80, 0x80 ) // Is this port brought out to DIP switches or not?
PORT_DIPUNKNOWN( 0x40, 0x40 ) // Check code at 0x013c78 (0x013690 in 'lostwrld')
PORT_DIPUNUSED( 0x20, 0x20 )
PORT_DIPUNUSED( 0x10, 0x10 )
PORT_DIPUNUSED( 0x08, 0x08 )
PORT_DIPUNUSED( 0x04, 0x04 )
PORT_DIPUNUSED( 0x02, 0x02 )
PORT_DIPUNUSED( 0x01, 0x01 )
PORT_START("DSWB")
CPS1_DIFFICULTY_1( "DIP-B" )
PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "DIP-B:4" )
PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "DIP-B:5" )
PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "DIP-B:6" ) // Check code at 0x00111c (0x00112c in 'lostwrld')
PORT_SERVICE_DIPLOC( 0x40, IP_ACTIVE_LOW, "DIP-B:7" )
PORT_DIPNAME( 0x80, 0x80, "Freeze" ) PORT_DIPLOCATION("DIP-B:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSWA")
CPS1_COINAGE_1( "DIP-A" )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DIP-A:7")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DIP-A:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DIAL0")
PORT_BIT( 0x0fff, 0x0000, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_PLAYER(1)
PORT_START("DIAL1")
PORT_BIT( 0x0fff, 0x0000, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20) PORT_CODE_DEC(KEYCODE_N) PORT_CODE_INC(KEYCODE_M) PORT_PLAYER(2)
INPUT_PORTS_END
static INPUT_PORTS_START( forgottnj ) // Where's the Demo Sound????
PORT_INCLUDE( cps1_1b )
PORT_MODIFY("IN0")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("DSWC") // The manual only mentions two DIP switch banks.
PORT_DIPNAME( 0x01, 0x01, "Slow Motion" ) PORT_DIPLOCATION("DIP-C:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, "Slowest Motion" ) PORT_DIPLOCATION("DIP-C:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "DIP-C:3" )
PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "DIP-C:4" )
PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "DIP-C:5" )
PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "DIP-C:6" )
PORT_DIPNAME( 0xc0, 0xc0, "Freeze" ) PORT_DIPLOCATION("DIP-C:7,8")
PORT_DIPSETTING( 0xc0, DEF_STR( Off ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) // Gs only takes effect when Freeze is ON
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
PORT_DIPSETTING( 0x00, "On with Alignment Character" ) // Shows a column of "G" on the leftside of the screen
PORT_START("DSWA") // DSW banks A & B in reverse order?
CPS1_DIFFICULTY_1( "DIP-A" ) // Not verified, going by other sets
PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "DIP-A:4" )
PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "DIP-A:5" )
PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "DIP-A:6" )
PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "DIP-A:7" )
PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_LOW, "DIP-A:8" )
PORT_START("DSWB") // DSW banks A & B in reverse order?
PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("DIP-B:1,2,3")
PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x06, "2 Coins / 2 Credits" ) // Must insert 2 coins to get a credit, but credits come in 2s
PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_6C ) )
PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("DIP-B:4,5,6")
PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x38, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x30, "2 Coins / 2 Credits" ) // Must insert 2 coins to get a credit, but credits come in 2s
PORT_DIPSETTING( 0x28, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x20, DEF_STR( 1C_4C ) )
PORT_DIPSETTING( 0x18, DEF_STR( 1C_6C ) )
PORT_DIPNAME( 0x40, 0x40, "Speed up" ) PORT_DIPLOCATION("DIP-B:7") // Everything is faster including title screen / score wait times
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DIP-B:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DIAL0")
PORT_BIT( 0x0fff, 0x0000, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_PLAYER(1)
PORT_START("DIAL1")
PORT_BIT( 0x0fff, 0x0000, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20) PORT_CODE_DEC(KEYCODE_N) PORT_CODE_INC(KEYCODE_M) PORT_PLAYER(2)
INPUT_PORTS_END
static INPUT_PORTS_START( ghouls )
PORT_INCLUDE( cps1_2b_4way )
/* Service1 doesn't give any credit */
PORT_START("DSWC")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW(C):1,2")
PORT_DIPSETTING( 0x03, "3" )
PORT_DIPSETTING( 0x02, "4" )
PORT_DIPSETTING( 0x01, "5" )
PORT_DIPSETTING( 0x00, "6" )
PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "SW(C):3" )
PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW(C):4" )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW(C):5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW(C):6") /* not much demo sound, just effects in gameplay section of attract sequence */
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW(C):7")
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x40, DEF_STR( Yes ) )
PORT_DIPNAME( 0x80, 0x80, "Game Mode") PORT_DIPLOCATION("SW(C):8")
PORT_DIPSETTING( 0x80, "Game" )
PORT_DIPSETTING( 0x00, DEF_STR( Test ) )
PORT_START("DSWB") /* Manual states default difficulty "B" (2) which differs from the normal macro */
PORT_DIPNAME( 0x07, 0x05, DEF_STR( Difficulty ) ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x80) PORT_DIPLOCATION("SW(B):1,2,3")
PORT_DIPSETTING( 0x04, "1 (Easiest)" )
PORT_DIPSETTING( 0x05, "2" )
PORT_DIPSETTING( 0x06, "3" )
PORT_DIPSETTING( 0x07, "4 (Normal)" )
PORT_DIPSETTING( 0x03, "5" )
PORT_DIPSETTING( 0x02, "6" )
PORT_DIPSETTING( 0x01, "7" )
PORT_DIPSETTING( 0x00, "8 (Hardest)" )
PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW(B):4" )
PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW(B):5,6")
PORT_DIPSETTING( 0x20, "10K, 30K and every 30K" )
PORT_DIPSETTING( 0x10, "20K, 50K and every 70K" )
PORT_DIPSETTING( 0x30, "30K, 60K and every 70K" )
PORT_DIPSETTING( 0x00, "40K, 70K and every 80K" )
PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW(B):7" )
PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW(B):8" )
PORT_START("DSWA")
CPS1_COINAGE_1( "SW(A)" )
PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW(A):7,8")
PORT_DIPSETTING( 0xc0, "Upright 1 Player" )
PORT_DIPSETTING( 0x80, "Upright 2 Players" )
// PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) ) // Manual says these are both valid settings
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) // for 2-player cocktail cabinet
INPUT_PORTS_END
/* Same as 'ghouls' but additional "Freeze" Dip Switch, different "Lives" Dip Switch,
and LOTS of "debug" features (read the notes to know how to activate them) */
static INPUT_PORTS_START( ghoulsu )
PORT_INCLUDE( ghouls )
PORT_MODIFY("DSWC")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW(C):1,2")
PORT_DIPSETTING( 0x00, "2" )
PORT_DIPSETTING( 0x03, "3" )
PORT_DIPSETTING( 0x02, "4" )
PORT_DIPSETTING( 0x01, "5" )
PORT_MODIFY("DSWB")
/* Standard Dip Switches */
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x80) PORT_DIPLOCATION("SW(B):4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x30, 0x00, DEF_STR( Bonus_Life ) ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x80) PORT_DIPLOCATION("SW(B):5,6")
PORT_DIPSETTING( 0x20, "10K, 30K and every 30K" )
PORT_DIPSETTING( 0x10, "20K, 50K and every 70K" )
PORT_DIPSETTING( 0x30, "30K, 60K and every 70K" )
PORT_DIPSETTING( 0x00, "40K, 70K and every 80K" )
/* Manuals states the following bonus settings
PORT_DIPSETTING( 0x20, "20K, 50K and every 70K" )
PORT_DIPSETTING( 0x10, "10K, 30K and every 30K" )
PORT_DIPSETTING( 0x30, "40K, 70K and every 80K" )
PORT_DIPSETTING( 0x00, "30K, 60K and every 70K" )
*/
/* Debug Dip Switches */
PORT_DIPNAME( 0x07, 0x07, "Starting Weapon" ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x00) PORT_DIPLOCATION("SW(B):1,2,3")
PORT_DIPSETTING( 0x07, "Spear" )
PORT_DIPSETTING( 0x06, "Knife" )
PORT_DIPSETTING( 0x05, "Torch" )
PORT_DIPSETTING( 0x04, "Sword" )
PORT_DIPSETTING( 0x03, "Axe" )
PORT_DIPSETTING( 0x02, "Shield" )
PORT_DIPSETTING( 0x01, "Super Weapon" )
// PORT_DIPSETTING( 0x00, "INVALID !" )
PORT_DIPNAME( 0x38, 0x30, "Armor on New Life" ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x00) PORT_DIPLOCATION("SW(B):4,5,6")
// PORT_DIPSETTING( 0x38, "Silver Armor" )
PORT_DIPSETTING( 0x18, "Golden Armor" )
PORT_DIPSETTING( 0x30, "Silver Armor" )
PORT_DIPSETTING( 0x28, "None (young man)" )
PORT_DIPSETTING( 0x20, "None (old man)" )
// PORT_DIPSETTING( 0x10, "INVALID !" )
// PORT_DIPSETTING( 0x08, "INVALID !" )
// PORT_DIPSETTING( 0x00, "INVALID !" )
PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW(B):7" )
PORT_DIPNAME( 0x80, 0x80, "Freeze" ) PORT_DIPLOCATION("SW(B):8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_MODIFY("DSWA")
/* Standard Dip Switches */
PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x80) PORT_DIPLOCATION("SW(A):1,2,3")
PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_6C ) )
PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x80) PORT_DIPLOCATION("SW(A):4,5,6")
PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x38, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x30, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x28, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x20, DEF_STR( 1C_4C ) )
PORT_DIPSETTING( 0x18, DEF_STR( 1C_6C ) )
/* Debug Dip Switches */
PORT_DIPNAME( 0x0f, 0x0f, "Starting Level" ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x00) PORT_DIPLOCATION("SW(A):1,2,3,4")
PORT_DIPSETTING( 0x0f, "Level 1 (1st half)" )
PORT_DIPSETTING( 0x0e, "Level 1 (2nd half)" )
PORT_DIPSETTING( 0x0d, "Level 2 (1st half)" )
PORT_DIPSETTING( 0x0c, "Level 2 (2nd half)" )
PORT_DIPSETTING( 0x0b, "Level 3 (1st half)" )
PORT_DIPSETTING( 0x0a, "Level 3 (2nd half)" )
PORT_DIPSETTING( 0x09, "Level 4 (1st half)" )
PORT_DIPSETTING( 0x08, "Level 4 (2nd half)" )
PORT_DIPSETTING( 0x07, "Level 5 (1st half)" )
PORT_DIPSETTING( 0x06, "Level 5 (2nd half)" )
PORT_DIPSETTING( 0x05, "Level 6" )
// PORT_DIPSETTING( 0x04, "INVALID !" )
// PORT_DIPSETTING( 0x03, "INVALID !" )
// PORT_DIPSETTING( 0x02, "INVALID !" )
// PORT_DIPSETTING( 0x01, "INVALID !" )
// PORT_DIPSETTING( 0x00, "INVALID !" )
PORT_DIPNAME( 0x10, 0x10, "Invulnerability" ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x00) PORT_DIPLOCATION("SW(A):5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, "Slow Motion" ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x00) PORT_DIPLOCATION("SW(A):6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW(A):7,8")
PORT_DIPSETTING( 0xc0, "Upright 1 Player" )
PORT_DIPSETTING( 0x80, "Upright 2 Players" )
// PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) ) // Manual says these are both valid settings
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) // for 2-player cocktail cabinet
INPUT_PORTS_END
/* Same as 'ghouls' but additional "Freeze" Dip Switch */
static INPUT_PORTS_START( daimakai )
PORT_INCLUDE(ghouls)
PORT_MODIFY("DSWB")
PORT_DIPNAME( 0x80, 0x80, "Freeze" ) PORT_DIPLOCATION("SW(B):8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) // This switch isn't documented in the manual
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
/* "Debug" features to be implemented */
static INPUT_PORTS_START( strider )
PORT_INCLUDE( cps1_3b )
PORT_START("DSWA")
CPS1_COINAGE_1( "SW(A)" )
PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW(A):7,8")
PORT_DIPSETTING( 0xc0, "Upright 1 Player" ) // These switches are not documented in the manual
PORT_DIPSETTING( 0x80, "Upright 2 Players" )
// PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
PORT_START("DSWB") /* Like Ghouls, Strider manual states "B" (or 2) as the recommended difficulty level. */
PORT_DIPNAME( 0x07, 0x05, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW(B):1,2,3")
PORT_DIPSETTING( 0x04, "1 (Easiest)" )
PORT_DIPSETTING( 0x05, "2" )
PORT_DIPSETTING( 0x06, "3" )
PORT_DIPSETTING( 0x07, "4 (Normal)" )
PORT_DIPSETTING( 0x03, "5" )
PORT_DIPSETTING( 0x02, "6" )
PORT_DIPSETTING( 0x01, "7" )
PORT_DIPSETTING( 0x00, "8 (Hardest)" )
/* In 'striderj', bit 3 is stored at 0xff8e77 ($e77,A5) via code at 0x000a2a,
but this address is never checked again.
In 'strider' and 'stridrjr', this code even doesn't exist ! */
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW(B):4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) // Manual says this is 2c start/1c continue but it
PORT_DIPSETTING( 0x00, DEF_STR( On ) ) // doesn't work (see comment above)
PORT_DIPNAME( 0x30, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW(B):5,6")
/* These show in test mode */
PORT_DIPSETTING( 0x30, "20K, 40K then every 60K" )
PORT_DIPSETTING( 0x20, "30K, 50K then every 70K" )
PORT_DIPSETTING( 0x10, "20K & 60K only" )
PORT_DIPSETTING( 0x00, "30K & 60K only" )
/* According to manual, these are the proper settings
PORT_DIPSETTING( 0x30, "40K, 70K then every 80K" )
PORT_DIPSETTING( 0x20, "20K, 50K then every 70K" )
PORT_DIPSETTING( 0x10, "10k, 30k then every 30k" )
PORT_DIPSETTING( 0x00, "30K, 60k then every 70k" )
*/
PORT_DIPNAME( 0xc0, 0x80, "Internal Diff. on Life Loss" ) PORT_DIPLOCATION("SW(B):7,8")
PORT_DIPSETTING( 0xc0, "-3" ) // Check code at 0x00d15a
// PORT_DIPSETTING( 0x40, "-1" ) // These switches are not documented in the manual
PORT_DIPSETTING( 0x00, "-1" )
PORT_DIPSETTING( 0x80, "Default" )
PORT_START("DSWC")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW(C):1,2")
PORT_DIPSETTING( 0x00, "2" ) // "6" in the "test mode" and manual
PORT_DIPSETTING( 0x03, "3" )
PORT_DIPSETTING( 0x02, "4" )
PORT_DIPSETTING( 0x01, "5" )
PORT_DIPNAME( 0x04, 0x04, "Freeze" ) PORT_DIPLOCATION("SW(C):3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW(C):4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW(C):5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW(C):6")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW(C):7")
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x40, DEF_STR( Yes ) )
PORT_DIPNAME( 0x80, 0x80, "Game Mode") PORT_DIPLOCATION("SW(C):8")
PORT_DIPSETTING( 0x80, "Game" )
PORT_DIPSETTING( 0x00, DEF_STR( Test ) ) // To enable the "debug" features
INPUT_PORTS_END
/* Same as 'strider' but additional "2 Coins to Start, 1 to Continue" Dip Switch */
/* "Debug" features to be implemented */
static INPUT_PORTS_START( stridrua )
PORT_INCLUDE( strider )
PORT_MODIFY("DSWB")
/* In 'striderj', bit 3 is stored at 0xff8e77 ($e77,A5) via code at 0x000a2a,
but this address is never checked again.
In 'strider' and 'stridrjr', this code even doesn't exist ! */
PORT_DIPNAME( 0x08, 0x08, "2 Coins to Start, 1 to Continue" ) PORT_DIPLOCATION("SW(B):4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) // This works in this revision
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( dynwar )
PORT_INCLUDE( cps1_3b )
PORT_START("DSWC")
PORT_DIPNAME( 0x01, 0x01, "Freeze" ) PORT_DIPLOCATION("SW(C):1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) // Also affects energy cost - read notes
PORT_DIPSETTING( 0x00, DEF_STR( On ) ) // This switch is not documented in the manual
PORT_DIPNAME( 0x02, 0x02, "Turbo Mode" ) PORT_DIPLOCATION("SW(C):2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) // Also affects energy cost - read notes
PORT_DIPSETTING( 0x00, DEF_STR( On ) ) // This switch is not documented in the manual
PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "SW(C):3" ) // This switch is not documented in the manual
PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW(C):4" ) // This switch is not documented in the manual
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW(C):5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW(C):6")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) // "ON" in the "test mode"
PORT_DIPSETTING( 0x20, DEF_STR( On ) ) // "OFF" in the "test mode"
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW(C):7")
PORT_DIPSETTING( 0x00, DEF_STR( No ) ) // "ON" in the "test mode"
PORT_DIPSETTING( 0x40, DEF_STR( Yes ) ) // "OFF" in the "test mode"
PORT_DIPNAME( 0x80, 0x80, "Game Mode") PORT_DIPLOCATION("SW(C):8")
PORT_DIPSETTING( 0x80, "Game" )
PORT_DIPSETTING( 0x00, DEF_STR( Test ) )
PORT_START("DSWB")
CPS1_DIFFICULTY_2( "SW(B)" )
PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW(B):4" ) // These five switches are not documented in the
PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "SW(B):5" ) // manual
PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW(B):6" )
PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW(B):7" )
PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW(B):8" )
PORT_START("DSWA")
/* According to the manual, ALL switches 1 to 6 must be ON to have
"2 Coins/1 Credit (1 to continue)" for both coin slots */
CPS1_COINAGE_3( "SW(A)" )
PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW(A):7" ) // This switch is not documented in the manual
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW(A):8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) // This switch is not documented in the manual
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
/* Read the notes to know how to activate the "debug" features */
static INPUT_PORTS_START( willow )
PORT_INCLUDE( cps1_3b )
PORT_MODIFY("IN0")
PORT_SERVICE_NO_TOGGLE( 0x40, IP_ACTIVE_LOW )
PORT_START("DSWC")
/* Standard Dip Switches */
PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x80) PORT_DIPLOCATION("SW(C):1,2")
PORT_DIPSETTING( 0x02, "1" )
PORT_DIPSETTING( 0x03, "2" )
PORT_DIPSETTING( 0x01, "3" )
PORT_DIPSETTING( 0x00, "4" )
PORT_DIPNAME( 0x0c, 0x08, "Vitality" ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x80) PORT_DIPLOCATION("SW(C):3,4")
PORT_DIPSETTING( 0x00, "2" )
PORT_DIPSETTING( 0x0c, "3" )
PORT_DIPSETTING( 0x08, "4" )
PORT_DIPSETTING( 0x04, "5" )
/* Debug Dip Switches */
PORT_DIPNAME( 0x01, 0x01, "Turbo Mode" ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x00) PORT_DIPLOCATION("SW(C):1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, "Freeze" ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x00) PORT_DIPLOCATION("SW(C):2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, "Slow Motion" ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x00) PORT_DIPLOCATION("SW(C):3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, "Invulnerability" ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x00) PORT_DIPLOCATION("SW(C):4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW(C):5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
/* Standard Dip Switches */
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x80) PORT_DIPLOCATION("SW(C):6")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
/* Debug Dip Switches */
PORT_DIPNAME( 0x20, 0x20, "Display Debug Infos" ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x00) PORT_DIPLOCATION("SW(C):6")
PORT_DIPSETTING( 0x20, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW(C):7")
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x40, DEF_STR( Yes ) )
PORT_DIPNAME( 0x80, 0x80, "Game Mode") PORT_DIPLOCATION("SW(C):8")
PORT_DIPSETTING( 0x80, "Game" )
PORT_DIPSETTING( 0x00, DEF_STR( Test ) ) // To enable the "debug" features
PORT_START("DSWB")
/* Standard Dip Switches */
PORT_DIPNAME( 0x07, 0x07, DEF_STR( Difficulty ) ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x80) PORT_DIPLOCATION("SW(B):1,2,3")
PORT_DIPSETTING( 0x04, "1 (Easiest)" )
PORT_DIPSETTING( 0x05, "2" )
PORT_DIPSETTING( 0x06, "3" )
PORT_DIPSETTING( 0x07, "4 (Normal)" )
PORT_DIPSETTING( 0x03, "5" )
PORT_DIPSETTING( 0x02, "6" )
PORT_DIPSETTING( 0x01, "7" )
PORT_DIPSETTING( 0x00, "8 (Hardest)" )
PORT_DIPNAME( 0x18, 0x18, "Nando Speed" ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x80) PORT_DIPLOCATION("SW(B):4,5")
PORT_DIPSETTING( 0x10, "Slow" )
PORT_DIPSETTING( 0x18, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x08, "Fast" )
PORT_DIPSETTING( 0x00, "Very Fast" )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x80) PORT_DIPLOCATION("SW(B):6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x80) PORT_DIPLOCATION("SW(B):7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, "Stage Magic Continue" ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x80) PORT_DIPLOCATION("SW(B):8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
/* Debug Dip Switches */
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x00) PORT_DIPLOCATION("SW(B):1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x1e, 0x1e, "Slow Motion Delay" ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x00) PORT_DIPLOCATION("SW(B):2,3,4,5")
PORT_DIPSETTING( 0x1e, "2 Frames" )
PORT_DIPSETTING( 0x1c, "3 Frames" )
PORT_DIPSETTING( 0x1a, "4 Frames" )
PORT_DIPSETTING( 0x18, "5 Frames" )
PORT_DIPSETTING( 0x16, "6 Frames" )
PORT_DIPSETTING( 0x14, "7 Frames" )
PORT_DIPSETTING( 0x12, "8 Frames" )
PORT_DIPSETTING( 0x10, "9 Frames" )
PORT_DIPSETTING( 0x0e, "10 Frames" )
PORT_DIPSETTING( 0x0c, "11 Frames" )
PORT_DIPSETTING( 0x0a, "12 Frames" )
PORT_DIPSETTING( 0x08, "13 Frames" )
PORT_DIPSETTING( 0x06, "14 Frames" )
PORT_DIPSETTING( 0x04, "15 Frames" )
PORT_DIPSETTING( 0x02, "16 Frames" )
PORT_DIPSETTING( 0x00, "17 Frames" )
PORT_DIPNAME( 0xe0, 0xe0, "Starting Level" ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x00) PORT_DIPLOCATION("SW(B):6,7,8")
PORT_DIPSETTING( 0xe0, "Level 1" )
PORT_DIPSETTING( 0xc0, "Level 2" )
PORT_DIPSETTING( 0xa0, "Level 3" )
PORT_DIPSETTING( 0x80, "Level 4" )
PORT_DIPSETTING( 0x60, "Level 5" )
PORT_DIPSETTING( 0x40, "Level 6" )
// PORT_DIPSETTING( 0x20, "INVALID !" )
// PORT_DIPSETTING( 0x00, "INVALID !" )
PORT_START("DSWA")
/* Standard Dip Switches */
PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x80) PORT_DIPLOCATION("SW(A):1,2,3")
PORT_DIPSETTING( 0x01, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, "2 Coins/1 Credit (1 to continue)" )
PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) )
PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x80) PORT_DIPLOCATION("SW(A):4,5,6")
PORT_DIPSETTING( 0x08, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x18, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, "2 Coins/1 Credit (1 to continue)" )
PORT_DIPSETTING( 0x38, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x30, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x28, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x20, DEF_STR( 1C_4C ) )
PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Cabinet ) ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x80) PORT_DIPLOCATION("SW(A):7,8")
PORT_DIPSETTING( 0xc0, "Upright 1 Player" )
PORT_DIPSETTING( 0x80, "Upright 2 Players" )
// PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
/* Debug Dip Switches */
PORT_DIPNAME( 0x3f, 0x3f, DEF_STR( Free_Play ) ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x00) PORT_DIPLOCATION("SW(A):1,2,3,4,5,6")
PORT_DIPSETTING( 0x3f, DEF_STR( Off ) )
PORT_DIPSETTING( 0x38, DEF_STR( On ) )
/* Other values don't give free play */
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Cabinet ) ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x00) PORT_DIPLOCATION("SW(A):7")
PORT_DIPSETTING( 0x40, "Upright 1 Player" )
PORT_DIPSETTING( 0x00, "Upright 2 Players" )
PORT_DIPNAME( 0x80, 0x80, "Maximum magic/sword power" ) PORT_CONDITION("DSWC", 0x80, EQUALS, 0x00) PORT_DIPLOCATION("SW(A):8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
/* To enable extra choices in the "test mode", you must press "Coin 1" ('5') AND "Service Mode" ('F2') */
static INPUT_PORTS_START( unsquad )
PORT_INCLUDE( cps1_3b )
PORT_MODIFY("IN0")
PORT_SERVICE_NO_TOGGLE( 0x40, IP_ACTIVE_LOW )
PORT_START("DSWA")
CPS1_COINAGE_3( "SW(A)" )
/* According to the manual, ALL bits 0 to 5 must be ON to have
"2 Coins/1 Credit (1 to continue)" for both coin slots */
PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW(A):7" )
PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW(A):8" )
PORT_START("DSWB")
CPS1_DIFFICULTY_1( "SW(B)" )
PORT_DIPNAME( 0x18, 0x18, "Damage" ) PORT_DIPLOCATION("SW(B):4,5")
PORT_DIPSETTING( 0x10, "Small" ) // Check code at 0x006f4e
PORT_DIPSETTING( 0x18, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x08, "Big" )
PORT_DIPSETTING( 0x00, "Biggest" )
PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW(B):6" )
PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW(B):7" )
PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW(B):8" )
PORT_START("DSWC")
PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW(C):1" )
PORT_DIPUNUSED_DIPLOC( 0x02, 0x02, "SW(C):2" )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW(C):3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, "Freeze" ) PORT_DIPLOCATION("SW(C):4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW(C):5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW(C):6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW(C):7")
PORT_DIPSETTING( 0x40, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_DIPNAME( 0x80, 0x80, "Game Mode") PORT_DIPLOCATION("SW(C):8")
PORT_DIPSETTING( 0x80, "Game" )
PORT_DIPSETTING( 0x00, DEF_STR( Test ) )
INPUT_PORTS_END
/* To access the hidden pattern test modes, turn the "Service Mode" dip to ON, and hold down "P1 Button 1"
('Ctrl') or "P1 Button 2" ('Alt') during the bootup test. Button 1 will load the Scroll (Background) test,
and Button 2 will load an Obj (Sprite) viewer. */
static INPUT_PORTS_START( ffight )
PORT_INCLUDE( cps1_3b )
/* The button below is not officially documented, pressing it will allow you to escape from grabs and choke
holds instantly. */
PORT_MODIFY("IN1")
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_NAME ("P1 Button 3 (Cheat)")
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME ("P2 Button 3 (Cheat)")
PORT_START("DSWA")
CPS1_COINAGE_1( "SW(A)" )
PORT_DIPNAME( 0x40, 0x40, "2 Coins to Start, 1 to Continue" ) PORT_DIPLOCATION("SW(A):7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW(A):8" )
PORT_START("DSWB")
PORT_DIPNAME( 0x07, 0x04, "Difficulty Level 1" ) PORT_DIPLOCATION("SW(B):1,2,3")
PORT_DIPSETTING( 0x07, DEF_STR( Easiest ) ) // "01"
PORT_DIPSETTING( 0x06, DEF_STR( Easier ) ) // "02"
PORT_DIPSETTING( 0x05, DEF_STR( Easy ) ) // "03"
PORT_DIPSETTING( 0x04, DEF_STR( Normal ) ) // "04"
PORT_DIPSETTING( 0x03, DEF_STR( Medium ) ) // "05"
PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) // "06"
PORT_DIPSETTING( 0x01, DEF_STR( Harder ) ) // "07"
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) // "08"
PORT_DIPNAME( 0x18, 0x10, "Difficulty Level 2" ) PORT_DIPLOCATION("SW(B):4,5")
PORT_DIPSETTING( 0x18, DEF_STR( Easy ) ) // "01"
PORT_DIPSETTING( 0x10, DEF_STR( Normal ) ) // "02"
PORT_DIPSETTING( 0x08, DEF_STR( Hard ) ) // "03"
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) // "04"
PORT_DIPNAME( 0x60, 0x60, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW(B):6,7")
PORT_DIPSETTING( 0x60, "100k" )
PORT_DIPSETTING( 0x40, "200k" )
PORT_DIPSETTING( 0x20, "100k and every 200k" )
PORT_DIPSETTING( 0x00, DEF_STR( None ) )
PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW(B):8" )
PORT_START("DSWC")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW(C):1,2")
PORT_DIPSETTING( 0x00, "1" )
PORT_DIPSETTING( 0x03, "2" )
PORT_DIPSETTING( 0x02, "3" )
PORT_DIPSETTING( 0x01, "4" )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW(C):3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, "Freeze" ) PORT_DIPLOCATION("SW(C):4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW(C):5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW(C):6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW(C):7")
PORT_DIPSETTING( 0x40, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_DIPNAME( 0x80, 0x80, "Game Mode") PORT_DIPLOCATION("SW(C):8")
PORT_DIPSETTING( 0x80, "Game" )
PORT_DIPSETTING( 0x00, DEF_STR( Test ) )
INPUT_PORTS_END
static INPUT_PORTS_START( ffightae )
PORT_INCLUDE( cps1_3players )
PORT_START("DSWA")
CPS1_COINAGE_1( "SW(A)" )
PORT_DIPNAME( 0x40, 0x40, "2 Coins to Start, 1 to Continue" ) PORT_DIPLOCATION("SW(A):7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW(A):8" )
PORT_START("DSWB")
PORT_DIPNAME( 0x07, 0x04, "Difficulty Level 1" ) PORT_DIPLOCATION("SW(B):1,2,3")
PORT_DIPSETTING( 0x07, DEF_STR( Easiest ) ) // "01"
PORT_DIPSETTING( 0x06, DEF_STR( Easier ) ) // "02"
PORT_DIPSETTING( 0x05, DEF_STR( Easy ) ) // "03"
PORT_DIPSETTING( 0x04, DEF_STR( Normal ) ) // "04"
PORT_DIPSETTING( 0x03, DEF_STR( Medium ) ) // "05"
PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) // "06"
PORT_DIPSETTING( 0x01, DEF_STR( Harder ) ) // "07"
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) // "08"
PORT_DIPNAME( 0x18, 0x10, "Difficulty Level 2" ) PORT_DIPLOCATION("SW(B):4,5")
PORT_DIPSETTING( 0x18, DEF_STR( Easy ) ) // "01"
PORT_DIPSETTING( 0x10, DEF_STR( Normal ) ) // "02"
PORT_DIPSETTING( 0x08, DEF_STR( Hard ) ) // "03"
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) // "04"
PORT_DIPNAME( 0x60, 0x60, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW(B):6,7")
PORT_DIPSETTING( 0x60, "100k" )
PORT_DIPSETTING( 0x40, "200k" )
PORT_DIPSETTING( 0x20, "100k and every 200k" )
PORT_DIPSETTING( 0x00, DEF_STR( None ) )
PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW(B):8" )
PORT_START("DSWC")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW(C):1,2")
PORT_DIPSETTING( 0x00, "1" )
PORT_DIPSETTING( 0x03, "2" )
PORT_DIPSETTING( 0x02, "3" )
PORT_DIPSETTING( 0x01, "4" )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW(C):3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, "Freeze" ) PORT_DIPLOCATION("SW(C):4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW(C):5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW(C):6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW(C):7")
PORT_DIPSETTING( 0x40, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_DIPNAME( 0x80, 0x80, "Game Mode") PORT_DIPLOCATION("SW(C):8")
PORT_DIPSETTING( 0x80, "Game" )
PORT_DIPSETTING( 0x00, DEF_STR( Test ) )
INPUT_PORTS_END
static INPUT_PORTS_START( 1941 )
PORT_INCLUDE( cps1_2b )
PORT_START("DSWA")
CPS1_COINAGE_1( "SW(A)" )
PORT_DIPNAME( 0x40, 0x40, "2 Coins to Start, 1 to Continue" ) PORT_DIPLOCATION("SW(A):7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW(A):8" )
PORT_START("DSWB")
CPS1_DIFFICULTY_1( "SW(B)" )
PORT_DIPNAME( 0x18, 0x18, "Level Up Timer" ) PORT_DIPLOCATION("SW(B):4,5")
PORT_DIPSETTING( 0x18, "More Slowly" )
PORT_DIPSETTING( 0x10, "Slowly" )
PORT_DIPSETTING( 0x08, "Quickly" )
PORT_DIPSETTING( 0x00, "More Quickly" )
PORT_DIPNAME( 0x60, 0x60, "Bullet's Speed" ) PORT_DIPLOCATION("SW(B):6,7")
PORT_DIPSETTING( 0x60, "Very Slow" )
PORT_DIPSETTING( 0x40, "Slow" )
PORT_DIPSETTING( 0x20, "Fast" )
PORT_DIPSETTING( 0x00, "Very Fast" )
PORT_DIPNAME( 0x80, 0x80, "Initial Vitality" ) PORT_DIPLOCATION("SW(B):8")
PORT_DIPSETTING( 0x80, "3 Bars" )
PORT_DIPSETTING( 0x00, "4 Bars" )
PORT_START("DSWC")
PORT_DIPNAME( 0x01, 0x01, "Throttle Game Speed" ) PORT_DIPLOCATION("SW(C):1")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) // turning this off will break the game
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
PORT_DIPUNUSED_DIPLOC( 0x02, 0x02, "SW(C):2" )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW(C):3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, "Freeze" ) PORT_DIPLOCATION("SW(C):4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW(C):5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW(C):6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW(C):7")
PORT_DIPSETTING( 0x40, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_DIPNAME( 0x80, 0x80, "Game Mode") PORT_DIPLOCATION("SW(C):8")
PORT_DIPSETTING( 0x80, "Game" )
PORT_DIPSETTING( 0x00, DEF_STR( Test ) )
INPUT_PORTS_END
static INPUT_PORTS_START( mercs )
PORT_INCLUDE( cps1_3players )
PORT_MODIFY("IN0")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("DSWA")
CPS1_COINAGE_2( "SW(A)" )
PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW(A):4" ) // These three switches are not documented in
PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "SW(A):5" ) // the manual
PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW(A):6" )
PORT_DIPNAME( 0x40, 0x40, "2 Coins to Start, 1 to Continue" ) PORT_DIPLOCATION("SW(A):7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW(A):8" ) // This switch is not documented in the manual
PORT_START("DSWB")
CPS1_DIFFICULTY_1( "SW(B)" )
PORT_DIPNAME( 0x08, 0x08, "Coin Slots" ) PORT_DIPLOCATION("SW(B):4")
PORT_DIPSETTING( 0x00, "1" )
PORT_DIPSETTING( 0x08, "3" ) // This setting can't be used in two-player mode
PORT_DIPNAME( 0x10, 0x10, "Play Mode" ) PORT_DIPLOCATION("SW(B):5")
PORT_DIPSETTING( 0x00, "2 Players" )
PORT_DIPSETTING( 0x10, "3 Players" )
PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW(B):6" ) // These three switches are not documented in
PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW(B):7" ) // the manual
PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW(B):8" )
PORT_START("DSWC")
PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW(C):1" ) // These three switches are not documented in
PORT_DIPUNUSED_DIPLOC( 0x02, 0x02, "SW(C):2" ) // the manual
PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "SW(C):3" )
PORT_DIPNAME( 0x08, 0x08, "Freeze" ) PORT_DIPLOCATION("SW(C):4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW(C):5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW(C):6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW(C):7")
PORT_DIPSETTING( 0x40, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW(C):8" )
INPUT_PORTS_END
/* According to code at 0x001c4e ('mtwins') or ('chikij') , ALL bits 0 to 5 of DSWA
must be ON to have "2 Coins/1 Credit (1 to continue)" for both coin slots.
But according to routine starting at 0x06b27c ('mtwins') or 0x06b4fa ('chikij'),
bit 6 of DSWA is tested to have the same "feature" in the "test mode".
Bits 3 and 4 of DSWB affect the number of lives AND the level of damage when you get hit.
When bit 5 of DSWB is ON you ALWAYS have 1 life but more energy (0x38 instead of 0x20).
Useful addresses to know :
- 0xff147b.b : lives (player 1)
- 0xff153b.b : lives (player 2)
- 0xff14ab.w : energy (player 1)
- 0xff156b.w : energy (player 2)
*/
INPUT_PORTS_START( mtwins )
PORT_INCLUDE( cps1_3b )
PORT_MODIFY("IN0")
PORT_SERVICE_NO_TOGGLE( 0x40, IP_ACTIVE_LOW )
PORT_START("DSWA")
CPS1_COINAGE_1( "SW(A)" )
PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW(A):7" )
PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW(A):8" )
PORT_START("DSWB")
CPS1_DIFFICULTY_1( "SW(B)" )
PORT_DIPNAME( 0x38, 0x18, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW(B):4,5,6")
// PORT_DIPSETTING( 0x30, "1" ) // 0x38 energy, smallest damage
// PORT_DIPSETTING( 0x38, "1" ) // 0x38 energy, small damage
// PORT_DIPSETTING( 0x28, "1" ) // 0x38 energy, big damage
// PORT_DIPSETTING( 0x20, "1" ) // 0x38 energy, biggest damage
PORT_DIPSETTING( 0x10, "1" ) // 0x20 energy, smallest damage
PORT_DIPSETTING( 0x18, "2" ) // 0x20 energy, small damage
PORT_DIPSETTING( 0x08, "3" ) // 0x20 energy, big damage
PORT_DIPSETTING( 0x00, "4" ) // 0x20 energy, biggest damage
PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW(B):7" )
PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW(B):8" )
PORT_START("DSWC")
PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW(C):1" )
PORT_DIPUNUSED_DIPLOC( 0x02, 0x02, "SW(C):2" )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW(C):3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, "Freeze" ) PORT_DIPLOCATION("SW(C):4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW(C):5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW(C):6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW(C):7")
PORT_DIPSETTING( 0x40, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_DIPNAME( 0x80, 0x80, "Game Mode") PORT_DIPLOCATION("SW(C):8")
PORT_DIPSETTING( 0x80, "Game" )
PORT_DIPSETTING( 0x00, DEF_STR( Test ) )
INPUT_PORTS_END
/* I guess that bit 8 of DSWB was used for debug purpose :
- code at 0x001094 : move players during "attract mode"
- code at 0x019b62 ('msword' and 'mswordr1'), 0x019bde ('mswordu') or 0x019c26 ('mswordj') : unknown effect
- code at 0x01c322 ('msword' and 'mswordr1'), 0x01c39e ('mswordu') or 0x01c3e0 ('mswordj') : unknown effect
These features are not available because of the 'bra' instruction after the test of bit 7. */
static INPUT_PORTS_START( msword )
PORT_INCLUDE( cps1_3b )
PORT_MODIFY("IN0")
PORT_SERVICE_NO_TOGGLE( 0x40, IP_ACTIVE_LOW )
PORT_START("DSWA")
CPS1_COINAGE_1( "SW(A)" )
PORT_DIPNAME( 0x40, 0x40, "2 Coins to Start, 1 to Continue" ) PORT_DIPLOCATION("SW(A):7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW(A):8" )
PORT_START("DSWB")
PORT_DIPNAME( 0x07, 0x04, "Player's vitality consumption" ) PORT_DIPLOCATION("SW(B):1,2,3") // "Level 1"
PORT_DIPSETTING( 0x07, "1 (Easiest)" ) // "Easy 3" (-1 every 28 frames)
PORT_DIPSETTING( 0x06, "2" ) // "Easy 2" (-1 every 24 frames)
PORT_DIPSETTING( 0x05, "3" ) // "Easy 1" (-1 every 20 frames)
PORT_DIPSETTING( 0x04, "4 (Normal)" ) // DEF_STR( Normal ) (-1 every 18 frames)
PORT_DIPSETTING( 0x03, "5" ) // "Difficult 1" (-1 every 16 frames)
PORT_DIPSETTING( 0x02, "6" ) // "Difficult 2" (-1 every 14 frames)
PORT_DIPSETTING( 0x01, "7" ) // "Difficult 3" (-1 every 12 frames)
PORT_DIPSETTING( 0x00, "8 (Hardest)" ) // "Difficult 4" (-1 every 8 frames)
PORT_DIPNAME( 0x38, 0x38, "Enemy's vitality and attacking power" ) PORT_DIPLOCATION("SW(B):4,5,6") // "Level 2"
PORT_DIPSETTING( 0x20, "1 (Easiest)" ) // "Easy 3"
PORT_DIPSETTING( 0x28, "2" ) // "Easy 2"
PORT_DIPSETTING( 0x30, "3" ) // "Easy 1"
PORT_DIPSETTING( 0x38, "4 (Normal)" ) // DEF_STR( Normal )
PORT_DIPSETTING( 0x18, "5" ) // "Difficult 1"
PORT_DIPSETTING( 0x10, "6" ) // "Difficult 2"
PORT_DIPSETTING( 0x08, "7" ) // "Difficult 3"
PORT_DIPSETTING( 0x00, "8 (Hardest)" ) // "Difficult 4"
PORT_DIPNAME( 0x40, 0x00, "Stage Select" ) PORT_DIPLOCATION("SW(B):7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW(B):8" )
PORT_START("DSWC")
PORT_DIPNAME( 0x03, 0x03, "Vitality Packs" ) PORT_DIPLOCATION("SW(C):1,2")
PORT_DIPSETTING( 0x00, "1" ) // 0x0320
PORT_DIPSETTING( 0x03, "2" ) // 0x0640
PORT_DIPSETTING( 0x02, "3 (2 when continue)" ) // 0x0960 (0x0640 when continue)
PORT_DIPSETTING( 0x01, "4 (3 when continue)" ) // 0x0c80 (0x0960 when continue)
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW(C):3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, "Freeze" ) PORT_DIPLOCATION("SW(C):4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW(C):5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW(C):6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW(C):7")
PORT_DIPSETTING( 0x40, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_DIPNAME( 0x80, 0x80, "Game Mode") PORT_DIPLOCATION("SW(C):8")
PORT_DIPSETTING( 0x80, "Game" )
PORT_DIPSETTING( 0x00, DEF_STR( Test ) )
INPUT_PORTS_END
static INPUT_PORTS_START( cawing )
PORT_INCLUDE( cps1_3b )
PORT_MODIFY("IN0")
PORT_SERVICE_NO_TOGGLE( 0x40, IP_ACTIVE_LOW )
PORT_START("DSWA")
CPS1_COINAGE_1( "SW(A)" )
PORT_DIPNAME( 0x40, 0x40, "2 Coins to Start, 1 to Continue" ) PORT_DIPLOCATION("SW(A):7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) // Overrides all other coinage settings
PORT_DIPSETTING( 0x00, DEF_STR( On ) ) // according to manual
PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW(A):8" ) // This switch is not documented
PORT_START("DSWB")
PORT_DIPNAME( 0x07, 0x04, "Difficulty Level (Enemy's Strength)" ) PORT_DIPLOCATION("SW(B):1,2,3")
PORT_DIPSETTING( 0x07, "1 (Easiest)" )
PORT_DIPSETTING( 0x06, "2" )
PORT_DIPSETTING( 0x05, "3" )
PORT_DIPSETTING( 0x04, "4 (Normal)" )
PORT_DIPSETTING( 0x03, "5" )
PORT_DIPSETTING( 0x02, "6" )
PORT_DIPSETTING( 0x01, "7" )
PORT_DIPSETTING( 0x00, "8 (Hardest)" )
PORT_DIPNAME( 0x18, 0x18, "Difficulty Level (Player's Strength)" ) PORT_DIPLOCATION("SW(B):4,5")
PORT_DIPSETTING( 0x10, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x18, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x08, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW(B):6" ) // This switch is not documented
PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW(B):7" ) // This switch is not documented
PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW(B):8" ) // This switch is not documented
PORT_START("DSWC")
PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW(C):1" ) // This switch is not documented
PORT_DIPUNUSED_DIPLOC( 0x02, 0x02, "SW(C):2" ) // This switch is not documented
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW(C):3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, "Freeze"