diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/devices/sound/disc_cls.h | 14 | ||||
-rw-r--r-- | src/devices/sound/disc_inp.hxx | 7 | ||||
-rw-r--r-- | src/devices/sound/discrete.cpp | 5 | ||||
-rw-r--r-- | src/devices/sound/spkrdev.cpp | 2 | ||||
-rw-r--r-- | src/emu/sound.cpp | 43 | ||||
-rw-r--r-- | src/emu/sound.h | 6 | ||||
-rw-r--r-- | src/frontend/mame/ui/audioeffects.cpp | 32 | ||||
-rw-r--r-- | src/mame/bmc/bmcpokr.cpp | 382 | ||||
-rw-r--r-- | src/mame/bmc/koftball.cpp | 150 | ||||
-rw-r--r-- | src/mame/capcom/cps2.cpp | 22 | ||||
-rw-r--r-- | src/mame/igs/igs_m027.cpp | 6 | ||||
-rw-r--r-- | src/mame/misc/gms.cpp | 143 |
12 files changed, 485 insertions, 327 deletions
diff --git a/src/devices/sound/disc_cls.h b/src/devices/sound/disc_cls.h index 2ea8498d2f1..72a5c39920a 100644 --- a/src/devices/sound/disc_cls.h +++ b/src/devices/sound/disc_cls.h @@ -120,14 +120,14 @@ public: /* Add gain to the output and put into the buffers */ /* Clipping will be handled by the main sound system */ double val = DISCRETE_INPUT(0) * DISCRETE_INPUT(1); - m_stream->put(m_stream_output, m_outview_sample++, val * (1.0 / 32768.0)); + m_stream->put(m_stream_output, m_stream_sample++, val * (1.0 / 32768.0)); } virtual int max_output() override { return 0; } - virtual void set_output_ptr(sound_stream &stream, int output) override { m_stream = &stream; m_stream_output = output; m_outview_sample = 0; } + virtual void set_output_ptr(sound_stream &stream, int output) override { m_stream = &stream; m_stream_output = output; m_stream_sample = 0; } private: sound_stream *m_stream = nullptr; int m_stream_output = 0; - u32 m_outview_sample = 0U; + u32 m_stream_sample = 0U; }; DISCRETE_CLASS(dso_csvlog, 0, @@ -228,13 +228,15 @@ public: virtual void start() override; virtual void input_write(int sub_node, uint8_t data ) override; virtual bool is_buffered() { return false; } + void set_input_ptr(sound_stream &stream, int input) { m_stream = &stream; m_stream_input = input; m_stream_sample = 0; } /* This is called by discrete_sound_device */ void stream_start(); -//protected: - uint32_t m_stream_in_number = 0; - uint32_t m_inview_sample = 0; +protected: + sound_stream *m_stream = nullptr; + uint32_t m_stream_input = 0; + uint32_t m_stream_sample = 0; private: double m_gain = 0.0; /* node gain */ double m_offset = 0.0; /* node offset */ diff --git a/src/devices/sound/disc_inp.hxx b/src/devices/sound/disc_inp.hxx index 432f8c076bf..ef000e6b331 100644 --- a/src/devices/sound/disc_inp.hxx +++ b/src/devices/sound/disc_inp.hxx @@ -246,12 +246,9 @@ DISCRETE_STEP(dss_input_stream) { /* the context pointer is set to point to the current input stream data in discrete_stream_update */ if (m_is_buffered) - { set_output(0, m_data * m_gain + m_offset); - m_inview_sample++; - } else - set_output(0, 0); + set_output(0, m_stream->get(m_stream_input, m_stream_sample ++) * 32768.0 * m_gain + m_offset); } DISCRETE_RESET(dss_input_stream) @@ -282,8 +279,6 @@ DISCRETE_START(dss_input_stream) { discrete_base_node::start(); - /* Stream out number is set during start */ - m_stream_in_number = DSS_INPUT_STREAM__STREAM; m_gain = DSS_INPUT_STREAM__GAIN; m_offset = DSS_INPUT_STREAM__OFFSET; diff --git a/src/devices/sound/discrete.cpp b/src/devices/sound/discrete.cpp index 5e5c1a05ecf..3e97bff89da 100644 --- a/src/devices/sound/discrete.cpp +++ b/src/devices/sound/discrete.cpp @@ -1056,10 +1056,13 @@ void discrete_sound_device::sound_stream_update(sound_stream &stream) outputnum++; } + int inputnum = 0; + /* Setup any input streams */ for (discrete_dss_input_stream_node *node : m_input_stream_list) { - node->m_inview_sample = 0; + node->set_input_ptr(stream, inputnum); + inputnum++; } /* just process it */ diff --git a/src/devices/sound/spkrdev.cpp b/src/devices/sound/spkrdev.cpp index 841656ab4ac..16dc6199c2f 100644 --- a/src/devices/sound/spkrdev.cpp +++ b/src/devices/sound/spkrdev.cpp @@ -268,7 +268,7 @@ void speaker_sound_device::level_w(int new_level) /* This is redundant because time update has to be done within sound_stream_update() anyway, * however this ensures synchronization between the speaker and stream timing: */ - m_channel_last_sample_time = m_channel->sample_time(); + m_channel_last_sample_time = m_channel->end_time(); /* sample_time() may be ahead of us */ if (m_channel_last_sample_time > time) diff --git a/src/emu/sound.cpp b/src/emu/sound.cpp index 1d0d3d753b8..a393fcefb46 100644 --- a/src/emu/sound.cpp +++ b/src/emu/sound.cpp @@ -844,7 +844,8 @@ void sound_manager::after_devices_init() m_record_buffer.resize(m_outputs_count * machine().sample_rate(), 0); m_record_samples = 0; - // Resamplers will be created at config load time + // Create resamplers and setup history + rebuild_all_resamplers(); m_effects_done = false; @@ -858,7 +859,7 @@ void sound_manager::after_devices_init() void sound_manager::input_get(int id, sound_stream &stream) { u32 samples = stream.samples(); - u64 end_pos = stream.sample_index(); + u64 end_pos = stream.end_index(); u32 skip = stream.output_count(); for(const auto &step : m_microphones[id].m_input_mixing_steps) { @@ -1114,7 +1115,6 @@ void sound_manager::config_load(config_type cfg_type, config_level cfg_level, ut break; case config_type::DEFAULT: { - fprintf(stderr, "loading resampler config\n"); // In the global config, get the default effect chain configuration util::xml::data_node const *efl_node = parentnode->get_child("default_audio_effects"); @@ -1130,11 +1130,12 @@ void sound_manager::config_load(config_type cfg_type, config_level cfg_level, ut // and the resampler configuration util::xml::data_node const *rs_node = parentnode->get_child("resampler"); if(rs_node) { - m_resampler_type = rs_node->get_attribute_int("type", RESAMPLER_LOFI); m_resampler_hq_latency = rs_node->get_attribute_float("hq_latency", 0.0050); m_resampler_hq_length = rs_node->get_attribute_int("hq_length", 400); - m_resampler_hq_phases = rs_node->get_attribute_int("hq_phases", 200); - rebuild_all_resamplers(); + m_resampler_hq_phases = rs_node->get_attribute_int("hq_phases", 200); + + // this also applies the hq settings if resampler is hq + set_resampler_type(rs_node->get_attribute_int("type", RESAMPLER_LOFI)); } break; } @@ -1216,8 +1217,6 @@ void sound_manager::config_save(config_type cfg_type, util::xml::data_node *pare break; case config_type::DEFAULT: { - fprintf(stderr, "saving resampler config\n"); - // In the global config, save the default effect chain configuration util::xml::data_node *const efl_node = parentnode->add_child("default_audio_effects", nullptr); for(u32 ei = 0; ei != m_default_effects.size(); ei++) { @@ -2490,7 +2489,7 @@ const audio_resampler *sound_manager::get_resampler(u32 fs, u32 ft) auto i = m_resamplers.find(key); if(i != m_resamplers.end()) return i->second.get(); - fprintf(stderr, "creating %d %d (%d)\n", fs, ft, m_resampler_type); + audio_resampler *res; if(m_resampler_type == RESAMPLER_HQ) res = new audio_resampler_hq(fs, ft, m_resampler_hq_latency, m_resampler_hq_length, m_resampler_hq_phases); @@ -2508,31 +2507,39 @@ void sound_manager::rebuild_all_resamplers() stream->create_resamplers(); for(auto &stream : m_stream_list) - stream->lookup_history_sizes(); + stream->lookup_history_sizes(); } void sound_manager::set_resampler_type(u32 type) { - m_resampler_type = type; - rebuild_all_resamplers(); + if(type != m_resampler_type) { + m_resampler_type = type; + rebuild_all_resamplers(); + } } void sound_manager::set_resampler_hq_latency(double latency) { - m_resampler_hq_latency = latency; - rebuild_all_resamplers(); + if(latency != m_resampler_hq_latency) { + m_resampler_hq_latency = latency; + rebuild_all_resamplers(); + } } void sound_manager::set_resampler_hq_length(u32 length) { - m_resampler_hq_length = length; - rebuild_all_resamplers(); + if(length != m_resampler_hq_length) { + m_resampler_hq_length = length; + rebuild_all_resamplers(); + } } void sound_manager::set_resampler_hq_phases(u32 phases) { - m_resampler_hq_phases = phases; - rebuild_all_resamplers(); + if(phases != m_resampler_hq_phases) { + m_resampler_hq_phases = phases; + rebuild_all_resamplers(); + } } const char *sound_manager::resampler_type_names(u32 type) const diff --git a/src/emu/sound.h b/src/emu/sound.h index 6d699dbb8d9..57c96683f0a 100644 --- a/src/emu/sound.h +++ b/src/emu/sound.h @@ -35,7 +35,7 @@ For example, if you have a 10Hz clock, and call stream.update() at t=0.91, it will compute 10 samples (for clock edges 0.0, 0.1, 0.2, ..., 0.7, 0.8, and 0.9). And then if you ask the stream what its - current end time is (via stream.sample_time()), it will say t=1.0, + current end time is (via stream.end_time()), it will say t=1.0, which is in the future, because it knows it will hold that last sample until 1.0s. @@ -210,11 +210,9 @@ public: // sample id and timing of the first and last sample of the current update block, and first of the next sample block u64 start_index() const { return m_output_buffer.write_sample(); } - u64 end_index() const { return m_output_buffer.write_sample() + samples() - 1; } - u64 sample_index() const { return m_output_buffer.write_sample() + samples(); } + u64 end_index() const { return m_output_buffer.write_sample() + samples(); } attotime start_time() const { return sample_to_time(start_index()); } attotime end_time() const { return sample_to_time(end_index()); } - attotime sample_time() const { return sample_to_time(sample_index()); } // convert from absolute sample index to time attotime sample_to_time(u64 index) const; diff --git a/src/frontend/mame/ui/audioeffects.cpp b/src/frontend/mame/ui/audioeffects.cpp index 750ef69815b..eb94667f99f 100644 --- a/src/frontend/mame/ui/audioeffects.cpp +++ b/src/frontend/mame/ui/audioeffects.cpp @@ -105,6 +105,31 @@ bool menu_audio_effects::handle(event const *ev) return true; } + case IPT_UI_CLEAR: { + switch(uintptr_t(ev->itemref)) { + case RS_TYPE: + machine().sound().set_resampler_type(sound_manager::RESAMPLER_LOFI); + reset(reset_options::REMEMBER_POSITION); + return true; + + case RS_LATENCY: + machine().sound().set_resampler_hq_latency(0.005); + reset(reset_options::REMEMBER_POSITION); + return true; + + case RS_LENGTH: + machine().sound().set_resampler_hq_length(400); + reset(reset_options::REMEMBER_POSITION); + return true; + + case RS_PHASES: + machine().sound().set_resampler_hq_phases(200); + reset(reset_options::REMEMBER_POSITION); + return true; + } + break; + } + case IPT_UI_LEFT: { switch(uintptr_t(ev->itemref)) { case RS_TYPE: @@ -189,6 +214,8 @@ u32 menu_audio_effects::flag_lat() const flag |= FLAG_LEFT_ARROW; if(latency < 0.0500) flag |= FLAG_RIGHT_ARROW; + if(machine().sound().resampler_type() != sound_manager::RESAMPLER_HQ) + flag |= FLAG_INVERT | FLAG_DISABLE; return flag; } @@ -200,6 +227,8 @@ u32 menu_audio_effects::flag_length() const flag |= FLAG_LEFT_ARROW; if(latency < 500) flag |= FLAG_RIGHT_ARROW; + if(machine().sound().resampler_type() != sound_manager::RESAMPLER_HQ) + flag |= FLAG_INVERT | FLAG_DISABLE; return flag; } @@ -211,6 +240,8 @@ u32 menu_audio_effects::flag_phases() const flag |= FLAG_LEFT_ARROW; if(latency < 1000) flag |= FLAG_RIGHT_ARROW; + if(machine().sound().resampler_type() != sound_manager::RESAMPLER_HQ) + flag |= FLAG_INVERT | FLAG_DISABLE; return flag; } @@ -228,6 +259,7 @@ void menu_audio_effects::populate() auto eff = sound.default_effect_chain(); for(u32 e = 0; e != eff.size(); e++) item_append(_(audio_effect::effect_names[eff[e]->type()]), 0, (void *)intptr_t((0xffff << 16) | e)); + item_append(_("Resampler"), FLAG_UI_HEADING | FLAG_DISABLE, nullptr); item_append(_("Type"), sound.resampler_type_names(sound.resampler_type()), flag_type(), (void *)RS_TYPE); item_append(_("HQ latency"), format_lat(sound.resampler_hq_latency()), flag_lat(), (void *)RS_LATENCY); diff --git a/src/mame/bmc/bmcpokr.cpp b/src/mame/bmc/bmcpokr.cpp index 95c0ec5808e..f8b94ae5e8f 100644 --- a/src/mame/bmc/bmcpokr.cpp +++ b/src/mame/bmc/bmcpokr.cpp @@ -681,7 +681,7 @@ static INPUT_PORTS_START( bmcpokr ) PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DIP1:1") PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) PORT_DIPSETTING( 0x01, DEF_STR( No ) ) - PORT_DIPNAME( 0x02, 0x00, "Double-Up Game" ) PORT_DIPLOCATION("DIP1:2") + PORT_DIPNAME( 0x02, 0x00, "Double Up Game" ) PORT_DIPLOCATION("DIP1:2") PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) PORT_DIPSETTING( 0x02, DEF_STR( No ) ) PORT_DIPNAME( 0x04, 0x00, "Slot Machine" ) PORT_DIPLOCATION("DIP1:3") @@ -719,7 +719,7 @@ static INPUT_PORTS_START( bmcpokr ) PORT_DIPSETTING( 0x01, "97" ) PORT_DIPSETTING( 0x03, "98" ) PORT_DIPSETTING( 0x00, "99" ) - PORT_DIPNAME( 0x0c, 0x0c, "Double-Up Rate" ) PORT_DIPLOCATION("DIP3:3,4") + PORT_DIPNAME( 0x0c, 0x0c, "Double Up Rate" ) PORT_DIPLOCATION("DIP3:3,4") PORT_DIPSETTING( 0x08, "93" ) PORT_DIPSETTING( 0x04, "94" ) PORT_DIPSETTING( 0x00, "95" ) @@ -780,17 +780,17 @@ static INPUT_PORTS_START( mjmaglmp ) PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DIP1:1") - PORT_DIPSETTING( 0x01, DEF_STR( No ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x02, 0x00, "Double-Up Game" ) PORT_DIPLOCATION("DIP1:2") - PORT_DIPSETTING( 0x02, DEF_STR( No ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) + PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x02, 0x00, "Double Up Game" ) PORT_DIPLOCATION("DIP1:2") + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x04, 0x04, "Coin Sw. Function" ) PORT_DIPLOCATION("DIP1:3") PORT_DIPSETTING( 0x00, "Coin" ) PORT_DIPSETTING( 0x04, "Note" ) PORT_DIPNAME( 0x08, 0x08, "Pay Sw. Function" ) PORT_DIPLOCATION("DIP1:4") PORT_DIPSETTING( 0x00, "Pay-Out" ) - PORT_DIPSETTING( 0x08, "Key-Down" ) + PORT_DIPSETTING( 0x08, "Key-Out" ) PORT_DIPNAME( 0x10, 0x10, "Game Hint" ) PORT_DIPLOCATION("DIP1:5") PORT_DIPSETTING( 0x10, DEF_STR( No ) ) PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) @@ -822,42 +822,42 @@ static INPUT_PORTS_START( mjmaglmp ) PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP2:8" ) PORT_START("DSW3") - PORT_DIPNAME( 0x03, 0x03, "Pay-Out Rate" ) PORT_DIPLOCATION("DIP3:1,2") - PORT_DIPSETTING( 0x02, "75" ) - PORT_DIPSETTING( 0x01, "82" ) - PORT_DIPSETTING( 0x03, "85" ) - PORT_DIPSETTING( 0x00, "88" ) - PORT_DIPNAME( 0x0c, 0x0c, "Double-Up Rate" ) PORT_DIPLOCATION("DIP3:3,4") - PORT_DIPSETTING( 0x08, "95" ) - PORT_DIPSETTING( 0x04, "96" ) - PORT_DIPSETTING( 0x00, "97" ) - PORT_DIPSETTING( 0x0c, "98" ) - PORT_DIPNAME( 0x30, 0x30, "Game Enhance Type" ) PORT_DIPLOCATION("DIP3:5,6") + PORT_DIPNAME( 0x03, 0x03, "Payout Rate" ) PORT_DIPLOCATION("DIP3:1,2") + PORT_DIPSETTING( 0x02, "75%" ) + PORT_DIPSETTING( 0x01, "82%" ) + PORT_DIPSETTING( 0x03, "85%" ) + PORT_DIPSETTING( 0x00, "88%" ) + PORT_DIPNAME( 0x0c, 0x0c, "Double Up Game Payout Rate" ) PORT_DIPLOCATION("DIP3:3,4") + PORT_DIPSETTING( 0x08, "95%" ) + PORT_DIPSETTING( 0x04, "96%" ) + PORT_DIPSETTING( 0x00, "97%" ) + PORT_DIPSETTING( 0x0c, "98%" ) + PORT_DIPNAME( 0x30, 0x30, "Game Enhance Type" ) PORT_DIPLOCATION("DIP3:5,6") PORT_DIPSETTING( 0x10, "Small" ) PORT_DIPSETTING( 0x00, "Big" ) PORT_DIPSETTING( 0x30, "Normal" ) PORT_DIPSETTING( 0x20, "Bonus" ) - PORT_DIPNAME( 0xc0, 0xc0, "Credit Limit" ) PORT_DIPLOCATION("DIP3:7,8") + PORT_DIPNAME( 0xc0, 0xc0, "Credit Limit" ) PORT_DIPLOCATION("DIP3:7,8") PORT_DIPSETTING( 0x00, "300" ) PORT_DIPSETTING( 0x80, "500" ) PORT_DIPSETTING( 0x40, "1000" ) PORT_DIPSETTING( 0xc0, "2000" ) PORT_START("DSW4") - PORT_DIPNAME( 0x01, 0x01, "Max Bet" ) PORT_DIPLOCATION("DIP4:1") + PORT_DIPNAME( 0x01, 0x01, "Maximum Bet" ) PORT_DIPLOCATION("DIP4:1") PORT_DIPSETTING( 0x01, "10" ) PORT_DIPSETTING( 0x00, "20" ) - PORT_DIPNAME( 0x06, 0x06, "Min Bet" ) PORT_DIPLOCATION("DIP4:2,3") + PORT_DIPNAME( 0x06, 0x06, "Minimum Bet" ) PORT_DIPLOCATION("DIP4:2,3") PORT_DIPSETTING( 0x00, "1" ) PORT_DIPSETTING( 0x06, "3" ) PORT_DIPSETTING( 0x04, "6" ) PORT_DIPSETTING( 0x02, "9" ) - PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DIP4:4,5") + PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DIP4:4,5") PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) PORT_DIPSETTING( 0x18, DEF_STR( 1C_1C ) ) PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) PORT_DIPSETTING( 0x08, DEF_STR( 1C_3C ) ) - PORT_DIPNAME( 0x60, 0x60, "Credits Per Key-In" ) PORT_DIPLOCATION("DIP4:6,7") + PORT_DIPNAME( 0x60, 0x60, "Credits Per Key-In" ) PORT_DIPLOCATION("DIP4:6,7") PORT_DIPSETTING( 0x40, "5" ) PORT_DIPSETTING( 0x60, "10" ) PORT_DIPSETTING( 0x20, "50" ) @@ -889,92 +889,95 @@ static INPUT_PORTS_START( fengyunh ) MAHJONG_KEYS_COMMON("DSW3", 0x01) PORT_START("DSW1") - PORT_DIPNAME( 0x01, 0x01, "Max Bet" ) PORT_DIPLOCATION("DIP4:1") // 最大押分 + PORT_DIPNAME( 0x01, 0x01, "Maximum Bet" ) PORT_DIPLOCATION("DIP4:1") // 最大押分 PORT_DIPSETTING( 0x01, "10" ) PORT_DIPSETTING( 0x00, "20" ) - PORT_DIPNAME( 0x06, 0x06, "Min Bet" ) PORT_DIPLOCATION("DIP4:2,3") // 最小押分 + PORT_DIPNAME( 0x06, 0x06, "Minimum Bet" ) PORT_DIPLOCATION("DIP4:2,3") // 最小押分 PORT_DIPSETTING( 0x00, "1" ) PORT_DIPSETTING( 0x04, "3" ) PORT_DIPSETTING( 0x06, "6" ) PORT_DIPSETTING( 0x02, "9" ) - PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DIP4:4,5") // 投幣單位 - PORT_DIPSETTING( 0x18, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) - PORT_DIPNAME( 0x60, 0x60, "Credits Per Key-In" ) PORT_DIPLOCATION("DIP4:6,7") // 開分單位 + PORT_DIPNAME( 0x18, 0x18, DEF_STR(Coinage) ) PORT_DIPLOCATION("DIP4:4,5") // 投幣單位 + PORT_DIPSETTING( 0x18, DEF_STR(1C_1C) ) + PORT_DIPSETTING( 0x10, DEF_STR(1C_2C) ) + PORT_DIPSETTING( 0x08, DEF_STR(1C_3C) ) + PORT_DIPSETTING( 0x00, DEF_STR(1C_5C) ) + PORT_DIPNAME( 0x60, 0x60, "Key-In Unit" ) PORT_DIPLOCATION("DIP4:6,7") // 開分單位 PORT_DIPSETTING( 0x40, "5" ) PORT_DIPSETTING( 0x60, "10" ) PORT_DIPSETTING( 0x20, "50" ) PORT_DIPSETTING( 0x00, "100" ) - PORT_DIPNAME( 0x80, 0x80, "Score Display Mode" ) PORT_DIPLOCATION("DIP4:8") // 計分方式 (sets how points, credits, bets, etc. are displayed) - PORT_DIPSETTING( 0x80, "Numbers" ) // 數字 (Arabic numerals) - PORT_DIPSETTING( 0x00, "Circle Tiles" ) // 筒子 (tong mahjong tiles representing digits) + PORT_DIPNAME( 0x80, 0x80, "Score Display Mode" ) PORT_DIPLOCATION("DIP4:8") // 計分方式 (sets how points, credits, bets, etc. are displayed) + PORT_DIPSETTING( 0x80, "Numbers" ) // 數字 (Arabic numerals) + PORT_DIPSETTING( 0x00, "Circle Tiles" ) // 筒子 (tong mahjong tiles representing digits) PORT_START("DSW2") - PORT_DIPNAME( 0x03, 0x03, "Pay-Out Rate" ) PORT_DIPLOCATION("DIP3:1,2") // 遊戲機率 - PORT_DIPSETTING( 0x02, "75" ) - PORT_DIPSETTING( 0x01, "78" ) - PORT_DIPSETTING( 0x03, "80" ) - PORT_DIPSETTING( 0x00, "85" ) - PORT_DIPNAME( 0x0c, 0x0c, "Double-Up Rate" ) PORT_DIPLOCATION("DIP3:3,4") // 比倍機率 - PORT_DIPSETTING( 0x08, "95" ) - PORT_DIPSETTING( 0x04, "96" ) - PORT_DIPSETTING( 0x00, "97" ) - PORT_DIPSETTING( 0x0c, "98" ) - PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "DIP3:5" ) // 出牌方式 - PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "DIP3:6" ) // " - PORT_DIPNAME( 0xc0, 0xc0, "Credit Limit" ) PORT_DIPLOCATION("DIP3:7,8") + PORT_DIPNAME( 0x03, 0x03, "Payout Rate" ) PORT_DIPLOCATION("DIP3:1,2") // 遊戲機率 + PORT_DIPSETTING( 0x02, "75%" ) + PORT_DIPSETTING( 0x01, "78%" ) + PORT_DIPSETTING( 0x03, "80%" ) + PORT_DIPSETTING( 0x00, "85%" ) + PORT_DIPNAME( 0x0c, 0x0c, "Double Up Game Payout Rate" ) PORT_DIPLOCATION("DIP3:3,4") // 比倍機率 + PORT_DIPSETTING( 0x08, "95%" ) + PORT_DIPSETTING( 0x04, "96%" ) + PORT_DIPSETTING( 0x00, "97%" ) + PORT_DIPSETTING( 0x0c, "98%" ) + PORT_DIPNAME( 0x30, 0x30, "Deal Mode" ) PORT_DIPLOCATION("DIP3:5,6") // 出牌方式 + PORT_DIPSETTING( 0x30, DEF_STR(Normal) ) // 正常 + PORT_DIPSETTING( 0x20, "Increase Manguan" ) // 滿貫加強 + PORT_DIPSETTING( 0x10, "Increase Xiaopai" ) // 小牌加強 + PORT_DIPSETTING( 0x00, "Increase Dapai" ) // 大牌加強 + PORT_DIPNAME( 0xc0, 0xc0, "Credit Limit" ) PORT_DIPLOCATION("DIP3:7,8") // 破台限制 PORT_DIPSETTING( 0x80, "500" ) PORT_DIPSETTING( 0x40, "1000" ) PORT_DIPSETTING( 0xc0, "2000" ) PORT_DIPSETTING( 0x00, "3000" ) PORT_START("DSW3") - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Controls ) ) PORT_DIPLOCATION("DIP2:1") // not displayed in test mode + PORT_DIPNAME( 0x01, 0x01, DEF_STR(Controls) ) PORT_DIPLOCATION("DIP2:1") // not displayed in test mode PORT_DIPSETTING( 0x01, "Keyboard" ) - PORT_DIPSETTING( 0x00, DEF_STR( Joystick ) ) - PORT_DIPNAME( 0x02, 0x02, "Key-In Limit" ) PORT_DIPLOCATION("DIP2:2") // 開分限制 + PORT_DIPSETTING( 0x00, DEF_STR(Joystick) ) + PORT_DIPNAME( 0x02, 0x02, "Key-In Limit" ) PORT_DIPLOCATION("DIP2:2") // 開分限制 PORT_DIPSETTING( 0x02, "1000" ) PORT_DIPSETTING( 0x00, "5000" ) - PORT_DIPNAME( 0x04, 0x04, "Jackpot" ) PORT_DIPLOCATION("DIP2:3") // 累積彩金 + PORT_DIPNAME( 0x04, 0x04, "Jackpot" ) PORT_DIPLOCATION("DIP2:3") // 累積彩金 PORT_DIPSETTING( 0x00, "50" ) PORT_DIPSETTING( 0x04, "100" ) - PORT_DIPNAME( 0x18, 0x18, "Double Over / Round Bonus" ) PORT_DIPLOCATION("DIP2:4,5") + PORT_DIPNAME( 0x18, 0x18, "Double Over / Round Bonus" ) PORT_DIPLOCATION("DIP2:4,5") // 比倍破台/比倍贈分 PORT_DIPSETTING( 0x10, "100 / 10" ) PORT_DIPSETTING( 0x18, "200 / 10" ) PORT_DIPSETTING( 0x08, "300 / 15" ) PORT_DIPSETTING( 0x00, "500 / 25" ) - PORT_DIPNAME( 0x60, 0x60, "Credits Per Key-Out" ) PORT_DIPLOCATION("DIP2:6,7") // 洗分單位 + PORT_DIPNAME( 0x60, 0x60, "Credits Per Key-Out" ) PORT_DIPLOCATION("DIP2:6,7") // 洗分單位 PORT_DIPSETTING( 0x40, "10" ) PORT_DIPSETTING( 0x20, "20" ) PORT_DIPSETTING( 0x60, "30" ) PORT_DIPSETTING( 0x00, "50" ) - PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP2:8" ) // not displayed in test mode + PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP2:8" ) // not displayed in test mode PORT_START("DSW4") - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DIP1:1") // not displayed in test mode - PORT_DIPSETTING( 0x01, DEF_STR( No ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x02, 0x00, "Double-Up Game" ) PORT_DIPLOCATION("DIP1:2") // 比倍遊戲 - PORT_DIPSETTING( 0x02, DEF_STR( No ) ) // 無 - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有 - PORT_DIPNAME( 0x04, 0x04, "Credit Mode" ) PORT_DIPLOCATION("DIP1:3") // 進分方式 (sets coin input function) - PORT_DIPSETTING( 0x04, "Key-In" ) // 開分 - PORT_DIPSETTING( 0x00, "Coin" ) // 投幣 - PORT_DIPNAME( 0x08, 0x08, "Payout Mode" ) PORT_DIPLOCATION("DIP1:4") // 退分方式 - PORT_DIPSETTING( 0x08, "Key-Out" ) // 洗分 (Pay Out key pays out score at Key-Out rate) - PORT_DIPSETTING( 0x00, "Cash Out" ) // 退幣 (Pay Out key pays out score at rate set for coin input) - PORT_DIPNAME( 0x10, 0x10, "Game Hint" ) PORT_DIPLOCATION("DIP1:5") // 吃碰提示 - PORT_DIPSETTING( 0x10, DEF_STR( No ) ) // 無 - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有 - PORT_DIPNAME( 0x20, 0x20, "Direct Double" ) PORT_DIPLOCATION("DIP1:6") // 直接比倍 - PORT_DIPSETTING( 0x20, DEF_STR( No ) ) // 無 - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有 - PORT_DIPNAME( 0x40, 0x40, "Coin Acceptor" ) PORT_DIPLOCATION("DIP1:7") // 投幣器 - PORT_DIPSETTING( 0x00, "Mechanical" ) // 機械式 - PORT_DIPSETTING( 0x40, "Electronic" ) // 電子式 - PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP1:8" ) // not displayed in test mode + PORT_DIPNAME( 0x01, 0x00, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("DIP1:1") // not displayed in test mode + PORT_DIPSETTING( 0x01, DEF_STR(Off) ) + PORT_DIPSETTING( 0x00, DEF_STR(On) ) + PORT_DIPNAME( 0x02, 0x00, "Double Up Game" ) PORT_DIPLOCATION("DIP1:2") // 比倍遊戲 + PORT_DIPSETTING( 0x02, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x04, 0x04, "Credit Mode" ) PORT_DIPLOCATION("DIP1:3") // 進分方式 (sets coin input function) + PORT_DIPSETTING( 0x04, "Key-In" ) // 開分 + PORT_DIPSETTING( 0x00, "Coin" ) // 投幣 + PORT_DIPNAME( 0x08, 0x08, "Payout Mode" ) PORT_DIPLOCATION("DIP1:4") // 退分方式 + PORT_DIPSETTING( 0x08, "Key-Out" ) // 洗分 (Pay Out key pays out score at Key-Out rate) + PORT_DIPSETTING( 0x00, "Return Coins" ) // 退幣 (Pay Out key pays out score at rate set for coin input) + PORT_DIPNAME( 0x10, 0x10, "Game Hint" ) PORT_DIPLOCATION("DIP1:5") // 吃碰提示 + PORT_DIPSETTING( 0x10, DEF_STR( No ) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有 + PORT_DIPNAME( 0x20, 0x20, "Direct Double" ) PORT_DIPLOCATION("DIP1:6") // 直接比倍 + PORT_DIPSETTING( 0x20, DEF_STR( No ) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有 + PORT_DIPNAME( 0x40, 0x40, "Coin Acceptor" ) PORT_DIPLOCATION("DIP1:7") // 投幣器 + PORT_DIPSETTING( 0x00, "Mechanical" ) // 機械式 + PORT_DIPSETTING( 0x40, "Electronic" ) // 電子式 + PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP1:8" ) // not displayed in test mode // Credit Mode Payout Mode | Pay Out Rate Key Out Rate // -----------------------------+------------------------------ @@ -988,95 +991,98 @@ static INPUT_PORTS_START( shendeng ) PORT_INCLUDE(fengyunh) PORT_MODIFY("DSW1") - PORT_DIPNAME( 0x01, 0x01, "Max Bet" ) PORT_DIPLOCATION("DIP4:1") // 最大押分 + PORT_DIPNAME( 0x01, 0x01, "Maximum Bet" ) PORT_DIPLOCATION("DIP4:1") // 最大押分 PORT_DIPSETTING( 0x01, "10" ) PORT_DIPSETTING( 0x00, "20" ) - PORT_DIPNAME( 0x06, 0x06, "Min Bet" ) PORT_DIPLOCATION("DIP4:2,3") // 最小押分 + PORT_DIPNAME( 0x06, 0x06, "Minimum Bet" ) PORT_DIPLOCATION("DIP4:2,3") // 最小押分 PORT_DIPSETTING( 0x06, "1" ) PORT_DIPSETTING( 0x04, "2" ) PORT_DIPSETTING( 0x02, "3" ) PORT_DIPSETTING( 0x00, "5" ) - PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DIP4:4,5") // 投幣單位 - PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x18, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 1C_3C ) ) - PORT_DIPNAME( 0x60, 0x60, "Credits Per Key-In" ) PORT_DIPLOCATION("DIP4:6,7") // 開分單位 + PORT_DIPNAME( 0x18, 0x18, DEF_STR(Coinage) ) PORT_DIPLOCATION("DIP4:4,5") // 投幣單位 + PORT_DIPSETTING( 0x00, DEF_STR(2C_1C) ) + PORT_DIPSETTING( 0x18, DEF_STR(1C_1C) ) + PORT_DIPSETTING( 0x10, DEF_STR(1C_2C) ) + PORT_DIPSETTING( 0x08, DEF_STR(1C_3C) ) + PORT_DIPNAME( 0x60, 0x60, "Key-In Unit" ) PORT_DIPLOCATION("DIP4:6,7") // 開分單位 PORT_DIPSETTING( 0x40, "5" ) PORT_DIPSETTING( 0x60, "10" ) PORT_DIPSETTING( 0x20, "50" ) PORT_DIPSETTING( 0x00, "100" ) - PORT_DIPNAME( 0x80, 0x80, "Score Display Mode" ) PORT_DIPLOCATION("DIP4:8") // 計分方式 (sets how points, credits, bets, etc. are displayed) - PORT_DIPSETTING( 0x80, "Numbers" ) // 數字 (Arabic numerals) - PORT_DIPSETTING( 0x00, "Bamboo Tiles" ) // 索子 (suo mahjong tiles representing digits) + PORT_DIPNAME( 0x80, 0x80, "Score Display Mode" ) PORT_DIPLOCATION("DIP4:8") // 計分方式 (sets how points, credits, bets, etc. are displayed) + PORT_DIPSETTING( 0x80, "Numbers" ) // 數字 (Arabic numerals) + PORT_DIPSETTING( 0x00, "Bamboo Tiles" ) // 索子 (suo mahjong tiles representing digits) PORT_MODIFY("DSW2") - PORT_DIPNAME( 0x03, 0x03, "Pay-Out Rate" ) PORT_DIPLOCATION("DIP3:1,2") // 遊戲機率 - PORT_DIPSETTING( 0x02, "82" ) - PORT_DIPSETTING( 0x01, "88" ) - PORT_DIPSETTING( 0x03, "90" ) - PORT_DIPSETTING( 0x00, "93" ) - PORT_DIPNAME( 0x0c, 0x0c, "Double-Up Rate" ) PORT_DIPLOCATION("DIP3:3,4") // 比倍機率 - PORT_DIPSETTING( 0x08, "93" ) - PORT_DIPSETTING( 0x04, "94" ) - PORT_DIPSETTING( 0x00, "95" ) - PORT_DIPSETTING( 0x0c, "96" ) - PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "DIP3:5" ) // 出牌方式 - PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "DIP3:6" ) // " - PORT_DIPNAME( 0xc0, 0xc0, "Credit Limit" ) PORT_DIPLOCATION("DIP3:7,8") + PORT_DIPNAME( 0x03, 0x03, "Payout Rate" ) PORT_DIPLOCATION("DIP3:1,2") // 遊戲機率 + PORT_DIPSETTING( 0x02, "82%" ) + PORT_DIPSETTING( 0x01, "88%" ) + PORT_DIPSETTING( 0x03, "90%" ) + PORT_DIPSETTING( 0x00, "93%" ) + PORT_DIPNAME( 0x0c, 0x0c, "Double Up Game Payout Rate" ) PORT_DIPLOCATION("DIP3:3,4") // 比倍機率 + PORT_DIPSETTING( 0x08, "93%" ) + PORT_DIPSETTING( 0x04, "94%" ) + PORT_DIPSETTING( 0x00, "95%" ) + PORT_DIPSETTING( 0x0c, "96%" ) + PORT_DIPNAME( 0x30, 0x30, "Deal Mode" ) PORT_DIPLOCATION("DIP3:5,6") // 出牌方式 + PORT_DIPSETTING( 0x30, DEF_STR(Normal) ) // 正常 + PORT_DIPSETTING( 0x20, "Increase Zhima" ) // 芝麻加強 + PORT_DIPSETTING( 0x10, "Increase Xiaopai" ) // 小牌加強 + PORT_DIPSETTING( 0x00, "Increase Dapai" ) // 大牌加強 + PORT_DIPNAME( 0xc0, 0xc0, "Credit Limit" ) PORT_DIPLOCATION("DIP3:7,8") // 破台限制 PORT_DIPSETTING( 0x80, "500" ) PORT_DIPSETTING( 0xc0, "1000" ) PORT_DIPSETTING( 0x40, "2000" ) PORT_DIPSETTING( 0x00, "3000" ) PORT_MODIFY("DSW3") - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Controls ) ) PORT_DIPLOCATION("DIP2:1") // not displayed in test mode + PORT_DIPNAME( 0x01, 0x01, DEF_STR(Controls) ) PORT_DIPLOCATION("DIP2:1") // not displayed in test mode PORT_DIPSETTING( 0x01, "Keyboard" ) - PORT_DIPSETTING( 0x00, DEF_STR( Joystick ) ) - PORT_DIPNAME( 0x02, 0x02, "Key-In Limit" ) PORT_DIPLOCATION("DIP2:2") // 開分限制 + PORT_DIPSETTING( 0x00, DEF_STR(Joystick) ) + PORT_DIPNAME( 0x02, 0x02, "Key-In Limit" ) PORT_DIPLOCATION("DIP2:2") // 開分限制 PORT_DIPSETTING( 0x02, "1000" ) PORT_DIPSETTING( 0x00, "5000" ) - PORT_DIPNAME( 0x04, 0x04, "Jackpot" ) PORT_DIPLOCATION("DIP2:3") // 累積彩金 + PORT_DIPNAME( 0x04, 0x04, "Jackpot" ) PORT_DIPLOCATION("DIP2:3") // 累積彩金 PORT_DIPSETTING( 0x00, "50" ) PORT_DIPSETTING( 0x04, "100" ) - PORT_DIPNAME( 0x18, 0x18, "Double Over / Round Bonus" ) PORT_DIPLOCATION("DIP2:4,5") + PORT_DIPNAME( 0x18, 0x18, "Double Over / Round Bonus" ) PORT_DIPLOCATION("DIP2:4,5") // 比倍破台/比倍贈分 PORT_DIPSETTING( 0x10, "100 / 10" ) PORT_DIPSETTING( 0x18, "200 / 10" ) PORT_DIPSETTING( 0x08, "300 / 15" ) PORT_DIPSETTING( 0x00, "500 / 25" ) - PORT_DIPNAME( 0xe0, 0xe0, "Cash Out Per Credit" ) PORT_DIPLOCATION("DIP2:6,7,8") // 彩票單位 (sets coins/tickets paid out per credit in cash out mode) - PORT_DIPSETTING( 0xe0, "1" ) - PORT_DIPSETTING( 0xc0, "2" ) - PORT_DIPSETTING( 0xa0, "5" ) - PORT_DIPSETTING( 0x80, "6" ) - PORT_DIPSETTING( 0x60, "7" ) - PORT_DIPSETTING( 0x40, "8" ) - PORT_DIPSETTING( 0x20, "9" ) - PORT_DIPSETTING( 0x00, "10" ) + PORT_DIPNAME( 0xe0, 0xe0, "Payout Unit" ) PORT_DIPLOCATION("DIP2:6,7,8") // 彩票單位 (sets coins/tickets paid out per credit in cash out mode) + PORT_DIPSETTING( 0xe0, DEF_STR(1C_1C) ) + PORT_DIPSETTING( 0xc0, DEF_STR(2C_1C) ) + PORT_DIPSETTING( 0xa0, DEF_STR(5C_1C) ) + PORT_DIPSETTING( 0x80, DEF_STR(6C_1C) ) + PORT_DIPSETTING( 0x60, DEF_STR(7C_1C) ) + PORT_DIPSETTING( 0x40, DEF_STR(8C_1C) ) + PORT_DIPSETTING( 0x20, DEF_STR(9C_1C) ) + PORT_DIPSETTING( 0x00, "10 Coins/1 Credit" ) PORT_MODIFY("DSW4") - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DIP1:1") // not displayed in test mode - PORT_DIPSETTING( 0x01, DEF_STR( No ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x02, 0x00, "Double-Up Game" ) PORT_DIPLOCATION("DIP1:2") // 比倍遊戲 - PORT_DIPSETTING( 0x02, DEF_STR( No ) ) // 無 - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有 - PORT_DIPNAME( 0x04, 0x04, "Credit Mode" ) PORT_DIPLOCATION("DIP1:3") // 進分方式 (sets coin input function) - PORT_DIPSETTING( 0x04, "Key-In" ) // 開分 - PORT_DIPSETTING( 0x00, "Coin" ) // 投幣 - PORT_DIPNAME( 0x08, 0x08, "Payout Mode" ) PORT_DIPLOCATION("DIP1:4") // 退分方式 - PORT_DIPSETTING( 0x08, "Key-Out" ) // 洗分 (Pay Out key pays out score at rate set for coin input) - PORT_DIPSETTING( 0x00, "Cash Out" ) // 退幣 (Pay Out key pays out score at cash out rate) - PORT_DIPNAME( 0x10, 0x10, "Game Hint" ) PORT_DIPLOCATION("DIP1:5") // 吃碰提示 - PORT_DIPSETTING( 0x10, DEF_STR( No ) ) // 無 - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有 - PORT_DIPNAME( 0x20, 0x20, "Direct Double" ) PORT_DIPLOCATION("DIP1:6") // 直接比倍 - PORT_DIPSETTING( 0x20, DEF_STR( No ) ) // 無 - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有 - PORT_DIPNAME( 0x40, 0x40, "Coin Acceptor" ) PORT_DIPLOCATION("DIP1:7") // 投幣器 - PORT_DIPSETTING( 0x00, "Mechanical" ) // 機械式 - PORT_DIPSETTING( 0x40, "Electronic" ) // 電子式 - PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP1:8" ) // not displayed in test mode + PORT_DIPNAME( 0x01, 0x00, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("DIP1:1") // not displayed in test mode + PORT_DIPSETTING( 0x01, DEF_STR(Off) ) + PORT_DIPSETTING( 0x00, DEF_STR(On) ) + PORT_DIPNAME( 0x02, 0x00, "Double Up Game" ) PORT_DIPLOCATION("DIP1:2") // 比倍遊戲 + PORT_DIPSETTING( 0x02, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x04, 0x04, "Credit Mode" ) PORT_DIPLOCATION("DIP1:3") // 進分方式 (sets coin input function) + PORT_DIPSETTING( 0x04, "Key-In" ) // 開分 + PORT_DIPSETTING( 0x00, "Coin" ) // 投幣 + PORT_DIPNAME( 0x08, 0x08, "Payout Mode" ) PORT_DIPLOCATION("DIP1:4") // 退分方式 + PORT_DIPSETTING( 0x08, "Key-Out" ) // 洗分 (Pay Out key pays out score at rate set for coin input) + PORT_DIPSETTING( 0x00, "Return Coins" ) // 退幣 (Pay Out key pays out score at cash out rate) + PORT_DIPNAME( 0x10, 0x10, "Game Hint" ) PORT_DIPLOCATION("DIP1:5") // 吃碰提示 + PORT_DIPSETTING( 0x10, DEF_STR( No ) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有 + PORT_DIPNAME( 0x20, 0x20, "Direct Double" ) PORT_DIPLOCATION("DIP1:6") // 直接比倍 + PORT_DIPSETTING( 0x20, DEF_STR( No ) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有 + PORT_DIPNAME( 0x40, 0x40, "Coin Acceptor" ) PORT_DIPLOCATION("DIP1:7") // 投幣器 + PORT_DIPSETTING( 0x00, "Mechanical" ) // 機械式 + PORT_DIPSETTING( 0x40, "Electronic" ) // 電子式 + PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP1:8" ) // not displayed in test mode // Credit Mode Payout Mode | Pay Out Rate Key Out Rate // -----------------------------+------------------------------ @@ -1089,22 +1095,22 @@ INPUT_PORTS_END static INPUT_PORTS_START( xyddzhh ) PORT_START("INPUTS") // Entertainment controls: - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) // choose - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) - PORT_BIT( 0x0200, IP_ACTIVE_HIGH,IPT_CUSTOM ) PORT_READ_LINE_MEMBER(FUNC(bmcpokr_state::hopper_r)) // TODO: verify? - PORT_SERVICE_NO_TOGGLE( 0x0400, IP_ACTIVE_LOW ) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE1 ) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) // no effect in test mode - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) // pass - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_O) + PORT_BIT( 0x0200, IP_ACTIVE_HIGH,IPT_CUSTOM ) PORT_READ_LINE_MEMBER(FUNC(bmcpokr_state::hopper_r)) + PORT_SERVICE_NO_TOGGLE( 0x0400, IP_ACTIVE_LOW ) + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE1 ) + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) // no effect in test mode + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) // bet + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) // pass + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN1 ) MAHJONG_KEYS_COMMON("DSW2", 0x01) @@ -1113,22 +1119,22 @@ static INPUT_PORTS_START( xyddzhh ) // Maximum Bet is fixed to 40 according to test mode (no DIP determines it) PORT_START("DSW1") - PORT_DIPNAME( 0x01, 0x00, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("DIP1:1") - PORT_DIPSETTING( 0x01, DEF_STR(Off) ) - PORT_DIPSETTING( 0x00, DEF_STR(On) ) - PORT_DIPNAME( 0x02, 0x02, "Key-Out Rate" ) PORT_DIPLOCATION("DIP1:2") - PORT_DIPSETTING( 0x02, "Key-In Rate" ) - PORT_DIPSETTING( 0x00, DEF_STR(Coinage) ) - PORT_DIPNAME( 0x04, 0x04, "Return Coins" ) PORT_DIPLOCATION("DIP1:3") - PORT_DIPSETTING( 0x04, DEF_STR(No) ) - PORT_DIPSETTING( 0x00, DEF_STR(Yes) ) - PORT_DIPNAME( 0x08, 0x08, "Siren Sound" ) PORT_DIPLOCATION("DIP1:4") - PORT_DIPSETTING( 0x00, DEF_STR(Off) ) - PORT_DIPSETTING( 0x08, DEF_STR(On) ) - PORT_DIPNAME( 0x10, 0x10, "Auto Pass" ) PORT_DIPLOCATION("DIP1:5") - PORT_DIPSETTING( 0x00, DEF_STR(Off) ) - PORT_DIPSETTING( 0x10, DEF_STR(On) ) - PORT_DIPNAME( 0xe0, 0xe0, "Double-Up Game Jackpot" ) PORT_DIPLOCATION("DIP1:6,7,8") + PORT_DIPNAME( 0x01, 0x00, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("DIP1:1") // 示範音樂 + PORT_DIPSETTING( 0x01, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x02, 0x02, "Key-Out Rate" ) PORT_DIPLOCATION("DIP1:2") // 洗分錶同 + PORT_DIPSETTING( 0x02, "Key-In Rate" ) // 開分 + PORT_DIPSETTING( 0x00, DEF_STR(Coinage) ) // 投幣 + PORT_DIPNAME( 0x04, 0x04, "Return Coins" ) PORT_DIPLOCATION("DIP1:3") // 退幣有無 + PORT_DIPSETTING( 0x04, DEF_STR(No) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR(Yes) ) // 有 + PORT_DIPNAME( 0x08, 0x08, "Siren Sound" ) PORT_DIPLOCATION("DIP1:4") // 報警音效 + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x08, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x10, 0x10, "Auto Pass" ) PORT_DIPLOCATION("DIP1:5") // 自動PASS + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x10, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0xe0, 0xe0, "Double Up Game Jackpot" ) PORT_DIPLOCATION("DIP1:6,7,8") // 續玩破台 PORT_DIPSETTING( 0xc0, "5,000" ) PORT_DIPSETTING( 0xe0, "10,000" ) PORT_DIPSETTING( 0xa0, "15,000" ) @@ -1139,18 +1145,18 @@ static INPUT_PORTS_START( xyddzhh ) PORT_DIPSETTING( 0x00, "50,000" ) PORT_START("DSW2") - PORT_DIPNAME( 0x01, 0x00, "Controls" ) PORT_DIPLOCATION("DIP2:1") - PORT_DIPSETTING( 0x01, "Mahjong" ) - PORT_DIPSETTING( 0x00, "Entertainment" ) - PORT_DIPNAME( 0x06, 0x06, "Double-Up Game Threshold" ) PORT_DIPLOCATION("DIP2:2,3") + PORT_DIPNAME( 0x01, 0x00, "Controls" ) PORT_DIPLOCATION("DIP2:1") // 版本 + PORT_DIPSETTING( 0x01, "Mahjong" ) // 麻將版 + PORT_DIPSETTING( 0x00, DEF_STR(Joystick) ) // 娛樂版 + PORT_DIPNAME( 0x06, 0x06, "Double Up Game Threshold" ) PORT_DIPLOCATION("DIP2:2,3") // 續玩過關 PORT_DIPSETTING( 0x06, "3000" ) PORT_DIPSETTING( 0x04, "4000" ) PORT_DIPSETTING( 0x02, "5000" ) PORT_DIPSETTING( 0x01, "6000" ) - PORT_DIPNAME( 0x08, 0x08, "Accumulated Bonus" ) PORT_DIPLOCATION("DIP2:4") + PORT_DIPNAME( 0x08, 0x08, "Accumulated Bonus" ) PORT_DIPLOCATION("DIP2:4") // 累積彩金 PORT_DIPSETTING( 0x08, "300" ) PORT_DIPSETTING( 0x00, "400" ) - PORT_DIPNAME( 0x70, 0x70, "Double-Up Game Payout Rate" ) PORT_DIPLOCATION("DIP2:5,6,7") + PORT_DIPNAME( 0x70, 0x70, "Double Up Game Payout Rate" ) PORT_DIPLOCATION("DIP2:5,6,7") // 續玩機率 PORT_DIPSETTING( 0x60, "92%" ) PORT_DIPSETTING( 0x50, "93%" ) PORT_DIPSETTING( 0x40, "94%" ) @@ -1159,12 +1165,12 @@ static INPUT_PORTS_START( xyddzhh ) PORT_DIPSETTING( 0x20, "97%" ) PORT_DIPSETTING( 0x10, "98%" ) PORT_DIPSETTING( 0x00, "99%" ) - PORT_DIPNAME( 0x80, 0x80, "Double-Up Game" ) PORT_DIPLOCATION("DIP2:8") - PORT_DIPSETTING( 0x00, DEF_STR(Off) ) - PORT_DIPSETTING( 0x80, DEF_STR(On) ) + PORT_DIPNAME( 0x80, 0x80, "Double Up Game" ) PORT_DIPLOCATION("DIP2:8") // 續玩遊戲 + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x80, DEF_STR(On) ) // 有 PORT_START("DSW3") - PORT_DIPNAME( 0x07, 0x07, DEF_STR(Coinage) ) PORT_DIPLOCATION("DIP3:1,2,3") + PORT_DIPNAME( 0x07, 0x07, DEF_STR(Coinage) ) PORT_DIPLOCATION("DIP3:1,2,3") // 投幣單位 PORT_DIPSETTING( 0x06, DEF_STR(1C_1C) ) PORT_DIPSETTING( 0x05, DEF_STR(1C_2C) ) PORT_DIPSETTING( 0x04, DEF_STR(1C_5C) ) @@ -1173,7 +1179,7 @@ static INPUT_PORTS_START( xyddzhh ) PORT_DIPSETTING( 0x01, "1 Coin/50 Credits" ) PORT_DIPSETTING( 0x07, "1 Coin/100 Credits" ) PORT_DIPSETTING( 0x00, "1 Coin/200 Credits" ) - PORT_DIPNAME( 0x38, 0x38, "Key-In Rate" ) PORT_DIPLOCATION("DIP3:4,5,6") + PORT_DIPNAME( 0x38, 0x38, "Key-In Unit" ) PORT_DIPLOCATION("DIP3:4,5,6") // 開分單位 PORT_DIPSETTING( 0x30, "40" ) PORT_DIPSETTING( 0x28, "50" ) PORT_DIPSETTING( 0x38, "100" ) @@ -1182,15 +1188,15 @@ static INPUT_PORTS_START( xyddzhh ) PORT_DIPSETTING( 0x10, "500" ) PORT_DIPSETTING( 0x08, "1000" ) PORT_DIPSETTING( 0x00, "2000" ) - PORT_DIPNAME( 0x40, 0x40, "Credit Limit" ) PORT_DIPLOCATION("DIP3:7") + PORT_DIPNAME( 0x40, 0x40, "Key-In Limit" ) PORT_DIPLOCATION("DIP3:7") // 開分限制 PORT_DIPSETTING( 0x00, "10,000" ) PORT_DIPSETTING( 0x40, "99,000" ) - PORT_DIPNAME( 0x80, 0x80, "Card Type" ) PORT_DIPLOCATION("DIP3:8") - PORT_DIPSETTING( 0x80, DEF_STR ( Normal ) ) - PORT_DIPSETTING( 0x00, "Graphics" ) + PORT_DIPNAME( 0x80, 0x80, "Card Type" ) PORT_DIPLOCATION("DIP3:8") // 牌型選項 + PORT_DIPSETTING( 0x80, DEF_STR(Normal) ) // 正常 + PORT_DIPSETTING( 0x00, "Graphics" ) // 圖型 PORT_START("DSW4") - PORT_DIPNAME( 0x07, 0x07, "Minimum Bet" ) PORT_DIPLOCATION("DIP4:1,2,3") + PORT_DIPNAME( 0x07, 0x07, "Minimum Bet" ) PORT_DIPLOCATION("DIP4:1,2,3") // 最小押分 PORT_DIPSETTING( 0x06, "1" ) PORT_DIPSETTING( 0x05, "2" ) PORT_DIPSETTING( 0x04, "3" ) @@ -1199,7 +1205,7 @@ static INPUT_PORTS_START( xyddzhh ) PORT_DIPSETTING( 0x02, "15" ) PORT_DIPSETTING( 0x01, "20" ) PORT_DIPSETTING( 0x00, "40" ) - PORT_DIPNAME( 0x38, 0x38, "Payout Rate" ) PORT_DIPLOCATION("DIP4:4,5,6") + PORT_DIPNAME( 0x38, 0x38, "Payout Rate" ) PORT_DIPLOCATION("DIP4:4,5,6") // 遊戲機率 PORT_DIPSETTING( 0x30, "90%" ) PORT_DIPSETTING( 0x28, "91%" ) PORT_DIPSETTING( 0x20, "92%" ) @@ -1208,10 +1214,10 @@ static INPUT_PORTS_START( xyddzhh ) PORT_DIPSETTING( 0x10, "95%" ) PORT_DIPSETTING( 0x08, "96%" ) PORT_DIPSETTING( 0x00, "97%" ) - PORT_DIPNAME( 0x40, 0x40, "Market Setting" ) PORT_DIPLOCATION("DIP4:7") - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x40, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, "Jackpot" ) PORT_DIPLOCATION("DIP4:8") + PORT_DIPNAME( 0x40, 0x40, "Market Setting" ) PORT_DIPLOCATION("DIP4:7") // 炒場設定 + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x40, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x80, 0x80, "Jackpot" ) PORT_DIPLOCATION("DIP4:8") // 系統破台 PORT_DIPSETTING( 0x00, "50,000" ) PORT_DIPSETTING( 0x80, "100,000" ) INPUT_PORTS_END diff --git a/src/mame/bmc/koftball.cpp b/src/mame/bmc/koftball.cpp index c986aa05b91..4c0b27894b4 100644 --- a/src/mame/bmc/koftball.cpp +++ b/src/mame/bmc/koftball.cpp @@ -7,14 +7,17 @@ King Of Football (c)1995 BMC preliminary driver by Tomasz Slanina TODO: -- lots of unknown writes / reads; -- one of the customs could contain a VIA6522-like core. bmc/bmcbowl.cpp uses the VIA6522 and the - accesses are similar; -- probably jxzh also supports the mahjong keyboard. Check if one of the dips enable it and where it - is read; -- better understanding of the koftball protection. +- Lots of unknown writes/reads. +- One of the customs could contain a VIA6522-like core. bmc/bmcbowl.cpp + uses the VIA6522 and the accesses are similar. +- jxzh and kaimenhu show a full mahjong keyboard in their key tests - is + this actually supported or is it vestigial? +- jxzh and kaimenhu bookkeeping menus do not clear the background. +- jxzh stops responding to inputs properly after winning a hand if + stripping sequences are enabled. +- jxzh last chance type A tiles are not visible. +- Better understanding of the koftball protection. --- MC68000P10 M28 (OKI 6295, next to ROM C9) @@ -22,7 +25,7 @@ BMC ADB40817(80 Pin PQFP - Google hits, but no datasheet or description) RAMDAC TRC1710-80PCA (Monolithic 256-word by 18bit Look-up Table & Triple Video DAC with 6-bit DACs) File 89C67 (Clone of YM2413. Next to 3.57954MHz OSC) OSC: 21.47727MHz & 3.57954MHz -2 8-way dipswitches +2 8-way DIP switches part # scratched 64 pin PLCC (soccer ball sticker over this chip ;-) ft5_v16_c5.u14 \ @@ -59,6 +62,37 @@ key-in unit 200 上分單位 key-in limit 5000 上分上限 credit limit 50000 得分上限 + +jxzh uses an unusual control scheme: +* use Start to draw a tile +* use Big (left) and Small (right) to select a tile to discard +* use Start to discard the selected tile +* Kan, Pon, Chi, Reach, Ron, Flip Flop and Bet function as expected in the main game +* use Big (left) and Small (right) to select a tile to exchange during "first chance" +* use Flip Flop to exchange the selected tile during "first chance" +* use Start to end "first chance" +* use Start to select a tile during "last chance" +* use Flip Flop to stake winnings on the double up game +* use Ron to take winnings + +kaimenhu appears to be just the first chance and double up games from +jxzh (i.e. like a draw poker game but with mahjong tiles and hands). + + +jxzh/kaimenhu test menu: + +pon input test 碰:按鍵測試 +kan graphics test 槓:圖型測試 +reach sound test 聽:音樂測試 +ron memory test 胡:記憶體測試 +chi DIP switch test 吃:DIP 測試 +big last hand test 大:前手牌測試 +test exit 離開 按《測試》 + + +kaimenhu has a full set of soft settings accessible from the bookeeping menu +(default password is Start eight times) + */ #include "emu.h" @@ -131,7 +165,7 @@ private: u8 m_gfx_ctrl = 0; u8 m_priority = 0; u8 m_backpen = 0; - std::unique_ptr<bitmap_ind16> m_pixbitmap; + bitmap_ind16 m_pixbitmap; u8 m_pixpal = 0; void irq_ack_w(u8 data); @@ -151,6 +185,7 @@ private: TIMER_DEVICE_CALLBACK_MEMBER(interrupt); + void common_mem(address_map &map) ATTR_COLD; void koftball_mem(address_map &map) ATTR_COLD; void jxzh_mem(address_map &map) ATTR_COLD; void kaimenhu_mem(address_map &map) ATTR_COLD; @@ -195,7 +230,7 @@ void koftball_state::video_start() m_tilemap[1]->set_transparent_pen(0); m_tilemap[3]->set_transparent_pen(0); - m_pixbitmap = std::make_unique<bitmap_ind16>(512, 256); + m_pixbitmap.allocate(512, 256); } // linear 512x256x4bpp @@ -247,13 +282,13 @@ u32 koftball_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, c girl select after coin up prev screen prev screen over under 0x13 0x3a */ - m_pixbitmap->fill(0, cliprect); - draw_pixlayer(*m_pixbitmap, cliprect); + m_pixbitmap.fill(0, cliprect); + draw_pixlayer(m_pixbitmap, cliprect); bitmap.fill(m_backpen, cliprect); if (BIT(m_priority, 3)) - copyscrollbitmap_trans(bitmap, *m_pixbitmap, 0, 0, 0, 0, cliprect, 0); + copyscrollbitmap_trans(bitmap, m_pixbitmap, 0, 0, 0, 0, cliprect, 0); // TODO: or bit 1? if (BIT(m_gfx_ctrl, 5)) @@ -268,7 +303,7 @@ u32 koftball_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, c } if (!BIT(m_priority, 3)) - copyscrollbitmap_trans(bitmap, *m_pixbitmap, 0, 0, 0, 0, cliprect, 0); + copyscrollbitmap_trans(bitmap, m_pixbitmap, 0, 0, 0, 0, cliprect, 0); return 0; } @@ -342,28 +377,25 @@ void koftball_state::kaimenhu_outputs_w(u8 data) // bit 7 always set? } -// FIXME: merge video maps -void koftball_state::koftball_mem(address_map &map) +void koftball_state::common_mem(address_map &map) { - map(0x000000, 0x01ffff).rom(); - map(0x220000, 0x22ffff).ram().share(m_main_ram); - map(0x260000, 0x260fff).ram().w(FUNC(koftball_state::videoram_w<0>)).share(m_videoram[0]); map(0x261000, 0x261fff).ram().w(FUNC(koftball_state::videoram_w<1>)).share(m_videoram[1]); map(0x262000, 0x262fff).ram().w(FUNC(koftball_state::videoram_w<2>)).share(m_videoram[2]); map(0x263000, 0x263fff).ram().w(FUNC(koftball_state::videoram_w<3>)).share(m_videoram[3]); + map(0x268000, 0x26ffff).ram(); map(0x280000, 0x29ffff).ram().share(m_pixram); + map(0x2a0007, 0x2a0007).w(FUNC(koftball_state::irq_ack_w)); map(0x2a0009, 0x2a0009).lw8(NAME([this] (u8 data) { m_irq_enable = data; })); map(0x2a000f, 0x2a000f).lw8(NAME([this] (u8 data) { m_priority = data; LOGGFX("GFX ctrl $2a000f (priority) %02x\n", data); })); map(0x2a0017, 0x2a0017).w(FUNC(koftball_state::pixpal_w)); map(0x2a0019, 0x2a0019).lw8(NAME([this] (u8 data) { m_backpen = data; LOGGFX("GFX ctrl $2a0019 (backpen) %02x\n", data); })); - map(0x2a001a, 0x2a001b).nopw(); - map(0x2a0000, 0x2a001f).r(FUNC(koftball_state::random_number_r)); + map(0x2b0000, 0x2b0001).portr("DSW"); - map(0x2d8000, 0x2d8001).r(FUNC(koftball_state::random_number_r)); + map(0x2da000, 0x2da003).w("ymsnd", FUNC(ym2413_device::write)).umask16(0xff00); map(0x2db001, 0x2db001).w("ramdac", FUNC(ramdac_device::index_w)); @@ -372,45 +404,43 @@ void koftball_state::koftball_mem(address_map &map) map(0x2db005, 0x2db005).w("ramdac", FUNC(ramdac_device::mask_w)); map(0x2dc000, 0x2dc000).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); - map(0x2f0000, 0x2f0003).portr("INPUTS"); - map(0x300001, 0x300001).w(FUNC(koftball_state::koftball_outputs_w)); + + map(0x2f0000, 0x2f0001).portr("INPUTS"); + map(0x320000, 0x320000).lw8(NAME([this] (u8 data) { m_gfx_ctrl = data; LOGGFX("GFX ctrl $320000 (layer enable) %02x\n", data); })); +} + +void koftball_state::koftball_mem(address_map &map) +{ + common_mem(map); + + map(0x000000, 0x01ffff).rom(); + map(0x220000, 0x22ffff).ram().share(m_main_ram); + + map(0x2a001a, 0x2a001b).nopw(); + map(0x2a0000, 0x2a001f).r(FUNC(koftball_state::random_number_r)); + map(0x2d8000, 0x2d8001).r(FUNC(koftball_state::random_number_r)); + + map(0x300001, 0x300001).w(FUNC(koftball_state::koftball_outputs_w)); + map(0x340000, 0x340001).r(FUNC(koftball_state::prot_r)); map(0x360000, 0x360001).w(FUNC(koftball_state::prot_w)); } void koftball_state::jxzh_mem(address_map &map) { + common_mem(map); + map(0x000000, 0x03ffff).rom(); map(0x200000, 0x200fff).ram().share("nvram"); - map(0x260000, 0x260fff).ram().w(FUNC(koftball_state::videoram_w<0>)).share(m_videoram[0]); - map(0x261000, 0x261fff).ram().w(FUNC(koftball_state::videoram_w<1>)).share(m_videoram[1]); - map(0x262000, 0x262fff).ram().w(FUNC(koftball_state::videoram_w<2>)).share(m_videoram[2]); - map(0x263000, 0x263fff).ram().w(FUNC(koftball_state::videoram_w<3>)).share(m_videoram[3]); map(0x264b00, 0x264dff).ram(); // TODO: writes here at least at girl selection after coin up. Some kind of effect? - map(0x268000, 0x26ffff).ram(); - map(0x280000, 0x29ffff).ram().share(m_pixram); - map(0x2a0007, 0x2a0007).w(FUNC(koftball_state::irq_ack_w)); - map(0x2a0009, 0x2a0009).lw8(NAME([this] (u8 data) { m_irq_enable = data; })); - map(0x2a000f, 0x2a000f).lw8(NAME([this] (u8 data) { m_priority = data; LOGGFX("GFX ctrl $2a000f (priority) %02x\n", data); })); - map(0x2a0017, 0x2a0017).w(FUNC(koftball_state::pixpal_w)); - map(0x2a0019, 0x2a0019).lw8(NAME([this] (u8 data) { m_backpen = data; LOGGFX("GFX ctrl $2a0019 (backpen) %02x\n", data); })); map(0x2a001a, 0x2a001d).nopw(); map(0x2a0000, 0x2a001f).r(FUNC(koftball_state::random_number_r)); - map(0x2b0000, 0x2b0001).portr("DSW"); - map(0x2da000, 0x2da003).umask16(0xff00).w("ymsnd", FUNC(ym2413_device::write)); - - map(0x2db001, 0x2db001).w("ramdac", FUNC(ramdac_device::index_w)); - map(0x2db002, 0x2db003).nopr(); // reads here during some scene changes - map(0x2db003, 0x2db003).w("ramdac", FUNC(ramdac_device::pal_w)); - map(0x2db005, 0x2db005).w("ramdac", FUNC(ramdac_device::mask_w)); - map(0x2dc000, 0x2dc000).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); - map(0x2f0000, 0x2f0001).portr("INPUTS"); map(0x300001, 0x300001).w(FUNC(koftball_state::kaimenhu_outputs_w)); - map(0x320000, 0x320000).lw8(NAME([this] (u8 data) { m_gfx_ctrl = data; LOGGFX("GFX ctrl $320000 (layer enable) %02x\n", data); })); + map(0x340000, 0x340001).r(FUNC(koftball_state::prot_r)); map(0x360000, 0x360001).w(FUNC(koftball_state::prot_w)); map(0x380000, 0x380001).w(FUNC(koftball_state::prot_w)); @@ -509,16 +539,16 @@ static INPUT_PORTS_START( kaimenhu ) PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) PORT_NAME("%p Mahjong Ron / Take Score" ) // called take score (得分) in key test PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::line_r)) + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::line_r)) PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_SERVICE_NO_TOGGLE( 0x1000, IP_ACTIVE_LOW ) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_NAME("%p Mahjong Small / Right") - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) PORT_NAME("%p Mahjong Big / Left") - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP) PORT_NAME("%p Mahjong Double Up / Change Tile") + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_NAME("%p Mahjong Small / Right") + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) PORT_NAME("%p Mahjong Big / Left") + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP ) PORT_NAME("%p Mahjong Flip Flop / Double Up" ) // called double up (比倍) in key test PORT_START("DSW") PORT_DIPNAME( 0x0001, 0x0001, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:8") @@ -542,7 +572,7 @@ static INPUT_PORTS_START( kaimenhu ) PORT_DIPNAME( 0x0040, 0x0040, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x0040, DEF_STR(Off) ) PORT_DIPSETTING( 0x0000, DEF_STR(On) ) - PORT_DIPNAME( 0x0080, 0x0080, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:1") + PORT_DIPNAME( 0x0080, 0x0080, "Double Up Game" ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x0080, DEF_STR(Off) ) PORT_DIPSETTING( 0x0000, DEF_STR(On) ) PORT_DIPNAME( 0x0100, 0x0100, DEF_STR(Service_Mode) ) PORT_DIPLOCATION("SW2:8") @@ -580,6 +610,18 @@ static INPUT_PORTS_START( jxzh ) PORT_DIPSETTING( 0x0002, "1 2 4 8 12 16 24 32" ) PORT_DIPSETTING( 0x0001, "1 2 3 5 8 15 30 50" ) PORT_DIPSETTING( 0x0000, "1 2 3 5 10 25 50 100" ) + PORT_DIPNAME( 0x0040, 0x0040, "Last Chance Type" ) PORT_DIPLOCATION("SW1:2") + PORT_DIPSETTING( 0x0040, "A" ) // choose three of ten tiles + PORT_DIPSETTING( 0x0000, "B" ) // draw ten tiles + PORT_DIPNAME( 0x0400, 0x0400, "Nudity" ) PORT_DIPLOCATION("SW2:6") + PORT_DIPSETTING( 0x0400, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x0800, 0x0800, "Auto Last Chance B" ) PORT_DIPLOCATION("SW2:5") + PORT_DIPSETTING( 0x0800, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) // automatically draws tiles for last chance type B + PORT_DIPNAME( 0x2000, 0x0000, "Gal Voice" ) PORT_DIPLOCATION("SW2:3") + PORT_DIPSETTING( 0x2000, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) // calls discarded tiles INPUT_PORTS_END @@ -804,6 +846,6 @@ void koftball_state::init_koftball() } // anonymous namespace -GAME( 1995, koftball, 0, koftball, koftball, koftball_state, init_koftball, ROT0, "BMC", "Zuqiu Wang - King of Football", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) -GAME( 1996, jxzh, 0, jxzh, jxzh, koftball_state, empty_init, ROT0, "BMC", "Jinxiu Zhonghua", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) -GAME( 1996, kaimenhu, jxzh, kaimenhu, kaimenhu, koftball_state, empty_init, ROT0, "BMC", "Kaimen Hu", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) +GAME( 1995, koftball, 0, koftball, koftball, koftball_state, init_koftball, ROT0, "BMC", "Zuqiu Wang - King of Football", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) +GAME( 1996, jxzh, 0, jxzh, jxzh, koftball_state, empty_init, ROT0, "BMC", "Jinxiu Zhonghua", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) +GAME( 1996, kaimenhu, 0, kaimenhu, kaimenhu, koftball_state, empty_init, ROT0, "BMC", "Kaimen Hu", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/capcom/cps2.cpp b/src/mame/capcom/cps2.cpp index 44c61e0a4e4..f7d6e36bdce 100644 --- a/src/mame/capcom/cps2.cpp +++ b/src/mame/capcom/cps2.cpp @@ -12893,17 +12893,17 @@ GAME( 2000, mmatrixj, mmatrix, cps2, cps2_2p1b, cps2_state, init_cps2, RO // Games released on CPS-2 hardware by Mitchell -GAME( 2000, mpang, 0, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Mighty! Pang (Europe 001010)", MACHINE_SUPPORTS_SAVE ) -GAME( 2000, mpangr1, mpang, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Mighty! Pang (Europe 000925)", MACHINE_SUPPORTS_SAVE ) -GAME( 2000, mpangu, mpang, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Mighty! Pang (USA 001010)", MACHINE_SUPPORTS_SAVE ) -GAME( 2000, mpangj, mpang, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Mighty! Pang (Japan 001011)", MACHINE_SUPPORTS_SAVE ) -GAME( 2000, mpanga, mpang, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Mighty! Pang (Asia 001010)", MACHINE_SUPPORTS_SAVE ) -GAME( 2001, pzloop2, 0, cps2, pzloop2, cps2_state, init_pzloop2, ROT0, "Mitchell (Capcom license)", "Puzz Loop 2 (Europe 010302)", MACHINE_SUPPORTS_SAVE ) -GAME( 2001, pzloop2j, pzloop2, cps2, pzloop2, cps2_state, init_pzloop2, ROT0, "Mitchell (Capcom license)", "Puzz Loop 2 (Japan 010226)", MACHINE_SUPPORTS_SAVE ) -GAME( 2001, pzloop2jr1, pzloop2, cps2, pzloop2, cps2_state, init_pzloop2, ROT0, "Mitchell (Capcom license)", "Puzz Loop 2 (Japan 010205)", MACHINE_SUPPORTS_SAVE ) -GAME( 2001, pzloop2jp, pzloop2, dead_cps2, pzloop2,cps2_state, init_pzloop2,ROT0, "Mitchell (Capcom license)", "Puzz Loop 2 (Japan 010201 Publicity)", MACHINE_SUPPORTS_SAVE ) -GAME( 2001, choko, 0, cps2, choko, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Janpai Puzzle Choukou (Japan 010820)", MACHINE_SUPPORTS_SAVE ) -GAME( 2001, chokop, 0, dead_cps2, choko,cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Janpai Puzzle Choukou (Japan 010820 Publicity)", MACHINE_SUPPORTS_SAVE ) +GAME( 2000, mpang, 0, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Mighty! Pang (Europe 001010)", MACHINE_SUPPORTS_SAVE ) +GAME( 2000, mpangr1, mpang, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Mighty! Pang (Europe 000925)", MACHINE_SUPPORTS_SAVE ) +GAME( 2000, mpangu, mpang, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Mighty! Pang (USA 001010)", MACHINE_SUPPORTS_SAVE ) +GAME( 2000, mpangj, mpang, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Mighty! Pang (Japan 001011)", MACHINE_SUPPORTS_SAVE ) +GAME( 2000, mpanga, mpang, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Mighty! Pang (Asia 001010)", MACHINE_SUPPORTS_SAVE ) +GAME( 2001, pzloop2, 0, cps2, pzloop2, cps2_state, init_pzloop2, ROT0, "Mitchell (Capcom license)", "Puzz Loop 2 (Europe 010302)", MACHINE_SUPPORTS_SAVE ) +GAME( 2001, pzloop2j, pzloop2, cps2, pzloop2, cps2_state, init_pzloop2, ROT0, "Mitchell (Capcom license)", "Puzz Loop 2 (Japan 010226)", MACHINE_SUPPORTS_SAVE ) +GAME( 2001, pzloop2jr1, pzloop2, cps2, pzloop2, cps2_state, init_pzloop2, ROT0, "Mitchell (Capcom license)", "Puzz Loop 2 (Japan 010205)", MACHINE_SUPPORTS_SAVE ) +GAME( 2001, pzloop2jp, pzloop2, dead_cps2, pzloop2, cps2_state, init_pzloop2, ROT0, "Mitchell (Capcom license)", "Puzz Loop 2 (Japan 010201 Publicity)", MACHINE_SUPPORTS_SAVE ) +GAME( 2001, choko, 0, cps2, choko, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Janpai Puzzle Choukou (Japan 010820)", MACHINE_SUPPORTS_SAVE ) +GAME( 2001, chokop, choko, dead_cps2, choko, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Janpai Puzzle Choukou (Japan 010820 Publicity)", MACHINE_SUPPORTS_SAVE ) // Games released on CPS-2 hardware by Eighting/Raizing diff --git a/src/mame/igs/igs_m027.cpp b/src/mame/igs/igs_m027.cpp index 45a2f96fba3..1d2297a4c1d 100644 --- a/src/mame/igs/igs_m027.cpp +++ b/src/mame/igs/igs_m027.cpp @@ -725,7 +725,7 @@ INPUT_PORTS_START( jking02 ) PORT_DIPNAME( 0x10, 0x10, "Password" ) PORT_DIPLOCATION("SW2:5") PORT_DIPSETTING( 0x10, DEF_STR(No) ) PORT_DIPSETTING( 0x00, DEF_STR(Yes) ) - PORT_DIPNAME( 0x20, 0x20, "Double-Up Game" ) PORT_DIPLOCATION("SW2:6") + PORT_DIPNAME( 0x20, 0x20, "Double Up Game" ) PORT_DIPLOCATION("SW2:6") PORT_DIPSETTING( 0x20, DEF_STR(Off) ) PORT_DIPSETTING( 0x00, DEF_STR(On) ) PORT_DIPNAME( 0x40, 0x40, "Auto Stop" ) PORT_DIPLOCATION("SW2:7") @@ -1418,10 +1418,10 @@ INPUT_PORTS_START( oceanpar101us ) PORT_DIPNAME( 0x10, 0x10, "Auto Take" ) PORT_DIPLOCATION("SW1:5") PORT_DIPSETTING( 0x10, DEF_STR(No) ) PORT_DIPSETTING( 0x00, DEF_STR(Yes) ) - PORT_DIPNAME( 0x20, 0x20, "Double-Up Game" ) PORT_DIPLOCATION("SW1:6") + PORT_DIPNAME( 0x20, 0x20, "Double Up Game" ) PORT_DIPLOCATION("SW1:6") PORT_DIPSETTING( 0x00, DEF_STR(Off) ) PORT_DIPSETTING( 0x20, DEF_STR(On) ) - PORT_DIPNAME( 0xc0, 0xc0, "Double-Up Game Type" ) PORT_DIPLOCATION("SW1:7,8") + PORT_DIPNAME( 0xc0, 0xc0, "Double Up Game Type" ) PORT_DIPLOCATION("SW1:7,8") PORT_DIPSETTING( 0xc0, "Poker 1" ) PORT_DIPSETTING( 0x80, "Poker 2" ) PORT_DIPSETTING( 0x40, "Symbol" ) diff --git a/src/mame/misc/gms.cpp b/src/mame/misc/gms.cpp index c35e44609ca..c5271b4215d 100644 --- a/src/mame/misc/gms.cpp +++ b/src/mame/misc/gms.cpp @@ -131,6 +131,7 @@ public: , m_oki(*this, "oki") , m_ymsnd(*this, "ymsnd") , m_dsw(*this, "DSW%u", 1U) + , m_key(*this, "KEY%u", 0U) { } @@ -150,6 +151,8 @@ public: void init_sscs() ATTR_COLD; void init_super555() ATTR_COLD; + template <unsigned Shift> ioport_value keyboard_r(); + protected: virtual void video_start() override ATTR_COLD; @@ -165,6 +168,7 @@ protected: required_device<okim6295_device> m_oki; optional_device<ym2151_device> m_ymsnd; optional_ioport_array<4> m_dsw; + optional_ioport_array<5> m_key; uint16_t m_reels_toggle = 0; uint16_t m_tilebank = 0; @@ -225,6 +229,19 @@ private: TILE_GET_INFO_MEMBER(get_tile1_info); }; +template <unsigned Shift> +ioport_value gms_2layers_state::keyboard_r() +{ + unsigned const select = bitswap<5>(m_input_matrix, 6, 1, 5, 0, 4); + ioport_value result = 0x3f; + for (unsigned i = 0; 5 > i; ++i) + { + if (BIT(select, i)) + result &= m_key[i]->read(); + } + return result >> Shift; +} + uint16_t gms_2layers_state::unk_r() { return machine().rand(); @@ -1344,46 +1361,102 @@ static INPUT_PORTS_START( baile ) INPUT_PORTS_END static INPUT_PORTS_START( yyhm ) - PORT_INCLUDE( sc2in1 ) - - PORT_MODIFY("IN1") // TODO: likely incomplete - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) + // TODO: missing flip flop and payout/keyout inputs in mahjong mode + // TODO: missing payout/keyout input in joystick mode + PORT_START("IN1") + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) PORT_SERVICE_NO_TOGGLE(0x02, IP_ACTIVE_LOW) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON2 ) // also used to select in test mode - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x00fc, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x0c00, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0xf000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) PORT_CUSTOM_MEMBER(FUNC(gms_3layers_state::keyboard_r<0>)) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + PORT_BIT( 0xf800, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) - // Only 1 8-DIP bank on PCB. Dips' effects as per test mode. - PORT_MODIFY("DSW1") - PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Test ) ) PORT_DIPLOCATION("SW1:1") - PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0002, 0x0002, "Voice Announcements" ) PORT_DIPLOCATION("SW1:2") - PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0002, DEF_STR( On ) ) - PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:3") - PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0004, DEF_STR( On ) ) - PORT_DIPNAME( 0x0008, 0x0008, "Scoring Type" ) PORT_DIPLOCATION("SW1:4") - PORT_DIPSETTING( 0x0000, "Mahjong Tile Scoring" ) - PORT_DIPSETTING( 0x0008, "Numeric Scoring" ) + PORT_START("IN2") + PORT_BIT( 0x0003, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) PORT_CUSTOM_MEMBER(FUNC(gms_3layers_state::keyboard_r<4>)) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + PORT_BIT( 0xfff8, IP_ACTIVE_LOW, IPT_UNKNOWN ) + //PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", FUNC(eeprom_serial_93cxx_device::do_read)) // TODO: verify + + PORT_START("KEY0") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_M ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_I ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + + PORT_START("KEY1") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_N ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_J ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_F ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_B ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + + PORT_START("KEY2") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_K ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_G ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_C ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + + PORT_START("KEY3") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_L ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_H ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_D ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + + PORT_START("KEY4") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + + // Only 1 8-DIP bank on PCB. DIPs' effects as per test mode. + PORT_START("DSW1") + PORT_DIPNAME( 0x0001, 0x0001, DEF_STR(Service_Mode) ) PORT_DIPLOCATION("SW1:1") // 遊戲設定 + PORT_DIPSETTING( 0x0001, DEF_STR(Off) ) // 正常 + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) // 開機進入 + PORT_DIPNAME( 0x0002, 0x0002, "Voice Announcements" ) PORT_DIPLOCATION("SW1:2") // 語音報牌 + PORT_DIPSETTING( 0x0000, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x0002, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x0004, 0x0004, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("SW1:3") // 示範音樂 + PORT_DIPSETTING( 0x0000, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x0004, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x0008, 0x0008, "Score Display" ) PORT_DIPLOCATION("SW1:4") // 計分方式 + PORT_DIPSETTING( 0x0008, "Numbers" ) // 數字計分 + PORT_DIPSETTING( 0x0000, "Circle Tiles" ) // 筒子計分 PORT_DIPUNUSED_DIPLOC( 0x0010, 0x0010, "SW1:5") // No effect listed in test mode PORT_DIPUNUSED_DIPLOC( 0x0020, 0x0020, "SW1:6") // " PORT_DIPUNUSED_DIPLOC( 0x0040, 0x0040, "SW1:7") // " - PORT_DIPNAME( 0x0080, 0x0000, "Connector" ) PORT_DIPLOCATION("SW1:8") - PORT_DIPSETTING( 0x0000, "Joystick" ) - PORT_DIPSETTING( 0x0080, "Mahjong" ) + PORT_DIPNAME( 0x0080, 0x0080, DEF_STR(Controls) ) PORT_DIPLOCATION("SW1:8") // 操作方式 + PORT_DIPSETTING( 0x0080, "Mahjong" ) // 鍵盤 + PORT_DIPSETTING( 0x0000, DEF_STR(Joystick) ) // 搖桿 INPUT_PORTS_END static INPUT_PORTS_START( ballch ) |