summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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/emu/sound.cpp47
-rw-r--r--src/frontend/mame/ui/audioeffects.cpp32
-rw-r--r--src/mame/bmc/koftball.cpp130
-rw-r--r--src/mame/capcom/cps2.cpp22
-rw-r--r--src/osd/modules/sound/pulse_sound.cpp14
8 files changed, 166 insertions, 105 deletions
diff --git a/src/devices/sound/disc_cls.h b/src/devices/sound/disc_cls.h
index 2ea8498d2f1..72a5c39920a 100644
--- a/src/devices/sound/disc_cls.h
+++ b/src/devices/sound/disc_cls.h
@@ -120,14 +120,14 @@ public:
/* Add gain to the output and put into the buffers */
/* Clipping will be handled by the main sound system */
double val = DISCRETE_INPUT(0) * DISCRETE_INPUT(1);
- m_stream->put(m_stream_output, m_outview_sample++, val * (1.0 / 32768.0));
+ m_stream->put(m_stream_output, m_stream_sample++, val * (1.0 / 32768.0));
}
virtual int max_output() override { return 0; }
- virtual void set_output_ptr(sound_stream &stream, int output) override { m_stream = &stream; m_stream_output = output; m_outview_sample = 0; }
+ virtual void set_output_ptr(sound_stream &stream, int output) override { m_stream = &stream; m_stream_output = output; m_stream_sample = 0; }
private:
sound_stream *m_stream = nullptr;
int m_stream_output = 0;
- u32 m_outview_sample = 0U;
+ u32 m_stream_sample = 0U;
};
DISCRETE_CLASS(dso_csvlog, 0,
@@ -228,13 +228,15 @@ public:
virtual void start() override;
virtual void input_write(int sub_node, uint8_t data ) override;
virtual bool is_buffered() { return false; }
+ void set_input_ptr(sound_stream &stream, int input) { m_stream = &stream; m_stream_input = input; m_stream_sample = 0; }
/* This is called by discrete_sound_device */
void stream_start();
-//protected:
- uint32_t m_stream_in_number = 0;
- uint32_t m_inview_sample = 0;
+protected:
+ sound_stream *m_stream = nullptr;
+ uint32_t m_stream_input = 0;
+ uint32_t m_stream_sample = 0;
private:
double m_gain = 0.0; /* node gain */
double m_offset = 0.0; /* node offset */
diff --git a/src/devices/sound/disc_inp.hxx b/src/devices/sound/disc_inp.hxx
index 432f8c076bf..ef000e6b331 100644
--- a/src/devices/sound/disc_inp.hxx
+++ b/src/devices/sound/disc_inp.hxx
@@ -246,12 +246,9 @@ DISCRETE_STEP(dss_input_stream)
{
/* the context pointer is set to point to the current input stream data in discrete_stream_update */
if (m_is_buffered)
- {
set_output(0, m_data * m_gain + m_offset);
- m_inview_sample++;
- }
else
- set_output(0, 0);
+ set_output(0, m_stream->get(m_stream_input, m_stream_sample ++) * 32768.0 * m_gain + m_offset);
}
DISCRETE_RESET(dss_input_stream)
@@ -282,8 +279,6 @@ DISCRETE_START(dss_input_stream)
{
discrete_base_node::start();
- /* Stream out number is set during start */
- m_stream_in_number = DSS_INPUT_STREAM__STREAM;
m_gain = DSS_INPUT_STREAM__GAIN;
m_offset = DSS_INPUT_STREAM__OFFSET;
diff --git a/src/devices/sound/discrete.cpp b/src/devices/sound/discrete.cpp
index 5e5c1a05ecf..3e97bff89da 100644
--- a/src/devices/sound/discrete.cpp
+++ b/src/devices/sound/discrete.cpp
@@ -1056,10 +1056,13 @@ void discrete_sound_device::sound_stream_update(sound_stream &stream)
outputnum++;
}
+ int inputnum = 0;
+
/* Setup any input streams */
for (discrete_dss_input_stream_node *node : m_input_stream_list)
{
- node->m_inview_sample = 0;
+ node->set_input_ptr(stream, inputnum);
+ inputnum++;
}
/* just process it */
diff --git a/src/emu/sound.cpp b/src/emu/sound.cpp
index e64941f558c..696742a87e2 100644
--- a/src/emu/sound.cpp
+++ b/src/emu/sound.cpp
@@ -844,13 +844,8 @@ void sound_manager::after_devices_init()
m_record_buffer.resize(m_outputs_count * machine().sample_rate(), 0);
m_record_samples = 0;
- // Have all streams create their initial resamplers
- for(auto &stream : m_stream_list)
- stream->create_resamplers();
-
- // Then get the initial history sizes
- for(auto &stream : m_stream_list)
- stream->lookup_history_sizes();
+ // Create resamplers and setup history
+ rebuild_all_resamplers();
m_effects_done = false;
@@ -917,6 +912,7 @@ void sound_manager::output_push(int id, sound_stream &stream)
*outb1 = std::clamp(int(*inb++ * 32768), -32768, 32767);
outb1 += m_outputs_count;
}
+ outb++;
}
}
@@ -1134,10 +1130,12 @@ void sound_manager::config_load(config_type cfg_type, config_level cfg_level, ut
// and the resampler configuration
util::xml::data_node const *rs_node = parentnode->get_child("resampler");
if(rs_node) {
- m_resampler_type = rs_node->get_attribute_int("type", RESAMPLER_LOFI);
m_resampler_hq_latency = rs_node->get_attribute_float("hq_latency", 0.0050);
m_resampler_hq_length = rs_node->get_attribute_int("hq_length", 400);
- m_resampler_hq_phases = rs_node->get_attribute_int("hq_phases", 200);
+ m_resampler_hq_phases = rs_node->get_attribute_int("hq_phases", 200);
+
+ // this also applies the hq settings if resampler is hq
+ set_resampler_type(rs_node->get_attribute_int("type", RESAMPLER_LOFI));
}
break;
}
@@ -2413,7 +2411,7 @@ void sound_manager::mapping_update()
u64 sound_manager::rate_and_time_to_index(attotime time, u32 sample_rate) const
{
- return time.m_seconds * sample_rate + ((time.m_attoseconds / 100'000'000) * sample_rate) / 10'000'000'000LL;
+ return time.m_seconds * sample_rate + ((time.m_attoseconds / 100'000'000) * sample_rate) / 10'000'000'000LL; //'
}
void sound_manager::update(s32)
@@ -2479,7 +2477,7 @@ void sound_manager::streams_update()
machine().osd().add_audio_to_recording(m_record_buffer.data(), m_record_samples);
machine().video().add_sound_to_recording(m_record_buffer.data(), m_record_samples);
if(m_wavfile)
- util::wav_add_data_16(*m_wavfile, m_record_buffer.data(), m_record_samples);
+ util::wav_add_data_16(*m_wavfile, m_record_buffer.data(), m_record_samples * m_outputs_count);
m_effects_condition.notify_all();
}
@@ -2491,6 +2489,7 @@ const audio_resampler *sound_manager::get_resampler(u32 fs, u32 ft)
auto i = m_resamplers.find(key);
if(i != m_resamplers.end())
return i->second.get();
+
audio_resampler *res;
if(m_resampler_type == RESAMPLER_HQ)
res = new audio_resampler_hq(fs, ft, m_resampler_hq_latency, m_resampler_hq_length, m_resampler_hq_phases);
@@ -2508,31 +2507,39 @@ void sound_manager::rebuild_all_resamplers()
stream->create_resamplers();
for(auto &stream : m_stream_list)
- stream->lookup_history_sizes();
+ stream->lookup_history_sizes();
}
void sound_manager::set_resampler_type(u32 type)
{
- m_resampler_type = type;
- rebuild_all_resamplers();
+ if(type != m_resampler_type) {
+ m_resampler_type = type;
+ rebuild_all_resamplers();
+ }
}
void sound_manager::set_resampler_hq_latency(double latency)
{
- m_resampler_hq_latency = latency;
- rebuild_all_resamplers();
+ if(latency != m_resampler_hq_latency) {
+ m_resampler_hq_latency = latency;
+ rebuild_all_resamplers();
+ }
}
void sound_manager::set_resampler_hq_length(u32 length)
{
- m_resampler_hq_length = length;
- rebuild_all_resamplers();
+ if(length != m_resampler_hq_length) {
+ m_resampler_hq_length = length;
+ rebuild_all_resamplers();
+ }
}
void sound_manager::set_resampler_hq_phases(u32 phases)
{
- m_resampler_hq_phases = phases;
- rebuild_all_resamplers();
+ if(phases != m_resampler_hq_phases) {
+ m_resampler_hq_phases = phases;
+ rebuild_all_resamplers();
+ }
}
const char *sound_manager::resampler_type_names(u32 type) const
diff --git a/src/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/koftball.cpp b/src/mame/bmc/koftball.cpp
index c986aa05b91..a028cee9a84 100644
--- a/src/mame/bmc/koftball.cpp
+++ b/src/mame/bmc/koftball.cpp
@@ -7,12 +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 tiles are not visible.
+- kaimenhu will not let you play a hand.
+- Better understanding of the koftball protection.
--
@@ -59,6 +64,30 @@ key-in unit 200 上分單位
key-in limit 5000 上分上限
credit limit 50000 得分上限
+
+jxzh and kaimenhu use 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
+* use Big (left) and Small (right) to select a tile to exchange during "first chance"
+* use Flip Flop to exchange a 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
+* kan, pon, chi, reach and ron function as expected
+
+
+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 離開 按《測試》
+
*/
#include "emu.h"
@@ -131,7 +160,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 +180,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 +225,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 +277,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 +298,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 +372,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 +399,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 +534,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")
@@ -580,6 +605,15 @@ 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" ) // deal ten tiles
+ PORT_DIPNAME( 0x0080, 0x0080, "Double Up Game" ) PORT_DIPLOCATION("SW1:1")
+ PORT_DIPSETTING( 0x0080, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x0000, DEF_STR(On) ) // also seems to enable stripping sequences
+ 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
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/osd/modules/sound/pulse_sound.cpp b/src/osd/modules/sound/pulse_sound.cpp
index 4b7c87b6b9b..820ca149c39 100644
--- a/src/osd/modules/sound/pulse_sound.cpp
+++ b/src/osd/modules/sound/pulse_sound.cpp
@@ -152,7 +152,6 @@ void sound_pulse::generic_pa_error(const char *msg, int err)
void sound_pulse::context_notify()
{
- fprintf(stderr, "context notify\n");
pa_context_state state = pa_context_get_state(m_context);
if(state == PA_CONTEXT_READY) {
pa_context_subscribe(m_context, PA_SUBSCRIPTION_MASK_ALL, nullptr, this);
@@ -173,7 +172,6 @@ void sound_pulse::stream_notify(stream_info *stream)
{
pa_stream_state state = pa_stream_get_state(stream->m_stream);
- fprintf(stderr, "stream notify\n");
if(state == PA_STREAM_READY || state == PA_STREAM_FAILED || state == PA_STREAM_TERMINATED) {
m_wait_stream = false;
pa_threaded_mainloop_signal(m_mainloop, 0);
@@ -216,7 +214,6 @@ void sound_pulse::server_info(const pa_server_info *i)
{
m_default_audio_sink = i->default_sink_name;
m_default_audio_source = i->default_source_name;
- fprintf(stderr, "defaults %s %s\n", i->default_sink_name, i->default_source_name);
m_generation++;
if(m_wait_init) {
m_wait_init = false;
@@ -243,7 +240,6 @@ void sound_pulse::source_info(const pa_source_info *i, int eol)
return;
}
- fprintf(stderr, "new source %d (%s)\n", i->index, i->description);
m_node_osdid_to_id[m_node_current_id] = i->index;
auto &node = m_nodes.emplace(i->index, node_info(this, i->index, m_node_current_id++, AREC, i->name, i->description)).first->second;
@@ -274,8 +270,6 @@ void sound_pulse::sink_info_new(const pa_sink_info *i, int eol)
return;
}
- fprintf(stderr, "new sink %d (%s)\n", i->index, i->description);
- fprintf(stderr, "rate %d\n", i->sample_spec.rate);
m_node_osdid_to_id[m_node_current_id] = i->index;
auto &node = m_nodes.emplace(i->index, node_info(this, i->index, m_node_current_id++, APLAY, i->name, i->description)).first->second;
@@ -312,13 +306,11 @@ void sound_pulse::sink_input_info_change(stream_info *stream, const pa_sink_inpu
for(uint32_t port = 0; port != stream->m_channels; port++)
stream->m_volumes[port] = pa_sw_volume_to_dB(i->volume.values[port]);
- fprintf(stderr, "change stream %d/%d sink=%s [%f %f]\n", stream->m_osdid, stream->m_pulse_id, stream->m_target_node->m_desc.c_str(), stream->m_volumes[0], stream->m_volumes[1]);
m_generation++;
}
void sound_pulse::i_sink_input_info_change(pa_context *, const pa_sink_input_info *i, int eol, void *self)
{
- fprintf(stderr, "i_sink_input_info_change %p %d\n", i, eol);
stream_info *stream = static_cast<stream_info *>(self);
stream->m_pulse->sink_input_info_change(stream, i, eol);
}
@@ -326,15 +318,12 @@ void sound_pulse::i_sink_input_info_change(pa_context *, const pa_sink_input_inf
void sound_pulse::context_subscribe(pa_subscription_event_type_t t, uint32_t idx)
{
// This is called with the thread locked
- static const char *const evt[] = { "sink", "source", "sink-input", "source-output", "module", "client", "cache", "server", "autoload", "card" };
- static const char *const evt2[] = { "new", "change", "remove" };
switch(int(t)) {
case PA_SUBSCRIPTION_EVENT_REMOVE | PA_SUBSCRIPTION_EVENT_SINK:
case PA_SUBSCRIPTION_EVENT_REMOVE | PA_SUBSCRIPTION_EVENT_SOURCE: {
auto si = m_nodes.find(idx);
if(si == m_nodes.end())
break;
- fprintf(stderr, "removing %s\n", si->second.m_desc.c_str());
for(auto &istream : m_streams)
if(istream.second.m_target_node == &si->second)
istream.second.m_target_node = nullptr;
@@ -367,7 +356,7 @@ void sound_pulse::context_subscribe(pa_subscription_event_type_t t, uint32_t idx
}
default:
- fprintf(stderr, "event %s %s %d\n", evt2[t>>4], evt[t&15], idx);
+ break;
}
}
@@ -489,7 +478,6 @@ uint32_t sound_pulse::stream_sink_open(uint32_t node, std::string name, uint32_t
stream.m_pulse_id = pa_stream_get_index(stream.m_stream);
m_stream_pulse_id_to_osdid[stream.m_pulse_id] = id;
- fprintf(stderr, "stream id %d\n", stream.m_pulse_id);
pa_threaded_mainloop_unlock(m_mainloop);
return id;