Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
7373 lines (6294 sloc) 309 KB
// license:BSD-3-Clause
// copyright-holders:Luca Elia, Nicola Salmoria
/*********************************************************************************************************************
Some Dynax games using the second version of their blitter
driver by Luca Elia and Nicola Salmoria
CPU: Z80 or TLCS90
Sound: [AY] + [YM] + [YM] + [M5205] / M6295
VDP: HD46505SP (6845) (CRT controller)
Custom: TC17G032AP-0246 (blitter)
---------------------------------------------------------------------------------------------------------------------
Year + Game Main Board Sub Board CPU Sound Clock Color Notes
---------------------------------------------------------------------------------------------------------------------
88 Jong Yu Ki D1505178-A D1505178-B Z80*2 AY8912 YM2203 M5205 PROM? 2 x TC17G032AP-0246
88 Hana no Mai D1610088L1 Z80 AY8912 YM2203 M5205 PROM
88 Hana Kochou D201901L2 D201901L1-0 Z80 AY8912 YM2203 M5205 PROM
89 Hana Oriduru D2304268L Z80 AY8912 YM2413 M5205 RAM
89 Dragon Punch D24? Z80 YM2203 PROM
89 Mj Friday D2607198L1 Z80 YM2413 PROM
89 Mj Gekisha D2809218L-1 D2809218L-2 TLCS YM2413 PROM Battery
89 Sports Match D31? Z80 YM2203 PROM
90 Jong Tou Ki D1505178-A D2711078L-B Z80*2 AY8912 YM2203 M5205 PROM 2 x Blitter
90 Mj Campus Hunting D3312108L1-1 D23SUB1 Z80 AY8912 YM2413 M5205 RAM
90 Hana Jingi no number D3312108L1-2 Z80 AY8912 YM2413 M5205 RAM
90 7jigen no Youseitachi D3707198L1 D23SUB1 Z80 AY8912 YM2413 M5205 RAM
89 Mj Electromagnetic Base D3803248L1 Z80 AY8912 YM2413 M5205 RAM
90 Mj Electron Base Z80 AY8912 YM2413 RAM
90 Mj X-Tal/Diamond 7 D4005208L1-1 D23SUB Z80 AY8912 YM2413 M5205 RAM
90 Mj Neruton Haikujiradan D4005208L1-1 D4508308L-2 Z80 AY8912 YM2413 M5205 RAM
91 Mj Dial Q2 D5212298L-1 Z80 YM2413 PROM
91 Mj Yarunara D5512068L1-1 D4508308L-2 Z80 AY8912 YM2413 M5205 M6242 RAM NL-001
91 Hana wo Yaraneba! D5512068L1-1 D4508308L-2 Z80 AY8912 YM2413 M5205 M6242 RAM NL-001, Battery
91 Warai no Hana Tenshi D5512068L1-1 D6107068L-1 Z80 AY8912 YM2413 M5205 M6242 RAM NL-001, Battery
91 Mj Angels D5512068L1-1 D6107068L-1 Z80 AY8912 YM2413 M5205 RAM
91 Mj Comic Gekijou V.1 D5512068L1-1 D6107068L-1 Z80 AY8912 YM2413 M5205 M6242 RAM NL-001, Battery
91 Mj Tenkaigen TLCS AY8910 YM2413 M6242 RAM Protection, Battery
91 Mj Ougon no Hai D6209038L1-0 TLCS AY8910 YM2413 RAM Undumped TMP91P640 Code, Battery
92 Quiz TV Gassyuukoku D5512068L1-2 D6410288L-1 Z80 AY8912 YM2413 M5205 RAM
92 Hanafuda Hana Tengoku D6502208L1 D6107068L-1 Z80 AY8910 YM2413 M6242 RAM
94 Castle Of Dracula Z80 M6295 PROM Blitter is an FPGA
94 Mj Reach (bootleg) bootleg TLCS AY8910 YM2413 M6242 PROM Battery
94 Maya Z80 YM2203 PROM Blitter is an FPGA
96 Mj Raijinhai DX D10010318L1 D10502168 TLCS AY8910 M6242 PROM Undumped TMP91P640 Code, Battery
9? Inca Z80 YM2203 PROM
---------------------------------------------------------------------------------------------------------------------
Notes:
- In some games (drgpunch,hanamai,hnoridur etc) there's a more complete service mode.
To enter it, set the service mode dip switch and reset keeping start1 pressed.
In hnkochou, keep F2 pressed and reset.
- sprtmtch and drgpunch are "clones", but the gfx are very different; sprtmtch
is a trimmed down version, without all animations between levels.
- according to the readme, mjfriday should have a M5205. However the program ROMs don't
seem to make accesses to it or contain ADPCM data for it, and photos of the game's
PCB don't even show an unpopulated location for one. Note that gekisha and mjdialq2,
which run on similar hardware, also lack 5205s. Likely it's a mistake in the readme.
TODO:
- Palette banking is not correct, see quiztvqq cross hatch test.
- Scrolling / wrap enable is not correct in hnoridur type hardware. See the dynax
logo in neruton: it has to do with writes to c3/c4 and there are 2 additional
scroll registers at 64/66.
- 7jigen: priority 0x30 is ok when used in the "gals check", but is wrong during
attract mode, where the girl is hidden by the background. Another possible
priority issue in attract mode is when the balls scroll over the devil.
- neruton / majxtal7: girls are behind the background in demo mode.
*********************************************************************************************************************/
#include "emu.h"
#include "includes/dynax.h"
#include "cpu/tlcs90/tlcs90.h"
#include "cpu/z80/z80.h"
#include "cpu/z80/tmpz84c015.h"
#include "machine/msm6242.h"
#include "machine/nvram.h"
#include "sound/ay8910.h"
#include "sound/2203intf.h"
#include "sound/ym2413.h"
#include "sound/3812intf.h"
#include "rendlay.h"
#include "speaker.h"
/***************************************************************************
Interrupts
***************************************************************************/
/***************************************************************************
Sports Match
***************************************************************************/
/* It runs in IM 0, thus needs an opcode on the data bus */
WRITE_LINE_MEMBER(dynax_state::sprtmtch_blitter_irq_w)
{
if (state && m_blitter_irq_mask)
m_mainirq->rst4_w(1);
}
WRITE8_MEMBER(dynax_state::dynax_vblank_ack_w)
{
m_mainirq->rst2_w(0);
}
WRITE_LINE_MEMBER(dynax_state::blitter_ack_w)
{
m_blitter_irq_mask = state;
if (!m_blitter_irq_mask)
m_mainirq->rst4_w(0);
}
WRITE_LINE_MEMBER(dynax_state::sprtmtch_vblank_w)
{
if (state)
m_mainirq->rst2_w(1);
}
/***************************************************************************
Jantouki - Main CPU
***************************************************************************/
/* It runs in IM 0, thus needs an opcode on the data bus */
WRITE8_MEMBER(dynax_state::jantouki_vblank_ack_w)
{
m_mainirq->rst4_w(0);
}
WRITE_LINE_MEMBER(dynax_state::jantouki_blitter_irq_w)
{
if (state && m_blitter_irq_mask)
m_mainirq->rst1_w(1);
}
WRITE_LINE_MEMBER(dynax_state::jantouki_blitter_ack_w)
{
m_blitter_irq_mask = state;
if (!m_blitter_irq_mask)
m_mainirq->rst1_w(0);
}
WRITE_LINE_MEMBER(dynax_state::jantouki_blitter2_irq_w)
{
if (state && m_blitter2_irq_mask)
m_mainirq->rst2_w(1);
}
WRITE_LINE_MEMBER(dynax_state::jantouki_blitter2_ack_w)
{
m_blitter2_irq_mask = state;
if (!m_blitter2_irq_mask)
m_mainirq->rst2_w(0);
}
WRITE_LINE_MEMBER(dynax_state::jantouki_vblank_w)
{
if (state)
{
m_mainirq->rst4_w(1);
m_soundirq->rst4_w(1);
}
}
/***************************************************************************
Jantouki - Sound CPU
***************************************************************************/
WRITE8_MEMBER(dynax_state::jantouki_sound_vblank_ack_w)
{
m_soundirq->rst4_w(0);
}
/***************************************************************************
Memory Maps
***************************************************************************/
/***************************************************************************
Sports Match
***************************************************************************/
WRITE_LINE_MEMBER(dynax_state::coincounter_0_w)
{
machine().bookkeeping().coin_counter_w(0, state);
}
WRITE_LINE_MEMBER(dynax_state::coincounter_1_w)
{
machine().bookkeeping().coin_counter_w(1, state);
}
READ8_MEMBER(dynax_state::ret_ff)
{
return 0xff;
}
READ8_MEMBER(dynax_state::hanamai_keyboard_0_r)
{
int res = 0x3f;
/* the game reads all rows at once (keyb = 0) to check if a key is pressed */
if (!BIT(m_keyb, 0)) res &= ioport("KEY0")->read();
if (!BIT(m_keyb, 1)) res &= ioport("KEY1")->read();
if (!BIT(m_keyb, 2)) res &= ioport("KEY2")->read();
if (!BIT(m_keyb, 3)) res &= ioport("KEY3")->read();
if (!BIT(m_keyb, 4)) res &= ioport("KEY4")->read();
return res;
}
READ8_MEMBER(dynax_state::hanamai_keyboard_1_r)
{
int res = 0x3f;
/* the game reads all rows at once (keyb = 0) to check if a key is pressed */
if (!BIT(m_keyb, 0)) res &= ioport("KEY5")->read();
if (!BIT(m_keyb, 1)) res &= ioport("KEY6")->read();
if (!BIT(m_keyb, 2)) res &= ioport("KEY7")->read();
if (!BIT(m_keyb, 3)) res &= ioport("KEY8")->read();
if (!BIT(m_keyb, 4)) res &= ioport("KEY9")->read();
return res;
}
WRITE8_MEMBER(dynax_state::hanamai_keyboard_w)
{
m_keyb = data;
}
WRITE8_MEMBER(dynax_state::dynax_rombank_w)
{
membank("bank1")->set_entry(data & 0x0f);
}
WRITE8_MEMBER(dynax_state::jantouki_sound_rombank_w)
{
membank("bank2")->set_entry(data);
}
WRITE8_MEMBER(dynax_state::hnoridur_rombank_w)
{
m_bankdev->set_bank(data & 0x1f);
}
WRITE8_MEMBER(dynax_state::hnoridur_palette_lo_w)
{
m_palette_ram[256 * m_palbank + offset + 16 * 256] = data;
hnoridur_palette_update(offset);
}
WRITE8_MEMBER(dynax_state::hnoridur_palette_hi_w)
{
m_palette_ram[256 * m_palbank + offset] = data;
hnoridur_palette_update(offset);
}
void dynax_state::hnoridur_palette_update(offs_t offset)
{
int x = (m_palette_ram[256 * m_palbank + offset] << 8) + m_palette_ram[256 * m_palbank + offset + 16 * 256];
/* The bits are in reverse order! */
int r = bitswap<5>((x >> 0) & 0x1f, 0, 1, 2, 3, 4);
int g = bitswap<5>((x >> 5) & 0x1f, 0, 1, 2, 3, 4);
int b = bitswap<5>((x >> 10) & 0x1f, 0, 1, 2, 3, 4);
m_palette->set_pen_color(256 * m_palbank + offset, pal5bit(r), pal5bit(g), pal5bit(b));
}
WRITE8_MEMBER(dynax_state::nanajign_palette_lo_w)
{
m_palette_ram[256 * m_palbank + offset + 16 * 256] = data;
nanajign_palette_update(offset);
}
WRITE8_MEMBER(dynax_state::nanajign_palette_hi_w)
{
m_palette_ram[256 * m_palbank + offset] = data;
nanajign_palette_update(offset);
}
void dynax_state::nanajign_palette_update(offs_t offset)
{
int bg = m_palette_ram[256 * m_palbank + offset];
int br = m_palette_ram[256 * m_palbank + offset + 16 * 256];
int r = br & 0x1f;
int g = bg & 0x1f;
int b = ((bg & 0xc0) >> 3) | ((br & 0xe0) >> 5);
m_palette->set_pen_color(256 * m_palbank + offset, pal5bit(r), pal5bit(g), pal5bit(b));
}
WRITE_LINE_MEMBER(dynax_state::adpcm_int)
{
m_msm->write_data(m_msm5205next >> 4);
m_msm5205next <<= 4;
m_toggle = 1 - m_toggle;
if (m_toggle)
{
if (m_resetkludge) // don't know what's wrong, but NMIs when the 5205 is reset make the game crash
m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero);
}
}
WRITE_LINE_MEMBER(dynax_state::adpcm_int_cpu1)
{
m_msm->write_data(m_msm5205next >> 4);
m_msm5205next <<= 4;
m_toggle_cpu1 = 1 - m_toggle_cpu1;
if (m_toggle_cpu1)
{
if (m_resetkludge) // don't know what's wrong, but NMIs when the 5205 is reset make the game crash
m_soundcpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); // cpu1
}
}
WRITE8_MEMBER(dynax_state::adpcm_data_w)
{
m_msm5205next = data;
}
WRITE8_MEMBER(dynax_state::adpcm_reset_w)
{
m_resetkludge = data & 1;
m_msm->reset_w(~data & 1);
}
WRITE_LINE_MEMBER(dynax_state::adpcm_reset_kludge_w)
{
m_resetkludge = state;
}
MACHINE_RESET_MEMBER(dynax_state,adpcm)
{
/* start with the MSM5205 reset */
m_resetkludge = 0;
m_msm->reset_w(1);
}
void dynax_state::cdracula_mem_map(address_map &map)
{
map(0x0000, 0xbfff).rom();
map(0xc000, 0xffff).ram();
}
void dynax_state::sprtmtch_mem_map(address_map &map)
{
map(0x0000, 0x6fff).rom();
map(0x7000, 0x7fff).ram().share("nvram");
map(0x8000, 0xffff).bankr("bank1");
}
void dynax_state::hnoridur_mem_map(address_map &map)
{
map(0x0000, 0x6fff).rom();
map(0x7000, 0x7fff).ram().share("nvram");
map(0x8000, 0xffff).m(m_bankdev, FUNC(address_map_bank_device::amap8));
}
void dynax_state::mcnpshnt_mem_map(address_map &map)
{
map(0x0000, 0x5fff).rom();
map(0x6000, 0x6fff).ram();
map(0x7000, 0x7fff).ram().share("nvram");
map(0x8000, 0xffff).m(m_bankdev, FUNC(address_map_bank_device::amap8));
}
void dynax_state::nanajign_mem_map(address_map &map)
{
map(0x0000, 0x5fff).rom();
map(0x6000, 0x6fff).ram();
map(0x7000, 0x7fff).ram().share("nvram");
map(0x8000, 0xffff).m(m_bankdev, FUNC(address_map_bank_device::amap8));
}
void dynax_state::mjdialq2_mem_map(address_map &map)
{
map(0x0000, 0x7fff).rom();
map(0x0800, 0x0fff).ram();
map(0x1000, 0x1fff).ram().share("nvram");
map(0x8000, 0xffff).bankr("bank1");
}
void dynax_state::yarunara_mem_map(address_map &map)
{
map(0x0000, 0x5fff).rom();
map(0x6000, 0x6fff).ram();
map(0x7000, 0x7fff).ram().share("nvram");
map(0x8000, 0xffff).m(m_bankdev, FUNC(address_map_bank_device::amap8));
}
//identical to yarunara, but nvram is in the 0x6000 - 0x6fff range
void dynax_state::quiztvqq_mem_map(address_map &map)
{
map(0x0000, 0x5fff).rom();
map(0x6000, 0x6fff).ram().share("nvram");
map(0x7000, 0x7fff).ram();
map(0x8000, 0xffff).m(m_bankdev, FUNC(address_map_bank_device::amap8));
}
void dynax_state::jantouki_mem_map(address_map &map)
{
map(0x0000, 0x5fff).rom();
map(0x6000, 0x6fff).ram();
map(0x7000, 0x7fff).ram().share("nvram");
map(0x8000, 0xffff).bankr("bank1");
}
void dynax_state::jantouki_sound_mem_map(address_map &map)
{
map(0x0000, 0x77ff).rom();
map(0x7800, 0x7fff).ram();
map(0x8000, 0xffff).bankr("bank2");
}
void dynax_state::hnoridur_banked_map(address_map &map)
{
map(0x00000, 0x7ffff).rom().region("maincpu", 0x10000);
map(0x80000, 0x800ff).w(FUNC(dynax_state::hnoridur_palette_lo_w));
map(0xa0000, 0xa00ff).w(FUNC(dynax_state::hnoridur_palette_hi_w));
map(0xc0000, 0xc7fff).ram(); // hnoridur: R/W RAM
}
void dynax_state::mjelctrn_banked_map(address_map &map)
{
map(0x00000, 0x3ffff).rom().region("maincpu", 0x10000);
map(0x80000, 0x800ff).w(FUNC(dynax_state::nanajign_palette_lo_w));
map(0xa0000, 0xa00ff).w(FUNC(dynax_state::nanajign_palette_hi_w));
}
void dynax_state::nanajign_banked_map(address_map &map)
{
map(0x00000, 0x7ffff).rom().region("maincpu", 0x10000);
map(0x80000, 0x800ff).w(FUNC(dynax_state::nanajign_palette_lo_w));
map(0xa0000, 0xa00ff).w(FUNC(dynax_state::nanajign_palette_hi_w));
}
void dynax_state::yarunara_banked_map(address_map &map)
{
map(0x00000, 0x3ffff).rom().region("maincpu", 0x10000);
map(0x80000, 0x801ff).w(FUNC(dynax_state::tenkai_palette_w));
map(0xe0000, 0xe000f).rw("rtc", FUNC(msm6242_device::read), FUNC(msm6242_device::write));
}
void dynax_state::mjangels_banked_map(address_map &map)
{
map(0x000000, 0x07ffff).rom().region("maincpu", 0x010000);
map(0x080000, 0x0801ff).w(FUNC(dynax_state::tenkai_palette_w));
map(0x0a0000, 0x0bffff).rom().region("maincpu", 0x0b0000);
map(0x0e0000, 0x0e000f).rw("rtc", FUNC(msm6242_device::read), FUNC(msm6242_device::write));
map(0x100000, 0x13ffff).rom().region("maincpu", 0x110000);
}
void dynax_state::hanamai_io_map(address_map &map)
{
map.global_mask(0xff);
map(0x00, 0x00).w(FUNC(dynax_state::dynax_extra_scrollx_w)); // screen scroll X
map(0x20, 0x20).w(FUNC(dynax_state::dynax_extra_scrolly_w)); // screen scroll Y
map(0x41, 0x47).w(m_blitter, FUNC(dynax_blitter_rev2_device::regs_w)); // Blitter
map(0x50, 0x50).w(FUNC(dynax_state::dynax_rombank_w)); // BANK ROM Select hnkochou only
map(0x60, 0x60).r(FUNC(dynax_state::hanamai_keyboard_0_r)); // P1
map(0x61, 0x61).r(FUNC(dynax_state::hanamai_keyboard_1_r)); // P2
map(0x62, 0x62).portr("COINS"); // Coins
map(0x63, 0x63).r(FUNC(dynax_state::ret_ff)); // ?
map(0x64, 0x64).w(FUNC(dynax_state::hanamai_keyboard_w)); // keyboard row select
map(0x65, 0x65).w(FUNC(dynax_state::dynax_rombank_w)); // BANK ROM Select hanamai only
map(0x66, 0x66).w(FUNC(dynax_state::dynax_vblank_ack_w)); // VBlank IRQ Ack
map(0x67, 0x67).w(FUNC(dynax_state::adpcm_data_w)); // MSM5205 data
map(0x68, 0x68).w(FUNC(dynax_state::dynax_layer_enable_w)); // Layers Enable
map(0x69, 0x69).w(FUNC(dynax_state::hanamai_priority_w)); // layer priority
map(0x6a, 0x6a).w(FUNC(dynax_state::dynax_blit_dest_w)); // Destination Layer
map(0x6b, 0x6b).w(m_blitter, FUNC(dynax_blitter_rev2_device::pen_w)); // Destination Pen
map(0x6c, 0x6c).w(FUNC(dynax_state::dynax_blit_palette01_w)); // Layers Palettes (Low Bits)
map(0x6d, 0x6d).w(FUNC(dynax_state::dynax_blit_palette23_w)); //
map(0x6e, 0x6e).w(FUNC(dynax_state::dynax_blit_backpen_w)); // Background Color
map(0x70, 0x77).w(m_mainlatch, FUNC(ls259_device::write_d0));
map(0x78, 0x79).rw("ym2203", FUNC(ym2203_device::read), FUNC(ym2203_device::write)); // 2 x DSW
map(0x7a, 0x7b).w("aysnd", FUNC(ay8912_device::address_data_w)); // AY8912
// map(0x7c, 0x7c).nopw(); // CRT Controller
// map(0x7d, 0x7d).nopw(); //
map(0x7e, 0x7e).w(FUNC(dynax_state::dynax_blit_romregion_w)); // Blitter ROM bank
}
void dynax_state::hnoridur_io_map(address_map &map)
{
map.global_mask(0xff);
map(0x01, 0x07).w(m_blitter, FUNC(dynax_blitter_rev2_device::regs_w)); // Blitter
// map(0x10, 0x10).nopw(); // CRT Controller
// map(0x11, 0x11).nopw(); // CRT Controller
map(0x20, 0x20).w(FUNC(dynax_state::hanamai_keyboard_w)); // keyboard row select
map(0x21, 0x21).portr("COINS"); // Coins
map(0x22, 0x22).r(FUNC(dynax_state::hanamai_keyboard_1_r)); // P2
map(0x23, 0x23).r(FUNC(dynax_state::hanamai_keyboard_0_r)); // P1
map(0x24, 0x24).portr("DSW1"); // DSW2
map(0x25, 0x25).portr("DSW3"); // DSW4
map(0x26, 0x26).portr("DSW2"); // DSW3
map(0x30, 0x30).w(FUNC(dynax_state::adpcm_reset_w)); // MSM5205 reset
map(0x32, 0x32).w(FUNC(dynax_state::adpcm_data_w)); // MSM5205 data
map(0x34, 0x35).w("ym2413", FUNC(ym2413_device::write)); //
map(0x36, 0x36).r("aysnd", FUNC(ay8912_device::data_r)); // AY8912, DSW0
map(0x38, 0x38).w("aysnd", FUNC(ay8912_device::data_w)); // AY8912
map(0x3a, 0x3a).w("aysnd", FUNC(ay8912_device::address_w)); //
map(0x40, 0x40).w(m_blitter, FUNC(dynax_blitter_rev2_device::pen_w)); // Destination Pen
map(0x41, 0x41).w(FUNC(dynax_state::dynax_blit_dest_w)); // Destination Layer
map(0x42, 0x42).w(FUNC(dynax_state::dynax_blit_palette01_w)); // Layers Palettes
map(0x43, 0x43).w(FUNC(dynax_state::dynax_blit_palette23_w)); //
map(0x44, 0x44).w(FUNC(dynax_state::hanamai_priority_w)); // layer priority and enable
map(0x45, 0x45).w(FUNC(dynax_state::dynax_blit_backpen_w)); // Background Color
map(0x46, 0x46).w(FUNC(dynax_state::dynax_blit_romregion_w)); // Blitter ROM bank
map(0x47, 0x47).w(FUNC(dynax_state::hnoridur_palbank_w));
map(0x50, 0x50).w(FUNC(dynax_state::dynax_extra_scrollx_w)); // screen scroll X
map(0x51, 0x51).w(FUNC(dynax_state::dynax_extra_scrolly_w)); // screen scroll Y
map(0x54, 0x54).w(FUNC(dynax_state::hnoridur_rombank_w)); // BANK ROM Select
map(0x55, 0x55).nopw(); // ? VBlank IRQ Ack
map(0x56, 0x56).w(FUNC(dynax_state::dynax_vblank_ack_w)); // VBlank IRQ Ack
map(0x57, 0x57).r(FUNC(dynax_state::ret_ff)); // ?
map(0x60, 0x67).w(m_mainlatch, FUNC(ls259_device::write_d0));
map(0x70, 0x77).w("outlatch", FUNC(ls259_device::write_d0));
}
/***************************************************************************
Hana Jingi
***************************************************************************/
WRITE_LINE_MEMBER(dynax_state::hjingi_lockout_w)
{
machine().bookkeeping().coin_lockout_w(0, !state);
}
WRITE_LINE_MEMBER(dynax_state::hjingi_hopper_w)
{
m_hopper = state;
}
uint8_t dynax_state::hjingi_hopper_bit()
{
return (m_hopper && !(m_screen->frame_number() % 10)) ? 0 : (1 << 6);
}
READ8_MEMBER(dynax_state::hjingi_keyboard_0_r)
{
return hanamai_keyboard_0_r(space, 0) | hjingi_hopper_bit();
}
READ8_MEMBER(dynax_state::hjingi_keyboard_1_r)
{
return hanamai_keyboard_1_r(space, 0) | ioport("BET")->read();
}
void dynax_state::hjingi_mem_map(address_map &map)
{
map(0x0000, 0x01ff).rom();
map(0x0200, 0x1fff).ram().share("nvram");
map(0x2000, 0x7fff).rom();
map(0x8000, 0xffff).m(m_bankdev, FUNC(address_map_bank_device::amap8));
map(0x8000, 0xffff).bankr("bank1");
}
void dynax_state::hjingi_banked_map(address_map &map)
{
map(0x80000, 0x800ff).w(FUNC(dynax_state::hnoridur_palette_lo_w));
map(0xa0000, 0xa00ff).w(FUNC(dynax_state::hnoridur_palette_hi_w));
}
void dynax_state::hjingi_io_map(address_map &map)
{
map.global_mask(0xff);
map(0x01, 0x07).w(m_blitter, FUNC(dynax_blitter_rev2_device::regs_w)); // Blitter
// map(0x10, 0x10).nopw(); // CRT Controller
// map(0x11, 0x11).nopw(); // CRT Controller
map(0x20, 0x20).w(FUNC(dynax_state::hanamai_keyboard_w)); // keyboard row select
map(0x21, 0x21).portr("COINS"); // Coins
map(0x22, 0x22).r(FUNC(dynax_state::hjingi_keyboard_1_r)); // P2 + Hopper
map(0x23, 0x23).r(FUNC(dynax_state::hjingi_keyboard_0_r)); // P1 + Hopper
map(0x24, 0x24).portr("DSW1"); // DSW1
map(0x25, 0x25).portr("DSW3"); // DSW3
map(0x26, 0x26).portr("DSW2"); // DSW2
map(0x30, 0x30).w(FUNC(dynax_state::adpcm_reset_w)); // MSM5205 reset
map(0x32, 0x32).w(FUNC(dynax_state::adpcm_data_w)); // MSM5205 data
map(0x34, 0x35).w("ym2413", FUNC(ym2413_device::write)); //
map(0x36, 0x36).r("aysnd", FUNC(ay8912_device::data_r)); // AY8912, DSW0
map(0x38, 0x38).w("aysnd", FUNC(ay8912_device::data_w)); // AY8912
map(0x3a, 0x3a).w("aysnd", FUNC(ay8912_device::address_w)); //
map(0x40, 0x40).w(m_blitter, FUNC(dynax_blitter_rev2_device::pen_w)); // Destination Pen
map(0x41, 0x41).w(FUNC(dynax_state::dynax_blit_dest_w)); // Destination Layer
map(0x42, 0x42).w(FUNC(dynax_state::dynax_blit_palette01_w)); // Layers Palettes
map(0x43, 0x43).w(FUNC(dynax_state::dynax_blit_palette23_w)); //
map(0x44, 0x44).w(FUNC(dynax_state::hanamai_priority_w)); // layer priority and enable
map(0x45, 0x45).w(FUNC(dynax_state::dynax_blit_backpen_w)); // Background Color
map(0x46, 0x46).w(FUNC(dynax_state::dynax_blit_romregion_w)); // Blitter ROM bank
map(0x47, 0x47).w(FUNC(dynax_state::hnoridur_palbank_w));
map(0x50, 0x50).w(FUNC(dynax_state::dynax_extra_scrollx_w)); // screen scroll X
map(0x51, 0x51).w(FUNC(dynax_state::dynax_extra_scrolly_w)); // screen scroll Y
map(0x54, 0x54).w(FUNC(dynax_state::hnoridur_rombank_w)); // palette bank select
map(0x56, 0x56).w(FUNC(dynax_state::dynax_vblank_ack_w)); // VBlank IRQ Ack
map(0x57, 0x57).r(FUNC(dynax_state::ret_ff)); // Blitter Busy
map(0x60, 0x67).w(m_mainlatch, FUNC(ls259_device::write_d0)); // Flip screen, layer half select, etc.
map(0x70, 0x77).w("outlatch", FUNC(ls259_device::write_d0)); // Coin Counters, Hopper, Coin Lockout
map(0x80, 0x80).w(FUNC(dynax_state::dynax_rombank_w)); // BANK ROM Select
}
/***************************************************************************
Yarunara / Quiz TV Q&Q / Mahjong Angels
***************************************************************************/
WRITE8_MEMBER(dynax_state::yarunara_input_w)
{
switch (offset)
{
case 0: m_input_sel = data;
m_keyb = 0;
break;
case 1: break;
}
}
READ8_MEMBER(dynax_state::yarunara_input_r)
{
static const char *const keynames0[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4" };
static const char *const keynames1[] = { "KEY5", "KEY6", "KEY7", "KEY8", "KEY9" };
switch (offset)
{
case 0:
{
switch (m_input_sel)
{
case 0x00:
return ioport("COINS")->read(); // coins
case 0x02:
return 0xff; // bit 7 must be 1. Bit 2?
default:
return 0xff;
}
}
case 1:
{
switch (m_input_sel)
{
// player 2
case 0x01: //quiztvqq
case 0x81:
return ioport(keynames1[m_keyb++])->read();
// player 1
case 0x02: //quiztvqq
case 0x82:
return ioport(keynames0[m_keyb++])->read();
default:
return 0xff;
}
}
}
return 0xff;
}
WRITE8_MEMBER(dynax_state::yarunara_rombank_w)
{
m_bankdev->set_bank(data & 0x3f);
}
WRITE8_MEMBER(dynax_state::yarunara_blit_romregion_w)
{
switch(data)
{
case 0x00: dynax_blit_romregion_w(space, 0, 0); return;
case 0x01: dynax_blit_romregion_w(space, 0, 1); return;
case 0x80: dynax_blit_romregion_w(space, 0, 2); return;
case 0x81: dynax_blit_romregion_w(space, 0, 3); return;
case 0x82: dynax_blit_romregion_w(space, 0, 4); return; // mjcomv1
}
logerror("%s: unmapped romregion=%02X\n", machine().describe_context(), data);
}
void dynax_state::yarunara_io_map(address_map &map)
{
map.global_mask(0xff);
map(0x00, 0x01).w(FUNC(dynax_state::yarunara_input_w)); // Controls
map(0x02, 0x03).r(FUNC(dynax_state::yarunara_input_r)); //
map(0x11, 0x17).w(m_blitter, FUNC(dynax_blitter_rev2_device::regs_w)); // Blitter
map(0x20, 0x20).w(FUNC(dynax_state::adpcm_reset_w)); // MSM5205 reset
map(0x22, 0x22).w(FUNC(dynax_state::adpcm_data_w)); // MSM5205 data
map(0x24, 0x25).w("ym2413", FUNC(ym2413_device::write)); //
map(0x28, 0x28).w("aysnd", FUNC(ay8912_device::data_w)); // AY8912
map(0x2a, 0x2a).w("aysnd", FUNC(ay8912_device::address_w)); //
map(0x48, 0x48).w(FUNC(dynax_state::dynax_extra_scrollx_w)); // screen scroll X
map(0x49, 0x49).w(FUNC(dynax_state::dynax_extra_scrolly_w)); // screen scroll Y
map(0x4a, 0x4a).w(FUNC(dynax_state::yarunara_rombank_w)); // BANK ROM Select
map(0x4b, 0x4b).w(FUNC(dynax_state::dynax_vblank_ack_w)); // VBlank IRQ Ack
map(0x4c, 0x4c).portr("DSW0"); // DSW 1
map(0x4f, 0x4f).portr("DSW1"); // DSW 2
map(0x50, 0x57).w(m_mainlatch, FUNC(ls259_device::write_d1));
map(0x68, 0x68).w(m_blitter, FUNC(dynax_blitter_rev2_device::pen_w)); // Destination Pen
map(0x69, 0x69).w(FUNC(dynax_state::dynax_blit_dest_w)); // Destination Layer
map(0x6a, 0x6a).w(FUNC(dynax_state::dynax_blit_palette01_w)); // Layers Palettes
map(0x6b, 0x6b).w(FUNC(dynax_state::dynax_blit_palette23_w)); //
map(0x6c, 0x6c).w(FUNC(dynax_state::hanamai_priority_w)); // layer priority and enable
map(0x6d, 0x6d).w(FUNC(dynax_state::dynax_blit_backpen_w)); // Background Color
map(0x6e, 0x6e).w(FUNC(dynax_state::yarunara_blit_romregion_w)); // Blitter ROM bank
}
// Almost identical to hnoridur
void dynax_state::mcnpshnt_io_map(address_map &map)
{
map.global_mask(0xff);
map(0x01, 0x07).w(m_blitter, FUNC(dynax_blitter_rev2_device::regs_w)); // Blitter
// map(0x10, 0x10).nopw(); // CRT Controller
// map(0x11, 0x11).nopw(); // CRT Controller
map(0x20, 0x20).w(FUNC(dynax_state::hanamai_keyboard_w)); // keyboard row select
map(0x21, 0x21).portr("COINS"); // Coins
map(0x22, 0x22).r(FUNC(dynax_state::hanamai_keyboard_1_r)); // P2
map(0x23, 0x23).r(FUNC(dynax_state::hanamai_keyboard_0_r)); // P1
map(0x24, 0x24).portr("DSW0"); // DSW2
map(0x26, 0x26).portr("DSW1"); // DSW3
map(0x30, 0x30).w(FUNC(dynax_state::adpcm_reset_w)); // MSM5205 reset
map(0x32, 0x32).w(FUNC(dynax_state::adpcm_data_w)); // MSM5205 data
map(0x34, 0x35).w("ym2413", FUNC(ym2413_device::write)); //
map(0x38, 0x38).w("aysnd", FUNC(ay8912_device::data_w)); // AY8912
map(0x3a, 0x3a).w("aysnd", FUNC(ay8912_device::address_w)); //
map(0x40, 0x40).w(m_blitter, FUNC(dynax_blitter_rev2_device::pen_w)); // Destination Pen
map(0x41, 0x41).w(FUNC(dynax_state::dynax_blit_dest_w)); // Destination Layer
map(0x42, 0x42).w(FUNC(dynax_state::dynax_blit_palette01_w)); // Layers Palettes
map(0x43, 0x43).w(FUNC(dynax_state::dynax_blit_palette23_w)); //
map(0x44, 0x44).w(FUNC(dynax_state::hanamai_priority_w)); // layer priority and enable
map(0x45, 0x45).w(FUNC(dynax_state::dynax_blit_backpen_w)); // Background Color
map(0x46, 0x46).w(FUNC(dynax_state::yarunara_blit_romregion_w)); // Blitter ROM bank
map(0x47, 0x47).w(FUNC(dynax_state::hnoridur_palbank_w));
map(0x50, 0x50).w(FUNC(dynax_state::dynax_extra_scrollx_w)); // screen scroll X
map(0x51, 0x51).w(FUNC(dynax_state::dynax_extra_scrolly_w)); // screen scroll Y
map(0x54, 0x54).w(FUNC(dynax_state::hnoridur_rombank_w)); // BANK ROM Select
map(0x56, 0x56).w(FUNC(dynax_state::dynax_vblank_ack_w)); // VBlank IRQ Ack
map(0x57, 0x57).r(FUNC(dynax_state::ret_ff)); // ?
map(0x60, 0x67).w(m_mainlatch, FUNC(ls259_device::write_d0));
map(0x70, 0x77).w("outlatch", FUNC(ls259_device::write_d0));
}
void dynax_state::sprtmtch_io_map(address_map &map)
{
map.global_mask(0xff);
map(0x01, 0x07).w(m_blitter, FUNC(dynax_blitter_rev2_device::regs_w)); // Blitter
map(0x10, 0x11).rw("ym2203", FUNC(ym2203_device::read), FUNC(ym2203_device::write)); // 2 x DSW
// map(0x12, 0x12).nopw(); // CRT Controller
// map(0x13, 0x13).nopw(); // CRT Controller
map(0x20, 0x20).portr("P1"); // P1
map(0x21, 0x21).portr("P2"); // P2
map(0x22, 0x22).portr("COINS"); // Coins
map(0x23, 0x23).r(FUNC(dynax_state::ret_ff)); // ?
map(0x30, 0x30).w(FUNC(dynax_state::dynax_layer_enable_w)); // Layers Enable
map(0x31, 0x31).w(FUNC(dynax_state::dynax_rombank_w)); // BANK ROM Select
map(0x32, 0x32).w(FUNC(dynax_state::dynax_blit_dest_w)); // Destination Layer
map(0x33, 0x33).w(m_blitter, FUNC(dynax_blitter_rev2_device::pen_w)); // Destination Pen
map(0x34, 0x34).w(FUNC(dynax_state::dynax_blit_palette01_w)); // Layers Palettes (Low Bits)
map(0x35, 0x35).w(FUNC(dynax_state::dynax_blit_palette23_w)); //
map(0x36, 0x36).w(FUNC(dynax_state::dynax_blit_backpen_w)); // Background Color
map(0x37, 0x37).w(FUNC(dynax_state::dynax_vblank_ack_w)); // VBlank IRQ Ack
map(0x40, 0x47).w(m_mainlatch, FUNC(ls259_device::write_d0));
}
void dynax_state::mjfriday_io_map(address_map &map)
{
map.global_mask(0xff);
map(0x00, 0x00).w(m_blitter, FUNC(dynax_blitter_rev2_device::pen_w)); // Destination Pen
map(0x01, 0x01).w(FUNC(dynax_state::dynax_blit_palette01_w)); // Layers Palettes (Low Bits)
map(0x02, 0x02).w(FUNC(dynax_state::dynax_rombank_w)); // BANK ROM Select
map(0x03, 0x03).w(FUNC(dynax_state::dynax_blit_backpen_w)); // Background Color
map(0x10, 0x17).w(m_mainlatch, FUNC(ls259_device::write_d0));
map(0x41, 0x47).w(m_blitter, FUNC(dynax_blitter_rev2_device::regs_w)); // Blitter
// map(0x50, 0x50).nopw(); // CRT Controller
// map(0x51, 0x51).nopw(); // CRT Controller
map(0x60, 0x60).w(FUNC(dynax_state::hanamai_keyboard_w)); // keyboard row select
map(0x61, 0x61).portr("COINS"); // Coins
map(0x62, 0x62).r(FUNC(dynax_state::hanamai_keyboard_1_r)); // P2
map(0x63, 0x63).r(FUNC(dynax_state::hanamai_keyboard_0_r)); // P1
map(0x64, 0x64).portr("DSW0"); // DSW
map(0x67, 0x67).portr("DSW1"); // DSW
map(0x70, 0x71).w("ym2413", FUNC(ym2413_device::write)); //
// map(0x80, 0x80).nopw(); // IRQ ack?
}
void dynax_state::nanajign_io_map(address_map &map)
{
map.global_mask(0xff);
map(0x00, 0x00).w(FUNC(dynax_state::adpcm_reset_w)); // MSM5205 reset
map(0x02, 0x02).w(FUNC(dynax_state::adpcm_data_w)); // MSM5205 data
map(0x04, 0x05).w("ym2413", FUNC(ym2413_device::write)); //
map(0x08, 0x08).w("aysnd", FUNC(ay8912_device::data_w)); // AY8912
map(0x0a, 0x0a).w("aysnd", FUNC(ay8912_device::address_w)); //
map(0x10, 0x10).w(FUNC(dynax_state::hanamai_keyboard_w)); // keyboard row select
map(0x11, 0x11).portr("COINS"); // Coins
map(0x12, 0x12).r(FUNC(dynax_state::hanamai_keyboard_1_r)); // P2
map(0x13, 0x13).r(FUNC(dynax_state::hanamai_keyboard_0_r)); // P1
map(0x14, 0x14).portr("DSW0"); // DSW1
map(0x15, 0x15).portr("DSW1"); // DSW2
map(0x16, 0x16).portr("DSW2"); // DSW3
// map(0x20, 0x21).nopw(); // CRT Controller
map(0x31, 0x37).w(m_blitter, FUNC(dynax_blitter_rev2_device::regs_w)); // Blitter
map(0x40, 0x47).w("outlatch", FUNC(ls259_device::write_d0)); // Coin Counter
map(0x50, 0x57).w(m_mainlatch, FUNC(ls259_device::write_d0));
map(0x60, 0x60).w(FUNC(dynax_state::dynax_extra_scrollx_w)); // screen scroll X
map(0x62, 0x62).w(FUNC(dynax_state::dynax_extra_scrolly_w)); // screen scroll Y
map(0x6a, 0x6a).w(FUNC(dynax_state::hnoridur_rombank_w)); // BANK ROM Select
map(0x6c, 0x6c).w(FUNC(dynax_state::dynax_vblank_ack_w)); // VBlank IRQ Ack
map(0x70, 0x70).w(m_blitter, FUNC(dynax_blitter_rev2_device::pen_w)); // Destination Pen
map(0x71, 0x71).w(FUNC(dynax_state::dynax_blit_dest_w)); // Destination Layer
map(0x72, 0x72).w(FUNC(dynax_state::dynax_blit_palette01_w)); // Layers Palettes
map(0x73, 0x73).w(FUNC(dynax_state::dynax_blit_palette23_w)); //
map(0x74, 0x74).w(FUNC(dynax_state::hanamai_priority_w)); // layer priority and enable
map(0x75, 0x75).w(FUNC(dynax_state::dynax_blit_backpen_w)); // Background Color
map(0x76, 0x76).w(FUNC(dynax_state::yarunara_blit_romregion_w)); // Blitter ROM bank
map(0x77, 0x77).w(FUNC(dynax_state::hnoridur_palbank_w));
}
/***************************************************************************
Jantouki - Main CPU
***************************************************************************/
READ8_MEMBER(dynax_state::jantouki_soundlatch_ack_r)
{
machine().scheduler().synchronize();
return m_soundlatch->pending_r() ? 0x80 : 0;
}
READ8_MEMBER(dynax_state::jantouki_blitter_busy_r)
{
return 0; // bit 0 & 1
}
WRITE8_MEMBER(dynax_state::jantouki_rombank_w)
{
membank("bank1")->set_entry(data & 0x0f);
m_led = BIT(data, 4); // maybe
}
void dynax_state::jantouki_io_map(address_map &map)
{
map.global_mask(0xff);
// map(0x40, 0x41).nopw(); // CRT Controller
map(0x48, 0x48).w(FUNC(dynax_state::jantouki_rombank_w)); // BANK ROM Select
map(0x49, 0x49).w(m_soundlatch, FUNC(generic_latch_8_device::write)); // To Sound CPU
map(0x4a, 0x4a).r(FUNC(dynax_state::jantouki_soundlatch_ack_r)); // Soundlatch status
map(0x4b, 0x4b).w(FUNC(dynax_state::dynax_blit2_dest_w)); // Destination Layer 2
map(0x4d, 0x4d).w(FUNC(dynax_state::dynax_blit_dest_w)); // Destination Layer
map(0x4f, 0x4f).w(FUNC(dynax_state::dynax_blit2_romregion_w)); // Blitter 2 ROM bank
map(0x50, 0x50).w(FUNC(dynax_state::jantouki_vblank_ack_w)); // VBlank IRQ Ack
map(0x51, 0x51).w(FUNC(dynax_state::hanamai_keyboard_w)); // keyboard row select
map(0x52, 0x52).r(FUNC(dynax_state::hanamai_keyboard_0_r)); // P1
map(0x54, 0x54).portr("COINS"); // Coins
map(0x55, 0x55).portr("DSW0"); // DSW1
map(0x56, 0x56).portr("DSW1"); // DSW2
map(0x58, 0x5f).w(m_mainlatch, FUNC(ls259_device::write_d0));
map(0x60, 0x60).w(FUNC(dynax_state::dynax_blit_palette67_w)); // Layers Palettes (Low Bits)
map(0x61, 0x61).w(FUNC(dynax_state::dynax_blit_palette45_w)); //
map(0x62, 0x62).w(FUNC(dynax_state::dynax_blit_palette23_w)); //
map(0x63, 0x63).w(FUNC(dynax_state::dynax_blit_palette01_w)); //
map(0x64, 0x64).w(FUNC(dynax_state::dynax_blit_backpen_w)); // Background Color
map(0x65, 0x65).w(m_blitter2, FUNC(dynax_blitter_rev2_device::pen_w)); // Destination Pen 2
map(0x66, 0x66).w(m_blitter, FUNC(dynax_blitter_rev2_device::pen_w)); // Destination Pen
map(0x67, 0x67).r(FUNC(dynax_state::jantouki_blitter_busy_r)); //
map(0x69, 0x6f).w(m_blitter2, FUNC(dynax_blitter_rev2_device::regs_w)); // Blitter 2
map(0x71, 0x77).w(m_blitter, FUNC(dynax_blitter_rev2_device::regs_w)); // Blitter
map(0x78, 0x7e).w(FUNC(dynax_state::jantouki_layer_enable_w)); // Layers Enable
}
/***************************************************************************
Jantouki - Sound CPU
***************************************************************************/
READ8_MEMBER(dynax_state::jantouki_soundlatch_status_r)
{
return m_soundlatch->pending_r() ? 0 : 0x80;
}
void dynax_state::jantouki_sound_io_map(address_map &map)
{
map.global_mask(0xff);
map(0x00, 0x00).w(FUNC(dynax_state::jantouki_sound_rombank_w)); // BANK ROM Select
map(0x10, 0x10).w(FUNC(dynax_state::jantouki_sound_vblank_ack_w)); // VBlank IRQ Ack
map(0x21, 0x21).r("aysnd", FUNC(ay8912_device::data_r)); // AY8912
map(0x22, 0x23).w("aysnd", FUNC(ay8912_device::data_address_w)); //
map(0x28, 0x29).rw("ym2203", FUNC(ym2203_device::read), FUNC(ym2203_device::write)); //
map(0x30, 0x30).w(FUNC(dynax_state::adpcm_reset_w)); // MSM5205 reset
map(0x40, 0x40).w(FUNC(dynax_state::adpcm_data_w)); // MSM5205 data
map(0x50, 0x50).r(FUNC(dynax_state::jantouki_soundlatch_status_r)); // Soundlatch status
map(0x60, 0x60).w(m_soundlatch, FUNC(generic_latch_8_device::acknowledge_w));
map(0x70, 0x70).r(m_soundlatch, FUNC(generic_latch_8_device::read)); // From Main CPU
}
/***************************************************************************
Mahjong Electron Base
***************************************************************************/
READ8_MEMBER(dynax_state::mjelctrn_keyboard_1_r)
{
return (hanamai_keyboard_1_r(space, 0) & 0x3f) | (ioport("FAKE")->read() ? 0x40 : 0);
}
READ8_MEMBER(dynax_state::mjelctrn_dsw_r)
{
int dsw = (m_keyb & 0xc0) >> 6;
static const char *const dswnames[] = { "DSW0", "DSW1", "DSW2", "DSW3" };
return ioport(dswnames[dsw])->read();
}
void dynax_state::mjelctrn_io_map(address_map &map)
{
map.global_mask(0xff);
map(0x00, 0x00).w(FUNC(dynax_state::adpcm_reset_w)); // MSM5205 reset
map(0x02, 0x02).w(FUNC(dynax_state::adpcm_data_w)); // MSM5205 data
map(0x04, 0x05).w("ym2413", FUNC(ym2413_device::write)); //
map(0x08, 0x08).w("aysnd", FUNC(ay8912_device::data_w)); // AY8912
map(0x0a, 0x0a).w("aysnd", FUNC(ay8912_device::address_w)); //
// map(0x20, 0x20).nopw(); // CRT Controller
// map(0x21, 0x21).nopw(); // CRT Controller
map(0x40, 0x47).w("outlatch", FUNC(ls259_device::write_d0));
map(0x60, 0x60).w(FUNC(dynax_state::dynax_extra_scrollx_w)); // screen scroll X
map(0x62, 0x62).w(FUNC(dynax_state::dynax_extra_scrolly_w)); // screen scroll Y
// map(0x64, 0x64).w(FUNC(dynax_state::dynax_extra_scrollx_w)); // screen scroll X
// map(0x66, 0x66).w(FUNC(dynax_state::dynax_extra_scrolly_w)); // screen scroll Y
map(0x6a, 0x6a).w(FUNC(dynax_state::hnoridur_rombank_w)); // BANK ROM Select
map(0x80, 0x80).w(FUNC(dynax_state::hanamai_keyboard_w)); // keyboard row select
map(0x81, 0x81).portr("COINS"); // Coins
map(0x82, 0x82).r(FUNC(dynax_state::mjelctrn_keyboard_1_r)); // P2
map(0x83, 0x83).r(FUNC(dynax_state::hanamai_keyboard_0_r)); // P1
map(0x84, 0x84).r(FUNC(dynax_state::mjelctrn_dsw_r)); // DSW8 x 4
map(0x85, 0x85).portr("SW1"); // DSW2
map(0xa1, 0xa7).w(m_blitter, FUNC(dynax_blitter_rev2_device::regs_w)); // Blitter
map(0xc0, 0xc7).w(m_mainlatch, FUNC(ls259_device::write_d0));
map(0xe0, 0xe0).w(m_blitter, FUNC(dynax_blitter_rev2_device::pen_w)); // Destination Pen
map(0xe1, 0xe1).w(FUNC(dynax_state::dynax_blit_dest_w)); // Destination Layer
map(0xe2, 0xe2).w(FUNC(dynax_state::dynax_blit_palette01_w)); // Layers Palettes
map(0xe3, 0xe3).w(FUNC(dynax_state::dynax_blit_palette23_w)); //
map(0xe4, 0xe4).w(FUNC(dynax_state::hanamai_priority_w)); // layer priority and enable
map(0xe5, 0xe5).w(FUNC(dynax_state::dynax_blit_backpen_w)); // Background Color
map(0xe6, 0xe6).w(FUNC(dynax_state::yarunara_blit_romregion_w)); // Blitter ROM bank
map(0xe7, 0xe7).w(FUNC(dynax_state::hnoridur_palbank_w));
}
void dynax_state::mjembase_io_map(address_map &map)
{
map.global_mask(0xff);
map(0x04, 0x05).w("ym2413", FUNC(ym2413_device::write)); //
map(0x06, 0x06).r("aysnd", FUNC(ay8912_device::data_r)); // AY8912, dsw0
map(0x08, 0x08).w("aysnd", FUNC(ay8912_device::data_w)); //
map(0x0a, 0x0a).w("aysnd", FUNC(ay8912_device::address_w)); //
map(0x20, 0x20).w(FUNC(dynax_state::hanamai_keyboard_w)); // keyboard row select
map(0x21, 0x21).portr("COINS"); // Coins
map(0x22, 0x22).r(FUNC(dynax_state::mjelctrn_keyboard_1_r)); // P2
map(0x23, 0x23).r(FUNC(dynax_state::hanamai_keyboard_0_r)); // P1
map(0x24, 0x24).portr("DSW3");
// map(0x40, 0x40).nopw(); // CRT Controller
// map(0x41, 0x41).nopw(); // CRT Controller
map(0x61, 0x67).w(m_blitter, FUNC(dynax_blitter_rev2_device::regs_w)); // Blitter
map(0x80, 0x87).w(m_mainlatch, FUNC(ls259_device::write_d0));
map(0xa0, 0xa0).w(FUNC(dynax_state::hnoridur_rombank_w)); // BANK ROM Select
map(0xc0, 0xc0).w(m_blitter, FUNC(dynax_blitter_rev2_device::pen_w)); // Destination Pen
map(0xc1, 0xc1).w(FUNC(dynax_state::mjembase_blit_dest_w)); // Destination Layer
map(0xc2, 0xc2).w(FUNC(dynax_state::dynax_blit_palette01_w)); // Layers Palettes
map(0xc3, 0xc3).w(FUNC(dynax_state::mjembase_blit_palette23_w)); //
map(0xc4, 0xc4).w(FUNC(dynax_state::mjembase_priority_w)); // layer priority and enable
map(0xc5, 0xc5).w(FUNC(dynax_state::dynax_blit_backpen_w)); // Background Color
map(0xc6, 0xc6).w(FUNC(dynax_state::yarunara_blit_romregion_w)); // Blitter ROM bank
map(0xc7, 0xc7).w(FUNC(dynax_state::hnoridur_palbank_w));
}
/***************************************************************************
Mahjong Tenkaigen
***************************************************************************/
WRITE8_MEMBER(dynax_state::tenkai_ipsel_w)
{
switch (offset)
{
case 0: m_input_sel = data;
m_keyb = 0;
break;
case 1: break;
}
}
WRITE8_MEMBER(dynax_state::tenkai_ip_w)
{
switch (m_input_sel)
{
case 0x0c:
machine().bookkeeping().coin_counter_w(0, data & 0x01);
machine().bookkeeping().coin_counter_w(1, data & 0x02);
// bit 2?
// bit 3?
// popmessage("%02x", data);
return;
case 0x0d:
if (data != 0xff)
break;
return;
}
logerror("%04x: unmapped ip_sel=%02x written with %02x\n", m_maincpu->pc(), m_input_sel, data);
}
READ8_MEMBER(dynax_state::tenkai_ip_r)
{
static const char *const keynames0[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4" };
//static const char *const keynames1[] = { "KEY5", "KEY6", "KEY7", "KEY8", "KEY9" };
switch (offset)
{
case 0:
{
switch (m_input_sel)
{
case 0x00:
return ioport("COINS")->read(); // coins
default:
logerror("%04x: unmapped ip_sel=%02x read from offs %x\n", m_maincpu->pc(), m_input_sel, offset);
return 0xff;
}
}
case 1:
{
switch (m_input_sel)
{
case 0x0d:
return 0xff;
// player 2
case 0x81:
if (m_keyb >= 5)
logerror("%04x: unmapped keyb=%02x read\n", m_maincpu->pc(), m_keyb);
return 0xff;//ioport(keynames1[m_keyb++])->read();
// player 1
case 0x82:
if (m_keyb >= 5)
logerror("%04x: unmapped keyb=%02x read\n", m_maincpu->pc(), m_keyb);
return ioport(keynames0[m_keyb++])->read();
default:
logerror("%04x: unmapped ip_sel=%02x read from offs %x\n", m_maincpu->pc(), m_input_sel, offset);
return 0xff;
}
}
}
return 0xff;
}
WRITE8_MEMBER(dynax_state::tenkai_dswsel_w)
{
m_dsw_sel = data;
}
READ8_MEMBER(dynax_state::tenkai_dsw_r)
{
if (!BIT(m_dsw_sel, 0)) return ioport("DSW0")->read();
if (!BIT(m_dsw_sel, 1)) return ioport("DSW1")->read();
if (!BIT(m_dsw_sel, 2)) return ioport("DSW2")->read();
if (!BIT(m_dsw_sel, 3)) return ioport("DSW3")->read();
if (!BIT(m_dsw_sel, 4)) return ioport("DSW4")->read();
logerror("%s: unmapped dsw %02x read\n", machine().describe_context(), m_dsw_sel);
return 0xff;
}
READ8_MEMBER(dynax_state::tenkai_palette_r)
{
return m_palette_ram[512 * m_palbank + offset];
}
WRITE8_MEMBER(dynax_state::tenkai_palette_w)
{
int addr = 512 * m_palbank + offset;
m_palette_ram[addr] = data;
{
int br = m_palette_ram[addr & ~0x10]; // bbbrrrrr
int bg = m_palette_ram[addr | 0x10]; // bb0ggggg
int r = br & 0x1f;
int g = bg & 0x1f;
int b = ((bg & 0xc0) >> 3) | ((br & 0xe0) >> 5);
m_palette->set_pen_color(256 * m_palbank + ((offset & 0xf) | ((offset & 0x1e0) >> 1)), pal5bit(r), pal5bit(g), pal5bit(b));
}
}
void dynax_state::tenkai_update_rombank()
{
m_bankdev->set_bank(m_rombank);
// logerror("rombank = %02x\n", m_rombank);
}
READ8_MEMBER(dynax_state::tenkai_p3_r)
{
return 0x00;
}
WRITE8_MEMBER(dynax_state::tenkai_p3_w)
{
m_rombank = ((data & 0x04) << 1) | (m_rombank & 0x07);
tenkai_update_rombank();
}
WRITE8_MEMBER(dynax_state::tenkai_p4_w)
{
m_rombank = (m_rombank & 0x08) | ((data & 0x0e) >> 1);
tenkai_update_rombank();
}
READ8_MEMBER(dynax_state::tenkai_p5_r)
{
return m_tenkai_p5_val;
}
WRITE8_MEMBER(dynax_state::tenkai_p6_w)
{
m_tenkai_p5_val &= 0x0f;
if (data & 0x0f)
m_tenkai_p5_val |= (1 << 4);
}
WRITE8_MEMBER(dynax_state::tenkai_p7_w)
{
m_tenkai_p5_val &= 0xf0;
if (data & 0x03)
m_tenkai_p5_val |= (1 << 3);
}
WRITE8_MEMBER(dynax_state::tenkai_p8_w)
{
m_rombank = ((data & 0x08) << 1) | (m_rombank & 0x0f);
tenkai_update_rombank();
}
READ8_MEMBER(dynax_state::tenkai_p8_r)
{
return 0x00;
}
void dynax_state::tenkai_show_6c()
{
// popmessage("%02x %02x", m_tenkai_6c, m_tenkai_70);
}
WRITE_LINE_MEMBER(dynax_state::tenkai_6c_w)
{
m_tenkai_6c = state;
tenkai_show_6c();
}
WRITE_LINE_MEMBER(dynax_state::tenkai_70_w)
{
m_tenkai_70 = state;
tenkai_show_6c();
}
WRITE8_MEMBER(dynax_state::tenkai_blit_romregion_w)
{
switch (data)
{
case 0x00: dynax_blit_romregion_w(space, 0, 0); return;
case 0x83: dynax_blit_romregion_w(space, 0, 1); return;
case 0x80: dynax_blit_romregion_w(space, 0, 2); return;
}
logerror("%04x: unmapped romregion=%02X\n", m_maincpu->pc(), data);
}
void dynax_state::tenkai_map(address_map &map)
{
map(0x0000, 0x5fff).rom();
map(0x6000, 0x7fff).ram().share("nvram");
map(0x8000, 0xffff).m(m_bankdev, FUNC(address_map_bank_device::amap8));
map(0x10000, 0x10000).r("aysnd", FUNC(ay8910_device::data_r)); // AY8910
map(0x10008, 0x10008).w("aysnd", FUNC(ay8910_device::data_w)); //
map(0x10010, 0x10010).w("aysnd", FUNC(ay8910_device::address_w)); //
map(0x10020, 0x10021).w("ym2413", FUNC(ym2413_device::write)); //
map(0x10040, 0x10040).w(m_blitter, FUNC(dynax_blitter_rev2_device::pen_w)); // Destination Pen
map(0x10044, 0x10044).w(FUNC(dynax_state::tenkai_blit_dest_w)); // Destination Layer
map(0x10048, 0x10048).w(FUNC(dynax_state::tenkai_blit_palette23_w)); // Layers Palettes
map(0x1004c, 0x1004c).w(FUNC(dynax_state::tenkai_blit_palette01_w)); //
map(0x10050, 0x10050).w(FUNC(dynax_state::tenkai_priority_w)); // layer priority and enable
map(0x10054, 0x10054).w(FUNC(dynax_state::dynax_blit_backpen_w)); // Background Color
map(0x10058, 0x10058).w(FUNC(dynax_state::tenkai_blit_romregion_w)); // Blitter ROM bank
map(0x10060, 0x1007f).lw8(NAME([this] (offs_t offset, u8 data) { m_mainlatch->write_d1(offset >> 2, data); }));
map(0x100c0, 0x100c0).w(FUNC(dynax_state::tenkai_ipsel_w));
map(0x100c1, 0x100c1).w(FUNC(dynax_state::tenkai_ip_w));
map(0x100c2, 0x100c3).r(FUNC(dynax_state::tenkai_ip_r));
map(0x100e1, 0x100e7).w(m_blitter, FUNC(dynax_blitter_rev2_device::regs_w)); // Blitter (inverted scroll values)
}
void dynax_state::tenkai_banked_map(address_map &map)
{
map(0x00000, 0x3ffff).rom().region("maincpu", 0x10000);
map(0x80000, 0x8000f).rw("rtc", FUNC(msm6242_device::read), FUNC(msm6242_device::write));
map(0x90000, 0x97fff).rw(FUNC(dynax_state::tenkai_palette_r), FUNC(dynax_state::tenkai_palette_w));
}
/***************************************************************************
Mahjong Gekisha
***************************************************************************/
READ8_MEMBER(dynax_state::gekisha_keyboard_0_r)
{
int res = 0x3f;
if (!BIT(m_keyb, 0)) res &= ioport("KEY0")->read();
if (!BIT(m_keyb, 1)) res &= ioport("KEY1")->read();
if (!BIT(m_keyb, 2)) res &= ioport("KEY2")->read();
if (!BIT(m_keyb, 3)) res &= ioport("KEY3")->read();
if (!BIT(m_keyb, 4)) res &= ioport("KEY4")->read();
return res;
}
READ8_MEMBER(dynax_state::gekisha_keyboard_1_r)
{
int res = 0x3f;
if (!BIT(m_keyb, 0)) res &= ioport("KEY5")->read();
if (!BIT(m_keyb, 1)) res &= ioport("KEY6")->read();
if (!BIT(m_keyb, 2)) res &= ioport("KEY7")->read();
if (!BIT(m_keyb, 3)) res &= ioport("KEY8")->read();
if (!BIT(m_keyb, 4)) res &= ioport("KEY9")->read();
// bit 6
res |= ioport("BET")->read();
// bit 7 = blitter busy
return res;
}
WRITE8_MEMBER(dynax_state::gekisha_hopper_w)
{
m_gekisha_val[offset] = data;
// popmessage("%02x %02x", gekisha_val[0], gekisha_val[1]);
}
WRITE8_MEMBER(dynax_state::gekisha_p4_w)
{
m_bankdev->set_bank((data >> 2) & 3);
}
void dynax_state::gekisha_map(address_map &map)
{
map(0x0000, 0x6fff).rom();
map(0x7000, 0x7fff).ram().share("nvram");
map(0x8000, 0xffff).m(m_bankdev, FUNC(address_map_bank_device::amap8));
}
void dynax_state::gekisha_banked_map(address_map &map)
{
map(0x00000, 0x0ffff).rom().region("maincpu", 0x8000);
map(0x10000, 0x10000).nopw(); // ? 0
map(0x10001, 0x10001).w(FUNC(dynax_state::dynax_blit_palette01_w)); // Layers Palettes (Low Bits)
map(0x10002, 0x10002).nopw(); // ? 1
map(0x10003, 0x10003).w(FUNC(dynax_state::dynax_blit_backpen_w)); // Background Color
map(0x10010, 0x10017).w(m_mainlatch, FUNC(ls259_device::write_d0));
map(0x10020, 0x10021).w(FUNC(dynax_state::gekisha_hopper_w));
map(0x10041, 0x10047).w(m_blitter, FUNC(dynax_blitter_rev2_device::regs_w)); // Blitter
// map(0x10050, 0x10050).nopw(); // CRT Controller
// map(0x10051, 0x10051).nopw(); // CRT Controller
map(0x10060, 0x10060).w(FUNC(dynax_state::hanamai_keyboard_w)); // keyboard row select
map(0x10061, 0x10061).portr("COINS"); // Coins
map(0x10062, 0x10062).r(FUNC(dynax_state::gekisha_keyboard_1_r)); // P2
map(0x10063, 0x10063).r(FUNC(dynax_state::gekisha_keyboard_0_r)); // P1
map(0x10064, 0x10064).portr("DSW1"); // DSW
map(0x10065, 0x10065).portr("DSW3"); // DSW
map(0x10066, 0x10066).portr("DSW4"); // DSW
map(0x10067, 0x10067).portr("DSW2"); // DSW
map(0x10070, 0x10071).w("ym2413", FUNC(ym2413_device::write)); //
map(0x10080, 0x10080).nopw(); // ? 0,1,6 (bit 0 = screen disable?)
}
/***************************************************************************
Castle Of Dracula
***************************************************************************/
WRITE8_MEMBER(dynax_state::cdracula_sound_rombank_w)
{
// logerror("%s: sound bank = %02x\n", machine().describe_context(), data);
int num_banks = memregion("oki")->bytes() / 0x40000;
if (data < num_banks)
m_oki->set_rom_bank(data);
else
logerror("%s: warning, invalid sound bank = %02x\n", machine().describe_context(), data);
}
void dynax_state::cdracula_io_map(address_map &map)
{
map.global_mask(0xff);
map(0x01, 0x07).w(m_blitter, FUNC(cdracula_blitter_device::regs_w)); // Blitter + Destination Layers
map(0x10, 0x10).rw(m_oki, FUNC(okim6295_device::read), FUNC(okim6295_device::write));
map(0x11, 0x11).noprw(); // unpopulated oki
// map(0x12, 0x12).nopw(); // CRT Controller
// map(0x13, 0x13).nopw(); // CRT Controller
map(0x20, 0x20).portr("P1"); // P1
map(0x21, 0x21).portr("P2"); // P2
map(0x22, 0x22).portr("COINS"); // Coins
map(0x30, 0x30).w(FUNC(dynax_state::dynax_layer_enable_w)); // Layers Enable
// map(0x31, 0x31).w(FUNC(dynax_state::dynax_rombank_w)); // BANK ROM Select
map(0x32, 0x32).w(m_blitter, FUNC(cdracula_blitter_device::pen_w)); // Destination Pen
map(0x33, 0x33).w(m_blitter, FUNC(cdracula_blitter_device::flags_w)); // Flags + Do Blit
map(0x34, 0x34).w(FUNC(dynax_state::dynax_blit_palette01_w)); // Layers Palettes (Low Bits)
map(0x35, 0x35).w(FUNC(dynax_state::dynax_blit_palette23_w)); //
map(0x36, 0x36).w(FUNC(dynax_state::dynax_blit_backpen_w)); // Background Color
map(0x37, 0x37).w(FUNC(dynax_state::dynax_vblank_ack_w)); // VBlank IRQ Ack
map(0x40, 0x47).w(m_mainlatch, FUNC(ls259_device::write_d0));
map(0x60, 0x60).portr("DSW2");
map(0x61, 0x61).portr("DSW1");
map(0x6b, 0x6b).w(FUNC(dynax_state::cdracula_sound_rombank_w)); // OKI Bank
}
/***************************************************************************
Input Ports
***************************************************************************/
static INPUT_PORTS_START( MAHJONG_KEYS )
PORT_START("KEY0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I ) PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M ) PORT_PLAYER(1)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_PLAYER(1)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
PORT_START("KEY1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_J ) PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N ) PORT_PLAYER(1)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) PORT_PLAYER(1)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_G ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_K ) PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) PORT_PLAYER(1)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) PORT_PLAYER(1)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY3")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_H ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_L ) PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) PORT_PLAYER(1)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY4")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE ) PORT_PLAYER(1) // "l"
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP ) PORT_PLAYER(1) // "f"
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY5")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I ) PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M ) PORT_PLAYER(2)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_START("KEY6")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_J ) PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N ) PORT_PLAYER(2)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY7")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_G ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_K ) PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) PORT_PLAYER(2)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY8")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_H ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_L ) PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) PORT_PLAYER(2)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY9")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE ) PORT_PLAYER(2) // "l"
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP ) PORT_PLAYER(2) // "f"
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
static INPUT_PORTS_START( MAHJONG_KEYS_BET )
PORT_START("KEY0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I ) PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M ) PORT_PLAYER(1)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_PLAYER(1)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
PORT_START("KEY1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_J ) PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N ) PORT_PLAYER(1)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) PORT_PLAYER(1)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) PORT_PLAYER(1)
PORT_START("KEY2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_G ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_K ) PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) PORT_PLAYER(1)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) PORT_PLAYER(1)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY3")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_H ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_L ) PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) PORT_PLAYER(1)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY4")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE ) PORT_PLAYER(1) // "l"
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) PORT_PLAYER(1) // "t"
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) PORT_PLAYER(1) // "w"
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP ) PORT_PLAYER(1) // "f"
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) PORT_PLAYER(1) // "b"
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_PLAYER(1) // "s"
PORT_START("KEY5")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I ) PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M ) PORT_PLAYER(2)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_START("KEY6")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_J ) PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N ) PORT_PLAYER(2)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) PORT_PLAYER(2)
PORT_START("KEY7")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_G ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_K ) PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) PORT_PLAYER(2)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY8")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_H ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_L ) PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) PORT_PLAYER(2)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY9")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE ) PORT_PLAYER(2) // "l"
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) PORT_PLAYER(2) // "t"
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) PORT_PLAYER(2) // "w"
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP ) PORT_PLAYER(2) // "f"
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) PORT_PLAYER(2) // "b"
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_PLAYER(2) // "s"
INPUT_PORTS_END
static INPUT_PORTS_START( HANAFUDA_KEYS )
PORT_START("KEY0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_A ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_E ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_HANAFUDA_YES ) PORT_PLAYER(1)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
PORT_START("KEY1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_B ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_F ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_HANAFUDA_NO ) PORT_PLAYER(1)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_C ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_G ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY3")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_D ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_H ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY4")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE ) PORT_PLAYER(1) // "l"
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP ) PORT_PLAYER(1) // "f"
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY5")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_A ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_E ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_HANAFUDA_YES ) PORT_PLAYER(2)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_START("KEY6")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_B ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_F ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_HANAFUDA_NO ) PORT_PLAYER(2)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY7")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_C ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_G ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY8")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_D ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_H ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY9")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE ) PORT_PLAYER(2) // "l"
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP ) PORT_PLAYER(2) // "f"
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
INPUT_PORTS_START( HANAFUDA_KEYS_BET )
PORT_START("KEY0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_A ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_E ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_HANAFUDA_YES ) PORT_PLAYER(1)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
PORT_START("KEY1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_B ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_F ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_HANAFUDA_NO ) PORT_PLAYER(1)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) PORT_PLAYER(1)
PORT_START("KEY2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_C ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_G ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY3")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_D ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_H ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY4")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE ) // "l"
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) // "t"
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) // "w"
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP ) // "f"
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) // "b"
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) // "s"
PORT_START("KEY5")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_A ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_E ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_HANAFUDA_YES ) PORT_PLAYER(2)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_START("KEY6")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_B ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_F ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_HANAFUDA_NO ) PORT_PLAYER(2)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) PORT_PLAYER(2)
PORT_START("KEY7")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_C ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_G ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY8")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_D ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_H ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY9")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE ) PORT_PLAYER(2) // "l"
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) PORT_PLAYER(2) // "t"
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) PORT_PLAYER(2) // "w"
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP ) PORT_PLAYER(2) // "f"
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) PORT_PLAYER(2) // "b"
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_PLAYER(2) // "s"
INPUT_PORTS_END
#ifdef UNREFERENCED_CODE
static INPUT_PORTS_START( HANAFUDA_KEYS_BET_ALT )
PORT_START("KEY0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_A ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_E ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_HANAFUDA_YES ) PORT_PLAYER(1)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) // "t"
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
PORT_START("KEY1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_B ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_F ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_HANAFUDA_NO ) PORT_PLAYER(1)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) // "s"
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_C ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_G ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) // "b"
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY3")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_D ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_H ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) // "w"
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY4")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY5")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_A ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_E ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_HANAFUDA_YES ) PORT_PLAYER(2)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) PORT_PLAYER(2) // "t"
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_START("KEY6")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_B ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_F ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_HANAFUDA_NO ) PORT_PLAYER(2)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_PLAYER(2) // "s"
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY7")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_C ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_G ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) PORT_PLAYER(2) // "b"
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY8")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_D ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_H ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) PORT_PLAYER(2) // "w"
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY9")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
#endif
static INPUT_PORTS_START( cdracula )
PORT_START("P1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) // erase on highscore entry
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
PORT_START("P2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) // erase on highscore entry
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
PORT_START("COINS")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(10)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(10)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("DSW1") // port $61 -> c217
PORT_DIPNAME( 0x03, 0x02, DEF_STR( Difficulty ) ) PORT_DIPLOCATION( "SW1:1,2" )
PORT_DIPSETTING( 0x03, DEF_STR( Easy ) ) // 44
PORT_DIPSETTING( 0x02, DEF_STR( Normal ) ) // 47
PORT_DIPSETTING( 0x01, DEF_STR( Hard ) ) // 4a
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) // 4d
PORT_DIPNAME( 0x0c, 0x08, "Time" ) PORT_DIPLOCATION( "SW1:3,4" )
PORT_DIPSETTING( 0x0c, "120 sec" )
PORT_DIPSETTING( 0x08, "90 sec" )
PORT_DIPSETTING( 0x04, "60 sec" )
PORT_DIPSETTING( 0x00, "60 sec (duplicate)" )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Lives ) ) PORT_DIPLOCATION( "SW1:5" )
PORT_DIPSETTING( 0x10, "3" )
PORT_DIPSETTING( 0x00, "5" )
PORT_DIPNAME( 0x20, 0x20, "Max Lives" ) PORT_DIPLOCATION( "SW1:6" )
PORT_DIPSETTING( 0x20, "5" )
PORT_DIPSETTING( 0x00, "8" )
PORT_DIPNAME( 0x40, 0x40, "Unknown 1-7" ) PORT_DIPLOCATION( "SW1:7" )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) PORT_DIPLOCATION( "SW1:8" )
PORT_START("DSW2") // port $60 -> c216
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) PORT_DIPLOCATION( "SW2:1,2" )
PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
PORT_DIPNAME( 0x04, 0x04, "Unknown 2-3" ) PORT_DIPLOCATION( "SW2:3" )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, "Reset Tiles After Miss" ) PORT_DIPLOCATION( "SW2:4" )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, "Unknown 2-5" ) PORT_DIPLOCATION( "SW2:5" )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION( "SW2:6" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, "Sound Test" ) PORT_DIPLOCATION( "SW2:7" )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, "Graphics Test" ) PORT_DIPLOCATION( "SW2:8" )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( hanamai )
PORT_START("DSW0")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Service_Mode ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("COINS")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test ))
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // Analyzer
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // Memory Reset
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_INCLUDE( HANAFUDA_KEYS )
INPUT_PORTS_END
static INPUT_PORTS_START( hnkochou )
PORT_START("DSW0")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("COINS")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // Pay
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE_NO_TOGGLE(0x04, IP_ACTIVE_LOW ) // Test (there isn't a dip switch)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // Analyzer
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // Memory Reset
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN3 ) // Note
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_INCLUDE( HANAFUDA_KEYS_BET )
INPUT_PORTS_END
static INPUT_PORTS_START( hnoridur )
PORT_START("DSW0") /* note that these are in reverse order wrt the others */
PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) )
PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) )
PORT_DIPSETTING( 0x30, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x10, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Flip_Screen ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x04, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, "Select Stage" )
PORT_DIPSETTING( 0x02, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Service_Mode ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("COINS")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test ))
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // Analyzer
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // Memory Reset
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_INCLUDE( HANAFUDA_KEYS )
PORT_START("DSW2")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW3")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( hjingi )
PORT_START("DSW0") /* note that these are in reverse order wrt the others */
PORT_DIPNAME( 0x80, 0x80, "Stage Select" )
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x80, DEF_STR( Yes ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, "Gal" ) // "Renchan Gal"
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x20, DEF_STR( Yes ) )
PORT_DIPNAME( 0x10, 0x10, "Game Music" )
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x10, DEF_STR( Yes ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, "Suggest Move" ) // "Teach TEFUDA"
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x04, DEF_STR( Yes ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Service_Mode ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW1")
PORT_DIPNAME( 0x07, 0x07, "Payout Rate" )
PORT_DIPSETTING( 0x07, DEF_STR( Highest ) )
PORT_DIPSETTING( 0x06, DEF_STR( Higher ) )
PORT_DIPSETTING( 0x05, DEF_STR( High) )
PORT_DIPSETTING( 0x04, DEF_STR( Medium ) )
PORT_DIPSETTING( 0x03, DEF_STR( Low ) )
PORT_DIPSETTING( 0x02, DEF_STR( Very_Low ) )
// PORT_DIPSETTING( 0x01, DEF_STR( ) )
// PORT_DIPSETTING( 0x00, DEF_STR( ) )
PORT_DIPNAME( 0x08, 0x08, "Payout Rate Change" )
PORT_DIPSETTING( 0x08, "Big" )
PORT_DIPSETTING( 0x00, "Small" )
PORT_DIPNAME( 0x10, 0x10, "Double-Up Game Rate" )
PORT_DIPSETTING( 0x10, DEF_STR( High ) )
PORT_DIPSETTING( 0x00, DEF_STR( Low ) )
PORT_DIPNAME( 0x20, 0x20, "GOKOU Odds" )
PORT_DIPSETTING( 0x20, "100" )
PORT_DIPSETTING( 0x00, "200" )
PORT_DIPNAME( 0x40, 0x40, "GOKOU Cut" )
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x40, DEF_STR( Yes ) )
PORT_DIPNAME( 0x80, 0x80, "3-Renchan Bonus" )
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x80, DEF_STR( Yes ) )
PORT_START("DSW2")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_5C ) )
PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" )
PORT_DIPNAME( 0x04, 0x04, "Credits Per Note" )
PORT_DIPSETTING( 0x04, "5" )
PORT_DIPSETTING( 0x00, "10" )
PORT_DIPNAME( 0x18, 0x18, "Max Bet" )
PORT_DIPSETTING( 0x18, "5" )
PORT_DIPSETTING( 0x10, "10" )
PORT_DIPSETTING( 0x08, "20" )
PORT_DIPSETTING( 0x00, "50" )
PORT_DIPNAME( 0x60, 0x60, "Min Rate To Play" )
PORT_DIPSETTING( 0x60, "1" )
PORT_DIPSETTING( 0x40, "2" )
PORT_DIPSETTING( 0x20, "3" )
PORT_DIPSETTING( 0x00, "5" )
PORT_DIPNAME( 0x80, 0x80, "Higi" )
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x80, DEF_STR( Yes ) )
PORT_START("DSW3")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, "Pay Out Type" )
PORT_DIPSETTING( 0x02, "Credit" )
PORT_DIPSETTING( 0x00, "Hopper" )
PORT_DIPNAME( 0x04, 0x04, "Hopper Switch" )
PORT_DIPSETTING( 0x04, "Active Low" )
PORT_DIPSETTING( 0x00, "Active High" )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("COINS")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // Pay
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE4 ) // 18B
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test ))
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // Analyzer
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // Memory Reset
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // Key In
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) // 18A
PORT_INCLUDE( HANAFUDA_KEYS_BET )
// PORT_INCLUDE( HANAFUDA_KEYS_BET_ALT )
PORT_START("BET")
PORT_CONFNAME( 0x40, 0x40, "Allow Betting" )
PORT_CONFSETTING( 0x40, DEF_STR( Yes ) ) // 2 keyboards, normal bet layout, hopper not pulsing in key test
// PORT_CONFSETTING( 0x00, DEF_STR( No ) ) // 1 keyboard, alt bet layout, hopper pulsing in key test
INPUT_PORTS_END
static INPUT_PORTS_START( drgpunch )
PORT_START("P1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
PORT_START("P2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
PORT_START("COINS")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(10)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(10)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("DSW0")
PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) )
PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) )
PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x18, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x38, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x30, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x28, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x20, DEF_STR( 1C_4C ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
PORT_START("DSW1")
PORT_DIPNAME( 0x07, 0x04, DEF_STR( Difficulty ) ) // Time
PORT_DIPSETTING( 0x00, "1 (Easy)" )
PORT_DIPSETTING( 0x01, "2" )
PORT_DIPSETTING( 0x02, "3" )
PORT_DIPSETTING( 0x03, "4" )
PORT_DIPSETTING( 0x04, "5" )
PORT_DIPSETTING( 0x05, "6" )
PORT_DIPSETTING( 0x06, "7" )
PORT_DIPSETTING( 0x07, "8 (Hard)" )
PORT_DIPNAME( 0x18, 0x10, "Vs Time" )
PORT_DIPSETTING( 0x18, "8 s" )
PORT_DIPSETTING( 0x10, "10 s" )
PORT_DIPSETTING( 0x08, "12 s" )
PORT_DIPSETTING( 0x00, "14 s" )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, "Unknown 2-7" )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, "Unknown 2-8" )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( sprtmtch )
PORT_INCLUDE( drgpunch )
PORT_MODIFY("DSW1")
PORT_DIPNAME( 0x40, 0x40, "Intermissions" ) // Does not apply to drgpunch
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( mjfriday )
PORT_START("DSW0")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) )
PORT_DIPNAME( 0x04, 0x04, "PINFU with TSUMO" )
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x04, DEF_STR( Yes ) )
PORT_DIPNAME( 0x18, 0x18, "Player Strength" )
PORT_DIPSETTING( 0x18, "Weak" )
PORT_DIPSETTING( 0x10, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x08, "Strong" )
PORT_DIPSETTING( 0x00, "Strongest" )
PORT_DIPNAME( 0x60, 0x60, "CPU Strength" )
PORT_DIPSETTING( 0x60, "Weak" )
PORT_DIPSETTING( 0x40, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x20, "Strong" )
PORT_DIPSETTING( 0x00, "Strongest" )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, "Auto TSUMO" )
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x01, DEF_STR( Yes ) )
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, "Full Test" )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("COINS")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // "17B"
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // "18B"
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) // Test (there isn't a dip switch)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // Analyzer
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // Memory Reset
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) // "06B"
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // "18A"
PORT_INCLUDE( MAHJONG_KEYS )
INPUT_PORTS_END
static INPUT_PORTS_START( mjdialq2 )
PORT_START("DSW0")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2")
PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) )
PORT_DIPNAME( 0x04, 0x00, "PINFU with TSUMO" ) PORT_DIPLOCATION("SW1:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x38, 0x20, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:4,5,6")
PORT_DIPSETTING( 0x38, "1 (Easy)" )
PORT_DIPSETTING( 0x30, "2" )
PORT_DIPSETTING( 0x28, "3" )
PORT_DIPSETTING( 0x20, "4" )
PORT_DIPSETTING( 0x18, "5" )
PORT_DIPSETTING( 0x10, "6" )
PORT_DIPSETTING( 0x08, "7" )
PORT_DIPSETTING( 0x00, "8 (Hard)" )
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW1")
PORT_DIPNAME( 0x07, 0x07, "Time Setting" ) PORT_DIPLOCATION("SW2:1,2,3")
PORT_DIPSETTING( 0x07, "08:30" )
PORT_DIPSETTING( 0x06, "09:00" )
PORT_DIPSETTING( 0x05, "09:30" )
PORT_DIPSETTING( 0x04, "10:00" )
PORT_DIPSETTING( 0x03, "10:30" )
PORT_DIPSETTING( 0x02, "11:00" )
PORT_DIPSETTING( 0x01, "11:30" )
PORT_DIPSETTING( 0x00, "12:00" )
PORT_DIPNAME( 0x08, 0x00, "Time Service" ) PORT_DIPLOCATION("SW2:4") // "secret moves" happen at certain time stamps
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, "TEL Display" ) PORT_DIPLOCATION("SW2:5")
PORT_DIPSETTING( 0x10, DEF_STR( On ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPNAME( 0x20, 0x20, "GAL mode" ) PORT_DIPLOCATION("SW2:6") // unknown what this does
PORT_DIPSETTING( 0x20, "1" )
PORT_DIPSETTING( 0x00, "2" )
PORT_DIPNAME( 0x40, 0x40, "Select Special Item" ) PORT_DIPLOCATION("SW2:7")/* Allows to select which one of the nine special items you want. */
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, "Debug" ) PORT_DIPLOCATION("SW2:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("COINS")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // "17B"
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // "18B"
PORT_SERVICE_NO_TOGGLE(0x04, IP_ACTIVE_LOW) // Test (there isn't a dip switch)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // Analyzer
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // Memory Reset
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) // "06B"
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // "18A"
PORT_INCLUDE( MAHJONG_KEYS )
INPUT_PORTS_END
static INPUT_PORTS_START( yarunara )
PORT_START("DSW0")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) )
PORT_DIPSETTING( 0x08, DEF_STR( Easy ) ) // 1,6
PORT_DIPSETTING( 0x0c, DEF_STR( Normal ) ) // 3,4
PORT_DIPSETTING( 0x04, DEF_STR( Hard ) ) // 5,2
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) // 7,0
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, "Use Password" )
PORT_DIPSETTING( 0x40, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_DIPNAME( 0x80, 0x80, "Set Date" )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, "PINFU with TSUMO" )
PORT_DIPSETTING( 0x01, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_DIPNAME( 0x02, 0x02, "Unknown 2-1" )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, "Unknown 2-2" )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, "Unknown 2-3*" )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, "Unknown 2-4" )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, "Choose Bonus (Cheat)")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, "Unknown 2-6" )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Service_Mode ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("COINS")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // "17B"
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // "18B"
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test ))
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // Analyzer
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // Memory Reset
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) // "06B"
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_INCLUDE( MAHJONG_KEYS )
INPUT_PORTS_END
static INPUT_PORTS_START( warahana )
PORT_START("DSW0")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) )
PORT_DIPSETTING( 0x04, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x0c, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x08, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, "Panel Type" )
PORT_DIPSETTING( 0x00, "Mahjong" )
PORT_DIPSETTING( 0x40, "Hanafuda" )
PORT_DIPNAME( 0x80, 0x80, "Set Date" )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, "Start with Quiz" )
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Service_Mode ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("COINS")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // "17B"
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // "18B"
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test ))
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // Analyzer
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // Memory Reset
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) // "06B"
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_INCLUDE( MAHJONG_KEYS )
INPUT_PORTS_END
static INPUT_PORTS_START( hanayara )
PORT_START("DSW0")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) )
PORT_DIPSETTING( 0x08, DEF_STR( Easy ) ) // 1,6
PORT_DIPSETTING( 0x0c, DEF_STR( Normal ) ) // 3,4
PORT_DIPSETTING( 0x04, DEF_STR( Hard ) ) // 5,2
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) // 7,0
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, "Use Password" )
PORT_DIPSETTING( 0x40, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_DIPNAME( 0x80, 0x80, "Set Date" )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, "PINFU with TSUMO" )
PORT_DIPSETTING( 0x01, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_DIPNAME( 0x02, 0x02, "Unknown 2-1" )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, "Unknown 2-2" )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, "Unknown 2-3*" )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, "Unknown 2-4" )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, "Choose Bonus (Cheat)")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, "Unknown 2-6" )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Service_Mode ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("COINS")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // "17B"
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // "18B"
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test ))
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // Analyzer
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // Memory Reset
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) // "06B"
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_INCLUDE( HANAFUDA_KEYS )
INPUT_PORTS_END
static INPUT_PORTS_START( quiztvqq )
PORT_START("DSW0")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) )
PORT_DIPSETTING( 0x08, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x0c, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x04, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, "Voices" )
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x40, DEF_STR( Yes ) )
PORT_DIPNAME( 0x80, 0x80, "Set Date" )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x03, "Unknown 2-0&1" )
PORT_DIPSETTING( 0x03, "0" )
PORT_DIPSETTING( 0x02, "1" )
PORT_DIPSETTING( 0x01, "2" )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPNAME( 0x04, 0x04, "Unknown 2-2" )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, "Unknown 2-3*" )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, "Unknown 2-4*" )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, "Unknown 2-5" )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, "Unknown 2-6" )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Service_Mode ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("COINS")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) // Test, during boot
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY0")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_START1 )
PORT_START("KEY1")
PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY2")
PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY3")
PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY4")
PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY5")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_START("KEY6")
PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY7")
PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY8")
PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY9")
PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
static INPUT_PORTS_START( mcnpshnt )
PORT_START("DSW0")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x06, 0x06, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x06, "0" )
PORT_DIPSETTING( 0x04, "1" )
PORT_DIPSETTING( 0x02, "2" )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x18, DEF_STR( 1C_1C ) )
// PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) )
PORT_DIPNAME( 0x20, 0x20, "Auto TSUMO" )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Flip_Screen ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
PORT_START("DSW1")
PORT_DIPNAME( 0x07, 0x07, "Time Setting" )
PORT_DIPSETTING( 0x07, "8:30" )
PORT_DIPSETTING( 0x06, "9:00" )
PORT_DIPSETTING( 0x05, "9:30" )
PORT_DIPSETTING( 0x04, "10:00" )
PORT_DIPSETTING( 0x03, "10:30" )
PORT_DIPSETTING( 0x02, "11:00" )
PORT_DIPSETTING( 0x01, "11:30" )
PORT_DIPSETTING( 0x00, "12:00" )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, "Buy Screen Bonus Points" ) /* Sets your points to 100 every time you arrive at the screen for buying special items. */
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
/* make your game last at least 4 or 5 minutes. Continue if necessary. Before the next round you begin,
you will get some sort of message in Japanese stating that it is some sort of lucky time of day for you, and
you get 100 bonus points (for purchasing items). */
PORT_DIPNAME( 0x20, 0x20, "Lucky Time Of Day Bonus" )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Service_Mode ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("COINS")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) // Test
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // Analyzer
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // Memory Reset
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_INCLUDE( MAHJONG_KEYS )
INPUT_PORTS_END
static INPUT_PORTS_START( nanajign )
PORT_START("DSW0")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x38, 0x38, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x38, "0" )
PORT_DIPSETTING( 0x30, "1" )
PORT_DIPSETTING( 0x28, "2" )
PORT_DIPSETTING( 0x20, "3" )
PORT_DIPSETTING( 0x18, "4" )
PORT_DIPSETTING( 0x10, "5" )
PORT_DIPSETTING( 0x08, "6" )
PORT_DIPSETTING( 0x00, "7" )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) //?
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) //*
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) //*
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) //*
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) //*
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Service_Mode ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("COINS")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) // Test
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // Analyzer
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // Memory Reset
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_INCLUDE( MAHJONG_KEYS )
PORT_START("DSW2")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( janyuki )
PORT_START("DSW0")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
// PORT_DIPSETTING( 0x08, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x18, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) //*
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) //*
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x03, "0" )
PORT_DIPSETTING( 0x02, "1" )
PORT_DIPSETTING( 0x01, "2" )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) //*
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) //*
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) //*
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("COINS")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE_NO_TOGGLE(0x04, IP_ACTIVE_LOW )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // Analyzer / Hardware Test
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // Memory Reset
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_START("KEY0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
PORT_START("KEY1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_J )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_REACH )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
PORT_START("KEY2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_G )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_K )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_RON )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY3")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_H )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_L )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY4")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
static INPUT_PORTS_START( jantouki )
PORT_START("DSW0")
PORT_DIPNAME( 0x07, 0x07, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x07, "0" ) // 0 6 2
PORT_DIPSETTING( 0x06, "1" ) // 0 6 1
PORT_DIPSETTING( 0x05, "2" ) // 1 5 2
PORT_DIPSETTING( 0x04, "3" ) // 1 5 1
PORT_DIPSETTING( 0x03, "4" ) // 2 4 2
PORT_DIPSETTING( 0x02, "5" ) // 2 4 1
PORT_DIPSETTING( 0x01, "6" ) // 2 3 1
PORT_DIPSETTING( 0x00, "7" ) // 2 2 1
PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x18, DEF_STR( 1C_1C ) )
// PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) //*
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) //*
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW1")
PORT_DIPNAME( 0x07, 0x07, "Time Setting" )
PORT_DIPSETTING( 0x07, "08:30" )
PORT_DIPSETTING( 0x06, "09:00" )
PORT_DIPSETTING( 0x05, "09:30" )
PORT_DIPSETTING( 0x04, "10:00" )
PORT_DIPSETTING( 0x03, "10:30" )
PORT_DIPSETTING( 0x02, "11:00" )
PORT_DIPSETTING( 0x01, "11:30" )
PORT_DIPSETTING( 0x00, "12:00" )
PORT_DIPNAME( 0x08, 0x00, "Nudity" )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_DIPSETTING( 0x08, DEF_STR( No ) ) // Moles On Gal's Face
PORT_DIPNAME( 0x10, 0x10, "Buy Screen Bonus Points" ) /* Sets your points to 100 every time you arrive at the screen for buying special items. */
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
/* make your game last at least 4 or 5 minutes. Continue if necessary. Before the next round you begin,
you will get some sort of message in Japanese stating that it is some sort of lucky time of day for you, and
you get 100 bonus points (for purchasing items). */
PORT_DIPNAME( 0x20, 0x20, "Lucky Time Of Day Bonus" )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) //*
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("COINS")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE_NO_TOGGLE(0x04, IP_ACTIVE_LOW )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // Analyzer
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // Memory Reset
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_START("KEY0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
PORT_START("KEY1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_J )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_REACH )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET )
PORT_START("KEY2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_G )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_K )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_RON )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY3")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_H )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_L )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("KEY4")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
static INPUT_PORTS_START( mjembase )
PORT_START("DSW2") /* DIP1, 7c20 (port $1e) */
PORT_DIPNAME( 0x0f, 0x07, "Pay Out Rate" )
PORT_DIPSETTING( 0x00, "50" )
PORT_DIPSETTING( 0x01, "53" )
PORT_DIPSETTING( 0x02, "56" )
PORT_DIPSETTING( 0x03, "59" )
PORT_DIPSETTING( 0x04, "62" )
PORT_DIPSETTING( 0x05, "65" )
PORT_DIPSETTING( 0x06, "68" )
PORT_DIPSETTING( 0x07, "71" )
PORT_DIPSETTING( 0x08, "75" )
PORT_DIPSETTING( 0x09, "78" )
PORT_DIPSETTING( 0x0a, "81" )
PORT_DIPSETTING( 0x0b, "84" )
PORT_DIPSETTING( 0x0c, "87" )
PORT_DIPSETTING( 0x0d, "90" )
PORT_DIPSETTING( 0x0e, "93" )
PORT_DIPSETTING( 0x0f, "96" )
PORT_DIPNAME( 0x30, 0x30, "Max Bet" )
PORT_DIPSETTING( 0x30, "1" )
PORT_DIPSETTING( 0x20, "5" )
PORT_DIPSETTING( 0x10, "10" )
PORT_DIPSETTING( 0x00, "20" )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Coin_B ) )
PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) )
PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW1") /* DIP2, 7c21 (port $1c) */
PORT_DIPNAME( 0x03, 0x03, "Difficulty?" )
PORT_DIPSETTING( 0x03, "0" ) // 20
PORT_DIPSETTING( 0x00, "1" ) // 32
PORT_DIPSETTING( 0x01, "2" ) // 64
PORT_DIPSETTING( 0x02, "3" ) // c8
PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 1C_5C ) )
PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" )
PORT_DIPNAME( 0x30, 0x30, "Min Pay?" )
PORT_DIPSETTING( 0x30, "1" )
PORT_DIPSETTING( 0x20, "2" )
PORT_DIPSETTING( 0x10, "3" )
PORT_DIPSETTING( 0x00, "5" )
PORT_DIPNAME( 0x40, 0x40, "Allow Coin Out" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, "Win A Prize?" )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW0") /* DIP3, 7c22 (port $06, AY) */ /* note that these are in reverse order wrt the others */
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, "DonDen Key" )
PORT_DIPSETTING( 0x02, "A" )
PORT_DIPSETTING( 0x00, "Flip Flop" )
PORT_DIPNAME( 0x04, 0x04, "Draw New Tile" )
PORT_DIPSETTING( 0x00, "Automatic" )
PORT_DIPSETTING( 0x04, "Manual" )
PORT_DIPNAME( 0x08, 0x08, "Win Rate?" )
PORT_DIPSETTING( 0x08, DEF_STR( High ) )
PORT_DIPSETTING( 0x00, DEF_STR( Low ) )
PORT_DIPNAME( 0x10, 0x10, "YAKU times" )
PORT_DIPSETTING( 0x10, "1" )
PORT_DIPSETTING( 0x00, "2" )
PORT_DIPNAME( 0xe0, 0xe0, "YAKUMAN Bonus" )
PORT_DIPSETTING( 0xe0, "Cut" )
PORT_DIPSETTING( 0x60, "1 T" )
PORT_DIPSETTING( 0xa0, "300" )
PORT_DIPSETTING( 0x20, "500" )
PORT_DIPSETTING( 0xc0, "700" )
PORT_DIPSETTING( 0x40, "1000" )
// PORT_DIPSETTING( 0x80, "1000" )
// PORT_DIPSETTING( 0x00, "1000" )
PORT_START("DSW3") /* DIP4, 7c23 (port $24) */
PORT_DIPNAME( 0x01, 0x01, "Last Chance" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, "Pay Rate?" )
PORT_DIPSETTING( 0x02, DEF_STR( High ) )
PORT_DIPSETTING( 0x00, DEF_STR( Low ) )
PORT_DIPNAME( 0x04, 0x04, "Choose Bonus" )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, "In-Game Bet?" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x00, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x00, "In-Game Music" )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, "Select Girl" )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x00, "Nudity" )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_DIPSETTING( 0x80, DEF_STR( No ) ) // Moles On Gal's Face
PORT_START("FAKE") /* IN10 - Fake DSW */
PORT_DIPNAME( 0xff, 0xff, "Allow Bets" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0xff, DEF_STR( On ) )
PORT_START("COINS")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // Pay
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // 18B
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) // Test
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // Analyzer
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // Memory Reset
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // Note
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) // Coin
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) // Service
PORT_INCLUDE( MAHJONG_KEYS_BET )
INPUT_PORTS_END
// dip locations verified on mjelctrb pcb
static INPUT_PORTS_START( mjelct3 )
PORT_START("COINS")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // Pay
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // 18B
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) // Test
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // Analyzer
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // Memory Reset
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // Note
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) // Coin
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) // Service
PORT_INCLUDE( MAHJONG_KEYS_BET )
PORT_START("SW1") // port 85
PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "SW1:1")
PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "SW1:2")
PORT_START("DSW0") /* 7c21 (select = 00) */
PORT_DIPNAME( 0x03, 0x03, "Difficulty?" ) PORT_DIPLOCATION("SW3:1,2")
PORT_DIPSETTING( 0x03, "0" ) // 20
PORT_DIPSETTING( 0x00, "1" ) // 32
PORT_DIPSETTING( 0x01, "2" ) // 64
PORT_DIPSETTING( 0x02, "3" ) // c8
PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW3:3,4")
PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 1C_5C ) )
PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" )
PORT_DIPNAME( 0x30, 0x30, "Min Pay?" ) PORT_DIPLOCATION("SW3:5,6")
PORT_DIPSETTING( 0x30, "1" )
PORT_DIPSETTING( 0x20, "2" )
PORT_DIPSETTING( 0x10, "3" )
PORT_DIPSETTING( 0x00, "5" )
PORT_DIPNAME( 0x40, 0x40, "Allow Coin Out" ) PORT_DIPLOCATION("SW3:7")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, "Win A Prize?" ) PORT_DIPLOCATION("SW3:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW1") /* 7c20 (select = 40) */
PORT_DIPNAME( 0x0f, 0x07, "Pay Out Rate" ) PORT_DIPLOCATION("SW4:1,2,3,4")
PORT_DIPSETTING( 0x00, "50" )
PORT_DIPSETTING( 0x01, "53" )
PORT_DIPSETTING( 0x02, "56" )
PORT_DIPSETTING( 0x03, "59" )
PORT_DIPSETTING( 0x04, "62" )
PORT_DIPSETTING( 0x05, "65" )
PORT_DIPSETTING( 0x06, "68" )
PORT_DIPSETTING( 0x07, "71" )
PORT_DIPSETTING( 0x08, "75" )
PORT_DIPSETTING( 0x09, "78" )
PORT_DIPSETTING( 0x0a, "81" )
PORT_DIPSETTING( 0x0b, "84" )
PORT_DIPSETTING( 0x0c, "87" )
PORT_DIPSETTING( 0x0d, "90" )
PORT_DIPSETTING( 0x0e, "93" )
PORT_DIPSETTING( 0x0f, "96" )
PORT_DIPNAME( 0x30, 0x30, "Max Bet" ) PORT_DIPLOCATION("SW4:5,6")
PORT_DIPSETTING( 0x30, "1" )
PORT_DIPSETTING( 0x20, "5" )
PORT_DIPSETTING( 0x10, "10" )
PORT_DIPSETTING( 0x00, "20" )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW4:7")
PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) )
PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW4:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW2") /* 7c22 (select = 80) */
PORT_DIPNAME( 0x07, 0x07, "YAKUMAN Bonus" ) PORT_DIPLOCATION("SW2:1,2,3")
PORT_DIPSETTING( 0x07, "Cut" )
PORT_DIPSETTING( 0x06, "1 T" )
PORT_DIPSETTING( 0x05, "300" )
PORT_DIPSETTING( 0x04, "500" )
PORT_DIPSETTING( 0x03, "700" )
PORT_DIPSETTING( 0x02, "1000" )
// PORT_DIPSETTING( 0x01, "1000" )
// PORT_DIPSETTING( 0x00, "1000" )
PORT_DIPNAME( 0x08, 0x08, "YAKU times" ) PORT_DIPLOCATION("SW2:4")
PORT_DIPSETTING( 0x08, "1" )
PORT_DIPSETTING( 0x00, "2" )
PORT_DIPNAME( 0x10, 0x10, "Win Rate?" ) PORT_DIPLOCATION("SW2:5")
PORT_DIPSETTING( 0x10, DEF_STR( High ) )
PORT_DIPSETTING( 0x00, DEF_STR( Low ) )
PORT_DIPNAME( 0x20, 0x20, "Draw New Tile (Part 3 Only)" ) PORT_DIPLOCATION("SW2:6")
PORT_DIPSETTING( 0x00, "Automatic" )
PORT_DIPSETTING( 0x20, "Manual" )
PORT_DIPNAME( 0x40, 0x40, "DonDen Key" ) PORT_DIPLOCATION("SW2:7")
PORT_DIPSETTING( 0x40, "A" )
PORT_DIPSETTING( 0x00, "Flip Flop" )
PORT_DIPNAME( 0x80, 0x00, "Subtitle" ) PORT_DIPLOCATION("SW2:8")
PORT_DIPSETTING( 0x80, "None (Part 2)" )
PORT_DIPSETTING( 0x00, "Super Express (Part 3)" )
PORT_START("DSW3") /* 7c23 (select = c0) */
PORT_DIPNAME( 0x01, 0x01, "Last Chance" ) PORT_DIPLOCATION("SW5:1")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, "Pay Rate?" ) PORT_DIPLOCATION("SW5:2")
PORT_DIPSETTING( 0x02, DEF_STR( High ) )
PORT_DIPSETTING( 0x00, DEF_STR( Low ) )
PORT_DIPNAME( 0x04, 0x04, "Choose Bonus" ) PORT_DIPLOCATION("SW5:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, "In-Game Bet?" ) PORT_DIPLOCATION("SW5:4")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW5:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x00, "In-Game Music" ) PORT_DIPLOCATION("SW5:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, "Select Girl" ) PORT_DIPLOCATION("SW5:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x00, "Nudity" ) PORT_DIPLOCATION("SW5:8")
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_DIPSETTING( 0x80, DEF_STR( No ) ) // Moles On Gal's Face
PORT_START("FAKE") /* IN10 - Fake DSW */
PORT_DIPNAME( 0xff, 0xff, "Allow Bets" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0xff, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( mjelctrn )
PORT_START("COINS")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // Pay
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // 18B
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) // Test
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // Analyzer
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // Memory Reset
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // Note
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) // Coin
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) // Service
PORT_INCLUDE( MAHJONG_KEYS_BET )
PORT_START("SW1") // port 85
PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "SW1:1")
PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "SW1:2")
PORT_START("DSW0") /* 7c21 (select = 00) */
PORT_DIPNAME( 0x03, 0x03, "Difficulty?" ) PORT_DIPLOCATION("SW3:1,2")
PORT_DIPSETTING( 0x03, "0" ) // 20
PORT_DIPSETTING( 0x00, "1" ) // 32
PORT_DIPSETTING( 0x01, "2" ) // 64
PORT_DIPSETTING( 0x02, "3" ) // c8
PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW3:3,4")
PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 1C_5C ) )
PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" )
PORT_DIPNAME( 0x30,