summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/devices/bus/odyssey2/voice.cpp2
-rw-r--r--src/devices/machine/netlist.cpp35
-rw-r--r--src/devices/machine/netlist.h12
-rw-r--r--src/devices/sound/disc_cls.h14
-rw-r--r--src/devices/sound/disc_inp.hxx7
-rw-r--r--src/devices/sound/discrete.cpp5
-rw-r--r--src/devices/sound/spkrdev.cpp2
-rw-r--r--src/emu/resampler.cpp4
-rw-r--r--src/emu/sound.cpp42
-rw-r--r--src/emu/sound.h6
-rw-r--r--src/frontend/mame/ui/audioeffects.cpp32
-rw-r--r--src/mame/bmc/bmcpokr.cpp382
-rw-r--r--src/mame/bmc/koftball.cpp150
-rw-r--r--src/mame/capcom/cps2.cpp22
-rw-r--r--src/mame/igs/igs_m027.cpp6
-rw-r--r--src/mame/misc/carrera.cpp477
-rw-r--r--src/mame/misc/gms.cpp143
17 files changed, 809 insertions, 532 deletions
diff --git a/src/devices/bus/odyssey2/voice.cpp b/src/devices/bus/odyssey2/voice.cpp
index 9ca1ea26101..678757bb775 100644
--- a/src/devices/bus/odyssey2/voice.cpp
+++ b/src/devices/bus/odyssey2/voice.cpp
@@ -139,7 +139,7 @@ void o2_voice_device::device_add_mconfig(machine_config &config)
// The Voice uses a speaker with its own volume control so the relative volumes to use are subjective, these sound good
m_speech->add_route(ALL_OUTPUTS, "mono", 1.00);
- O2_CART_SLOT(config, m_subslot, o2_cart, nullptr);
+ O2_CART_SLOT(config, m_subslot, o2_cart, nullptr).set_must_be_loaded(true);
}
ROM_START( o2voice )
diff --git a/src/devices/machine/netlist.cpp b/src/devices/machine/netlist.cpp
index 8d4d6cedf4d..a3d6ae3e656 100644
--- a/src/devices/machine/netlist.cpp
+++ b/src/devices/machine/netlist.cpp
@@ -322,6 +322,7 @@ class NETLIB_NAME(sound_in) : public sound_in_type
public:
using base_type = sound_in_type;
using base_type::base_type;
+ sound_stream *m_stream = nullptr;
};
netlist::setup_t &netlist_mame_device::setup()
@@ -1387,6 +1388,11 @@ void netlist_mame_sound_device::device_start()
std::vector<nld_sound_in *> indevs = netlist().get_device_list<nld_sound_in>();
for (auto &e : indevs)
{
+ // We cannot use the resampler because the stream is not
+ // always audio. In particular the ay8910 may send a stream
+ // of resistor values, which would be destroyed by resampling.
+
+ e->m_stream = stream_alloc(1, 0, SAMPLE_RATE_INPUT_ADAPTIVE);
m_in.emplace(e->id(), e);
const auto sample_time = netlist::netlist_time::from_raw(static_cast<netlist::netlist_time::internal_type>(nltime_from_attotime(m_attotime_per_clock).as_raw()));
e->resolve_params(sample_time);
@@ -1399,7 +1405,7 @@ void netlist_mame_sound_device::device_start()
m_inbuffer.resize(m_in.size());
/* initialize the stream(s) */
- m_stream = stream_alloc(m_in.size(), m_out.size(), m_sound_clock);
+ m_stream = stream_alloc(0, m_out.size(), m_sound_clock);
LOGDEVCALLS("sound device_start exit\n");
}
@@ -1444,21 +1450,30 @@ void netlist_mame_sound_device::update_to_current_time()
void netlist_mame_sound_device::sound_stream_update(sound_stream &stream)
{
- for (auto &e : m_in)
+ if (stream.input_count() == 1)
{
- auto clock_period = stream.sample_period();
- auto sample_time = netlist::netlist_time::from_raw(static_cast<netlist::netlist_time::internal_type>(nltime_from_attotime(clock_period).as_raw()));
- m_inbuffer[e.first] = netlist_mame_sound_input_buffer(stream, e.first);
- e.second->buffer_reset(sample_time, stream.samples(), &m_inbuffer[e.first]);
+ for (auto &e : m_in)
+ if (e.second->m_stream == &stream)
+ {
+ auto clock_period = stream.sample_period();
+ auto sample_time = netlist::netlist_time::from_raw(static_cast<netlist::netlist_time::internal_type>(nltime_from_attotime(clock_period).as_raw()));
+ m_inbuffer[e.first] = netlist_mame_sound_input_buffer(stream);
+ e.second->buffer_reset(sample_time, stream.samples(), &m_inbuffer[e.first]);
+ return;
+ }
+ fatalerror("netlist: Got input from an unknown stream\n");
}
int samples = stream.samples();
LOGDEBUG("samples %d\n", samples);
- // end_time() is the time at the END of the last sample we're generating
- // however, the sample value is the value at the START of that last sample,
- // so subtract one sample period so that we only process up to the minimum
- auto nl_target_time = nltime_from_attotime(stream.end_time() - stream.sample_period());
+ // Ensure all input streams are up-to-date
+ for (auto &e : m_in)
+ if (e.second->m_stream)
+ e.second->m_stream->update();
+
+ // Get the start time of the last sample to generate
+ auto nl_target_time = nltime_from_attotime(stream.sample_to_time(stream.end_index() - 1));
auto nltime(netlist().exec().time());
if (nltime < nl_target_time)
diff --git a/src/devices/machine/netlist.h b/src/devices/machine/netlist.h
index 67b6b7d143c..57fc6b05c3a 100644
--- a/src/devices/machine/netlist.h
+++ b/src/devices/machine/netlist.h
@@ -255,14 +255,18 @@ private:
class netlist_mame_sound_input_buffer
{
public:
- sound_stream *m_stream = nullptr;
- int m_stream_input = 0;
+ std::vector<sound_stream::sample_t> m_buffer;
netlist_mame_sound_input_buffer() {}
- netlist_mame_sound_input_buffer(sound_stream &stream, int input) : m_stream(&stream), m_stream_input(input) { }
+ netlist_mame_sound_input_buffer(sound_stream &stream) {
+ int samples = stream.samples();
+ m_buffer.resize(samples);
+ for (int i=0; i != samples; i++)
+ m_buffer[i] = stream.get(0, i);
+ }
- sound_stream::sample_t operator[](std::size_t index) { return m_stream->get(m_stream_input, index); }
+ sound_stream::sample_t operator[](std::size_t index) { return m_buffer[index]; }
};
// ----------------------------------------------------------------------------------------
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/resampler.cpp b/src/emu/resampler.cpp
index b86e028ce04..18a5d9f4a21 100644
--- a/src/emu/resampler.cpp
+++ b/src/emu/resampler.cpp
@@ -231,7 +231,7 @@ u32 audio_resampler_hq::compute_gcd(u32 fs, u32 ft)
u32 audio_resampler_hq::history_size() const
{
- return m_order_per_lane;
+ return m_order_per_lane + m_skip + 1;
}
void audio_resampler_hq::apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const
@@ -382,7 +382,7 @@ audio_resampler_lofi::audio_resampler_lofi(u32 fs, u32 ft)
u32 audio_resampler_lofi::history_size() const
{
- return 5 * m_source_divide;
+ return 5 * m_source_divide + m_fs / m_ft + 1;
}
void audio_resampler_lofi::apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const
diff --git a/src/emu/sound.cpp b/src/emu/sound.cpp
index 86e1858a7c9..becd54ea050 100644
--- a/src/emu/sound.cpp
+++ b/src/emu/sound.cpp
@@ -503,7 +503,7 @@ void sound_stream::update()
// Find out where we are and how much we have to do
u64 idx = get_current_sample_index();
- m_samples_to_update = idx - m_output_buffer.write_sample();
+ m_samples_to_update = idx - m_output_buffer.write_sample() + 1; // We want to include the current sample, hence the +1
if(m_samples_to_update > 0) {
m_in_update = true;
@@ -525,7 +525,7 @@ void sound_stream::update_nodeps()
// Find out where we are and how much we have to do
u64 idx = get_current_sample_index();
- m_samples_to_update = idx - m_output_buffer.write_sample();
+ m_samples_to_update = idx - m_output_buffer.write_sample() + 1; // We want to include the current sample, hence the +1
if(m_samples_to_update > 0) {
m_in_update = true;
@@ -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) {
@@ -1129,12 +1130,13 @@ 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);
+ 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));
}
- rebuild_all_resamplers();
break;
}
@@ -2505,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/carrera.cpp b/src/mame/misc/carrera.cpp
index 9e2bb3242db..3ad4b5be6d0 100644
--- a/src/mame/misc/carrera.cpp
+++ b/src/mame/misc/carrera.cpp
@@ -1,56 +1,117 @@
// license:BSD-3-Clause
-// copyright-holders: David Haywood
-
-/*
-
-This is a simple 'Pairs' game called
-Carrera or Bomberman by BS Electronics
-
-
-
-PCB Layout
-----------
-
-|----------------------------------------------|
-| 22.1184MHz Z80 |
-| ROM.IC1 |
-|_ BATTERY ROM.IC22 |
- | |
- _| 6116 ROM.IC2 |
-| |
-| |
-|J AY-3-8910 ROM.IC3 |
-|A DSW1(8) |
-|M |
-|M DSW2(8) ROM.IC4 |
-|A |
-| DSW3(8) |
-| ROM.IC5 |
-|_ PROM.IC39 DSW4(8) |
- | 6116 |
- _| |
-| HD6845 6116 |
-|----------------------------------------------|
-Notes:
- Z80 @ 3.6864MHz [22.1184/6]
- AY-3-8910 @ 1.8432MHz [22.1184/12]
-
-
-Emulation Notes:
- Corrupt Tile on the first R in Carrera? (unlikely to be a bug, HW is very simple..)
-
-TODO:
-- Are colors 100% correct? Needs a reference to be sure.
-- There are reel GFXs on the ROMs (near the end), left-over or there's a way to enable it?
- Update: if you trigger a normal irq 0 instead of a NMI the game will change into a proper 8 liner game without inputs. Investigate on it...
- Update 2: alantin, bsebmanbl, bsebmanbl2, drkseal start directly with the 8 liner game
-- ncarrera has an undumped AT90S8515 MCU (8 bit AVR RISC core)
-
-*/
+// copyright-holders: David Haywood, Roberto Fresca, Grull Osgo
+
+/***********************************************************************
+
+ Carrera / Bomberman
+ by BS Electronics.
+
+ Video slots stealth games with selectable bomberman or fruits themes.
+ The front game is normally a "memory" pairs game, where the objetive
+ is to clear the screen.
+
+ You can change the tileset, the game title (Carrera/Bomberman), and
+ switch the type of game (amusement/gambling).
+
+ Some sets don't allow the title change.
+
+
+ PCB Layout
+ ----------
+
+ |----------------------------------------------|
+ | 22.1184MHz Z80 |
+ | ROM.IC1 |
+ |_ BATTERY ROM.IC22 |
+ | |
+ _| 6116 ROM.IC2 |
+ | |
+ | |
+ |J AY-3-8910 ROM.IC3 |
+ |A DSW1(8) |
+ |M |
+ |M DSW2(8) ROM.IC4 |
+ |A |
+ | DSW3(8) |
+ | ROM.IC5 |
+ |_ PROM.IC39 DSW4(8) |
+ | 6116 |
+ _| |
+ | HD6845 6116 |
+ |----------------------------------------------|
+
+ Notes:
+ Z80 @ 3.6864MHz [22.1184/6]
+ AY-3-8910 @ 1.8432MHz [22.1184/12]
+
+
+************************************************************************
+
+ Technical notes:
+ ----------------
+
+ The two first sets (carrera and bsebman) have a "bug" in the title if
+ the NVRAM was created from zero. This "bug" is intended to see at first
+ sight if the game NVRAM was manipulated in some way.
+
+ In fact, each boot the code paint the game title properly, and then
+ force the graphics bug if a special value hardcoded in NVRAM doesn't
+ match the expected.
+
+ $1da3.......$1dd6 ; loops to paint the title/logo on screen.
+
+ then...
+
+ $1dd7 ld, a ($e300) 3a 00 e3 ; take the hardcoded value from NVRAM.
+ $1dda ld, ($f616), a 32 16 f6 ; place this value as tile index,
+ ; halfway the title top line ($f616),
+ ; creating the intended GFX bug.
+
+ $1ddd ret c9 ; return from subroutine.
+
+
+ For other bootleg sets, if the hardcoded value doesn't match, they force
+ another tile index very close to the original, so is way less notorious
+ and only the technical trained people can see these minimal differences.
+
+ Note: This behavior is by design and should not be interpreted as a software
+ defect. It allows operators to instantly identify units with reset or modified
+ NVRAM and maintains system integrity without preventing gameplay functionality.
+
+
+************************************************************************
+
+ Updates:
+
+ [2025-05]
+
+ - Fix color bipolar PROM decode and palette calculation,
+ based on real games screenshots.
+ - Added NVRAM support for all games.
+ - Created default NVRAM for carrera and bsebman sets,
+ with harcoded critical values/registers needed to get
+ the games working.
+ - Workaround that fix the titles corruption for both
+ carrera and bsebman sets.
+ - Inputs and DIP switches.
+ - Fix alantin colors, based on the real game screenshots.
+ - Changed bsebman description to:
+ Carrera (Version 6.7) / Bomberman (Version 6.6)
+ - Added technical and game notes.
+
+
+ TODO:
+
+ - Analyze the carrera/bomberman sets and rename them accordingly.
+ - ncarrera has an undumped AT90S8515 MCU (8 bit AVR RISC core)
+
+
+***********************************************************************/
#include "emu.h"
#include "cpu/z80/z80.h"
+#include "machine/nvram.h"
#include "sound/ay8910.h"
#include "video/mc6845.h"
@@ -88,10 +149,69 @@ private:
};
+/*************************************************
+* Video Hardware *
+*************************************************/
+
+uint32_t carrera_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
+{
+ int count = 0;
+
+ for (int y = 0; y < 32; y++)
+ {
+ for (int x = 0; x < 64; x++)
+ {
+ int tile = m_tileram[count & 0x7ff] | m_tileram[(count & 0x7ff) + 0x800] << 8;
+
+ m_gfxdecode->gfx(0)->opaque(bitmap, cliprect, tile, 0, 0, 0, x * 8, y * 8);
+ count++;
+ }
+ }
+ return 0;
+}
+
+void carrera_state::palette(palette_device &palette) const
+{
+ uint8_t const *const color_prom = memregion("proms")->base();
+ for (int i = 0; i < 0x20; ++i)
+ {
+ int bit0, bit1;
+ int const br_bit0 = BIT(color_prom[i], 6);
+ int const br_bit1 = BIT(color_prom[i], 7);
+
+ bit0 = BIT(color_prom[i], 0);
+ bit1 = BIT(color_prom[i], 3);
+ int const b = 0x0e * br_bit1 + 0x1f * br_bit0 + 0x43 * bit0 + 0x8f * bit1;
+ bit0 = BIT(color_prom[i], 1);
+ bit1 = BIT(color_prom[i], 4);
+ int const g = 0x0e * br_bit1 + 0x1f * br_bit0 + 0x43 * bit0 + 0x8f * bit1;
+ bit0 = BIT(color_prom[i], 2);
+ bit1 = BIT(color_prom[i], 5);
+ int const r = 0x0e * br_bit1 + 0x1f * br_bit0 + 0x43 * bit0 + 0x8f * bit1;
+
+ palette.set_pen_color(i, rgb_t(r, g, b));
+ }
+}
+
+
+/*************************************************
+* Read Write Handlers *
+*************************************************/
+
+uint8_t carrera_state::unknown_r()
+{
+ return machine().rand();
+}
+
+
+/*************************************************
+* Memory map information *
+*************************************************/
+
void carrera_state::prg_map(address_map &map)
{
map(0x0000, 0x7fff).rom();
- map(0xe000, 0xe7ff).ram();
+ map(0xe000, 0xe7ff).ram().share("nvram");
map(0xe800, 0xe800).w("crtc", FUNC(mc6845_device::address_w));
map(0xe801, 0xe801).w("crtc", FUNC(mc6845_device::register_w));
map(0xf000, 0xffff).ram().share(m_tileram);
@@ -106,48 +226,35 @@ void carrera_state::io_map(address_map &map)
map(0x03, 0x03).portr("IN3");
map(0x04, 0x04).portr("IN4");
map(0x05, 0x05).portr("IN5");
- map(0x06, 0x06).nopw(); // ?
+ map(0x06, 0x06).nopw(); // ?
map(0x08, 0x09).w("aysnd", FUNC(ay8910_device::address_data_w));
}
+
+/*************************************************
+* Input ports *
+*************************************************/
+
static INPUT_PORTS_START( carrera )
PORT_START("IN0") // Port 0
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
- // unused / unknown inputs, not dips
- PORT_DIPNAME( 0x20, 0x20, "0" )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Master Reset")
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_NAME("Up - Bet")
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_NAME("Down - Start")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Auto Start") // autoplay
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("0-6") PORT_CODE(KEYCODE_Z)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Master Reset")
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_START("IN1") // Port 1
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
- // unused / unknown inputs, not dips
- PORT_DIPNAME( 0x04, 0x04, "1" )
- 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_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-3") PORT_CODE(KEYCODE_A)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-4") PORT_CODE(KEYCODE_S)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-5") PORT_CODE(KEYCODE_D)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-6") PORT_CODE(KEYCODE_F)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-7") PORT_CODE(KEYCODE_G)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Reset")
// I suspect the 4 below are the 4xDSWs
PORT_START("IN2") // Port 2
@@ -175,7 +282,7 @@ static INPUT_PORTS_START( carrera )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
-
+
PORT_START("IN3") // Port 3
PORT_DIPNAME( 0x01, 0x01, "3" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
@@ -203,58 +310,67 @@ static INPUT_PORTS_START( carrera )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("IN4") // Port 4
- PORT_DIPNAME( 0x01, 0x01, "4" )
- 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_DIPNAME( 0x07, 0x00, "Coinage B" ) PORT_DIPLOCATION("IN4:6,7,8")
+ PORT_DIPSETTING( 0x07, "5" )
+ PORT_DIPSETTING( 0x00, "10" )
+ PORT_DIPSETTING( 0x01, "20" )
+ PORT_DIPSETTING( 0x02, "50" )
+ PORT_DIPSETTING( 0x03, "100" )
+ PORT_DIPSETTING( 0x04, "500" )
+ PORT_DIPSETTING( 0x05, "1000" )
+ PORT_DIPSETTING( 0x06, "1100" )
+ PORT_DIPNAME( 0x08, 0x08, "Game Name" ) PORT_DIPLOCATION("IN4:5")
+ PORT_DIPSETTING( 0x08, "Bomber Man" )
+ PORT_DIPSETTING( 0x00, "Carrera" )
+ PORT_DIPNAME( 0x10, 0x10, "Bonus 10%" ) PORT_DIPLOCATION("IN4:4")
+ PORT_DIPSETTING( 0x10, DEF_STR( No ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
+ PORT_DIPNAME( 0x20, 0x20, "Key Out" ) PORT_DIPLOCATION("IN4:3")
+ PORT_DIPSETTING( 0x00, "10" )
+ PORT_DIPSETTING( 0x20, "100" )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficult ) ) PORT_DIPLOCATION("IN4:2")
+ PORT_DIPSETTING( 0x40, DEF_STR( Normal ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Easy ) )
+ PORT_DIPNAME( 0x80, 0x80, "Max Bet" ) PORT_DIPLOCATION("IN4:1")
+ PORT_DIPSETTING( 0x80, "9" )
+ PORT_DIPSETTING( 0x00, "5" )
PORT_START("IN5") // Port 5
- PORT_DIPNAME( 0x01, 0x01, "5" )
- 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, "Playing Graphics" )
+ PORT_DIPNAME( 0x07, 0x00, "Coinage A" ) PORT_DIPLOCATION("IN5:1,2,3")
+ PORT_DIPSETTING( 0x07, "5" )
+ PORT_DIPSETTING( 0x00, "10" )
+ PORT_DIPSETTING( 0x01, "20" )
+ PORT_DIPSETTING( 0x02, "50" )
+ PORT_DIPSETTING( 0x03, "100" )
+ PORT_DIPSETTING( 0x04, "500" )
+ PORT_DIPSETTING( 0x05, "1000" )
+ PORT_DIPSETTING( 0x06, "1100" )
+ PORT_DIPNAME( 0x08, 0x00, "Playing Graphics" ) PORT_DIPLOCATION("IN5:4")
PORT_DIPSETTING( 0x08, "Bricks" )
PORT_DIPSETTING( 0x00, "Fruits" )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
+
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("IN5:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("IN5:6")
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, "Debug?" ) // displays numbers over the game area
+
+ PORT_DIPNAME( 0x40, 0x40, "Game Mode" ) PORT_DIPLOCATION("IN5:7")
+ PORT_DIPSETTING( 0x40, "Gamble" )
+ PORT_DIPSETTING( 0x00, "Amusement" )
+
+ // this one displays numbers over the game area
+ PORT_DIPNAME( 0x80, 0x80, "Debug?" ) PORT_DIPLOCATION("IN5:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
+
+/*************************************************
+* Graphics Layouts *
+*************************************************/
+
static const gfx_layout tiles8x8_layout =
{
8,8,
@@ -266,55 +382,19 @@ static const gfx_layout tiles8x8_layout =
8*8
};
+
+/*************************************************
+* Graphics Decode Information *
+*************************************************/
+
static GFXDECODE_START( gfx_carrera )
GFXDECODE_ENTRY( "tiles", 0, tiles8x8_layout, 0, 1 )
GFXDECODE_END
-uint32_t carrera_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
-{
- int count = 0;
-
- for (int y = 0; y < 32; y++)
- {
- for (int x = 0; x < 64; x++)
- {
- int tile = m_tileram[count & 0x7ff] | m_tileram[(count & 0x7ff) + 0x800] << 8;
-
- m_gfxdecode->gfx(0)->opaque(bitmap, cliprect, tile, 0, 0, 0, x * 8, y * 8);
- count++;
- }
- }
- return 0;
-}
-
-uint8_t carrera_state::unknown_r()
-{
- return machine().rand();
-}
-
-void carrera_state::palette(palette_device &palette) const
-{
- uint8_t const *const color_prom = memregion("proms")->base();
- for (int i = 0; i < 0x20; ++i)
- {
- int bit0, bit1;
- int const br_bit0 = BIT(color_prom[i], 6);
- int const br_bit1 = BIT(color_prom[i], 7);
-
- bit0 = BIT(color_prom[i], 0);
- bit1 = BIT(color_prom[i], 3);
- int const b = 0x0e * br_bit0 + 0x1f * br_bit1 + 0x43 * bit0 + 0x8f * bit1;
- bit0 = BIT(color_prom[i], 1);
- bit1 = BIT(color_prom[i], 4);
- int const g = 0x0e * br_bit0 + 0x1f * br_bit1 + 0x43 * bit0 + 0x8f * bit1;
- bit0 = BIT(color_prom[i], 2);
- bit1 = BIT(color_prom[i], 5);
- int const r = 0x0e * br_bit0 + 0x1f * br_bit1 + 0x43 * bit0 + 0x8f * bit1;
-
- palette.set_pen_color(i, rgb_t(r, g, b));
- }
-}
+/*************************************************
+* Machine Drivers *
+*************************************************/
void carrera_state::carrera(machine_config &config)
{
@@ -325,10 +405,11 @@ void carrera_state::carrera(machine_config &config)
m_maincpu->set_addrmap(AS_PROGRAM, &carrera_state::prg_map);
m_maincpu->set_addrmap(AS_IO, &carrera_state::io_map);
+ NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
+
// video hardware
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_refresh_hz(60);
- screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
screen.set_size(512, 256);
screen.set_visarea_full();
screen.set_screen_update(FUNC(carrera_state::screen_update));
@@ -353,6 +434,10 @@ void carrera_state::carrera(machine_config &config)
}
+/*************************************************
+* ROM Load *
+*************************************************/
+
ROM_START( carrera )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(2385b9c8) SHA1(12d4397779e074096fbb23b114985f104366b79c) )
@@ -364,6 +449,9 @@ ROM_START( carrera )
ROM_LOAD( "27512.ic4", 0x30000, 0x10000, CRC(97433f36) SHA1(39f3c6b76ad540693682832aba6e4fc400ca3753) )
ROM_LOAD( "27512.ic5", 0x40000, 0x10000, CRC(ffa75920) SHA1(aa5619f5aabcdfa250bb24bcad101a8c512a1776) )
+ ROM_REGION( 0x800, "nvram", 0 ) // default NVRAM
+ ROM_LOAD( "carrera_nvram.bin", 0x0000, 0x0800, CRC(b2ac3ddd) SHA1(22886fba71badbdfa754489057889b5326bbaf78) )
+
ROM_REGION( 0x20, "proms", 0 )
ROM_LOAD( "82s123.ic39", 0x00, 0x20, CRC(af16359f) SHA1(1ff5c9d7807e52be09c0ded56fb68a47e41b3fcf) )
ROM_END
@@ -379,15 +467,18 @@ ROM_START( bsebman )
ROM_LOAD( "ic4", 0x30000, 0x10000, CRC(6b569989) SHA1(e00263fae310094ad5119e3a9673fb342f643ddc) )
ROM_LOAD( "ic5", 0x40000, 0x10000, CRC(21635791) SHA1(514078694269582c33fb7dddd6171089f9e21ee2) )
+ ROM_REGION( 0x800, "nvram", 0 ) // default NVRAM
+ ROM_LOAD( "carrera_nvram.bin", 0x0000, 0x0800, CRC(b2ac3ddd) SHA1(22886fba71badbdfa754489057889b5326bbaf78) )
+
ROM_REGION( 0x20, "proms", 0 )
ROM_LOAD( "am27s19.ic39", 0x00, 0x20, CRC(af16359f) SHA1(1ff5c9d7807e52be09c0ded56fb68a47e41b3fcf) )
ROM_END
ROM_START( bsebmanbl )
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(7b896b33) SHA1(841d5c7853e18109b74cad44c9f0d91398add146) ) // SLDH
+ ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(7b896b33) SHA1(841d5c7853e18109b74cad44c9f0d91398add146) ) // SLDH
- ROM_REGION( 0x50000, "tiles", 0 ) // still has BS GFX
+ ROM_REGION( 0x50000, "tiles", 0 ) // still has BS GFX
ROM_LOAD( "27512.ic1", 0x00000, 0x10000, CRC(a16e914e) SHA1(09f2271f193a7bffd62ef6e428ecbf9aa1154860) )
ROM_LOAD( "27512.ic2", 0x10000, 0x10000, CRC(147036a5) SHA1(34b4818fe61c5b13220b0a2001987b68b655b2cb) )
ROM_LOAD( "27512.ic3", 0x20000, 0x10000, CRC(920eee0e) SHA1(85e6d5292b751c57c64d17858bd00292356599e3) )
@@ -399,10 +490,10 @@ ROM_START( bsebmanbl )
ROM_END
ROM_START( bsebmanbl2 )
- ROM_REGION( 0x10000, "maincpu", 0 ) // has Carrera, Avraam and Ballas strings
+ ROM_REGION( 0x10000, "maincpu", 0 ) // has Carrera, Avraam and Ballas strings
ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(ca2c8962) SHA1(140a217bb0365ec55116ba483208bdf1d820a7af) )
- ROM_REGION( 0x50000, "tiles", 0 ) // hacked J.T. GFX instead of BS
+ ROM_REGION( 0x50000, "tiles", 0 ) // hacked J.T. GFX instead of BS
ROM_LOAD( "27512.ic1", 0x00000, 0x10000, CRC(65ad616a) SHA1(e87d6d187ec5c99628d767a9720dd9d634e39c2d) )
ROM_LOAD( "27512.ic2", 0x10000, 0x10000, CRC(64004dcb) SHA1(f9af56035f00d3d914c8e83e941762cb6153fc16) )
ROM_LOAD( "27512.ic3", 0x20000, 0x10000, CRC(c6e0a838) SHA1(e30d0f28845f331839afc44fb7358be72d2a88cb) )
@@ -415,24 +506,24 @@ ROM_END
ROM_START( alantin )
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "alpro.ic22", 0x00000, 0x10000, CRC(1eb97b31) SHA1(7097cf344734a2b553356f9b9fd6453e584a6e3f) ) // 27512
+ ROM_LOAD( "alpro.ic22", 0x00000, 0x10000, CRC(1eb97b31) SHA1(7097cf344734a2b553356f9b9fd6453e584a6e3f) ) // 27512
- ROM_REGION( 0x50000, "tiles", 0 ) // still has BS GFX
+ ROM_REGION( 0x50000, "tiles", 0 ) // still has BS GFX
ROM_LOAD( "alantin1.ic1", 0x00000, 0x10000, CRC(feb49cfd) SHA1(696683375c832b4cd6db9eef0edf4919b90c97ef) )
ROM_LOAD( "alantin2.ic2", 0x10000, 0x10000, CRC(e79da4b9) SHA1(a80c5f6431fc755645a0c8cd0cb290669f0cbada) )
ROM_LOAD( "alantin3.ic3", 0x20000, 0x10000, CRC(73d7c748) SHA1(bf688b8f506859ed3c514915676b13cecfec0a81) )
ROM_LOAD( "alantin4.ic4", 0x30000, 0x10000, CRC(6a061afd) SHA1(f6d736bd284e97ab915adb249c371617daa02a36) )
ROM_LOAD( "alantin5.ic5", 0x40000, 0x10000, CRC(35d8fb1b) SHA1(5d7ff8089e16ebb792543eeb9cc682f9f5eba6fe) )
- ROM_REGION( 0x20, "proms", 0 )
- ROM_LOAD( "82s123.ic39", 0x00, 0x20, CRC(5b0e598f) SHA1(99a8e80229d684f2083634ae2d96bf1d4f13677c) )
+ ROM_REGION( 0x20, "proms", 0 ) // swapping bytes through a driver init has no palette response.
+ ROM_LOAD16_WORD_SWAP( "82s123.ic39", 0x00, 0x20, CRC(5b0e598f) SHA1(99a8e80229d684f2083634ae2d96bf1d4f13677c) )
ROM_END
ROM_START( drkseal )
- ROM_REGION( 0x10000, "maincpu", 0 ) // still shows Alantin and Avraam strings
- ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(8a1732e5) SHA1(191de15d0ccf439991e3c0c258cbfeb79ef19002) ) // 1xxxxxxxxxxxxxxx = 0xFF
+ ROM_REGION( 0x10000, "maincpu", 0 ) // still shows Alantin and Avraam strings
+ ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(8a1732e5) SHA1(191de15d0ccf439991e3c0c258cbfeb79ef19002) ) // 1xxxxxxxxxxxxxxx = 0xFF
- ROM_REGION( 0x50000, "tiles", 0 ) // shows Vegas copyright
+ ROM_REGION( 0x50000, "tiles", 0 ) // shows Vegas copyright
ROM_LOAD( "27512.ic1", 0x00000, 0x10000, CRC(fd3b6bbc) SHA1(b1fe09772a5d9a07077038244517fc7169266893) )
ROM_LOAD( "27512.ic2", 0x10000, 0x10000, CRC(d3a048e3) SHA1(687d58b84ca5985f51755b09c8a8b2ef68d16399) )
ROM_LOAD( "27512.ic3", 0x20000, 0x10000, CRC(50b8f9ee) SHA1(4f31e36eb54fde40e409f0ac18bf87126174be33) )
@@ -443,16 +534,17 @@ ROM_START( drkseal )
ROM_LOAD( "82s123.ic39", 0x00, 0x20, CRC(03aadf73) SHA1(e5baf8c5e7276eb207357e4cbb694c75e8caab6a) )
ROM_END
-// this set uses a newer 'TYPE C-2000' board with a 'Rania Original 2000 Type 8515' riser board (the Z80 and MC6845 have been moved here along with a AT90S8515 MCU)
+// this set uses a newer 'TYPE C-2000' board with a 'Rania Original 2000 Type 8515' riser board
+// (the Z80 and MC6845 have been moved here along with a AT90S8515 MCU)
ROM_START( ncarrera )
- ROM_REGION( 0x10000, "maincpu", 0 ) // has 2001, Mpampis and Avraam strings
- ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(3ec2dbca) SHA1(896fbccaf844c1fa5861b176c09e4a3707b3524f) ) // 1xxxxxxxxxxxxxxx = 0xFF
+ ROM_REGION( 0x10000, "maincpu", 0 ) // has 2001, Mpampis and Avraam strings
+ ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(3ec2dbca) SHA1(896fbccaf844c1fa5861b176c09e4a3707b3524f) ) // 1xxxxxxxxxxxxxxx = 0xFF
ROM_REGION( 0x2200, "mcu", 0 )
ROM_LOAD( "internal_eeprom", 0x0000, 0x0200, NO_DUMP )
ROM_LOAD( "internal_flash", 0x0200, 0x2000, NO_DUMP )
- ROM_REGION( 0x50000, "tiles", 0 ) // has both New Carrera and New Bomberman GFX
+ ROM_REGION( 0x50000, "tiles", 0 ) // has both New Carrera and New Bomberman GFX
ROM_LOAD( "27512.ic1", 0x00000, 0x10000, CRC(dbec54c7) SHA1(ca7e54c198ca8abeffba1b323a514678384c35f9) )
ROM_LOAD( "27512.ic2", 0x10000, 0x10000, CRC(8e8c2b6d) SHA1(001121e0b91d8e0efdc3f5f99c43e1751b4be758) )
ROM_LOAD( "27512.ic3", 0x20000, 0x10000, CRC(ac66cda8) SHA1(65fae21de9f9727c5d8198ff57b27d703a7518fc) )
@@ -466,10 +558,15 @@ ROM_END
} // anonymous namespace
-GAME( 19??, carrera, 0, carrera, carrera, carrera_state, empty_init, ROT0, "BS Electronics", "Carrera (Version 6.7)", MACHINE_SUPPORTS_SAVE )
-GAME( 19??, bsebman, carrera, carrera, carrera, carrera_state, empty_init, ROT0, "BS Electronics", "Bomberman (Version 6.6)", MACHINE_SUPPORTS_SAVE )
-GAME( 1999, bsebmanbl, carrera, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (Ballas / Avraam)", "Bomberman (Version 6.6, Avraam bootleg)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs verifying of inputs
-GAME( 1999, bsebmanbl2, carrera, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (J.T.)", "Bomberman (Version 6.6, J.T. bootleg)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs verifying of inputs
-GAME( 1999, alantin, 0, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (Robert / Avraam)", "Alantin - Aladdin's Magic Lamp", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs verifying of inputs
-GAME( 1999, drkseal, 0, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (Vegas)", "Dark Seal (8-liner)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs verifying of inputs
-GAME( 2001, ncarrera, 0, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (J.T.)", "New Carrera - Version 2000", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs MCU dump
+/*********************************************
+* Game Drivers *
+*********************************************/
+
+// YEAR NAME PARENT MACHINE INPUT CLASS INIT ROT COMPANY FULLNAME FLAGS
+GAME( 19??, carrera, 0, carrera, carrera, carrera_state, empty_init, ROT0, "BS Electronics", "Carrera (Version 6.7)", MACHINE_SUPPORTS_SAVE )
+GAME( 19??, bsebman, carrera, carrera, carrera, carrera_state, empty_init, ROT0, "BS Electronics", "Carrera (Version 6.7) / Bomberman (Version 6.6)", MACHINE_SUPPORTS_SAVE )
+GAME( 1999, bsebmanbl, carrera, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (Ballas / Avraam)", "Bomberman (Version 6.6, Avraam bootleg)", MACHINE_SUPPORTS_SAVE )
+GAME( 1999, bsebmanbl2, carrera, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (J.T.)", "Bomberman (Version 6.6, J.T. bootleg)", MACHINE_SUPPORTS_SAVE )
+GAME( 1999, alantin, 0, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (Robert / Avraam)", "Alantin - Aladdin's Magic Lamp", MACHINE_SUPPORTS_SAVE )
+GAME( 1999, drkseal, 0, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (Vegas)", "Dark Seal (8-liner)", MACHINE_SUPPORTS_SAVE )
+GAME( 2001, ncarrera, 0, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (J.T.)", "New Carrera - Version 2000", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs MCU dump
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 )