Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
5698 lines (4676 sloc) 281 KB
// license:BSD-3-Clause
// copyright-holders:Quench, Yochizo, David Haywood
// thanks-to:Richard Bush
/*****************************************************************************
ToaPlan game hardware from 1991 - 1994
Raizing/8ing game hardware from 1993 onwards
-------------------------------------------------
Driver by: Quench and Yochizo
Original othldrby.c by Nicola Salmoria
Raizing games and Truxton 2 are heavily dependent on the Raine source -
many thanks to Richard Bush and the Raine team. [Yochizo]
Supported games:
Name Board No Maker Game name
----------------------------------------------------------------------------
tekipaki TP-020 Toaplan Teki Paki
tekipakit TP-020 Toaplan Teki Paki (location test)
ghox TP-021 Toaplan Ghox (Spinner with single up/down axis control)
ghoxj TP-021 Toaplan Ghox (8-Way Joystick controls)
dogyuun TP-022 Toaplan Dogyuun
dogyuuna TP-022 Toaplan Dogyuun (older)
dogyuunt TP-022 Toaplan Dogyuun (location test)
kbash TP-023 Toaplan Knuckle Bash
kbash2 bootleg Toaplan Knuckle Bash 2
truxton2 TP-024 Toaplan Truxton 2 / Tatsujin Oh
pipibibs TP-025 Toaplan Pipi & Bibis / Whoopee!! (set 1)
pipibibsa TP-025 Toaplan Pipi & Bibis / Whoopee!! (set 2)
pipibibsp TP-025 Toaplan Pipi & Bibis / Whoopee!! (Prototype)
pipibibsbl bootleg Toaplan Pipi & Bibis / Whoopee!! (based of the prototype)
whoopee *TP-025/TP-020 Toaplan Pipi & Bibis / Whoopee!! (Teki Paki hardware)
fixeight TP-026 Toaplan FixEight
fixeightbl bootleg Toaplan FixEight
grindstm TP-027 Toaplan Grind Stormer (1992)
grindstma TP-027 Toaplan Grind Stormer (1992) (older)
vfive TP-027 Toaplan V-V (V-Five) (1993 - Japan only)
batsugun TP-030 Toaplan Batsugun
batsuguna TP-030 Toaplan Batsugun (older)
batsugunsp TP-030 Toaplan Batsugun (Special Version)
enmadaio TP-031 Toaplan Enma Daio
pwrkick SW931201 Sunwise Power Kick
othldrby ?????? Sunwise Othello Derby
snowbro2 TP-033 Hanafram Snow Bros. 2 - With New Elves
* This version of Whoopee!! is on a board labeled TP-020
(same board number, and same hardware, as Teki Paki)
but the ROMs are labeled TP-025.
sstriker RA-MA7893-01 Raizing Sorcer Striker
sstrikera RA-MA7893-01 Raizing Sorcer Striker (Unite Trading license)
mahoudai RA-MA7893-01 Raizing Mahou Daisakusen (Japan)
kingdmgp RA-MA9402-03 Raizing/8ing Kingdom Grandprix
shippumd RA-MA9402-03 Raizing/8ing Shippu Mahou Daisakusen (Japan)
bgaregga RA9503 Raizing/8ing Battle Garegga (World - Sat Feb 3 1996)
bgareggahk RA9503 Raizing/8ing Battle Garegga (Hong Kong (and Austria?) - Sat Feb 3 1996)
bgareggatw RA9503 Raizing/8ing Battle Garegga (Taiwan (and Germany?) - Thu Feb 1 1996)
bgaregganv RA9503 Raizing/8ing Battle Garegga - New Version (Hong Kong (and Austria?) - Sat Mar 2 1996)
bgareggat2 RA9503 Raizing/8ing Battle Garegga - Type 2 (World - Sat Mar 2 1996)
bgareggacn RA9503 Raizing/8ing Battle Garegga - Type 2 (China (and Denmark?) - Tue Apr 2 1996)
batrider RA9704 Raizing/8ing Armed Police Batrider (Europe - Fri Feb 13 1998)
batrideru RA9704 Raizing/8ing Armed Police Batrider (USA - Fri Feb 13 1998)
batriderc RA9704 Raizing/8ing Armed Police Batrider (China - Fri Feb 13 1998)
batriderj RA9704 Raizing/8ing Armed Police Batrider - B Version (Japan - Fri Feb 13 1998)
batriderk RA9704 Raizing/8ing Armed Police Batrider (Korea - Fri Feb 13 1998)
batriderja RA9704 Raizing/8ing Armed Police Batrider (Japan - Mon Dec 22 1997)
batridert RA9704 Raizing/8ing Armed Police Batrider (Taiwan - Mon Dec 22 1997)
bbakraid ET68-V99 8ing Battle Bakraid - Unlimited Version (USA - Tue Jun 8th, 1999)
bbakraidj ET68-V99 8ing Battle Bakraid - Unlimited Version (Japan - Tue Jun 8th, 1999)
bbakraidja ET68-V99 8ing Battle Bakraid (Japan - Wed Apr 7th, 1999)
SET NOTES:
ghox - The ghoxj set displays an English title screen when the jumpers are set for Japan/Taito,
and fails to display the "Winners Don't Use Drugs" logo when set for USA/Taito (either
Taito America or Taito Japan).
dogyuun - In the location test version, if you are hit while you have a bomb, the bomb explodes
automatically and saves you from dying. In the final released version, the bomb explodes
but you die anyway.
The only difference between the dogyuun and dogyuuna sets is some of the region jumper
settings; see the INPUT_PORTS definitions.
truxton2 - Although the truxton2 PCB has only standard JAMMA mono audio output, and uses a YM3014B
mono DAC, the YM2151 music is actually sequenced in stereo. In toaplan2.h, uncomment
"#define TRUXTON2_STEREO" to hear the game's music the way it was originally composed.
Difficulty is much lower when the region is set to Europe or USA than when set to any
Asian region, independent of the "Difficulty" dipswitches. See the code beginning at
1FE94 (RAM address 1002D6 contains 0 if region is an Asian region, 1 if Europe or USA)
fixeight - The same program is used for all regions, and the region can be changed just by swapping
EEPROMs. However, the V25 code also recognizes a secret input that rewrites the EEPROM to
use any one of the 14 recognized regional licenses, using the state of the player 1 and
player 2 button inputs held in conjunction with it as a 4-bit binary code:
Region Button input
------------------------ ------------------------------------
Korea, Taito license No buttons
Korea P1 button 1
Hong Kong, Taito license P1 button 2
Hong Kong P1 buttons 1 & 2
Taiwan, Taito license P2 button 1
Taiwan P1 button 1 + P2 button 1
SE Asia, Taito license P1 button 2 + P2 button 1
Southeast Asia P1 buttons 1 & 2 + P2 button 1
Europe, Taito license P2 button 2
Europe P1 button 1 + P2 button 2
USA, Taito license P1 button 2 + P2 button 2
USA P1 buttons 1 & 2 + P2 button 2
(Invalid) P2 buttons 1 & 2
(Invalid) P1 button 1 + P2 buttons 1 & 2
Japan P1 button 2 + P2 buttons 1 & 2
Japan, Taito license P1 buttons 1 & 2 + P2 buttons 1 & 2
grindstm - Code at 20A26 in vfive forces region to Japan. All sets have some NOPs at reset vector,
and the NEC V25 CPU test that the other games do is skipped. Furthermore, all sets have
a broken ROM checksum routine that reads address ranges that don't match the actual
location or size of the ROM, and that has a hack at the end so it always passes.
Normally you would expect to see code like this in a bootleg, but the NOPs and other
oddities are identical among three different sets.
batsugun - The Special Version has many changes to make the game easier: it adds an autofire button,
replaces the regular bomb with the more powerful double bomb (which in the original version
required both players in a two player game to press their bomb buttons at once), gives you
a shield that can absorb one hit each time your ship "levels up", etc. It also changes the
colors of the title screen, ship select screen, stages, and enemies.
batsugun compared to batsuguna has code that looks more like the Special Version, but it
doesn't have any of the Special Version features. All the differences between batsugun
and batsuguna look like bug fixes that were carried over into the Special Version.
sstriker - The mahoudai set reads the region jumpers, but the lookup tables in ROM that map jumper
settings to copyright text, coinage settings, etc., contain identical values for every
jumper setting, effectively ignoring the jumpers and forcing the region to Japan.
On the other hand, sstriker has its title screen and all its text in English even when
the region is set to Japan. This seems odd but has been verified correct on two boards.
The only difference between sstriker and sstrikera is the copyright text displayed when
the region is set to Korea.
kingdmgp - The kingdmgp and shippumd sets have identical program ROMs but a different graphics ROM
for the text layer. Setting the region to Japan with the kingdmgp ROM, or to anything other
than Japan with the shippumd ROM, results in a corrupt title screen and unreadable text.
In kingdmgp some of the tiles needed for the credits screen in attract mode have been
stripped out, resulting in boxes where letters should be. It doesn't seem very professional
but appears to be a genuine release. A lot of boards being sold as 'Kingdom Grand Prix' are
in fact conversions using Neill Corlett's hack.
bgaregga - The later versions change the small bullet-shaped enemy bullets to bright yellow balls,
eliminate the flying metal debris from explosions, and require additional joystick input
to access the Extended, Harder, Special, and Stage Edit hidden features.
In addition to these changes, the bgareggat2 set uses only two buttons. Instead of being
able to change the formation of your options with the third button, each of the selectable
ships has a different, fixed option formation. However, the third button can still be used
to select an alternate ship color and to enter the secret character and Stage Edit codes.
batrider - Batrider was marketed as a two button game, and the regular ships all use only the first
two buttons, but in the original version you need the third button in order to control the
options of the hidden Battle Garegga ships.
This problem was fixed in the B Version, which lets you change the Battle Garegga ships'
option formation using Street Fighter style joystick commands (as well as by using the third
button, if the cabinet has one)
bbakraid - Because players managed to counter stop the original Battle Bakraid not long after release,
the Unlimited Version, which can display more score digits, was released as a ROM upgrade.
The upgrade also fixes the bug in the original version that prevented the unlocking of
Team Edit mode from being saved in the EEPROM.
****************************************************************************
* Battle Garegga and Armed Police Batrider have secret characters *
* and game features. *
* Try to input the following commands to use them. *
* ======================================================================== *
* Battle Garegga *
* The button you use to select your ship not only determines its *
* color, but affects its characteristics. *
* A: Default characteristics. *
* B: Slightly higher speed than A type. *
* C: Slightly smaller hitbox than A type. *
* A+B+C: Same speed as B type and same hitbox as C type. *
* *
* After inserting a coin (pushing a credit button), input *
* UP UP DOWN DOWN LEFT RIGHT LEFT RIGHT A B C START *
* then you can use Mahou Daisakusen characters. *
* *
* Note: In versions of the game dated Mar 2 1996 or later, you must *
* hold the joystick RIGHT in addition to the specified button(s) *
* when entering any of the following commands. Even if Stage Edit *
* is enabled via dipswitch, you need to hold RIGHT to use it. *
* *
* EXTENDED: After inserting a coin, hold A and press START. *
* You play through all stages twice before the game ends. *
* HARDER: After inserting a coin, hold B and press START. *
* Difficulty is increased. *
* SPECIAL: After inserting a coin, hold A and B and press START. *
* Combination of EXTENDED and HARDER modes. *
* STAGE EDIT: After inserting a coin, hold C and press START. *
* You can choose what order to play Stage 2, 3 and 4 in, *
* or even skip them. *
* *
* EXTENDED, HARDER, and SPECIAL modes each have their own high score list. *
* ------------------------------------------------------------------------ *
* Armed Police Batrider *
* The button you use to select your ship not only determines its *
* color, but affects its characteristics. *
* A: High main shot power, low option shot power. *
* Average speed. Default autofire rate is 15 Hz. *
* B: Low main shot power, high option shot power. Slightly *
* slower than A type. Default autofire rate is 12 Hz. *
* C: High main shot and option shot power, but lowest speed. *
* Default autofire rate is 20 Hz. *
* START: Low main shot and option shot power, but highest speed. *
* Default autofire rate is 10 Hz. *
* *
* Note: The following features can also be enabled via dipswitches. *
* *
* PLAYER SELECT: After inserting a coin, input *
* UP UP DOWN DOWN LEFT RIGHT LEFT RIGHT B A *
* You can select a single character instead of a team. *
* GUEST PLAYERS: After inserting a coin, input *
* UP UP DOWN DOWN LEFT RIGHT LEFT RIGHT A B *
* You can use Mahou Daisakusen and Battle Garegga characters. *
* SPECIAL COURSE: After inserting a coin, input *
* UP DOWN UP DOWN LEFT RIGHT LEFT RIGHT A B *
* You can select the Special course, which consists of bosses only. *
* STAGE EDIT: When you select your course, press A and B simultaneously. *
* You can choose what order to play Stage 2, 3 and 4 in, *
* or even skip them. *
****************************************************************************
############################################################################
# In Battle Bakraid, the button you use to select your ship not only #
# determines its color, but affects its characteristics. #
# A: Increased main shot power. Default autofire rate is 20 Hz. #
# B: Increased bomb blast duration. Default autofire rate is 12 Hz. #
# C: Increased side shot power. Default autofire rate is 15 Hz. #
# START: Increased speed. Default autofire rate is 10 Hz. #
# #
# STAGE EDIT: When you select your course, press A and B simultaneously. #
# You can choose what order to play Stage 2, 3, 4 and 5 in, #
# or even skip them. Stage Edit can also be enabled via dipswitch. #
# ======================================================================== #
# Battle Bakraid has unlocking codes to gain access to extra players #
# and game features. Once each feature is unlocked, it is saved in EEPROM #
# and remains unlocked until you erase the EEPROM from the service mode. #
# However, in the original (non-Unlimited) version, the unlocking of #
# Team Edit is not saved in EEPROM, apparently due to a bug. #
# Special thanks go to the 'R8ZING Shooter Tribute' page for finding #
# and publishing this info. #
# ======================================================================== #
# PLAYER SELECT: PHASE 2 #
# Result: 3 more fighter planes available. #
# Code: UP UP DOWN DOWN LEFT RIGHT LEFT RIGHT A B Start #
# Conditions: #
# 1. Start from the title screen #
# 2. Insert Coin #
# 3. Watch the 20 sec. counter and enter each part of the code right #
# between the counting. #
# Example: 12,up,11,up,10,down,9,down,8,left,7,right,6.left,5,r.. #
# After entering the [B] button a chime should sound. Phase 2 unlocked! #
# ------------------------------------------------------------------------ #
# PLAYER SELECT: PHASE 3 #
# Result: 2 more fighter planes available. #
# Code: UP UP DOWN DOWN LEFT RIGHT LEFT RIGHT B A Start #
# Conditions: #
# 1. Unlock Player Select Phase 2 first #
# 2. Insert Coin #
# 3. Watch the 20 sec. counter and enter each part of the code right #
# between the counting. #
# Important: The entering of this code has to be finished before the #
# counter passes 10 ! To do so, you will have to start after coin #
# insertion, right before it starts to count: #
# Example: up,19,up,18,down,17,down,16,left,15,right,14.left,.. #
# After entering the [A] button a chime should sound. Phase 3 unlocked! #
# ------------------------------------------------------------------------ #
# TEAM EDIT: ENABLE #
# Result: Unlocks the 'team edit' feature to select a team of different #
# ships like in Batrider. #
# Code: UP DOWN UP DOWN LEFT RIGHT LEFT RIGHT A B Start #
# Conditions: #
# 1. Unlock Player Select Phase 2 and Phase 3 first #
# 2. Insert Coin #
# 3. Watch the 20 sec. counter and enter each part of the code right #
# between the counting. #
# Important: This code hast to be entered so that the counter is at 0 when #
# you press the final button [B]. To do so, start after second 9: #
# Example: 9,up,8,down,7,up,6,down,5,left,4,right,3,left,2,right,1,A,0,B #
# After entering the [B] button a chime should sound. Team edit unlocked! #
# #
# Note: In the Japan version, to use Team Edit after unlocking it, #
# you must hold UP or DOWN while selecting your course. #
# In the USA version, if Team Edit is unlocked, the game asks you #
# if you want to use it after you select your course. #
# ------------------------------------------------------------------------ #
# SPECIAL COURSE: ENABLE #
# Result: Unlocks the Special course, a game mode where you fight the #
# bosses only. #
# Code: UP DOWN UP DOWN LEFT RIGHT LEFT RIGHT B A Start #
# Conditions: #
# 1. Start from the title screen #
# 2. Hold [C] button #
# 3. Insert Coin #
# 4. Watch the 20 sec. counter and enter each part of the code right #
# between the counting. #
# 5. Release [C] button #
# After entering the [A] button a chime should sound. Special course #
# unlocked! #
############################################################################
*************** Hardware Info ***************
CPU:
MC68000P10
TMP68HC000N-16
Sound CPU/MCU:
HD647180X0FS6 (Hitachi Z180 Compatible CPU with internal 16k ROM)
Z84C0006PEC (Z80)
NEC V25
Sound Chips:
YM3812 + YM3014B (DAC)
YM2151 + YM3014B
YM2151 + YM3014B + M6295
YM2151 + YM3012 (DAC) + M6295 + M6295
YMZ280B-F + YAC516-E (DAC)
Graphics Custom 208pin QFP:
GP9001 L7A0498 TOA PLAN
(emulated in video/gp9001.c)
*********************************************************************
Game status:
Teki Paki Working. MCU type is a Hitachi HD647180.
Ghox Working, MCU type is a Hitachi HD647180.
Dogyuun Working. MCU type is a NEC V25. Chip is a PLCC94 stamped 'TS-002-MACH'.*
Knuckle Bash Working. MCU type is a NEC V25. Chip is a PLCC94 stamped 'TS-004-DASH'.*
Truxton 2 Working.
Pipi & Bibis Working.
Pipi & Bibis (Teki Paki h/w) Working, MCU type is a Hitachi HD647180.
Pipi & Bibis bootleg Working. One unknown ROM.
FixEight Working. MCU type is a NEC V25. Chip is a PLCC94 stamped 'TS-001-TURBO'
FixEight bootleg Working. One unknown ROM (same as pipibibs bootleg one). Region hardcoded to Korea (@ $4d8)
Grind Stormer / VFive Working. MCU type is a NEC V25. Chip is a PLCC94 stamped 'TS-007-SPY'.*
Batsugun / Batsugun Sp' Working. MCU type is a NEC V25. Chip is a PLCC94 stamped 'TS-007-SPY'.*
Snow Bros. 2 Working.
Mahou Daisakusen Working.
Shippu Mahou Daisakusen Working.
Battle Garegga Working.
Armed Police Batrider Working.
Battle Bakraid Working.
* Some PCBs use another version stamped 'NITRO' which is the same chip type.
MACH, DASH and SPY seem to be the same chip (same encryption table)
Batsugun has the CPU hooked up in non-encrypted mode.
Notes:
See Input Port definition header below, for instructions
on how to enter pause/slow motion modes.
To Do / Unknowns:
- Whoopee/Teki Paki sometimes tests bit 5 of the region jumper port
just after testing for vblank. Why?
- Priority problem on 2nd player side of selection screen in Fixeight bootleg.
- Fixeight bootleg text in sound check mode does not display properly
with the CPU set to 10MHz (ok at 16MHz). Possible error in video_count_r routine.
- Need to sort out the video status register.
- Find out how exactly how sound CPU communication really works in bgaregga/batrider/bbakraid
current emulation seems to work (plays all sounds), but there are still some unknown reads/writes
Notes on Power Kick coin inputs:
- The 10 yen input is "Key In" according to the bookkeeping screen, but is
an otherwise normal coin input with a counter and a lockout (sharing the
latter with the "medal" coin).
- The 100 yen input never adds any credits except in "Coin Function Check,"
instead dispensing its value into the hopper immediately.
To reset the NVRAM in Othello Derby, hold P1 Button 1 down while booting.
*****************************************************************************/
#include "emu.h"
#include "includes/toaplan2.h"
#include "includes/toaplipt.h"
#include "cpu/nec/v25.h"
#include "cpu/z80/z80.h"
#include "cpu/z180/hd647180x.h"
#include "machine/nvram.h"
#include "sound/3812intf.h"
#include "sound/ym2151.h"
#include "sound/ymz280b.h"
#include "speaker.h"
#define UNICODE_YEN "\xC2\xA5"
#define PWRKICK_HOPPER_PULSE 50 // time between hopper pulses in milliseconds (probably wrong)
//#define TRUXTON2_STEREO /* Uncomment to hear truxton2 music in stereo */
constexpr unsigned toaplan2_state::T2PALETTE_LENGTH;
/***************************************************************************
Initialisation handlers
***************************************************************************/
void toaplan2_state::machine_start()
{
save_item(NAME(m_old_p1_paddle_h));
save_item(NAME(m_old_p2_paddle_h));
save_item(NAME(m_z80_busreq));
}
WRITE_LINE_MEMBER(toaplan2_state::toaplan2_reset)
{
if (m_audiocpu != nullptr)
m_audiocpu->pulse_input_line(INPUT_LINE_RESET, attotime::zero);
}
MACHINE_RESET_MEMBER(toaplan2_state,toaplan2)
{
// All games execute a RESET instruction on init, presumably to reset the sound CPU.
// This is important for games with common RAM; the RAM test will fail
// when leaving service mode if the sound CPU is not reset.
m_maincpu->set_reset_callback(write_line_delegate(FUNC(toaplan2_state::toaplan2_reset),this));
}
MACHINE_RESET_MEMBER(toaplan2_state,ghox)
{
MACHINE_RESET_CALL_MEMBER(toaplan2);
m_old_p1_paddle_h = 0;
m_old_p2_paddle_h = 0;
}
MACHINE_RESET_MEMBER(toaplan2_state,bgaregga)
{
MACHINE_RESET_CALL_MEMBER(toaplan2);
for (int chip = 0; chip < 2; chip++)
{
for (int i = 0; i < 8; i++)
{
if (m_raizing_okibank[chip][i] != nullptr)
m_raizing_okibank[chip][i]->set_entry(0);
}
}
}
void toaplan2_state::init_dogyuun()
{
m_sound_reset_bit = 0x20;
}
void toaplan2_state::init_fixeight()
{
m_sound_reset_bit = 0x08;
}
void toaplan2_state::init_fixeightbl()
{
u8 *ROM = memregion("oki1")->base();
m_okibank->configure_entries(0, 5, &ROM[0x30000], 0x10000);
}
void toaplan2_state::init_vfive()
{
m_sound_reset_bit = 0x10;
}
void toaplan2_state::init_pipibibsbl()
{
u16 *ROM = (u16 *)(memregion("maincpu")->base());
for (int i = 0; i < (0x040000/2); i += 4)
{
ROM[i+0] = bitswap<16>(ROM[i+0],0x1,0x5,0x6,0x7,0x8,0x2,0x0,0x9,0xe,0xd,0x4,0x3,0xf,0xa,0xb,0xc);
ROM[i+1] = bitswap<16>(ROM[i+1],0x5,0x3,0x1,0xf,0xd,0xb,0x9,0x0,0x2,0x4,0x6,0x8,0xa,0xc,0xe,0x7);
ROM[i+2] = bitswap<16>(ROM[i+2],0xc,0xd,0xe,0xf,0x8,0x9,0xa,0xb,0x3,0x2,0x1,0x0,0x7,0x6,0x5,0x4);
ROM[i+3] = bitswap<16>(ROM[i+3],0x8,0x9,0xa,0xb,0xc,0xd,0xe,0xf,0x3,0x2,0x1,0x0,0x7,0x6,0x5,0x4);
}
}
void toaplan2_state::install_raizing_okibank(int chip)
{
assert(m_oki_rom[chip] && m_raizing_okibank[chip][0]);
for (int i = 0; i < 4; i++)
{
m_raizing_okibank[chip][i]->configure_entries(0, 16, &m_oki_rom[chip][(i * 0x100)], 0x10000);
}
m_raizing_okibank[chip][4]->configure_entries(0, 16, &m_oki_rom[chip][0x400], 0x10000);
for (int i = 5; i < 8; i++)
{
m_raizing_okibank[chip][i]->configure_entries(0, 16, &m_oki_rom[chip][0], 0x10000);
}
}
void toaplan2_state::init_bgaregga()
{
u8 *Z80 = memregion("audiocpu")->base();
m_audiobank->configure_entries(0, 8, Z80, 0x4000); // Test mode only, Mirror of First 128KB Areas?
m_audiobank->configure_entries(8, 8, Z80, 0x4000);
install_raizing_okibank(0);
}
void toaplan2_state::init_batrider()
{
u8 *Z80 = memregion("audiocpu")->base();
m_audiobank->configure_entries(0, 16, Z80, 0x4000);
install_raizing_okibank(0);
install_raizing_okibank(1);
m_sndirq_line = 4;
}
void toaplan2_state::init_bbakraid()
{
m_sndirq_line = 2;
}
void toaplan2_state::init_enmadaio()
{
u8 *ROM = memregion("oki1")->base();
m_okibank->configure_entries(0, 0x60, ROM, 0x40000);
m_okibank->set_entry(0);
}
/***************************************************************************
Toaplan games
***************************************************************************/
void toaplan2_state::cpu_space_fixeightbl_map(address_map &map)
{
map(0xfffff0, 0xffffff).m(m_maincpu, FUNC(m68000_base_device::autovectors_map));
map(0xfffff5, 0xfffff5).lr8("irq 2", [this]() { m_maincpu->set_input_line(M68K_IRQ_2, CLEAR_LINE); return m68000_device::autovector(2); });
}
void toaplan2_state::cpu_space_pipibibsbl_map(address_map &map)
{
map(0xfffff0, 0xffffff).m(m_maincpu, FUNC(m68000_base_device::autovectors_map));
map(0xfffff9, 0xfffff9).lr8("irq 4", [this]() { m_maincpu->set_input_line(M68K_IRQ_4, CLEAR_LINE); return m68000_device::autovector(4); });
}
u16 toaplan2_state::video_count_r()
{
/* +---------+---------+--------+---------------------------+ */
/* | /H-Sync | /V-Sync | /Blank | Scanline Count | */
/* | Bit 15 | Bit 14 | Bit 8 | Bit 7-0 (count from #EF) | */
/* +---------+---------+--------+---------------------------+ */
/*************** Control Signals are active low ***************/
int vpos = m_screen->vpos();
u16 video_status = 0xff00; // Set signals inactive
vpos = (vpos + 15) % 262;
if (!m_vdp[0]->hsync_r())
video_status &= ~0x8000;
if (!m_vdp[0]->vsync_r())
video_status &= ~0x4000;
if (!m_vdp[0]->fblank_r())
video_status &= ~0x0100;
if (vpos < 256)
video_status |= (vpos & 0xff);
else
video_status |= 0xff;
// logerror("VC: vpos=%04x hpos=%04x VBL=%04x\n",vpos,hpos,m_screen->vblank());
return video_status;
}
void toaplan2_state::coin_w(u8 data)
{
/* +----------------+------ Bits 7-5 not used ------+--------------+ */
/* | Coin Lockout 2 | Coin Lockout 1 | Coin Count 2 | Coin Count 1 | */
/* | Bit 3 | Bit 2 | Bit 1 | Bit 0 | */
if (data & 0x0f)
{
machine().bookkeeping().coin_lockout_w(0, BIT(~data, 2));
machine().bookkeeping().coin_lockout_w(1, BIT(~data, 3));
machine().bookkeeping().coin_counter_w(0, BIT( data, 0));
machine().bookkeeping().coin_counter_w(1, BIT( data, 1));
}
else
{
machine().bookkeeping().coin_lockout_global_w(1); // Lock all coin slots
}
if (data & 0xf0)
{
logerror("Writing unknown upper bits (%02x) to coin control\n",data);
}
}
void toaplan2_state::pwrkick_coin_w(u8 data)
{
machine().bookkeeping().coin_counter_w(0, BIT(data, 1)); // medal
machine().bookkeeping().coin_counter_w(1, BIT(data, 3)); // 10 yen
machine().bookkeeping().coin_counter_w(2, BIT(data, 0)); // 100 yen
m_hopper->motor_w(BIT(data, 7));
}
void toaplan2_state::pwrkick_coin_lockout_w(u8 data)
{
machine().bookkeeping().coin_lockout_w(0, BIT(~data, 2));
machine().bookkeeping().coin_lockout_w(1, BIT(~data, 2));
machine().bookkeeping().coin_lockout_w(2, BIT(~data, 1));
}
void toaplan2_state::coin_sound_reset_w(u8 data)
{
logerror("coin_sound_reset_w %02x\n",data);
coin_w(data & ~m_sound_reset_bit);
sound_reset_w(data & m_sound_reset_bit);
}
void toaplan2_state::shippumd_coin_w(u8 data)
{
coin_w(data & ~0x10);
m_oki[0]->set_rom_bank(BIT(data, 4));
}
u8 toaplan2_state::shared_ram_r(offs_t offset)
{
return m_shared_ram[offset];
}
void toaplan2_state::shared_ram_w(offs_t offset, u8 data)
{
m_shared_ram[offset] = data;
}
READ_LINE_MEMBER(toaplan2_state::c2map_r)
{
// For Teki Paki hardware
// bit 4 high signifies secondary CPU is ready
// bit 5 is tested low before V-Blank bit ???
return m_soundlatch->pending_r() ? 0x00 : 0x01;
}
u16 toaplan2_state::ghox_p1_h_analog_r()
{
const s8 new_value = m_io_pad[0]->read();
if (new_value == m_old_p1_paddle_h) return 0;
const s8 value = new_value - m_old_p1_paddle_h;
if (!machine().side_effects_disabled())
m_old_p1_paddle_h = new_value;
return value;
}
u16 toaplan2_state::ghox_p2_h_analog_r()
{
const s8 new_value = m_io_pad[1]->read();
if (new_value == m_old_p2_paddle_h) return 0;
const s8 value = new_value - m_old_p2_paddle_h;
if (!machine().side_effects_disabled())
m_old_p2_paddle_h = new_value;
return value;
}
void toaplan2_state::sound_reset_w(u8 data)
{
m_audiocpu->set_input_line(INPUT_LINE_RESET, (data & m_sound_reset_bit) ? CLEAR_LINE : ASSERT_LINE);
}
template<int Chip>
void toaplan2_state::oki_bankswitch_w(u8 data)
{
m_oki[Chip]->set_rom_bank(data & 1);
}
void toaplan2_state::fixeightbl_oki_bankswitch_w(u8 data)
{
data &= 7;
if (data <= 4) m_okibank->set_entry(data);
}
/***************************************************************************
Raizing games
***************************************************************************/
void toaplan2_state::raizing_z80_bankswitch_w(u8 data)
{
m_audiobank->set_entry(data & 0x0f);
}
// bgaregga and batrider don't actually have a NMK112, but rather a GAL
// programmed to bankswitch the sound ROMs in a similar fashion.
// it may not be a coincidence that the composer and sound designer for
// these two games, Manabu "Santaruru" Namiki, came to Raizing from NMK...
void toaplan2_state::raizing_oki_bankswitch_w(offs_t offset, u8 data)
{
m_raizing_okibank[(offset & 4) >> 2][offset & 3]->set_entry(data & 0xf);
m_raizing_okibank[(offset & 4) >> 2][4 + (offset & 3)]->set_entry(data & 0xf);
offset++;
data >>= 4;
m_raizing_okibank[(offset & 4) >> 2][offset & 3]->set_entry(data & 0xf);
m_raizing_okibank[(offset & 4) >> 2][4 + (offset & 3)]->set_entry(data & 0xf);
}
u8 toaplan2_state::bgaregga_E01D_r()
{
// the Z80 reads this address during its IRQ routine,
// and reads the soundlatch only if the lowest bit is clear.
return m_soundlatch->pending_r() ? 0 : 1;
}
u16 toaplan2_state::batrider_z80_busack_r()
{
// Bit 0x01 returns the status of BUSAK from the Z80.
// These accesses are made when the 68K wants to read the Z80
// ROM code. Failure to return the correct status incurrs a Sound Error.
return m_z80_busreq; // Loop BUSRQ to BUSAK
}
void toaplan2_state::batrider_z80_busreq_w(u8 data)
{
m_z80_busreq = (data & 0x01); // see batrider_z80_busack_r above
}
u16 toaplan2_state::batrider_z80rom_r(offs_t offset)
{
return m_z80_rom[offset];
}
// these two latches are always written together, via a single move.l instruction
void toaplan2_state::batrider_soundlatch_w(u8 data)
{
m_soundlatch->write(data & 0xff);
m_audiocpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
}
void toaplan2_state::batrider_soundlatch2_w(u8 data)
{
m_soundlatch2->write(data & 0xff);
m_audiocpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
}
void toaplan2_state::batrider_unknown_sound_w(u16 data)
{
// the 68K writes here when it wants a sound acknowledge IRQ from the Z80
// for bbakraid this is on every sound command; for batrider, only on certain commands
}
void toaplan2_state::batrider_clear_sndirq_w(u16 data)
{
// not sure whether this is correct
// the 68K writes here during the sound IRQ handler, and nowhere else...
m_maincpu->set_input_line(m_sndirq_line, CLEAR_LINE);
}
void toaplan2_state::batrider_sndirq_w(u8 data)
{
// if batrider_clear_sndirq_w() is correct, should this be ASSERT_LINE?
m_maincpu->set_input_line(m_sndirq_line, HOLD_LINE);
}
void toaplan2_state::batrider_clear_nmi_w(u8 data)
{
m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
}
u16 toaplan2_state::bbakraid_eeprom_r()
{
// Bit 0x01 returns the status of BUSAK from the Z80.
// BUSRQ is activated via bit 0x10 on the EEPROM write port.
// These accesses are made when the 68K wants to read the Z80
// ROM code. Failure to return the correct status incurrs a Sound Error.
u8 data;
data = ((m_eeprom->do_read() & 0x01) << 4);
data |= ((m_z80_busreq >> 4) & 0x01); // Loop BUSRQ to BUSAK
return data;
}
void toaplan2_state::bbakraid_eeprom_w(u8 data)
{
if (data & ~0x1f)
logerror("CPU #0 PC:%06X - Unknown EEPROM data being written %02X\n",m_maincpu->pc(),data);
m_eepromout->write(data, 0xff);
m_z80_busreq = data & 0x10; // see bbakraid_eeprom_r above
}
INTERRUPT_GEN_MEMBER(toaplan2_state::bbakraid_snd_interrupt)
{
device.execute().set_input_line(0, HOLD_LINE);
}
void toaplan2_state::tekipaki_68k_mem(address_map &map)
{
map(0x000000, 0x01ffff).rom();
map(0x020000, 0x03ffff).rom(); // extra for Whoopee
map(0x080000, 0x082fff).ram();
map(0x0c0000, 0x0c0fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x140000, 0x14000d).rw(m_vdp[0], FUNC(gp9001vdp_device::read), FUNC(gp9001vdp_device::write));
map(0x180000, 0x180001).portr("DSWA");
map(0x180010, 0x180011).portr("DSWB");
map(0x180020, 0x180021).portr("SYS");
map(0x180030, 0x180031).portr("JMPR"); // CPU 2 busy and Region Jumper block
map(0x180041, 0x180041).w(FUNC(toaplan2_state::coin_w));
map(0x180050, 0x180051).portr("IN1");
map(0x180060, 0x180061).portr("IN2");
map(0x180071, 0x180071).w(m_soundlatch, FUNC(generic_latch_8_device::write));
}
void toaplan2_state::ghox_68k_mem(address_map &map)
{
map(0x000000, 0x03ffff).rom();
map(0x040000, 0x040001).r(FUNC(toaplan2_state::ghox_p2_h_analog_r));
map(0x080000, 0x083fff).ram();
map(0x0c0000, 0x0c0fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x100000, 0x100001).r(FUNC(toaplan2_state::ghox_p1_h_analog_r));
map(0x140000, 0x14000d).rw(m_vdp[0], FUNC(gp9001vdp_device::read), FUNC(gp9001vdp_device::write));
map(0x180000, 0x180fff).rw(FUNC(toaplan2_state::shared_ram_r), FUNC(toaplan2_state::shared_ram_w)).umask16(0x00ff);
map(0x181001, 0x181001).w(FUNC(toaplan2_state::coin_w));
map(0x18100c, 0x18100d).portr("JMPR");
}
void toaplan2_state::dogyuun_68k_mem(address_map &map)
{
map(0x000000, 0x07ffff).rom();
map(0x100000, 0x103fff).ram();
map(0x200010, 0x200011).portr("IN1");
map(0x200014, 0x200015).portr("IN2");
map(0x200018, 0x200019).portr("SYS");
map(0x20001d, 0x20001d).w(FUNC(toaplan2_state::coin_sound_reset_w)); // Coin count/lock + v25 reset line
map(0x210000, 0x21ffff).rw(FUNC(toaplan2_state::shared_ram_r), FUNC(toaplan2_state::shared_ram_w)).umask16(0x00ff);
map(0x300000, 0x30000d).rw(m_vdp[0], FUNC(gp9001vdp_device::read), FUNC(gp9001vdp_device::write));
map(0x400000, 0x400fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x500000, 0x50000d).rw(m_vdp[1], FUNC(gp9001vdp_device::read), FUNC(gp9001vdp_device::write));
map(0x700000, 0x700001).r(FUNC(toaplan2_state::video_count_r)); // test bit 8
}
void toaplan2_state::kbash_68k_mem(address_map &map)
{
map(0x000000, 0x07ffff).rom();
map(0x100000, 0x103fff).ram();
map(0x200000, 0x200fff).rw(FUNC(toaplan2_state::shared_ram_r), FUNC(toaplan2_state::shared_ram_w)).umask16(0x00ff);
map(0x208010, 0x208011).portr("IN1");
map(0x208014, 0x208015).portr("IN2");
map(0x208018, 0x208019).portr("SYS");
map(0x20801d, 0x20801d).w(FUNC(toaplan2_state::coin_w));
map(0x300000, 0x30000d).rw(m_vdp[0], FUNC(gp9001vdp_device::read), FUNC(gp9001vdp_device::write));
map(0x400000, 0x400fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x700000, 0x700001).r(FUNC(toaplan2_state::video_count_r)); // test bit 8
}
void toaplan2_state::kbash2_68k_mem(address_map &map)
{
map(0x000000, 0x07ffff).rom();
map(0x100000, 0x103fff).ram();
map(0x104000, 0x10401f).ram(); // Sound related?
map(0x200000, 0x200001).noprw(); // Left over from original code - Sound Number write, Status read
map(0x200002, 0x200003).nopw(); // Left over from original code - Reset Sound
map(0x200004, 0x200005).portr("DSWA");
map(0x200008, 0x200009).portr("DSWB");
map(0x20000c, 0x20000d).portr("JMPR");
map(0x200010, 0x200011).portr("IN1");
map(0x200014, 0x200015).portr("IN2");
map(0x200018, 0x200019).portr("SYS");
map(0x200021, 0x200021).rw(m_oki[1], FUNC(okim6295_device::read), FUNC(okim6295_device::write));
map(0x200025, 0x200025).rw(m_oki[0], FUNC(okim6295_device::read), FUNC(okim6295_device::write));
map(0x200029, 0x200029).w(FUNC(toaplan2_state::oki_bankswitch_w<0>));
map(0x20002c, 0x20002d).r(FUNC(toaplan2_state::video_count_r));
map(0x300000, 0x30000d).rw(m_vdp[0], FUNC(gp9001vdp_device::read), FUNC(gp9001vdp_device::write));
map(0x400000, 0x400fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
}
void toaplan2_state::truxton2_68k_mem(address_map &map)
{
map(0x000000, 0x07ffff).rom();
map(0x100000, 0x10ffff).ram();
map(0x200000, 0x20000d).rw(m_vdp[0], FUNC(gp9001vdp_device::read), FUNC(gp9001vdp_device::write));
map(0x300000, 0x300fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x400000, 0x401fff).ram().w(FUNC(toaplan2_state::tx_videoram_w)).share("tx_videoram");
map(0x402000, 0x402fff).ram().share("tx_lineselect");
map(0x403000, 0x4031ff).ram().w(FUNC(toaplan2_state::tx_linescroll_w)).share("tx_linescroll");
map(0x403200, 0x403fff).ram();
map(0x500000, 0x50ffff).ram().w(FUNC(toaplan2_state::tx_gfxram_w)).share("tx_gfxram");
map(0x600000, 0x600001).r(FUNC(toaplan2_state::video_count_r));
map(0x700000, 0x700001).portr("DSWA");
map(0x700002, 0x700003).portr("DSWB");
map(0x700004, 0x700005).portr("JMPR");
map(0x700006, 0x700007).portr("IN1");
map(0x700008, 0x700009).portr("IN2");
map(0x70000a, 0x70000b).portr("SYS");
map(0x700011, 0x700011).rw(m_oki[0], FUNC(okim6295_device::read), FUNC(okim6295_device::write));
map(0x700014, 0x700017).rw("ymsnd", FUNC(ym2151_device::read), FUNC(ym2151_device::write)).umask16(0x00ff);
map(0x70001f, 0x70001f).w(FUNC(toaplan2_state::coin_w));
}
void toaplan2_state::pipibibs_68k_mem(address_map &map)
{
map(0x000000, 0x03ffff).rom();
map(0x080000, 0x082fff).ram();
map(0x0c0000, 0x0c0fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x140000, 0x14000d).rw(m_vdp[0], FUNC(gp9001vdp_device::read), FUNC(gp9001vdp_device::write));
map(0x190000, 0x190fff).rw(FUNC(toaplan2_state::shared_ram_r), FUNC(toaplan2_state::shared_ram_w)).umask16(0x00ff);
map(0x19c01d, 0x19c01d).w(FUNC(toaplan2_state::coin_w));
map(0x19c020, 0x19c021).portr("DSWA");
map(0x19c024, 0x19c025).portr("DSWB");
map(0x19c028, 0x19c029).portr("JMPR");
map(0x19c02c, 0x19c02d).portr("SYS");
map(0x19c030, 0x19c031).portr("IN1");
map(0x19c034, 0x19c035).portr("IN2");
}
// odd scroll registers
void toaplan2_state::pipibibi_bootleg_68k_mem(address_map &map)
{
map(0x000000, 0x03ffff).rom();
map(0x080000, 0x082fff).ram();
map(0x083000, 0x0837ff).rw(m_vdp[0], FUNC(gp9001vdp_device::pipibibi_bootleg_spriteram16_r), FUNC(gp9001vdp_device::pipibibi_bootleg_spriteram16_w)); // SpriteRAM
map(0x083800, 0x087fff).ram(); // SpriteRAM (unused)
map(0x0c0000, 0x0c0fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x120000, 0x120fff).ram(); // Copy of SpriteRAM ?
// map(0x13f000, 0x13f001).nopw(); // ???
map(0x180000, 0x182fff).rw(m_vdp[0], FUNC(gp9001vdp_device::pipibibi_bootleg_videoram16_r), FUNC(gp9001vdp_device::pipibibi_bootleg_videoram16_w)); // TileRAM
map(0x188000, 0x18800f).w(m_vdp[0], FUNC(gp9001vdp_device::pipibibi_bootleg_scroll_w));
map(0x190003, 0x190003).r(FUNC(toaplan2_state::shared_ram_r)); // Z80 ready ?
map(0x190011, 0x190011).w(FUNC(toaplan2_state::shared_ram_w)); // Z80 task to perform
map(0x19c01d, 0x19c01d).w(FUNC(toaplan2_state::coin_w));
map(0x19c020, 0x19c021).portr("DSWA");
map(0x19c024, 0x19c025).portr("DSWB");
map(0x19c028, 0x19c029).portr("JMPR");
map(0x19c02c, 0x19c02d).portr("SYS");
map(0x19c030, 0x19c031).portr("IN1");
map(0x19c034, 0x19c035).portr("IN2");
}
void toaplan2_state::fixeight_68k_mem(address_map &map)
{
map(0x000000, 0x07ffff).rom();
map(0x100000, 0x103fff).ram();
map(0x200000, 0x200001).portr("IN1");
map(0x200004, 0x200005).portr("IN2");
map(0x200008, 0x200009).portr("IN3");
map(0x200010, 0x200011).portr("SYS");
map(0x20001d, 0x20001d).w(FUNC(toaplan2_state::coin_w));
map(0x280000, 0x28ffff).rw(FUNC(toaplan2_state::shared_ram_r), FUNC(toaplan2_state::shared_ram_w)).umask16(0x00ff);
map(0x300000, 0x30000d).rw(m_vdp[0], FUNC(gp9001vdp_device::read), FUNC(gp9001vdp_device::write));
map(0x400000, 0x400fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x500000, 0x501fff).ram().w(FUNC(toaplan2_state::tx_videoram_w)).share("tx_videoram");
map(0x502000, 0x5021ff).ram().share("tx_lineselect");
map(0x503000, 0x5031ff).ram().w(FUNC(toaplan2_state::tx_linescroll_w)).share("tx_linescroll");
map(0x600000, 0x60ffff).ram().w(FUNC(toaplan2_state::tx_gfxram_w)).share("tx_gfxram");
map(0x700000, 0x700001).w(FUNC(toaplan2_state::sound_reset_w)).umask16(0x00ff).cswidth(16);
map(0x800000, 0x800001).r(FUNC(toaplan2_state::video_count_r));
}
void toaplan2_state::fixeightbl_68k_mem(address_map &map)
{
map(0x000000, 0x0fffff).rom(); // 0-7ffff ?
map(0x100000, 0x10ffff).ram(); // 100000-107fff 105000-105xxx 106000-106xxx 108000 - related to sound ?
map(0x200000, 0x200001).portr("IN1");
map(0x200004, 0x200005).portr("IN2");
map(0x200008, 0x200009).portr("IN3");
map(0x20000c, 0x20000d).portr("DSWB");
map(0x200010, 0x200011).portr("SYS");
map(0x200015, 0x200015).w(FUNC(toaplan2_state::fixeightbl_oki_bankswitch_w)); // Sound banking. Code at $4084c, $5070
map(0x200019, 0x200019).rw(m_oki[0], FUNC(okim6295_device::read), FUNC(okim6295_device::write));
map(0x20001c, 0x20001d).portr("DSWA");
map(0x300000, 0x30000d).rw(m_vdp[0], FUNC(gp9001vdp_device::read), FUNC(gp9001vdp_device::write));
map(0x400000, 0x400fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x500000, 0x501fff).ram().w(FUNC(toaplan2_state::tx_videoram_w)).share("tx_videoram");
map(0x700000, 0x700001).r(FUNC(toaplan2_state::video_count_r));
map(0x800000, 0x87ffff).rom().region("maincpu", 0x80000);
}
void toaplan2_state::vfive_68k_mem(address_map &map)
{
map(0x000000, 0x07ffff).rom();
map(0x100000, 0x103fff).ram();
// map(0x200000, 0x20ffff).noprw(); // Read at startup by broken ROM checksum code - see notes
map(0x200010, 0x200011).portr("IN1");
map(0x200014, 0x200015).portr("IN2");
map(0x200018, 0x200019).portr("SYS");
map(0x20001d, 0x20001d).w(FUNC(toaplan2_state::coin_sound_reset_w)); // Coin count/lock + v25 reset line
map(0x210000, 0x21ffff).rw(FUNC(toaplan2_state::shared_ram_r), FUNC(toaplan2_state::shared_ram_w)).umask16(0x00ff);
map(0x300000, 0x30000d).rw(m_vdp[0], FUNC(gp9001vdp_device::read), FUNC(gp9001vdp_device::write));
map(0x400000, 0x400fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x700000, 0x700001).r(FUNC(toaplan2_state::video_count_r));
}
void toaplan2_state::batsugun_68k_mem(address_map &map)
{
map(0x000000, 0x07ffff).rom();
map(0x100000, 0x10ffff).ram();
map(0x200010, 0x200011).portr("IN1");
map(0x200014, 0x200015).portr("IN2");
map(0x200018, 0x200019).portr("SYS");
map(0x20001d, 0x20001d).w(FUNC(toaplan2_state::coin_sound_reset_w)); // Coin count/lock + v25 reset line
map(0x210000, 0x21ffff).rw(FUNC(toaplan2_state::shared_ram_r), FUNC(toaplan2_state::shared_ram_w)).umask16(0x00ff);
map(0x300000, 0x30000d).rw(m_vdp[0], FUNC(gp9001vdp_device::read), FUNC(gp9001vdp_device::write));
map(0x400000, 0x400fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x500000, 0x50000d).rw(m_vdp[1], FUNC(gp9001vdp_device::read), FUNC(gp9001vdp_device::write));
map(0x700000, 0x700001).r(FUNC(toaplan2_state::video_count_r));
}
void toaplan2_state::pwrkick_68k_mem(address_map &map)
{
map(0x000000, 0x07ffff).rom();
map(0x100000, 0x103fff).ram().share("nvram"); // Only 10022C-10037B is actually saved as NVRAM
map(0x104000, 0x10ffff).ram();
map(0x200000, 0x20000f).rw(m_rtc, FUNC(upd4992_device::read), FUNC(upd4992_device::write)).umask16(0x00ff);
map(0x300000, 0x30000d).rw(m_vdp[0], FUNC(gp9001vdp_device::read), FUNC(gp9001vdp_device::write));
map(0x400000, 0x400fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x600001, 0x600001).rw(m_oki[0], FUNC(okim6295_device::read), FUNC(okim6295_device::write));
map(0x700000, 0x700001).r(FUNC(toaplan2_state::video_count_r));
map(0x700004, 0x700005).portr("DSWA");
map(0x700008, 0x700009).portr("DSWB");
map(0x70000c, 0x70000d).portr("IN1");
map(0x700014, 0x700015).portr("IN2");
map(0x700018, 0x700019).portr("DSWC");
map(0x70001c, 0x70001d).portr("SYS");
map(0x700031, 0x700031).w(FUNC(toaplan2_state::oki_bankswitch_w<0>));
map(0x700035, 0x700035).w(FUNC(toaplan2_state::pwrkick_coin_w));
map(0x700039, 0x700039).w(FUNC(toaplan2_state::pwrkick_coin_lockout_w));
}
void toaplan2_state::othldrby_68k_mem(address_map &map)
{
map(0x000000, 0x07ffff).rom();
map(0x100000, 0x103fff).ram().share("nvram"); // Only 10331E-103401 is actually saved as NVRAM
map(0x104000, 0x10ffff).ram();
map(0x200000, 0x20000f).rw(m_rtc, FUNC(upd4992_device::read), FUNC(upd4992_device::write)).umask16(0x00ff);
map(0x300000, 0x30000d).rw(m_vdp[0], FUNC(gp9001vdp_device::read), FUNC(gp9001vdp_device::write));
map(0x400000, 0x400fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x600001, 0x600001).rw(m_oki[0], FUNC(okim6295_device::read), FUNC(okim6295_device::write));
map(0x700000, 0x700001).r(FUNC(toaplan2_state::video_count_r));
map(0x700004, 0x700005).portr("DSWA");
map(0x700008, 0x700009).portr("DSWB");
map(0x70000c, 0x70000d).portr("IN1");
map(0x700010, 0x700011).portr("IN2");
map(0x70001c, 0x70001d).portr("SYS");
map(0x700031, 0x700031).w(FUNC(toaplan2_state::oki_bankswitch_w<0>));
map(0x700035, 0x700035).w(FUNC(toaplan2_state::coin_w));
}
void toaplan2_state::enmadaio_oki_bank_w(offs_t offset, u16 data, u16 mem_mask)
{
data &= mem_mask;
if (data < 0x60)
{
m_okibank->set_entry(data);
}
else
{
logerror("enmadaio_oki_bank_w >=0x60 (%04x)\n",data);
}
}
void toaplan2_state::enmadaio_68k_mem(address_map &map)
{
map(0x000000, 0x07ffff).rom();
map(0x100000, 0x103fff).ram(); //.share("nvram");
map(0x104000, 0x10ffff).ram();
map(0x200000, 0x20000d).rw(m_vdp[0], FUNC(gp9001vdp_device::read), FUNC(gp9001vdp_device::write));
map(0x300000, 0x300fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x400000, 0x400003).rw("ymsnd", FUNC(ym2151_device::read), FUNC(ym2151_device::write)).umask16(0x00ff);
map(0x500001, 0x500001).rw(m_oki[0], FUNC(okim6295_device::read), FUNC(okim6295_device::write));
map(0x700000, 0x700001).r(FUNC(toaplan2_state::video_count_r));
map(0x700004, 0x700005).portr("DSWA");
map(0x70000c, 0x70000d).portr("MISC2");
map(0x700010, 0x700011).portr("MISC3");
map(0x700014, 0x700015).portr("MISC4");
map(0x700018, 0x700019).portr("SYS");
map(0x70001c, 0x70001d).portr("UNK"); //.portr("SYS");
map(0x700020, 0x700021).w(FUNC(toaplan2_state::enmadaio_oki_bank_w)); // oki bank
map(0x700028, 0x700029).nopw();
map(0x70003c, 0x70003d).nopw();
map(0x70002c, 0x70002d).nopw();
}
void toaplan2_state::snowbro2_68k_mem(address_map &map)
{
map(0x000000, 0x07ffff).rom();
map(0x100000, 0x10ffff).ram();
map(0x300000, 0x30000d).rw(m_vdp[0], FUNC(gp9001vdp_device::read), FUNC(gp9001vdp_device::write));
map(0x400000, 0x400fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x500000, 0x500003).rw("ymsnd", FUNC(ym2151_device::read), FUNC(ym2151_device::write)).umask16(0x00ff);
map(0x600001, 0x600001).rw(m_oki[0], FUNC(okim6295_device::read), FUNC(okim6295_device::write));
map(0x700000, 0x700001).portr("JMPR");
map(0x700004, 0x700005).portr("DSWA");
map(0x700008, 0x700009).portr("DSWB");
map(0x70000c, 0x70000d).portr("IN1");
map(0x700010, 0x700011).portr("IN2");
map(0x700014, 0x700015).portr("IN3");
map(0x700018, 0x700019).portr("IN4");
map(0x70001c, 0x70001d).portr("SYS");
map(0x700031, 0x700031).w(FUNC(toaplan2_state::oki_bankswitch_w<0>));
map(0x700035, 0x700035).w(FUNC(toaplan2_state::coin_w));
}
void toaplan2_state::mahoudai_68k_mem(address_map &map)
{
map(0x000000, 0x07ffff).rom();
map(0x100000, 0x10ffff).ram();
map(0x218000, 0x21bfff).rw(FUNC(toaplan2_state::shared_ram_r), FUNC(toaplan2_state::shared_ram_w)).umask16(0x00ff);
map(0x21c01d, 0x21c01d).w(FUNC(toaplan2_state::coin_w));
map(0x21c020, 0x21c021).portr("IN1");
map(0x21c024, 0x21c025).portr("IN2");
map(0x21c028, 0x21c029).portr("SYS");
map(0x21c02c, 0x21c02d).portr("DSWA");
map(0x21c030, 0x21c031).portr("DSWB");
map(0x21c034, 0x21c035).portr("JMPR");
map(0x21c03c, 0x21c03d).r(FUNC(toaplan2_state::video_count_r));
map(0x300000, 0x30000d).rw(m_vdp[0], FUNC(gp9001vdp_device::read), FUNC(gp9001vdp_device::write));
map(0x400000, 0x400fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x401000, 0x4017ff).ram(); // Unused palette RAM
map(0x500000, 0x501fff).ram().w(FUNC(toaplan2_state::tx_videoram_w)).share("tx_videoram");
map(0x502000, 0x502fff).ram().share("tx_lineselect");
map(0x503000, 0x5031ff).ram().w(FUNC(toaplan2_state::tx_linescroll_w)).share("tx_linescroll");
map(0x503200, 0x503fff).ram();
}
void toaplan2_state::shippumd_68k_mem(address_map &map)
{
map(0x000000, 0x0fffff).rom();
map(0x100000, 0x10ffff).ram();
map(0x218000, 0x21bfff).rw(FUNC(toaplan2_state::shared_ram_r), FUNC(toaplan2_state::shared_ram_w)).umask16(0x00ff);
// map(0x21c008, 0x21c009).nopw(); // ???
map(0x21c01d, 0x21c01d).w(FUNC(toaplan2_state::shippumd_coin_w)); // Coin count/lock + oki bankswitch
map(0x21c020, 0x21c021).portr("IN1");
map(0x21c024, 0x21c025).portr("IN2");
map(0x21c028, 0x21c029).portr("SYS");
map(0x21c02c, 0x21c02d).portr("DSWA");
map(0x21c030, 0x21c031).portr("DSWB");
map(0x21c034, 0x21c035).portr("JMPR");
map(0x21c03c, 0x21c03d).r(FUNC(toaplan2_state::video_count_r));
map(0x300000, 0x30000d).rw(m_vdp[0], FUNC(gp9001vdp_device::read), FUNC(gp9001vdp_device::write));
map(0x400000, 0x400fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x401000, 0x4017ff).ram(); // Unused palette RAM
map(0x500000, 0x501fff).ram().w(FUNC(toaplan2_state::tx_videoram_w)).share("tx_videoram");
map(0x502000, 0x502fff).ram().share("tx_lineselect");
map(0x503000, 0x5031ff).ram().w(FUNC(toaplan2_state::tx_linescroll_w)).share("tx_linescroll");
map(0x503200, 0x503fff).ram();
}
void toaplan2_state::bgaregga_68k_mem(address_map &map)
{
map(0x000000, 0x0fffff).rom();
map(0x100000, 0x10ffff).ram();
map(0x218000, 0x21bfff).rw(FUNC(toaplan2_state::shared_ram_r), FUNC(toaplan2_state::shared_ram_w)).umask16(0x00ff);
map(0x21c01d, 0x21c01d).w(FUNC(toaplan2_state::coin_w));
map(0x21c020, 0x21c021).portr("IN1");
map(0x21c024, 0x21c025).portr("IN2");
map(0x21c028, 0x21c029).portr("SYS");
map(0x21c02c, 0x21c02d).portr("DSWA");
map(0x21c030, 0x21c031).portr("DSWB");
map(0x21c034, 0x21c035).portr("JMPR");
map(0x21c03c, 0x21c03d).r(FUNC(toaplan2_state::video_count_r));
map(0x300000, 0x30000d).rw(m_vdp[0], FUNC(gp9001vdp_device::read), FUNC(gp9001vdp_device::write));
map(0x400000, 0x400fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x500000, 0x501fff).ram().w(FUNC(toaplan2_state::tx_videoram_w)).share("tx_videoram");
map(0x502000, 0x502fff).ram().share("tx_lineselect");
map(0x503000, 0x5031ff).ram().w(FUNC(toaplan2_state::tx_linescroll_w)).share("tx_linescroll");
map(0x503200, 0x503fff).ram();
map(0x600001, 0x600001).w(m_soundlatch, FUNC(generic_latch_8_device::write));
}
void toaplan2_state::batrider_dma_mem(address_map &map)
{
map(0x0000, 0x1fff).ram().w(FUNC(toaplan2_state::tx_videoram_w)).share("tx_videoram");
map(0x2000, 0x2fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x3000, 0x31ff).ram().share("tx_lineselect");
map(0x3200, 0x33ff).ram().w(FUNC(toaplan2_state::tx_linescroll_w)).share("tx_linescroll");
map(0x3400, 0x7fff).ram();
map(0x8000, 0xffff).ram().w(FUNC(toaplan2_state::batrider_tx_gfxram_w)).share("tx_gfxram");
}
void toaplan2_state::batrider_68k_mem(address_map &map)
{
map(0x000000, 0x1fffff).rom();
// actually 200000 - 20ffff is probably all main RAM, and the text and palette RAM are written via DMA
map(0x200000, 0x207fff).ram().share("mainram");
map(0x208000, 0x20ffff).ram();
map(0x300000, 0x37ffff).r(FUNC(toaplan2_state::batrider_z80rom_r));
map(0x400000, 0x40000d).lrw16("gp9001_invert_rw",
[this](offs_t offset, u16 mem_mask) { return m_vdp[0]->read(offset ^ (0xc/2), mem_mask); },
[this](offs_t offset, u16 data, u16 mem_mask) { m_vdp[0]->write(offset ^ (0xc/2), data, mem_mask); });
map(0x500000, 0x500001).portr("IN");
map(0x500002, 0x500003).portr("SYS-DSW");
map(0x500004, 0x500005).portr("DSW");
map(0x500006, 0x500007).r(FUNC(toaplan2_state::video_count_r));
map(0x500009, 0x500009).r("soundlatch3", FUNC(generic_latch_8_device::read));
map(0x50000b, 0x50000b).r("soundlatch4", FUNC(generic_latch_8_device::read));
map(0x50000c, 0x50000d).r(FUNC(toaplan2_state::batrider_z80_busack_r));
map(0x500011, 0x500011).w(FUNC(toaplan2_state::coin_w));
map(0x500021, 0x500021).w(FUNC(toaplan2_state::batrider_soundlatch_w));
map(0x500023, 0x500023).w(FUNC(toaplan2_state::batrider_soundlatch2_w));
map(0x500024, 0x500025).w(FUNC(toaplan2_state::batrider_unknown_sound_w));
map(0x500026, 0x500027).w(FUNC(toaplan2_state::batrider_clear_sndirq_w));
map(0x500061, 0x500061).w(FUNC(toaplan2_state::batrider_z80_busreq_w));
map(0x500080, 0x500081).w(FUNC(toaplan2_state::batrider_textdata_dma_w));
map(0x500082, 0x500083).w(FUNC(toaplan2_state::batrider_pal_text_dma_w));
map(0x5000c0, 0x5000cf).w(FUNC(toaplan2_state::batrider_objectbank_w)).umask16(0x00ff);
}
void toaplan2_state::bbakraid_68k_mem(address_map &map)
{
map(0x000000, 0x1fffff).rom();
// actually 200000 - 20ffff is probably all main RAM, and the text and palette RAM are written via DMA
map(0x200000, 0x207fff).ram().share("mainram");
map(0x208000, 0x20ffff).ram();
map(0x300000, 0x33ffff).r(FUNC(toaplan2_state::batrider_z80rom_r));
map(0x400000, 0x40000d).lrw16("gp9001_invert_rw",
[this](offs_t offset, u16 mem_mask) { return m_vdp[0]->read(offset ^ (0xc/2), mem_mask); },
[this](offs_t offset, u16 data, u16 mem_mask) { m_vdp[0]->write(offset ^ (0xc/2), data, mem_mask); });
map(0x500000, 0x500001).portr("IN");
map(0x500002, 0x500003).portr("SYS-DSW");
map(0x500004, 0x500005).portr("DSW");
map(0x500006, 0x500007).r(FUNC(toaplan2_state::video_count_r));
map(0x500009, 0x500009).w(FUNC(toaplan2_state::coin_w));
map(0x500011, 0x500011).r("soundlatch3", FUNC(generic_latch_8_device::read));
map(0x500013, 0x500013).r("soundlatch4", FUNC(generic_latch_8_device::read));
map(0x500015, 0x500015).w(FUNC(toaplan2_state::batrider_soundlatch_w));
map(0x500017, 0x500017).w(FUNC(toaplan2_state::batrider_soundlatch2_w));
map(0x500018, 0x500019).r(FUNC(toaplan2_state::bbakraid_eeprom_r));
map(0x50001a, 0x50001b).w(FUNC(toaplan2_state::batrider_unknown_sound_w));
map(0x50001c, 0x50001d).w(FUNC(toaplan2_state::batrider_clear_sndirq_w));
map(0x50001f, 0x50001f).w(FUNC(toaplan2_state::bbakraid_eeprom_w));
map(0x500080, 0x500081).w(FUNC(toaplan2_state::batrider_textdata_dma_w));
map(0x500082, 0x500083).w(FUNC(toaplan2_state::batrider_pal_text_dma_w));
map(0x5000c0, 0x5000cf).w(FUNC(toaplan2_state::batrider_objectbank_w)).umask16(0x00ff);
}
void toaplan2_state::pipibibs_sound_z80_mem(address_map &map)
{
map(0x0000, 0x7fff).rom();
map(0x8000, 0x87ff).ram().share("shared_ram");
map(0xe000, 0xe001).rw("ymsnd", FUNC(ym3812_device::read), FUNC(ym3812_device::write));
}
void toaplan2_state::raizing_sound_z80_mem(address_map &map)
{
map(0x0000, 0xbfff).rom();
map(0xc000, 0xdfff).ram().share("shared_ram");
map(0xe000, 0xe001).rw("ymsnd", FUNC(ym2151_device::read), FUNC(ym2151_device::write));
map(0xe004, 0xe004).rw(m_oki[0], FUNC(okim6295_device::read), FUNC(okim6295_device::write));
map(0xe00e, 0xe00e).w(FUNC(toaplan2_state::coin_w));
}
void toaplan2_state::bgaregga_sound_z80_mem(address_map &map)
{
map(0x0000, 0x7fff).rom();
map(0x8000, 0xbfff).bankr("audiobank");
map(0xc000, 0xdfff).ram().share("shared_ram");
map(0xe000, 0xe001).rw("ymsnd", FUNC(ym2151_device::read), FUNC(ym2151_device::write));
map(0xe004, 0xe004).rw(m_oki[0], FUNC(okim6295_device::read), FUNC(okim6295_device::write));
map(0xe006, 0xe008).w(FUNC(toaplan2_state::raizing_oki_bankswitch_w));
map(0xe00a, 0xe00a).w(FUNC(toaplan2_state::raizing_z80_bankswitch_w));
map(0xe00c, 0xe00c).w(m_soundlatch, FUNC(generic_latch_8_device::acknowledge_w));
map(0xe01c, 0xe01c).r(m_soundlatch, FUNC(generic_latch_8_device::read));
map(0xe01d, 0xe01d).r(FUNC(toaplan2_state::bgaregga_E01D_r));
}
void toaplan2_state::batrider_sound_z80_mem(address_map &map)
{
map(0x0000, 0x7fff).rom();
map(0x8000, 0xbfff).bankr("audiobank");
map(0xc000, 0xdfff).ram();
}
void toaplan2_state::batrider_sound_z80_port(address_map &map)
{
map.global_mask(0xff);
map(0x40, 0x40).w("soundlatch3", FUNC(generic_latch_8_device::write));
map(0x42, 0x42).w("soundlatch4", FUNC(generic_latch_8_device::write));
map(0x44, 0x44).w(FUNC(toaplan2_state::batrider_sndirq_w));
map(0x46, 0x46).w(FUNC(toaplan2_state::batrider_clear_nmi_w));
map(0x48, 0x48).r(m_soundlatch, FUNC(generic_latch_8_device::read));
map(0x4a, 0x4a).r(m_soundlatch2, FUNC(generic_latch_8_device::read));
map(0x80, 0x81).rw("ymsnd", FUNC(ym2151_device::read), FUNC(ym2151_device::write));
map(0x82, 0x82).rw(m_oki[0], FUNC(okim6295_device::read), FUNC(okim6295_device::write));
map(0x84, 0x84).rw(m_oki[1], FUNC(okim6295_device::read), FUNC(okim6295_device::write));
map(0x88, 0x88).w(FUNC(toaplan2_state::raizing_z80_bankswitch_w));
map(0xc0, 0xc6).w(FUNC(toaplan2_state::raizing_oki_bankswitch_w));
}
void toaplan2_state::bbakraid_sound_z80_mem(address_map &map)
{
map(0x0000, 0xbfff).rom(); // No banking? ROM only contains code and data up to 0x28DC
map(0xc000, 0xffff).ram();
}
void toaplan2_state::bbakraid_sound_z80_port(address_map &map)
{
map.global_mask(0xff);
map(0x40, 0x40).w("soundlatch3", FUNC(generic_latch_8_device::write));
map(0x42, 0x42).w("soundlatch4", FUNC(generic_latch_8_device::write));
map(0x44, 0x44).w(FUNC(toaplan2_state::batrider_sndirq_w));
map(0x46, 0x46).w(FUNC(toaplan2_state::batrider_clear_nmi_w));
map(0x48, 0x48).r(m_soundlatch, FUNC(generic_latch_8_device::read));
map(0x4a, 0x4a).r(m_soundlatch2, FUNC(generic_latch_8_device::read));
map(0x80, 0x81).rw("ymz", FUNC(ymz280b_device::read), FUNC(ymz280b_device::write));
}
void toaplan2_state::v25_mem(address_map &map)
{
map(0x00000, 0x00001).rw("ymsnd", FUNC(ym2151_device::read), FUNC(ym2151_device::write));
map(0x00004, 0x00004).rw(m_oki[0], FUNC(okim6295_device::read), FUNC(okim6295_device::write));
map(0x80000, 0x87fff).mirror(0x78000).ram().share("shared_ram");
}
void toaplan2_state::kbash_v25_mem(address_map &map)
{
map(0x00000, 0x007ff).ram().share("shared_ram");
map(0x04000, 0x04001).rw("ymsnd", FUNC(ym2151_device::read), FUNC(ym2151_device::write));
map(0x04002, 0x04002).rw(m_oki[0], FUNC(okim6295_device::read), FUNC(okim6295_device::write));
map(0x80000, 0x87fff).mirror(0x78000).rom().region("audiocpu", 0);
}
void toaplan2_state::fixeight_v25_mem(address_map &map)
{
map(0x00000, 0x00000).portr("IN1");
map(0x00002, 0x00002).portr("IN2");
map(0x00004, 0x00004).portr("IN3");
map(0x0000a, 0x0000b).rw("ymsnd", FUNC(ym2151_device::read), FUNC(ym2151_device::write));
map(0x0000c, 0x0000c).rw(m_oki[0], FUNC(okim6295_device::read), FUNC(okim6295_device::write));
map(0x80000, 0x87fff).mirror(0x78000).ram().share("shared_ram");
}
void toaplan2_state::vfive_v25_mem(address_map &map)
{
map(0x00000, 0x00001).rw("ymsnd", FUNC(ym2151_device::read), FUNC(ym2151_device::write));
map(0x80000, 0x87fff).mirror(0x78000).ram().share("shared_ram");
}
void toaplan2_state::fixeightbl_oki(address_map &map)
{
map(0x00000, 0x2ffff).rom();
map(0x30000, 0x3ffff).bankr("okibank");
}
void toaplan2_state::enmadaio_oki(address_map &map)
{
map(0x00000, 0x3ffff).bankr("okibank");
}
// similar as NMK112, but GAL-driven; NOT actual NMK112 is present
template<unsigned Chip>
void toaplan2_state::raizing_oki(address_map &map)
{
map(0x00000, 0x000ff).bankr(m_raizing_okibank[Chip][0]);
map(0x00100, 0x001ff).bankr(m_raizing_okibank[Chip][1]);
map(0x00200, 0x002ff).bankr(m_raizing_okibank[Chip][2]);
map(0x00300, 0x003ff).bankr(m_raizing_okibank[Chip][3]);
map(0x00400, 0x0ffff).bankr(m_raizing_okibank[Chip][4]);
map(0x10000, 0x1ffff).bankr(m_raizing_okibank[Chip][5]);
map(0x20000, 0x2ffff).bankr(m_raizing_okibank[Chip][6]);
map(0x30000, 0x3ffff).bankr(m_raizing_okibank[Chip][7]);
}
u8 toaplan2_state::tekipaki_cmdavailable_r()
{
if (m_soundlatch->pending_r()) return 0xff;
else return 0x00;
};
void toaplan2_state::hd647180_io_map(address_map &map)
{
map.global_mask(0xff);
map(0x60, 0x60).nopr();
map(0x70, 0x75).nopw(); // DDRs are written with the wrong upper addresses!
map(0x84, 0x84).r(m_soundlatch, FUNC(generic_latch_8_device::read));
map(0x82, 0x82).rw("ymsnd", FUNC(ym3812_device::status_port_r), FUNC(ym3812_device::control_port_w));
map(0x83, 0x83).rw("ymsnd", FUNC(ym3812_device::read_port_r), FUNC(ym3812_device::write_port_w));
}
void toaplan2_state::ghox_hd647180_mem_map(address_map &map)
{
map(0x40000, 0x407ff).ram().share("shared_ram");
map(0x80002, 0x80002).portr("DSWA");
map(0x80004, 0x80004).portr("DSWB");
map(0x80006, 0x80006).nopr(); // nothing?
map(0x80008, 0x80008).portr("IN1");
map(0x8000a, 0x8000a).portr("IN2");
map(0x8000c, 0x8000e).portr("SYS");
map(0x8000e, 0x8000f).rw("ymsnd", FUNC(ym2151_device::read), FUNC(ym2151_device::write));
}
/*****************************************************************************
Input Port definitions
The following commands are available when the Invulnerability dipswitch
is set (or, in some games, also when the JAMMA Test switch is pressed):
P2 start : pause
P1 start : resume
Hold P1 start & P2 start : slow motion
In bgaregga, batrider and bbakraid, the commands are different:
Tap P1 start : pause/resume
Hold P1 start : slow motion
Additional per-game test features are as follows:
truxton2 - While playing in invulnerable mode, press button 3 to suicide.
fixeight - While playing in invulnerable mode, press button 3 to suicide
(player 1 and player 2 only)
batsugun - While playing in invulnerable mode, press the following buttons
to stage skip:
P2 button 3 & P2 button 1 : Skip to end of stage 1
P2 button 3 & P2 button 2 : Skip to end of stage 2
P2 button 3 : Skip to end of stage 3
sstriker - While playing in invulnerable mode as player 2, press
/kingdmgp P2 button 3 to skip to the end of the current stage.
bgaregga - Press and hold P1 button 1, P1 button 2 and P1 button 3 while
powering on in service mode to enter the special service mode.
"OPTIONS" and "PLAY DATAS" are added to the menu, and the
dipswitch display will show the region jumpers (normally hidden).
Choose "GAME MODE" from the special service mode to enter the
special game mode. In the special game mode, you can use pause
and slow motion even when not playing in invulnerable mode.
batrider - While playing in invulnerable mode, press P1 Start and P2 Start
to skip directly to the ending scene.
batrider - Press and hold P1 button 1, P1 button 2 and P1 button 3 while
/bbakraid powering on in service mode to enter the special service mode.
You can change the game's region by pressing left/right.
Choose "GAME MODE" from the special service mode to enter the
special game mode. In the special game mode, you can use pause
and slow motion even when not playing in invulnerable mode.
While the game is paused in special mode, press button 3 to
display debugging information.
*****************************************************************************/
static INPUT_PORTS_START( toaplan2_2b )
PORT_START("IN1")
TOAPLAN_JOY_UDLR_2_BUTTONS( 1 )
PORT_START("IN2")
TOAPLAN_JOY_UDLR_2_BUTTONS( 2 )
PORT_START("SYS")
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SERVICE1 )
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_TILT )
TOAPLAN_TEST_SWITCH( 0x04, IP_ACTIVE_HIGH )
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("DSWA")
TOAPLAN_MACHINE_NO_COCKTAIL_LOC(SW1)
// Coinage on bit mask 0x00f0
PORT_BIT( 0x00f0, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // Modified below
PORT_START("DSWB")
TOAPLAN_DIFFICULTY_LOC(SW2)
// Per-game features on bit mask 0x00fc
PORT_BIT( 0x00fc, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // Modified below
INPUT_PORTS_END
static INPUT_PORTS_START( toaplan2_3b )
PORT_INCLUDE( toaplan2_2b )
PORT_MODIFY("IN1")
TOAPLAN_JOY_UDLR_3_BUTTONS( 1 )
PORT_MODIFY("IN2")
TOAPLAN_JOY_UDLR_3_BUTTONS( 2 )
INPUT_PORTS_END
static INPUT_PORTS_START( tekipaki )
PORT_INCLUDE( toaplan2_2b )
PORT_MODIFY("DSWA")
// Various features on bit mask 0x000f - see above
TOAPLAN_COINAGE_DUAL_LOC( JMPR, 0x0f, 0x02, SW1 )
PORT_MODIFY("DSWB")
// Difficulty on bit mask 0x0003 - see above
// "Stop Mode" corresponds to "Invulnerability" in the other games
// (i.e. it enables pause and slow motion)
PORT_DIPNAME( 0x0004, 0x0000, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW2:!3")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0004, DEF_STR( On ) )
PORT_DIPNAME( 0x0008, 0x0000, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW2:!4")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0008, DEF_STR( On ) )
PORT_DIPNAME( 0x0010, 0x0000, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW2:!5")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0010, DEF_STR( On ) )
PORT_DIPNAME( 0x0020, 0x0000, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW2:!6")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0020, DEF_STR( On ) )
PORT_DIPNAME( 0x0040, 0x0000, "Stop Mode (Cheat)" ) PORT_DIPLOCATION("SW2:!7")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0040, DEF_STR( On ) )
PORT_DIPNAME( 0x0080, 0x0000, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW2:!8")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0080, DEF_STR( On ) )
PORT_START("JMPR")
PORT_CONFNAME( 0x000f, 0x0002, DEF_STR( Region ) ) PORT_DIPLOCATION("JP:!4,!3,!2,!1")
PORT_CONFSETTING( 0x0002, DEF_STR( Europe ) )
PORT_CONFSETTING( 0x0001, DEF_STR( USA ) )
PORT_CONFSETTING( 0x0000, DEF_STR( Japan ) )
PORT_CONFSETTING( 0x0003, DEF_STR( Hong_Kong ) )
PORT_CONFSETTING( 0x0004, DEF_STR( Korea ) )
PORT_CONFSETTING( 0x0005, DEF_STR( Taiwan ) )
PORT_CONFSETTING( 0x0006, "Taiwan (Spacy Co., Ltd." )
PORT_CONFSETTING( 0x0007, "USA (Romstar, Inc.)" )
PORT_CONFSETTING( 0x0008, "Hong Kong (Honest Trading Co.)" )
// PORT_CONFSETTING( 0x0009, DEF_STR( Japan ) ) // English title screen
// PORT_CONFSETTING( 0x000a, DEF_STR( Japan ) )
// PORT_CONFSETTING( 0x000b, DEF_STR( Japan ) )
// PORT_CONFSETTING( 0x000c, DEF_STR( Japan ) )
// PORT_CONFSETTING( 0x000d, DEF_STR( Japan ) )
// PORT_CONFSETTING( 0x000e, DEF_STR( Japan ) )
PORT_CONFSETTING( 0x000f, "Japan (Distributed by Tecmo)" )
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(toaplan2_state, c2map_r)
INPUT_PORTS_END
static INPUT_PORTS_START( ghox )
PORT_INCLUDE( toaplan2_2b )
PORT_MODIFY("DSWA")
// Various features on bit mask 0x000f - see above
TOAPLAN_COINAGE_DUAL_LOC( JMPR, 0x80000, 0x80000, SW1 )
PORT_MODIFY("DSWB")
// Difficulty on bit mask 0x0003 - see above
// "Debug Mode" corresponds to "Invulnerability" in the other games
// (i.e. it enables pause and slow motion)
PORT_DIPNAME( 0x000c, 0x0000, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:!3,!4")
PORT_DIPSETTING( 0x000c, DEF_STR( None ) )
PORT_DIPSETTING( 0x0008, "100k only" )
PORT_DIPSETTING( 0x0004, "100k and 300k" )
PORT_DIPSETTING( 0x0000, "100k and every 200k" )
PORT_DIPNAME( 0x0030, 0x0000, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:!5,!6")
PORT_DIPSETTING( 0x0030, "1" )
PORT_DIPSETTING( 0x0020, "2" )
PORT_DIPSETTING( 0x0000, "3" )
PORT_DIPSETTING( 0x0010, "5" )
PORT_DIPNAME( 0x0040, 0x0000, "Debug Mode (Cheat)" ) PORT_DIPLOCATION("SW2:!7")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0040, DEF_STR( On ) )
PORT_DIPNAME( 0x0080, 0x0000, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW2:!8")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0080, DEF_STR( On ) )
PORT_START("JMPR")
// Bit Mask 0x80000 is used here to signify European Coinage for MAME purposes - not read on the real board!
PORT_CONFNAME( 0x8000f, 0x80002, DEF_STR( Region ) ) //PORT_CONFLOCATION("JP:!4,!3,!2,!1,FAKE:!1")
PORT_CONFSETTING( 0x80002, DEF_STR( Europe ) )
PORT_CONFSETTING( 0x00001, DEF_STR( USA ) )
PORT_CONFSETTING( 0x00000, DEF_STR( Japan ) )
PORT_CONFSETTING( 0x00003, "Hong Kong (Honest Trading Co.)" )
PORT_CONFSETTING( 0x00004, DEF_STR( Korea ) )
PORT_CONFSETTING( 0x00005, DEF_STR( Taiwan ) )
PORT_CONFSETTING( 0x80006, "Spain & Portugal (APM Electronics S.A.)" )
PORT_CONFSETTING( 0x80007, "Italy (Star Electronica SRL)" )
PORT_CONFSETTING( 0x80008, "UK (JP Leisure Limited)" )
PORT_CONFSETTING( 0x00009, "USA (Romstar, Inc.)" )
PORT_CONFSETTING( 0x8000a, "Europe (Nova Apparate GMBH & Co.)" )
PORT_CONFSETTING( 0x0000b, "USA (Taito America Corporation)" )
PORT_CONFSETTING( 0x0000c, "USA (Taito Corporation Japan)" )
PORT_CONFSETTING( 0x8000d, "Europe (Taito Corporation Japan)" )
PORT_CONFSETTING( 0x0000e, "Japan (Licensed to [blank])" ) // English title screen
PORT_CONFSETTING( 0x0000f, "Japan (Taito Corporation)" )
PORT_START("PAD1") /* Paddle 1 (left-right) read at $100000 */
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1)
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // Unknown/Unused
PORT_START("PAD2") /* Paddle 2 (left-right) read at $040000 */
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(2)
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // Unknown/Unused
INPUT_PORTS_END
static INPUT_PORTS_START( ghoxjo )
PORT_INCLUDE( ghox )
PORT_MODIFY("JMPR")
// Bit Mask 0x80000 is used here to signify European Coinage for MAME purposes - not read on the real board!
PORT_CONFNAME( 0x8000f, 0x80002, DEF_STR( Region ) ) //PORT_CONFLOCATION("JP:!4,!3,!2,!1,FAKE:!1")
PORT_CONFSETTING( 0x80002, DEF_STR( Europe ) )
PORT_CONFSETTING( 0x00001, DEF_STR( USA ) )
PORT_CONFSETTING( 0x00000, DEF_STR( Japan ) )
PORT_CONFSETTING( 0x00003, "Hong Kong (Honest Trading Co.)" )
PORT_CONFSETTING( 0x00004, DEF_STR( Korea ) )
PORT_CONFSETTING( 0x00005, DEF_STR( Taiwan ) )
PORT_CONFSETTING( 0x80006, "Spain & Portugal (APM Electronics S.A.)" )
PORT_CONFSETTING( 0x80007, "Italy (Star Electronica SRL)" )
PORT_CONFSETTING( 0x80008, "UK (JP Leisure Limited)" )
PORT_CONFSETTING( 0x00009, "USA (Romstar, Inc.)" )
PORT_CONFSETTING( 0x8000a, "Europe (Nova Apparate GMBH & Co.)" )
PORT_CONFSETTING( 0x0000b, "Japan (Unused) [b]" )
PORT_CONFSETTING( 0x0000c, "Japan (Unused) [c]" )
PORT_CONFSETTING( 0x0000d, "Japan (Unused) [d]" )
PORT_CONFSETTING( 0x0000e, "Japan (Unused) [e]" )
PORT_CONFSETTING( 0x0000f, "Japan (Unused) [f]" )
INPUT_PORTS_END
static INPUT_PORTS_START( dogyuun )
PORT_INCLUDE( toaplan2_3b )
PORT_MODIFY("DSWA")
PORT_DIPNAME( 0x0001, 0x0000, DEF_STR( Free_Play) ) PORT_DIPLOCATION("SW1:!1")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0001, DEF_STR( On ) )
// Various features on bit mask 0x000e - see above
TOAPLAN_COINAGE_DUAL_LOC( JMPR, 0x8000, 0x8000, SW1 )
PORT_MODIFY("DSWB")
// Difficulty on bit mask 0x0003 - see above
PORT_DIPNAME( 0x000c, 0x0000, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:!3,!4")
PORT_DIPSETTING( 0x000c, DEF_STR( None ) )
PORT_DIPSETTING( 0x0008, "400k only" )
PORT_DIPSETTING( 0x0000, "200k only" )
PORT_DIPSETTING( 0x0004, "200k, 400k and 600k" )
PORT_DIPNAME( 0x0030, 0x0000, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:!5,!6")
PORT_DIPSETTING( 0x0030, "1" )
PORT_DIPSETTING( 0x0020, "2" )
PORT_DIPSETTING( 0x0000, "3" )
PORT_DIPSETTING( 0x0010, "5" )
PORT_DIPNAME( 0x0040, 0x0000, "Invulnerability (Cheat)" ) PORT_DIPLOCATION("SW2:!7")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0040, DEF_STR( On ) )
PORT_DIPNAME( 0x0080, 0x0000, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW2:!8")
PORT_DIPSETTING( 0x0080, DEF_STR( No ) )
PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) )
PORT_START("JMPR")
// Bit Mask 0x8000 is used here to signify European Coinage for MAME purposes - not read on the real board!
// "No speedups": all speedup items in game are replaced with bombs
PORT_CONFNAME( 0x80f0, 0x8030, DEF_STR( Region ) ) //PORT_CONFLOCATION("JP:!4,!3,!2,!1,FAKE:!1")
PORT_CONFSETTING( 0x8030, DEF_STR( Europe ) )
PORT_CONFSETTING( 0x0010, DEF_STR( USA ) )
PORT_CONFSETTING( 0x0020, "USA (Atari Games Corp.)" )
PORT_CONFSETTING( 0x0000, DEF_STR( Japan ) )
PORT_CONFSETTING( 0x0040, "Hong Kong (Charterfield); no speedups" )
PORT_CONFSETTING( 0x0050, "Korea (Unite Trading); no speedups" )
PORT_CONFSETTING( 0x0060, "Taiwan; no speedups" )
PORT_CONFSETTING( 0x0070, "USA; no speedups" )
PORT_CONFSETTING( 0x0080, "Southeast Asia (Charterfield); no speedups" )
PORT_CONFSETTING( 0x0090, "Hong Kong (Charterfield)" )
PORT_CONFSETTING( 0x00a0, "Korea (Unite Trading)" )
PORT_CONFSETTING( 0x00b0, DEF_STR( Taiwan ) )
PORT_CONFSETTING( 0x00c0, "USA (Atari Games Corp.); no speedups" )
PORT_CONFSETTING( 0x00d0, "Southeast Asia (Charterfield)" )
PORT_CONFSETTING( 0x80e0, "Europe; no speedups" )
PORT_CONFSETTING( 0x00f0, "Japan (Taito Corp.)" )
INPUT_PORTS_END
static INPUT_PORTS_START( dogyuuna )
PORT_INCLUDE( dogyuun )
PORT_MODIFY("DSWA")
TOAPLAN_COINAGE_DUAL_LOC( JMPR, 0xf0, 0x30, SW1 )
PORT_MODIFY("JMPR")
// "No speedups": all speedup items in game are replaced with bombs
PORT_CONFNAME( 0x00f0, 0x0030, DEF_STR( Region ) ) //PORT_CONFLOCATION("JP:!4,!3,!2,!1")
PORT_CONFSETTING( 0x0030, DEF_STR( Europe ) )
PORT_CONFSETTING( 0x0010, DEF_STR( USA ) )
PORT_CONFSETTING( 0x0020, "USA (Atari Games Corp.)" )
PORT_CONFSETTING( 0x0000, DEF_STR( Japan ) )
PORT_CONFSETTING( 0x0040, "Hong Kong (Charterfield); no speedups" )
PORT_CONFSETTING( 0x0050, "Korea (Unite Trading); no speedups" )
PORT_CONFSETTING( 0x0060, "Taiwan; no speedups" )
// PORT_CONFSETTING( 0x0070, "Taiwan (Licensed to ???????); no speedups" )
PORT_CONFSETTING( 0x0080, "Southeast Asia (Charterfield); no speedups" )
PORT_CONFSETTING( 0x0090, "Hong Kong (Charterfield)" )
PORT_CONFSETTING( 0x00a0, "Korea (Unite Trading)" )
PORT_CONFSETTING( 0x00b0, DEF_STR( Taiwan ) )
// PORT_CONFSETTING( 0x00c0, "Taiwan (Licensed to ???????)" )
PORT_CONFSETTING( 0x00d0, "Southeast Asia (Charterfield)" )
// PORT_CONFSETTING( 0x00e0, DEF_STR( Unused ) )
PORT_CONFSETTING( 0x00f0, "Japan (Taito Corp.)" )
INPUT_PORTS_END
static INPUT_PORTS_START( dogyuunt )
PORT_INCLUDE( dogyuun )
PORT_MODIFY("DSWA")
TOAPLAN_COINAGE_DUAL_LOC( JMPR, 0xf0, 0x20, SW1 )
PORT_MODIFY("JMPR")
PORT_CONFNAME( 0x00f0, 0x0020, DEF_STR( Region ) ) //PORT_CONFLOCATION("JP:!4,!3,!2,!1")
PORT_CONFSETTING( 0x0020, DEF_STR( Europe ) )
PORT_CONFSETTING( 0x0010, DEF_STR( USA ) )
PORT_CONFSETTING( 0x0000, DEF_STR( Japan ) )
PORT_CONFSETTING( 0x0030, DEF_STR( Hong_Kong ) )
PORT_CONFSETTING( 0x0040, DEF_STR( Korea ) )
PORT_CONFSETTING( 0x0050, DEF_STR( Taiwan ) )
PORT_CONFSETTING( 0x0060, "Southeast Asia (Charterfield)" )
PORT_CONFSETTING( 0x0070, "USA (Romstar, Inc.)" )
PORT_CONFSETTING( 0x0080, "Hong Kong (Honest Trading Co.)" )
PORT_CONFSETTING( 0x0090, "Korea (JC Trading Corp.)" )
PORT_CONFSETTING( 0x00a0, "USA (Fabtek)" )
// PORT_CONFSETTING( 0x00b0, DEF_STR( Unused ) )
// PORT_CONFSETTING( 0x00c0, DEF_STR( Unused ) )
// PORT_CONFSETTING( 0x00d0, DEF_STR( Unused ) )
// PORT_CONFSETTING( 0x00e0, DEF_STR( Unused ) )
PORT_CONFSETTING( 0x00f0, "Japan (Taito Corp.)" )
INPUT_PORTS_END
static INPUT_PORTS_START( kbash )
PORT_INCLUDE( toaplan2_3b )
PORT_MODIFY("DSWA")
PORT_DIPNAME( 0x0001, 0x0000, DEF_STR( Continue_Price ) ) PORT_DIPLOCATION("SW1:!1")
PORT_DIPSETTING( 0x0000, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x0001, "Discount" )
// Various features on bit mask 0x000e - see above
TOAPLAN_COINAGE_DUAL_LOC( JMPR, 0x70, 0x20, SW1 )
PORT_MODIFY("DSWB")
// Difficulty on bit mask 0x0003 - see above
PORT_DIPNAME( 0x000c, 0x0000, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:!3,!4")
PORT_DIPSETTING( 0x000c, DEF_STR( None ) )
PORT_DIPSETTING( 0x0008, "200k only" )
PORT_DIPSETTING( 0x0004, "100k only" )
PORT_DIPSETTING( 0x0000, "100k and 400k" )
PORT_DIPNAME( 0x0030, 0x0000, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:!5,!6")
PORT_DIPSETTING( 0x0030, "1" )
PORT_DIPSETTING( 0x0000, "2" )
PORT_DIPSETTING( 0x0020, "3" )
PORT_DIPSETTING( 0x0010, "4" )
PORT_DIPNAME( 0x0040, 0x0000, "Invulnerability (Cheat)" ) PORT_DIPLOCATION("SW2:!7")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0040, DEF_STR( On ) )
PORT_DIPNAME( 0x0080, 0x0000, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW2:!8")
PORT_DIPSETTING( 0x0080, DEF_STR( No ) )
PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) )
PORT_START("JMPR")
PORT_CONFNAME( 0x00f0, 0x0020, DEF_STR( Region ) ) //PORT_CONFLOCATION("JP:!4,!3,!2,!1")
PORT_CONFSETTING( 0x0020, "Europe, USA (Atari Games)" ) // European coinage
PORT_CONFSETTING( 0x0010, "USA, Europe (Atari Games)" )
PORT_CONFSETTING( 0x0000, DEF_STR( Japan ) )
PORT_CONFSETTING( 0x0030, DEF_STR( Korea ) )
PORT_CONFSETTING( 0x0040, DEF_STR( Hong_Kong ) )
PORT_CONFSETTING( 0x0050, DEF_STR( Taiwan ) )
PORT_CONFSETTING( 0x0060, DEF_STR( Southeast_Asia ) ) // Service Mode wrongly shows European coinage
// PORT_CONFSETTING( 0x0070, DEF_STR( Unused ) )
// PORT_CONFSETTING( 0x0080, DEF_STR( Unused ) )
PORT_CONFSETTING( 0x0090, DEF_STR( USA ) )
PORT_CONFSETTING( 0x00a0, DEF_STR( Europe ) ) // European coinage
// PORT_CONFSETTING( 0x00b0, DEF_STR( Unused ) )
// PORT_CONFSETTING( 0x00c0, DEF_STR( Unused ) )
// PORT_CONFSETTING( 0x00d0, DEF_STR( Unused ) )
// PORT_CONFSETTING( 0x00e0, DEF_STR( Unused ) ) // Service Mode wrongly shows European coinage
// PORT_CONFSETTING( 0x00f0, DEF_STR( Unused ) )
INPUT_PORTS_END
static INPUT_PORTS_START( kbashk )
PORT_INCLUDE( kbash )
PORT_MODIFY("JMPR")
PORT_CONFNAME( 0x00f0, 0x0000, DEF_STR( Region ) ) //PORT_CONFLOCATION("JP:!4,!3,!2,!1")
PORT_CONFSETTING( 0x0000, "Japan (Taito license)" ) // Taito license
PORT_CONFSETTING( 0x0010, DEF_STR( Unused ) )
PORT_CONFSETTING( 0x0020, DEF_STR( Unused ) )
PORT_CONFSETTING( 0x0030, DEF_STR( Korea ) )
PORT_CONFSETTING( 0x0040, DEF_STR( Hong_Kong ) )
PORT_CONFSETTING( 0x0050, DEF_STR( Taiwan ) )
PORT_CONFSETTING( 0x0060, DEF_STR( Southeast_Asia ) )
PORT_CONFSETTING( 0x0070, DEF_STR( Unused ) )
PORT_CONFSETTING( 0x0080, DEF_STR( Japan ) ) // no Taito license
PORT_CONFSETTING( 0x0090, DEF_STR( Unused ) )
PORT_CONFSETTING( 0x00a0, DEF_STR( Unused ) )
PORT_CONFSETTING( 0x00b0, DEF_STR( Korea ) )
PORT_CONFSETTING( 0x00c0, DEF_STR( Hong_Kong ))
PORT_CONFSETTING( 0x00d0, DEF_STR( Taiwan ))
PORT_CONFSETTING( 0x00e0, DEF_STR( Southeast_Asia ))
PORT_CONFSETTING( 0x00f0, DEF_STR( Unused ) )
INPUT_PORTS_END
static INPUT_PORTS_START( kbash2 )
PORT_INCLUDE( kbash )
PORT_MODIFY("DSWA")
TOAPLAN_COINAGE_DUAL_LOC( JMPR, 0x07, 0x02, SW1 )
PORT_MODIFY("JMPR")
PORT_CONFNAME( 0x000f, 0x0006, DEF_STR( Region ) ) //PORT_CONFLOCATION("JP:!4,!3,!2,!1")
PORT_CONFSETTING( 0x0000, "Japan (Taito Corp.)" )
// PORT_CONFSETTING( 0x0001, DEF_STR( Unused ) )
// PORT_CONFSETTING( 0x0002, DEF_STR( Unused ) ) // European coinage
PORT_CONFSETTING( 0x0003, "Korea (Unite Trading)" )
PORT_CONFSETTING( 0x0004, DEF_STR( Hong_Kong ) )
PORT_CONFSETTING( 0x0005, DEF_STR( Taiwan ) )
PORT_CONFSETTING( 0x0006, "Southeast Asia (Charterfield)" ) // Service Mode wrongly shows European coinage
// PORT_CONFSETTING( 0x0007, DEF_STR( Unused ) )
PORT_CONFSETTING( 0x0008, DEF_STR( Japan ) )
// PORT_CONFSETTING( 0x0009, DEF_STR( Unused ) )
// PORT_CONFSETTING( 0x000a, DEF_STR( Unused ) ) // European coinage
PORT_CONFSETTING( 0x000b, DEF_STR( Korea ) )
// PORT_CONFSETTING( 0x000c, DEF_STR( Hong_Kong ) )
// PORT_CONFSETTING( 0x000d, DEF_STR( Taiwan ) )
PORT_CONFSETTING( 0x000e, DEF_STR( Southeast_Asia ) ) // Service Mode wrongly shows European coinage
// PORT_CONFSETTING( 0x000f, DEF_STR( Unused ) )
PORT_BIT( 0x00f0, IP_ACTIVE_HIGH, IPT_UNKNOWN )
INPUT_PORTS_END
static INPUT_PORTS_START( truxton2 )
PORT_INCLUDE( toaplan2_3b )
PORT_MODIFY("IN1")
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Fast Scrolling (Cheat)")
PORT_MODIFY("DSWA")
PORT_DIPNAME( 0x0001, 0x0000, "Rapid Fire" ) PORT_DIPLOCATION("SW1:!1")
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
// Various features on bit mask 0x000e - see above
TOAPLAN_COINAGE_DUAL_LOC( JMPR, 0x0f, 0x02, SW1 )
PORT_MODIFY("DSWB")
// Difficulty on bit mask 0x0003 - see above
PORT_DIPNAME( 0x000c, 0x0000, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:!3,!4")
PORT_DIPSETTING( 0x000c, "200k only" )
PORT_DIPSETTING( 0x0008, "100k only" )
PORT_DIPSETTING( 0x0004, "100k and 250k" )
PORT_DIPSETTING( 0x0000, "70k and 200k" )
PORT_DIPNAME( 0x0030, 0x0000, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:!5,!6")
PORT_DIPSETTING( 0x0030, "2" )
PORT_DIPSETTING( 0x0000, "3" )
PORT_DIPSETTING( 0x0020, "4" )
PORT_DIPSETTING( 0x0010, "5" )
PORT_DIPNAME( 0x0040, 0x0000, "Invulnerability (Cheat)" ) PORT_DIPLOCATION("SW2:!7")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0040, DEF_STR( On ) )
PORT_DIPNAME( 0x0080, 0x0000, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW2:!8")
PORT_DIPSETTING( 0x0080, DEF_STR( No ) )
PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) )
PORT_START("JMPR")
PORT_CONFNAME( 0x000f, 0x0002, DEF_STR( Region ) ) //PORT_CONFLOCATION("JP:!4,!3,!2,!1")
PORT_CONFSETTING( 0x0002, DEF_STR( Europe ) )
PORT_CONFSETTING( 0x0001, DEF_STR( USA ) )
PORT_CONFSETTING( 0x0000, DEF_STR( Japan ) )
PORT_CONFSETTING( 0x0003, DEF_STR( Hong_Kong ) )
PORT_CONFSETTING( 0x0004, DEF_STR( Korea ) )
PORT_CONFSETTING( 0x0005, DEF_STR( Taiwan ) )
PORT_CONFSETTING( 0x0006, "Southeast Asia (Charterfield)" )
PORT_CONFSETTING( 0x0007, "USA (Romstar, Inc.)" )
PORT_CONFSETTING( 0x0008, "Hong Kong (Honest Trading Co.)" )
PORT_CONFSETTING( 0x0009, "Korea (JC Trading Corp.)" )
PORT_CONFSETTING( 0x000a, "USA (Fabtek)" )
// PORT_CONFSETTING( 0x000b, DEF_STR( Unused ) )
// PORT_CONFSETTING( 0x000c, DEF_STR( Unused ) )
// PORT_CONFSETTING( 0x000d, DEF_STR( Unused ) )
// PORT_CONFSETTING( 0x000e, DEF_STR( Unused ) )
PORT_CONFSETTING( 0x000f, "Japan (Taito Corp.)" )
INPUT_PORTS_END
static INPUT_PORTS_START( pipibibs )
PORT_INCLUDE( toaplan2_2b )
PORT_MODIFY("DSWA")
// Various features on bit mask 0x000f - see above
TOAPLAN_COINAGE_DUAL_LOC( JMPR, 0x06, 0x06, SW1 )
PORT_MODIFY("DSWB")
// Difficulty on bit mask 0x0003 - see above
PORT_DIPNAME( 0x000c, 0x0000, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:!3,!4")
PORT_DIPSETTING( 0x000c, DEF_STR( None ) )
PORT_DIPSETTING( 0x0008, "200k only" )
PORT_DIPSETTING( 0x0000, "200k and every 300k" )
PORT_DIPSETTING( 0x0004, "150k and every 200k" )
PORT_DIPNAME( 0x0030, 0x0000, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:!5,!6")
PORT_DIPSETTING( 0x0030, "1" )
PORT_DIPSETTING( 0x0020, "2" )
PORT_DIPSETTING( 0x0000, "3" )
PORT_DIPSETTING( 0x0010, "5" )
PORT_DIPNAME( 0x0040, 0x0000, "Invulnerability (Cheat)" ) PORT_DIPLOCATION("SW2:!7")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0040, DEF_STR( On ) )
PORT_DIPNAME( 0x0080, 0x0000, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW2:!8")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0080, DEF_STR( On ) )
PORT_START("JMPR")
PORT_CONFNAME( 0x0008, 0x0000, "Nudity" ) //PORT_CONFLOCATION("JP:!1")
PORT_CONFSETTING( 0x0008, DEF_STR( Low ) )
PORT_CONFSETTING( 0x0000, "High, but censored" )
PORT_CONFNAME( 0x0007, 0x0006, DEF_STR( Region ) ) //PORT_CONFLOCATION("JP:!4,!3,!2")
PORT_CONFSETTING( 0x0006, DEF_STR( Europe ) )
PORT_CONFSETTING( 0x0004, DEF_STR( USA ) )
PORT_CONFSETTING( 0x0000, DEF_STR( Japan ) )
PORT_CONFSETTING( 0x0001, DEF_STR( Asia ) )
PORT_CONFSETTING( 0x0002, "Hong Kong (Honest Trading Co.)" )
PORT_CONFSETTING( 0x0003, DEF_STR( Taiwan ) )
PORT_CONFSETTING( 0x0005, "USA (Romstar, Inc.)" )
PORT_CONFSETTING( 0x0007, "Europe (Nova Apparate GMBH & Co.)" )
INPUT_PORTS_END
static INPUT_PORTS_START( pipibibsp )
PORT_INCLUDE( pipibibs )
PORT_MODIFY("DSWA")
// Various features on bit mask 0x000d - see above
TOAPLAN_COINAGE_DUAL_LOC( JMPR, 0x80000, 0x80000, SW1 )
PORT_MODIFY("JMPR")
// Bit Mask 0x80000 is used here to signify European Coinage for MAME purposes - not read on the real board!
PORT_CONFNAME( 0x80007, 0x00002, DEF_STR( Region ) ) //PORT_CONFLOCATION("JP:!4,!3,!2,FAKE:!1")
PORT_CONFSETTING( 0x00002, DEF_STR( World ) )
PORT_CONFSETTING( 0x80005, DEF_STR( Europe ) )
PORT_CONFSETTING( 0x00004, DEF_STR( USA ) )
PORT_CONFSETTING( 0x00000, "Japan (Ryouta Kikaku)" )
PORT_CONFSETTING( 0x00001, "Hong Kong (Honest Trading Co.)" )
PORT_CONFSETTING( 0x80006, "Spain & Portugal (APM Electronics S.A.)" )
PORT_CONFSETTING( 0x00007, "World (Ryouta Kikaku)" )
INPUT_PORTS_END
static INPUT_PORTS_START( whoopee )
PORT_INCLUDE( pipibibs )
PORT_MODIFY("JMPR")
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(toaplan2_state, c2map_r) // bit 0x10 sound ready
INPUT_PORTS_END
static INPUT_PORTS_START( pipibibsbl )
PORT_INCLUDE( pipibibs )
PORT_MODIFY("DSWA")
PORT_DIPNAME( 0x0002, 0x0000, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:!2") // In Test Mode, it shows as Normal/Invert Screen - HW doesn't support it
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0002, DEF_STR( On ) )
// Various features on bit mask 0x000d - see above
TOAPLAN_COINAGE_DUAL_LOC( JMPR, 0x80000, 0x80000, SW1 )
PORT_MODIFY("JMPR")
// Bit Mask 0x80000 is used here to signify European Coinage for MAME purposes - not read on the real board!
PORT_CONFNAME( 0x80007, 0x00002, DEF_STR( Region ) ) //PORT_CONFLOCATION("JP:!4,!3,!2,FAKE:!1")
PORT_CONFSETTING( 0x00002, DEF_STR( World ) )
PORT_CONFSETTING( 0x80005, DEF_STR( Europe ) )
PORT_CONFSETTING( 0x00004, DEF_STR( USA ) )
PORT_CONFSETTING( 0x00000, "Japan (Ryouta Kikaku)" )
PORT_CONFSETTING( 0x00001, "Hong Kong (Honest Trading Co.)" )
PORT_CONFSETTING( 0x80006, "Spain & Portugal (APM Electronics S.A.)" )
PORT_CONFSETTING( 0x00007, "World (Ryouta Kikaku)" )
INPUT_PORTS_END
static INPUT_PORTS_START( fixeight )
// The Suicide buttons are technically P1 and P2 Button 3, but we hook
// them up as IPT_OTHER so each player has the same number of buttons.
PORT_START("IN1")
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_8WAY
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_8WAY
PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_8WAY
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_8WAY
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1)
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P1 Suicide (Cheat)")
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // Unknown/Unused
PORT_START("IN2")
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_8WAY
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_8WAY
PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_8WAY
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_8WAY
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P2 Suicide (Cheat)")
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // Unknown/Unused
PORT_START("IN3")
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(3) PORT_8WAY
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(3) PORT_8WAY
PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(3) PORT_8WAY
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(3) PORT_8WAY
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(3)
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(3)
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_START3 )
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_MEMORY_RESET ) PORT_NAME("Region Reset")
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // Unknown/Unused
PORT_START("SYS")
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_COIN3 )
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_TILT )
PORT_SERVICE_NO_TOGGLE(0x0004, IP_ACTIVE_HIGH) // Service input is a pushbutton marked 'Test SW'
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // Unknown/Unused
PORT_START("EEPROM")
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, cs_write)
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, clk_write)
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, di_write)
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
INPUT_PORTS_END
static INPUT_PORTS_START( fixeightbl )
PORT_INCLUDE( toaplan2_2b )
PORT_MODIFY("SYS")
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_COIN3 )
PORT_SERVICE_NO_TOGGLE(0x0004, IP_ACTIVE_HIGH) // Service input is a pushbutton marked 'Test SW'
PORT_START("IN3")
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(3) PORT_8WAY
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(3) PORT_8WAY
PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(3) PORT_8WAY
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(3) PORT_8WAY
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(3)
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(3)
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_START3 )
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // Unknown/Unused
PORT_MODIFY("DSWA")
PORT_DIPNAME( 0x0001, 0x0000, "Maximum Players" ) PORT_DIPLOCATION("SW1:!1")
PORT_DIPSETTING( 0x0000, "2" )
PORT_DIPSETTING( 0x0001, "3" )
PORT_DIPNAME( 0x0002, 0x0000, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:!2") // This video HW doesn't support flip screen
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0002, DEF_STR( On ) )
PORT_DIPNAME( 0x0004, 0x0004, "Shooting Style" ) PORT_DIPLOCATION("SW1:!3")
PORT_DIPSETTING( 0x0004, "Semi-Auto" )
PORT_DIPSETTING( 0x0000, "Full-Auto" )
// Various features on bit mask 0x0008 - see above
TOAPLAN_COINAGE_JAPAN_LOC(SW1)
PORT_MODIFY("DSWB")
// Difficulty on bit mask 0x0003 - see above
PORT_DIPNAME( 0x000c, 0x0000, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:!3,!4")
PORT_DIPSETTING( 0x000c, DEF_STR( None ) )
PORT_DIPSETTING( 0x0000, "500k and every 500k" )
PORT_DIPSETTING( 0x0008, "300k only" )
PORT_DIPSETTING( 0x0004, "300k and every 300k" )
PORT_DIPNAME( 0x0030, 0x0000, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:!5,!6")
PORT_DIPSETTING( 0x0030, "1" )
PORT_DIPSETTING( 0x0020, "2" )
PORT_DIPSETTING( 0x0000, "3" )
PORT_DIPSETTING( 0x0010, "5" )
PORT_DIPNAME( 0x0040, 0x0000, "Invulnerability (Cheat)" ) PORT_DIPLOCATION("SW2:!7")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0040, DEF_STR( On ) )
PORT_DIPNAME( 0x0080, 0x0000, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW2:!8")
PORT_DIPSETTING( 0x0080, DEF_STR( No ) )
PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) )
INPUT_PORTS_END
static INPUT_PORTS_START( grindstm )
PORT_INCLUDE( toaplan2_2b )
PORT_MODIFY("DSWA")
PORT_DIPNAME( 0x0001, 0x0000, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:!1")
PORT_DIPSETTING( 0x0000, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x0001, DEF_STR( Cocktail ) )
// Various features on bit mask 0x000e - see above
TOAPLAN_COINAGE_DUAL_LOC( JMPR, 0xe0, 0x80, SW1 )
PORT_MODIFY("DSWB")
// Difficulty on bit mask 0x0003 - see above
PORT_DIPNAME( 0x000c, 0x0000, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:!3,!4")
PORT_DIPSETTING( 0x000c, DEF_STR( None ) )
PORT_DIPSETTING( 0x0008, "200k only" )
PORT_DIPSETTING( 0x0000, "300k and 800k" )
PORT_DIPSETTING( 0x0004, "300k and every 800k" )
PORT_DIPNAME( 0x0030, 0x0000, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:!5,!6")
PORT_DIPSETTING( 0x0030, "1" )
PORT_DIPSETTING( 0x0020, "2" )
PORT_DIPSETTING( 0x0000, "3" )
PORT_DIPSETTING( 0x0010, "5" )
PORT_DIPNAME( 0x0040, 0x0000, "Invulnerability (Cheat)" ) PORT_DIPLOCATION("SW2:!7")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0040, DEF_STR( On ) )
PORT_DIPNAME( 0x0080, 0x0000, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW2:!8")
PORT_DIPSETTING( 0x0080, DEF_STR( No ) )
PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) )
PORT_START("JMPR")
// Code in many places in game tests if region is >= 0xC. Effects on gameplay?
PORT_CONFNAME( 0x00f0, 0x0090, DEF_STR( Region ) ) //PORT_CONFLOCATION("JP:!4,!3,!2,!1")
PORT_CONFSETTING( 0x0090, DEF_STR( Europe ) )
// PORT_CONFSETTING( 0x0080, DEF_STR( Europe ) )
PORT_CONFSETTING( 0x00b0, DEF_STR( USA ) )
PORT_CONFSETTING( 0x00a0, "USA (American Sammy Corporation)" )
PORT_CONFSETTING( 0x0070, DEF_STR( Southeast_Asia ) )
PORT_CONFSETTING( 0x0060, "Southeast Asia (Charterfield)" )
PORT_CONFSETTING( 0x0050, DEF_STR( Taiwan ) )
PORT_CONFSETTING( 0x0040, "Taiwan (Anomoto International Inc.)" )
PORT_CONFSETTING( 0x0030, DEF_STR( Hong_Kong ) )
PORT_CONFSETTING( 0x0020, "Hong Kong (Charterfield)" )
PORT_CONFSETTING( 0x0010, DEF_STR( Korea ) )
PORT_CONFSETTING( 0x0000, "Korea (Unite Trading)" )
PORT_CONFSETTING( 0x00d0, "USA; different?" )
PORT_CONFSETTING( 0x00c0, "USA (American Sammy Corporation); different?" )
PORT_CONFSETTING( 0x00e0, "Korea; different?" )
// PORT_CONFSETTING( 0x00f0, "Korea; different?" )
INPUT_PORTS_END
static INPUT_PORTS_START( grindstma )
PORT_INCLUDE( grindstm )
PORT_MODIFY("JMPR")
// Code in many places in game tests if region is >= 0xC. Effects on gameplay?
PORT_CONFNAME( 0x00f0, 0x0090, DEF_STR( Region ) ) //PORT_CONFLOCATION("JP:!4,!3,!2,!1")
PORT_CONFSETTING( 0x0090, DEF_STR( Europe ) )
// PORT_CONFSETTING( 0x0080, DEF_STR( Europe ) )
PORT_CONFSETTING( 0x00b0, DEF_STR( USA ) )
PORT_CONFSETTING( 0x00a0, "USA (Atari Games Corp.)" )
PORT_CONFSETTING( 0x0070, DEF_STR( Southeast_Asia ) )
PORT_CONFSETTING( 0x0060, "Southeast Asia (Charterfield)" )
PORT_CONFSETTING( 0x0050, DEF_STR( Taiwan ) )
// PORT_CONFSETTING( 0x0040, DEF_STR( Taiwan ) )
PORT_CONFSETTING( 0x0030, DEF_STR( Hong_Kong ) )
PORT_CONFSETTING( 0x0020, "Hong Kong (Charterfield)" )
PORT_CONFSETTING( 0x0010, DEF_STR( Korea ) )
PORT_CONFSETTING( 0x0000, "Korea (Unite Trading)" )
PORT_CONFSETTING( 0x00c0, "Korea; different?" )
// PORT_CONFSETTING( 0x00d0, "Korea; different?" )
// PORT_CONFSETTING( 0x00e0, "Korea; different?" )
// PORT_CONFSETTING( 0x00f0, "Korea; different?" )
INPUT_PORTS_END
static INPUT_PORTS_START( vfive )
PORT_INCLUDE( grindstm )
PORT_MODIFY("DSWA")
TOAPLAN_COINAGE_JAPAN_LOC(SW1)
PORT_MODIFY("JMPR")
// Region is forced to Japan in this set.
// Code at $9238 tests bit 7.
// (Actually bit 3, but the V25 shifts the jumper byte before storing it in shared RAM)
// Runs twice near end of stage 1, once when each of the two boss tanks appears. Effect?
// Also, if bit 7 is set and bits 6-5 are clear, service mode wrongly shows European coinage
// (due to code left in from Grind Stormer: see code at $210A4 and lookup table at $211FA)
PORT_CONFNAME( 0x0030, 0x0000, "Copyright" ) //PORT_CONFLOCATION("JP:!4,!3")
PORT_CONFSETTING( 0x0000, "All Rights Reserved" )
// PORT_CONFSETTING( 0x0010, "All Rights Reserved" )
// PORT_CONFSETTING( 0x0020, "All Rights Reserved" )
PORT_CONFSETTING( 0x0030, "Licensed to Taito Corp." )
PORT_CONFNAME( 0x0040, 0x0000, DEF_STR( Unused ) ) //PORT_CONFLOCATION("JP:!2")
PORT_CONFSETTING( 0x0000, DEF_STR( Off ) )
PORT_CONFSETTING( 0x0040, DEF_STR( On ) )
PORT_CONFNAME( 0x0080, 0x0000, DEF_STR( Unknown ) ) //PORT_CONFLOCATION("JP:!1")
PORT_CONFSETTING( 0x0000, DEF_STR( Off ) )
PORT_CONFSETTING( 0x0080, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( batsugun )
PORT_INCLUDE( toaplan2_3b )
PORT_MODIFY("DSWA")
PORT_DIPNAME( 0x0001, 0x0000, DEF_STR( Continue_Price ) ) PORT_DIPLOCATION("SW1:!1")
PORT_DIPSETTING( 0x0000, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x0001, "Discount" )
// Various features on bit mask 0x000e - see above
TOAPLAN_COINAGE_JAPAN_LOC(SW1) // European coinage shown in Service Mode but not actually used
PORT_MODIFY("DSWB")
// Difficulty on bit mask 0x0003 - see above
PORT_DIPNAME( 0x000c, 0x0000, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:!3,!4")
PORT_DIPSETTING( 0x000c, DEF_STR( None ) )
PORT_DIPSETTING( 0x0008, "1500k only" )
PORT_DIPSETTING( 0x0000, "1000k only" )
PORT_DIPSETTING( 0x0004, "500k and every 600k" )
PORT_DIPNAME( 0x0030, 0x0000, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:!5,!6")
PORT_DIPSETTING( 0x0030, "1" )
PORT_DIPSETTING( 0x0020, "2" )
PORT_DIPSETTING( 0x0000, "3" )
PORT_DIPSETTING( 0x0010, "5" )
PORT_DIPNAME( 0x0040, 0x0000, "Invulnerability (Cheat)" ) PORT_DIPLOCATION("SW2:!7")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0040, DEF_STR( On ) )
PORT_DIPNAME( 0x0080, 0x0000, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW2:!8")
PORT_DIPSETTING( 0x0080, DEF_STR( No ) )
PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) )
PORT_START("JMPR")
PORT_CONFNAME( 0x00f0, 0x0090, DEF_STR( Region ) ) //PORT_CONFLOCATION("JP:!4,!3,!2,!1")
PORT_CONFSETTING( 0x0090, DEF_STR( Europe ) )
PORT_CONFSETTING( 0x0080, "Europe (Taito Corp.)" )
PORT_CONFSETTING( 0x00b0, DEF_STR( USA ) )
PORT_CONFSETTING( 0x00a0, "USA (Taito Corp.)" )
PORT_CONFSETTING( 0x00f0, DEF_STR( Japan ) )
// PORT_CONFSETTING( 0x00e0, DEF_STR( Japan ) )
PORT_CONFSETTING( 0x00d0, "Japan (Taito Corp.)" )
// PORT_CONFSETTING( 0x00c0, "Japan (Taito Corp.)" )
PORT_CONFSETTING( 0x0070, DEF_STR( Southeast_Asia ) )
PORT_CONFSETTING( 0x0060, "Southeast Asia (Taito Corp.)" )
PORT_CONFSETTING( 0x0050, DEF_STR( Taiwan ) )
PORT_CONFSETTING( 0x0040, "Taiwan (Taito Corp.)" )
PORT_CONFSETTING( 0x0030, DEF_STR( Hong_Kong ) )
PORT_CONFSETTING( 0x0020, "Hong Kong (Taito Corp.)" )
PORT_CONFSETTING( 0x0010, DEF_STR( Korea ) )
PORT_CONFSETTING( 0x0000, "Korea (Unite Trading)" )
INPUT_PORTS_END
static INPUT_PORTS_START( pwrkick )
PORT_START("DSWA")
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:!1,!2")
PORT_DIPSETTING( 0x00, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x01, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x02, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x03, DEF_STR( Very_Hard ) )
PORT_DIPNAME( 0x5c, 0x00, "Payout" ) PORT_DIPLOCATION("SW1:!3,!4,!5,!7")
PORT_DIPSETTING( 0x00, "110" ) // Service mode displays values as 1-8, ignoring SW1:7
PORT_DIPSETTING( 0x04, "105" )
PORT_DIPSETTING( 0x08, "100" )
PORT_DIPSETTING( 0x0c, "95" )
PORT_DIPSETTING( 0x10, "90" )
PORT_DIPSETTING( 0x14, "85" )
PORT_DIPSETTING( 0x18, "80" )
PORT_DIPSETTING( 0x1c, "75" )
PORT_DIPSETTING( 0x40, "70" )
PORT_DIPSETTING( 0x44, "65" )
PORT_DIPSETTING( 0x48, "60" )
PORT_DIPSETTING( 0x4c, "55" )
PORT_DIPSETTING( 0x50, "50" )
PORT_DIPSETTING( 0x54, "45" )
PORT_DIPSETTING( 0x58, "40" )
PORT_DIPSETTING( 0x5c, "35" )
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:!6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x00, "Diagnostic" ) PORT_DIPLOCATION("SW1:!8")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
PORT_START("DSWB")
PORT_DIPNAME( 0x03, 0x00, "Play Credit" ) PORT_DIPLOCATION("SW2:!1,!2")
PORT_DIPSETTING( 0x00, UNICODE_YEN "10" )
PORT_DIPSETTING( 0x01, UNICODE_YEN "20" )
PORT_DIPSETTING( 0x02, UNICODE_YEN "30" )
PORT_DIPSETTING( 0x03, UNICODE_YEN "40" )
PORT_DIPNAME( 0x0c, 0x00, "Coin Exchange" ) PORT_DIPLOCATION("SW2:!3,!4")
PORT_DIPSETTING( 0x00, "12" )
PORT_DIPSETTING( 0x04, "10" )
PORT_DIPSETTING( 0x08, "6" )
PORT_DIPSETTING( 0x0c, "5" )
PORT_DIPNAME( 0x30, 0x00, "Game Mode" ) PORT_DIPLOCATION("SW2:!5,!6")
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, "Shot" )
PORT_DIPSETTING( 0x20, "Auto" )
PORT_DIPSETTING( 0x30, "S-Manual" )
PORT_DIPUNUSED_DIPLOC( 0x40, 0x00, "SW2:!7" )
PORT_DIPUNUSED_DIPLOC( 0x80, 0x00, "SW2:!8" )
PORT_START("DSWC")
PORT_DIPUNUSED_DIPLOC( 0x01, 0x00, "SW3:!1" )
PORT_DIPUNUSED_DIPLOC( 0x02, 0x00, "SW3:!2" )
PORT_DIPUNUSED_DIPLOC( 0x04, 0x00, "SW3:!3" )
PORT_DIPUNUSED_DIPLOC( 0x08, 0x00, "SW3:!4" )
PORT_DIPUNUSED_DIPLOC( 0x10, 0x00, "SW3:!5" )
PORT_DIPUNUSED_DIPLOC( 0x20, 0x00, "SW3:!6" )
PORT_DIPUNUSED_DIPLOC( 0x40, 0x00, "SW3:!7" )
PORT_DIPUNUSED_DIPLOC( 0x80, 0x00, "SW3:!8" )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SLOT_STOP1 ) PORT_NAME("Left")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SLOT_STOP2 ) PORT_NAME("Center")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SLOT_STOP3 ) PORT_NAME("Right")
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("IN2")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_NAME("Coin 2 (" UNICODE_YEN "10)")
PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_HIGH )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SLOT_STOP4 ) PORT_NAME("Down") // does this button really exist?
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", ticket_dispenser_device, line_r)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_MEMORY_RESET )
PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("SYS")
PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 ) PORT_NAME("Coin Exchange (" UNICODE_YEN "100)")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_GAMBLE_BOOK )
PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_GAMBLE_SERVICE ) PORT_NAME("Attendant Key")
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_NAME("Coin 1 (Medal)")
// The specific "Payout" button shown on the test screen and diagnostic menu does not exist.
INPUT_PORTS_END
static INPUT_PORTS_START( othldrby )
PORT_INCLUDE( toaplan2_3b )
PORT_MODIFY("SYS")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(1)
PORT_MODIFY("DSWA")
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x02, DEF_STR( On ) )
PORT_SERVICE( 0x04, IP_ACTIVE_HIGH )
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Allow_Continue ) )
PORT_DIPSETTING( 0x08, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0x30, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) )
PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )
PORT_DIPSETTING( 0xc0, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) )
PORT_MODIFY("DSWB")
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) )
PORT_DIPSETTING( 0x01, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x02, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x03, DEF_STR( Very_Hard ) )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x04, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unused ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unused ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x10, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unused ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unused ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unused ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( enmadaio )
PORT_START("SYS")
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SERVICE1 )
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_TILT )
TOAPLAN_TEST_SWITCH( 0x04, IP_ACTIVE_HIGH )
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("DSWA")
PORT_DIPNAME( 0x0001, 0x0000, "Game Mode" )
PORT_DIPSETTING( 0x0000, "Normal Game" )
PORT_DIPSETTING( 0x0001, "Stop and Slow Mode" )
PORT_DIPNAME( 0x0002, 0x0000, DEF_STR( Flip_Screen ) )
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0002, DEF_STR( On ) )
PORT_DIPNAME( 0x0004, 0x0000, DEF_STR( Unknown ) ) // unused
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0004, DEF_STR( On ) )
PORT_DIPNAME( 0x0008, 0x0000, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x0000, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x0010, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x0020, DEF_STR( 4C_1C ) )
PORT_DIPNAME( 0x0040, 0x0000, DEF_STR( Unknown ) ) // unused
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0040, DEF_STR( On ) )
PORT_DIPNAME( 0x0080, 0x0000, DEF_STR( Unknown ) ) // unused
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0080, DEF_STR( On ) )
PORT_START("MISC2") // should be DSWB? but not even read in test mode display?
PORT_DIPNAME( 0x0001, 0x0001, "2" )
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0800, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_START("MISC3")
PORT_DIPNAME( 0x0001, 0x0001, "3" )
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("yes")
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("no")
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0800, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_START("MISC4")
PORT_DIPNAME( 0x0001, 0x0001, "4" )
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0004, 0x0000, "Status of Something 1" ) // gives error in attract mode otherwise
PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0040, 0x0000, "Status of Something 2" ) // turn this off and it comes up with an error
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0800, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_START("UNK")
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(30) PORT_KEYDELTA(15) // this is the sensor, not sure what it measures, pulse / heartbeat?
PORT_DIPNAME( 0x0100, 0x0100, "Freeze" ) // not sure
PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0800, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( snowbro2 )
PORT_INCLUDE( toaplan2_2b )
PORT_START("IN3")
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(3) PORT_8WAY
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(3) PORT_8WAY
PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(3) PORT_8WAY
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(3) PORT_8WAY
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(3)
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(3)
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_START3 )
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("IN4")
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(4) PORT_8WAY
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(4) PORT_8WAY
PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(4) PORT_8WAY
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(4) PORT_8WAY
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(4)
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(4)
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_START4 )
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_MODIFY("DSWA")
PORT_DIPNAME( 0x0001, 0x0000, DEF_STR( Continue_Price ) ) PORT_DIPLOCATION("SW1:!1")
PORT_DIPSETTING( 0x0000, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x0001, "Discount" )
// Various features on bit mask 0x000e - see above
TOAPLAN_COINAGE_DUAL_LOC( JMPR, 0x1c00, 0x0800, SW1 )
PORT_MODIFY("DSWB")
// Difficulty on bit mask 0x0003 - see above
PORT_DIPNAME( 0x000c, 0x0000, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:!3,!4")
PORT_DIPSETTING( 0x000c, DEF_STR( None ) )
PORT_DIPSETTING( 0x0008, "200k only" )
PORT_DIPSETTING( 0x0000, "100k only" )
PORT_DIPSETTING( 0x0004, "100k and every 500k" )
PORT_DIPNAME( 0x0030, 0x0000, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:!5,!6")
PORT_DIPSETTING( 0x0030, "1" )
PORT_DIPSETTING( 0x0020, "2" )
PORT_DIPSETTING( 0x0000, "3" )
PORT_DIPSETTING( 0x0010, "4" )
PORT_DIPNAME( 0x0040, 0x0000, "Invulnerability (Cheat)" ) PORT_DIPLOCATION("SW2:!7")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0040, DEF_STR( On ) )
PORT_DIPNAME( 0x0080, 0x0000, "Maximum Players" ) PORT_DIPLOCATION("SW2:!8")
PORT_DIPSETTING( 0x0080, "2" )
PORT_DIPSETTING( 0x0000, "4" )
PORT_START("JMPR")
PORT_CONFNAME( 0x2000, 0x0000, "Show All Rights Reserved" ) //PORT_CONFLOCATION("JP:!1")
PORT_CONFSETTING( 0x0000, DEF_STR( No ) )
PORT_CONFSETTING( 0x2000, DEF_STR( Yes ) )
PORT_CONFNAME( 0x1c00, 0x0800, DEF_STR( Region ) ) //PORT_CONFLOCATION("JP:!4,!3,!2")
PORT_CONFSETTING( 0x0800, DEF_STR( Europe ) )
PORT_CONFSETTING( 0x0400, DEF_STR( USA ) )
PORT_CONFSETTING( 0x0000, DEF_STR( Japan ) )
PORT_CONFSETTING( 0x0c00, DEF_STR( Korea ) )
PORT_CONFSETTING( 0x1000, DEF_STR( Hong_Kong ) )
PORT_CONFSETTING( 0x1400, DEF_STR( Taiwan ) )
PORT_CONFSETTING( 0x1800, DEF_STR( Southeast_Asia ) )
// PORT_CONFSETTING( 0x1c00, DEF_STR( Unused ) )
PORT_BIT( 0xc3ff, IP_ACTIVE_HIGH, IPT_UNKNOWN )
INPUT_PORTS_END
static INPUT_PORTS_START( sstriker )
PORT_INCLUDE( toaplan2_3b )
PORT_MODIFY("DSWA")
PORT_DIPNAME( 0x0001, 0x0000, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW1:!1")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0001, DEF_STR( On ) )
// Various features on bit mask 0x000e - see above
TOAPLAN_COINAGE_DUAL_LOC( JMPR, 0x0e, 0x04, SW1 )
PORT_MODIFY("DSWB")
// Difficulty on bit mask 0x0003 - see above
PORT_DIPNAME( 0x000c, 0x0000, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:!3,!4")
PORT_DIPSETTING( 0x000c, DEF_STR( None ) )
PORT_DIPSETTING( 0x0008, "200k only" )
PORT_DIPSETTING( 0x0000, "Every 300k" )
PORT_DIPSETTING( 0x0004, "200k and 500k" )
PORT_DIPNAME( 0x0030, 0x0000, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:!5,!6")
PORT_DIPSETTING( 0x0030, "1" )
PORT_DIPSETTING( 0x0020, "2" )
PORT_DIPSETTING( 0x0000, "3" )
PORT_DIPSETTING( 0x0010, "5" )
PORT_DIPNAME( 0x0040, 0x0000, "Invulnerability (Cheat)" ) PORT_DIPLOCATION("SW2:!7")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0040, DEF_STR( On ) )
PORT_DIPNAME( 0x0080, 0x0000, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW2:!8")
PORT_DIPSETTING( 0x0080, DEF_STR( No ) )
PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) )
PORT_START("JMPR")
PORT_CONFNAME( 0x0001, 0x0001, "FBI Logo" ) //PORT_CONFLOCATION("JP:!4")
PORT_CONFSETTING( 0x0001, DEF_STR( Off ) )
PORT_CONFSETTING( 0x0000, DEF_STR( On ) )
PORT_CONFNAME( 0x000e, 0x0004, DEF_STR( Region ) ) //PORT_CONFLOCATION("JP:!3,!2,!1")
PORT_CONFSETTING( 0x0004, DEF_STR( Europe ) )
PORT_CONFSETTING( 0x0002, DEF_STR( USA ) )
PORT_CONFSETTING( 0x0000, DEF_STR( Japan ) )
PORT_CONFSETTING( 0x0006, DEF_STR( Southeast_Asia ) )
PORT_CONFSETTING( 0x0008, DEF_STR( China ) )
PORT_CONFSETTING( 0x000a, DEF_STR( Korea ) )
PORT_CONFSETTING( 0x000c, DEF_STR( Hong_Kong ) )
PORT_CONFSETTING( 0x000e, DEF_STR( Taiwan ) )
INPUT_PORTS_END
static INPUT_PORTS_START( sstrikerk ) // Although the region jumper is functional, it's a Korean board / version
PORT_INCLUDE( sstriker )
PORT_MODIFY("JMPR")
PORT_CONFNAME( 0x000e, 0x000a, DEF_STR( Region ) ) //PORT_CONFLOCATION("JP:!3,!2,!1")
PORT_CONFSETTING( 0x0004, DEF_STR( Europe ) )
PORT_CONFSETTING( 0x0002, DEF_STR( USA ) )
PORT_CONFSETTING( 0x0000, DEF_STR( Japan ) )
PORT_CONFSETTING( 0x0006, DEF_STR( Southeast_Asia ) )
PORT_CONFSETTING( 0x0008, DEF_STR( China ) )
PORT_CONFSETTING( 0x000a, "Korea (Unite Trading)" )
PORT_CONFSETTING( 0x000c, DEF_STR( Hong_Kong ) )
PORT_CONFSETTING( 0x000e, DEF_STR( Taiwan ) )
INPUT_PORTS_END
static INPUT_PORTS_START( mahoudai )
PORT_INCLUDE( sstriker )
PORT_MODIFY("JMPR")
// Effectively unused by this set - see notes
PORT_BIT( 0xffff, IP_ACTIVE_HIGH, IPT_UNKNOWN )
INPUT_PORTS_END
static INPUT_PORTS_START( kingdmgp )
PORT_INCLUDE( sstriker )
// The code and lookup tables pertaining to the jumpers are almost identical to sstriker.
// However, this set apparently lacks (reachable) code to display the FBI logo,
// even though the logo itself is present in the gfx ROMs.
PORT_MODIFY("JMPR")
PORT_CONFNAME( 0x0001, 0x0000, DEF_STR( Unused ) ) //PORT_CONFLOCATION("JP:!4")
PORT_CONFSETTING( 0x0000, DEF_STR( Off ) )
PORT_CONFSETTING( 0x0001, DEF_STR( On ) )
PORT_CONFNAME( 0x000e, 0x0004, DEF_STR( Region ) ) //PORT_CONFLOCATION("JP:!3,!2,!1")
PORT_CONFSETTING( 0x0004, DEF_STR( Europe ) )
PORT_CONFSETTING( 0x0002, DEF_STR( USA ) )
// PORT_CONFSETTING( 0x0000, DEF_STR( Japan ) ) // Corrupt title screen and text - use shippumd
PORT_CONFSETTING( 0x0006, DEF_STR( Southeast_Asia ) )
PORT_CONFSETTING( 0x0008, DEF_STR( China ) )
PORT_CONFSETTING( 0x000a, "Korea (Unite Trading license)" )
PORT_CONFSETTING( 0x000c, DEF_STR( Hong_Kong ) )
PORT_CONFSETTING( 0x000e, DEF_STR( Taiwan ) )
INPUT_PORTS_END
static INPUT_PORTS_START( shippumd )
PORT_INCLUDE( sstriker )
PORT_MODIFY("JMPR")
// Title screen and text are corrupt for anything but Japan
PORT_BIT( 0xffff, IP_ACTIVE_HIGH, IPT_UNKNOWN )
INPUT_PORTS_END
static INPUT_PORTS_START( bgaregga )
PORT_START("IN1")
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_8WAY
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_8WAY
PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_8WAY
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_8WAY
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1)
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(1)
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // Unknown/Unused
PORT_START("IN2")
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_8WAY
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_8WAY
PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_8WAY
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_8WAY
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // Unknown/Unused
PORT_START("SYS")
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SERVICE1 )
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_UNKNOWN )
TOAPLAN_TEST_SWITCH( 0x04, IP_ACTIVE_HIGH )
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // Unknown/Unused
PORT_START("DSWA")
PORT_SERVICE_DIPLOC(0x0001, IP_ACTIVE_HIGH, "SW1:!1")
PORT_DIPNAME( 0x0002, 0x0000, "Credits to Start" ) PORT_DIPLOCATION("SW1:!2")
PORT_DIPSETTING( 0x0000, "1" )
PORT_DIPSETTING( 0x0002, "2" )
PORT_DIPNAME( 0x001c, 0x0000, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:!3,!4,!5")
PORT_DIPSETTING( 0x0018, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x0014, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x0010, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x0004, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x0008, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x000c, DEF_STR( 1C_4C ) )
PORT_DIPSETTING( 0x001c, DEF_STR( Free_Play ) )
PORT_DIPNAME( 0x00e0, 0x0000, DEF_STR( Coin_B ) ) PORT_CONDITION("DSWA", 0x001c, NOTEQUALS, 0x001c) PORT_DIPLOCATION("SW1:!6,!7,!8")
PORT_DIPSETTING( 0x00c0, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSWA", 0x001c, NOTEQUALS, 0x001c)
PORT_DIPSETTING( 0x00a0, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSWA", 0x001c, NOTEQUALS, 0x001c)
PORT_DIPSETTING( 0x0080, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSWA", 0x001c, NOTEQUALS, 0x001c)
PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWA", 0x001c, NOTEQUALS, 0x001c)
// PORT_DIPSETTING( 0x00e0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWA", 0x001c, NOTEQUALS, 0x001c)
PORT_DIPSETTING( 0x0020, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSWA", 0x001c, NOTEQUALS, 0x001c)
PORT_DIPSETTING( 0x0040, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSWA", 0x001c, NOTEQUALS, 0x001c)
PORT_DIPSETTING( 0x0060, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSWA", 0x001c, NOTEQUALS, 0x001c)
// When Coin_A is set to Free_Play, Coin_A becomes Coin_A and Coin_B, and the following dips occur
PORT_DIPNAME( 0x0020, 0x0000, "Joystick Mode" ) PORT_CONDITION("DSWA", 0x001c, EQUALS, 0x001c) PORT_DIPLOCATION("SW1:!6")
PORT_DIPSETTING( 0x0000, "90 degrees ACW" ) PORT_CONDITION("DSWA", 0x001c, EQUALS, 0x001c)
PORT_DIPSETTING( 0x0020, DEF_STR( Normal ) ) PORT_CONDITION("DSWA", 0x001c, EQUALS, 0x001c)
PORT_DIPNAME( 0x0040, 0x0000, "Effect" ) PORT_CONDITION("DSWA", 0x001c, EQUALS, 0x001c) PORT_DIPLOCATION("SW1:!7")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_CONDITION("DSWA", 0x001c, EQUALS, 0x001c)
PORT_DIPSETTING( 0x0040, DEF_STR( On ) ) PORT_CONDITION("DSWA", 0x001c, EQUALS, 0x001c)
PORT_DIPNAME( 0x0080, 0x0000, "Music" ) PORT_CONDITION("DSWA", 0x001c, EQUALS, 0x001c) PORT_DIPLOCATION("SW1:!8")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_CONDITION("DSWA", 0x001c, EQUALS, 0x001c)
PORT_DIPSETTING( 0x0080, DEF_STR( On ) ) PORT_CONDITION("DSWA", 0x001c, EQUALS, 0x001c)
PORT_START("DSWB")
PORT_DIPNAME( 0x0003, 0x0000, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:!1,!2")
PORT_DIPSETTING( 0x0001, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x0000, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x0002, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x0003, DEF_STR( Very_Hard ) )
PORT_DIPNAME( 0x0004, 0x0000, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW2:!3")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0004, DEF_STR( On ) )
PORT_DIPNAME( 0x0008, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:!4")
PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0070, 0x0000, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:!5,!6,!7")
PORT_DIPSETTING( 0x0030, "1" )
PORT_DIPSETTING( 0x0020, "2" )
PORT_DIPSETTING( 0x0000, "3" )
PORT_DIPSETTING( 0x0010, "4" )
PORT_DIPSETTING( 0x0040, "5" )
PORT_DIPSETTING( 0x0050, "6" )
PORT_DIPSETTING( 0x0060, DEF_STR( Infinite ) )
PORT_DIPSETTING( 0x0070, "Invulnerability (Cheat)" )
PORT_DIPNAME( 0x0080, 0x0000, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:!8")
PORT_DIPSETTING( 0x0000, DEF_STR( None ) ) PORT_CONDITION("JMPR",0x0003,NOTEQUALS,0x0000) // Non-Japan
PORT_DIPSETTING( 0x0080, "Every 2000k" ) PORT_CONDITION("JMPR",0x0003,NOTEQUALS,0x0000) // Non-Japan
PORT_DIPSETTING( 0x0080, "1000k and 2000k" ) PORT_CONDITION("JMPR",0x0003,EQUALS,0x0000) // Japan
PORT_DIPSETTING( 0x0000, "Every 1000k" ) PORT_CONDITION("JMPR",0x0003,EQUALS,0x0000) // Japan
PORT_START("JMPR") // DSW3 and jumper
PORT_DIPNAME( 0x0008, 0x0000, "Stage Edit" ) PORT_DIPLOCATION("SW3:!1")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0008, DEF_STR( On ) )
PORT_DIPNAME( 0x0004, 0x0000, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW3:!2")
PORT_DIPSETTING( 0x0004, DEF_STR( No ) )
PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) )
PORT_CONFNAME( 0x0003, 0x0001, DEF_STR( Region ) ) //PORT_CONFLOCATION("JP:!2,!1")
PORT_CONFSETTING( 0x0001, "Europe (Tuning)" )
PORT_CONFSETTING( 0x0002, "USA (Fabtek)" )
PORT_CONFSETTING( 0x0000, DEF_STR( Japan ) )
PORT_CONFSETTING( 0x0003, DEF_STR( Asia ) )
INPUT_PORTS_END
static INPUT_PORTS_START( bgareggahk )
PORT_INCLUDE( bgaregga )
PORT_MODIFY("JMPR")
PORT_CONFNAME( 0x0003, 0x0003, DEF_STR( Region ) ) //PORT_CONFLOCATION("JP:!2,!1")
PORT_CONFSETTING( 0x0001, "Austria (Tuning)" )
// These two settings end up reporting ROM-0 as BAD
// PORT_CONFSETTING( 0x0002, "USA (Fabtek)" )
// PORT_CONFSETTING( 0x0000, DEF_STR( Japan ) )
PORT_CONFSETTING( 0x0003, "Hong Kong (Metrotainment)" )
INPUT_PORTS_END
static INPUT_PORTS_START( bgareggatw )
PORT_INCLUDE( bgaregga )
PORT_MODIFY("JMPR")
PORT_CONFNAME( 0x0003, 0x0003, DEF_STR( Region ) ) //PORT_CONFLOCATION("JP:!2,!1")
PORT_CONFSETTING( 0x0001, "Germany (Tuning)" )
// These two settings end up reporting ROM-0 as BAD
// PORT_CONFSETTING( 0x0002, "USA (Fabtek)" )
// PORT_CONFSETTING( 0x0000, DEF_STR( Japan ) )
PORT_CONFSETTING( 0x0003, "Taiwan (Liang Hwa)" )
INPUT_PORTS_END
static INPUT_PORTS_START( bgareggacn )
PORT_INCLUDE( bgaregga )
PORT_MODIFY("JMPR")
PORT_CONFNAME( 0x0003, 0x0003, DEF_STR( Region ) ) //PORT_CONFLOCATION("JP:!2,!1")
PORT_CONFSETTING( 0x0001, "Denmark (Tuning)" )
// These two settings end up reporting ROM-0 as BAD
// PORT_CONFSETTING( 0x0002, "USA (Fabtek)" )
// PORT_CONFSETTING( 0x0000, DEF_STR( Japan ) )
PORT_CONFSETTING( 0x0003, DEF_STR( China ) )
INPUT_PORTS_END
static INPUT_PORTS_START( batrider )
PORT_START("IN") // Player Inputs
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1)
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(1)
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0x8080, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("DSW") // DSWA and DSWB
PORT_SERVICE_DIPLOC(0x0001, IP_ACTIVE_HIGH, "SW1:!1")
PORT_DIPNAME( 0x0002, 0x0000, "Credits to Start" ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c) PORT_DIPLOCATION("SW1:!2")
PORT_DIPSETTING( 0x0000, "1" ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c)
PORT_DIPSETTING( 0x0002, "2" ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c)
PORT_DIPNAME( 0x0002, 0x0000, "Joystick Mode" ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c) PORT_DIPLOCATION("SW1:!2")
PORT_DIPSETTING( 0x0000, DEF_STR( Normal ) ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c)
PORT_DIPSETTING( 0x0002, "90 degrees ACW" ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c)
PORT_DIPNAME( 0x001c, 0x0000, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:!3,!4,!5")
PORT_DIPSETTING( 0x0018, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x0014, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x0010, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x0004, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x0008, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x000c, DEF_STR( 1C_4C ) )
PORT_DIPSETTING( 0x001c, DEF_STR( Free_Play ) )
PORT_DIPNAME( 0x00e0, 0x0000, DEF_STR( Coin_B ) ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c) PORT_DIPLOCATION("SW1:!6,!7,!8")
PORT_DIPSETTING( 0x00c0, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c)
PORT_DIPSETTING( 0x00a0, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c)
PORT_DIPSETTING( 0x0080, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c)
PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c)
// PORT_DIPSETTING( 0x00e0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c)
PORT_DIPSETTING( 0x0020, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c)
PORT_DIPSETTING( 0x0040, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c)
PORT_DIPSETTING( 0x0060, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c)
// When Coin_A is set to Free_Play, Coin_A becomes Coin_A and Coin_B, and the following dips occur
PORT_DIPNAME( 0x0020, 0x0000, "Hit Score" ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c) PORT_DIPLOCATION("SW1:!6")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c)
PORT_DIPSETTING( 0x0020, DEF_STR( On ) ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c)
PORT_DIPNAME( 0x0040, 0x0000, "Sound Effect" ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c) PORT_DIPLOCATION("SW1:!7")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c)
PORT_DIPSETTING( 0x0040, DEF_STR( On ) ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c)
PORT_DIPNAME( 0x0080, 0x0000, "Music" ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c) PORT_DIPLOCATION("SW1:!8")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c)
PORT_DIPSETTING( 0x0080, DEF_STR( On ) ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c)
PORT_DIPNAME( 0x0300, 0x0000, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:!1,!2")
PORT_DIPSETTING( 0x0100, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x0000, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x0200, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x0300, DEF_STR( Very_Hard ) )
PORT_DIPNAME( 0x0c00, 0x0000, "Timer" ) PORT_DIPLOCATION("SW2:!3,!4")
PORT_DIPSETTING( 0x0c00, DEF_STR( Highest ) )
PORT_DIPSETTING( 0x0800, DEF_STR( High ) )
PORT_DIPSETTING( 0x0000, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x0400, DEF_STR( Low ) )
PORT_DIPNAME( 0x3000, 0x0000, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:!5,!6")
PORT_DIPSETTING( 0x3000, "1" )
PORT_DIPSETTING( 0x2000, "2" )
PORT_DIPSETTING( 0x0000, "3" )
PORT_DIPSETTING( 0x1000, "4" )
PORT_DIPNAME( 0xc000, 0x0000, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:!7,!8")
PORT_DIPSETTING( 0xc000, DEF_STR( None ) )
PORT_DIPSETTING( 0x8000, "Every 2000k" )
PORT_DIPSETTING( 0x0000, "Every 1500k" )
PORT_DIPSETTING( 0x4000, "Every 1000k" )
PORT_START("SYS-DSW") // Coin/System and DSWC
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SERVICE1 )
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_UNKNOWN)
TOAPLAN_TEST_SWITCH( 0x0004, IP_ACTIVE_HIGH )
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_DIPNAME( 0x0100, 0x0000, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW3:!1")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0100, DEF_STR( On ) )
PORT_DIPNAME( 0x0200, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW3:!2")
PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0400, 0x0000, "Stage Edit" ) PORT_DIPLOCATION("SW3:!3")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0400, DEF_STR( On ) )
PORT_DIPNAME( 0x0800, 0x0000, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW3:!4")
PORT_DIPSETTING( 0x0800, DEF_STR( No ) )
PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) )
PORT_DIPNAME( 0x1000, 0x0000, "Invulnerability (Cheat)" ) PORT_DIPLOCATION("SW3:!5")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x1000, DEF_STR( On ) )
// These dips are shown only when Coin_A is set to Free_Play, but they work in normal play mode too
PORT_DIPNAME( 0x2000, 0x0000, "Guest Players" ) PORT_DIPLOCATION("SW3:!6")
PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x4000, 0x0000, "Player Select" ) PORT_DIPLOCATION("SW3:!7")
PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x8000, 0x0000, "Special Course" ) PORT_DIPLOCATION("SW3:!8")
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( batriderj )
PORT_INCLUDE( batrider )
PORT_MODIFY("SYS-DSW") // Coin/System and DSWC
// These dips are shown only when Coin_A is set to Free_Play, but they work in normal play mode too
PORT_DIPNAME( 0x2000, 0x0000, "Guest Players" ) PORT_DIPLOCATION("SW3:!6")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x2000, DEF_STR( On ) )
PORT_DIPNAME( 0x4000, 0x0000, "Player Select" ) PORT_DIPLOCATION("SW3:!7")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x4000, DEF_STR( On ) )
PORT_DIPNAME( 0x8000, 0x0000, "Special Course" ) PORT_DIPLOCATION("SW3:!8")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x8000, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( bbakraid )
PORT_INCLUDE( batrider )
PORT_MODIFY("DSW") // DSWA and DSWB
PORT_DIPNAME( 0xc000, 0x0000, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:!7,!8")
PORT_DIPSETTING( 0xc000, DEF_STR( None ) )
PORT_DIPSETTING( 0x8000, "Every 4000k" )
PORT_DIPSETTING( 0x4000, "Every 3000k" )
PORT_DIPSETTING( 0x0000, "Every 2000k" )
PORT_MODIFY("SYS-DSW") // Coin/System and DSW-3
PORT_DIPNAME( 0x2000, 0x0000, "Save Scores" ) PORT_DIPLOCATION("SW3:!6")
PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x4000, 0x0000, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW3:!7")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x4000, DEF_STR( On ) )
PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW3:!8")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x8000, DEF_STR( On ) )
PORT_START( "EEPROMOUT" )
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, cs_write)
PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, di_write)
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, clk_write)
INPUT_PORTS_END
// Text layer graphics -- ROM based in some games, RAM based in others
// See video/gp9001.cpp for the main graphics layouts
static const gfx_layout rom_textlayout =
{
8,8,
RGN_FRAC(1,1),
4,
{ STEP4(0,1) },
{ STEP8(0,4) },
{ STEP8(0,4*8) },
8*8*4
};
#define XOR(a) WORD_XOR_LE(a)
#define LOC(x) (x+XOR(0))
static const gfx_layout truxton2_tx_tilelayout =
{
8,8, /* 8x8 characters */
1024, /* 1024 characters */
4, /* 4 bits per pixel */
{ STEP4(0,1) },
{ LOC(0)*4, LOC(1)*4, LOC(4)*4, LOC(5)*4, LOC(8)*4, LOC(9)*4, LOC(12)*4, LOC(13)*4 },
{ STEP8(0,8*8) },
8*8*8
};
static const gfx_layout batrider_tx_tilelayout =
{
8,8, /* 8x8 characters */
1024, /* 1024 characters */
4, /* 4 bits per pixel */
{ STEP4(0,1) },
{ XOR(0)*4, XOR(1)*4, XOR(2)*4, XOR(3)*4, XOR(4)*4, XOR(5)*4, XOR(6)*4, XOR(7)*4 },
{ STEP8(0,4*8) },
8*8*4
};
static GFXDECODE_START( gfx_truxton2 )
GFXDECODE_ENTRY( nullptr, 0, truxton2_tx_tilelayout, 64*16, 64 )
GFXDECODE_END
static GFXDECODE_START( gfx_textrom )
GFXDECODE_ENTRY( "text", 0, rom_textlayout, 64*16, 64 )
GFXDECODE_END
static GFXDECODE_START( gfx_batrider )
GFXDECODE_ENTRY( nullptr, 0, batrider_tx_tilelayout, 64*16, 64 )
GFXDECODE_END
void toaplan2_state::tekipaki(machine_config &config)
{
/* basic machine hardware */
M68000(config, m_maincpu, 10_MHz_XTAL); // 10MHz Oscillator
m_maincpu->set_addrmap(AS_PROGRAM, &toaplan2_state::tekipaki_68k_mem);
hd647180x_device &audiocpu(HD647180X(config, m_audiocpu, 10_MHz_XTAL));
// 16k byte ROM and 512 byte RAM are internal
audiocpu.set_addrmap(AS_IO, &toaplan2_state::hd647180_io_map);
audiocpu.in_pa_callback().set(FUNC(toaplan2_state::tekipaki_cmdavailable_r));
config.m_minimum_quantum = attotime::from_hz(600);
MCFG_MACHINE_RESET_OVERRIDE(toaplan2_state,toaplan2)
/* video hardware */
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK);
m_screen->set_raw(27_MHz_XTAL/4, 432, 0, 320, 262, 0, 240);
//m_screen->set_refresh_hz(60);
//m_screen->set_size(432, 262);
//m_screen->set_visarea(0, 319, 0, 239);
m_screen->set_screen_update(FUNC(toaplan2_state::screen_update_toaplan2));
m_screen->screen_vblank().set(FUNC(toaplan2_state::screen_vblank));
m_screen->set_palette(m_palette);
PALETTE(config, m_palette).set_format(palette_device::xBGR_555, T2PALETTE_LENGTH);
GP9001_VDP(config, m_vdp[0], 27_MHz_XTAL);
m_vdp[0]->set_palette(m_palette);
m_vdp[0]->vint_out_cb().set_inputline(m_maincpu, M68K_IRQ_4);
MCFG_VIDEO_START_OVERRIDE(toaplan2_state,toaplan2)
/* sound hardware */
SPEAKER(config, "mono").front_center();
GENERIC_LATCH_8(config, m_soundlatch);
ym3812_device &ymsnd(YM3812(config, "ymsnd", 27_MHz_XTAL/8));
ymsnd.irq_handler().set_inputline(m_audiocpu, 0);
ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0);
}
void toaplan2_state::ghox(machine_config &config)
{
/* basic machine hardware */
M68000(config, m_maincpu, 10_MHz_XTAL); /* verified on pcb */
m_maincpu->set_addrmap(AS_PROGRAM, &toaplan2_state::ghox_68k_mem);
HD647180X(config, m_audiocpu, 10_MHz_XTAL);
m_audiocpu->set_addrmap(AS_PROGRAM, &toaplan2_state::ghox_hd647180_mem_map);
config.m_minimum_quantum = attotime::from_hz(600);
MCFG_MACHINE_RESET_OVERRIDE(toaplan2_state,ghox)
/* video hardware */
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK);
m_screen->set_raw(27_MHz_XTAL/4, 432, 0, 320, 262, 0, 240);
//m_screen->set_refresh_hz(60);
//m_screen->set_size(432, 262);
//m_screen->set_visarea(0, 319, 0, 239);
m_screen->set_screen_update(FUNC(toaplan2_state::screen_update_toaplan2));
m_screen->screen_vblank().set(FUNC(toaplan2_state::screen_vblank));
m_screen->set_palette(m_palette);
PALETTE(config, m_palette).set_format(palette_device::xBGR_555, T2PALETTE_LENGTH);
GP9001_VDP(config, m_vdp[0], 27_MHz_XTAL);
m_vdp[0]->set_palette(m_palette);
m_vdp[0]->vint_out_cb().set_inputline(m_maincpu, M68K_IRQ_4);
MCFG_VIDEO_START_OVERRIDE(toaplan2_state,toaplan2)
/* sound hardware */
SPEAKER(config, "mono").front_center();
YM2151(config, "ymsnd", 27_MHz_XTAL/8).add_route(ALL_OUTPUTS, "mono", 1.0); // verified on pcb
}
/* probably dogyuun, vfive and kbash use the same decryption table;
those 3 games have been seen with the NITRO905 chip, other alias are
ts002mach for dogyuun, ts004dash for kbash and ts007spy for vfive */
static const u8 nitro_decryption_table[256] = {
0x1b,0x56,0x75,0x88,0x8c,0x06,0x58,0x72, 0x83,0x86,0x36,0x1a,0x5f,0xd3,0x8c,0xe9, /* 00 */
/* *//* *//* *//* *//* *//* *//* *//* */ /* *//* *//* *//* *//* *//* *//* *//* */
0x22,0x0f,0x03,0x2a,0xeb,0x2a,0xf9,0x0f, 0xa4,0xbd,0x75,0xf3,0x4f,0x53,0x8e,0xfe, /* 10 */
/*W*//*W*//*r*//*W*//*r*//*W*//*W*//*r*/ /*r*//*a*//*r*//*r*//*r*//*W*//*x*//*r*/
0x87,0xe8,0xb1,0x8d,0x36,0xb5,0x43,0x73, 0x2a,0x5b,0xf9,0x02,0x24,0x8a,0x03,0x80, /* 20 */
/*a*//*r*//*r*//*r*//*x*//*r*//*r*//*r*/ /*W*//*r*//*W*//*W*//*a*//*r*//*a*//*r*/
0x86,0x8b,0xd1,0x3e,0x8d,0x3e,0x58,0xfb, 0xc3,0x79,0xbd,0xb7,0x8a,0xe8,0x0f,0x81, /* 30 */
/*a*//*a*//*a*//*a*//*r*//*r*//*a*//*r*/ /*r*//*a*//*a*//*W*//*r*//*r*//*r*//*r*/
0xb7,0xd0,0x8b,0xeb,0xff,0xb8,0x90,0x8b, 0x5e,0xa2,0x90,0x90,0xab,0xb4,0x80,0x59, /* 40 */
/*r*//*r*//*a*//*r*//*a