summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2026-05-01 04:09:54 +1000
committer Vas Crabb <vas@vastheman.com>2026-05-01 04:09:54 +1000
commit91faf17b0d95d0cfab2f7d6aabf451900afee69b (patch)
tree31919691cea8ec141b001d92b06288080d019441
parent1e5263494af307699e72b463ce8ee180684c1c5c (diff)
-dynax/ddenlovr.cpp: Added proper inputs for Royal Selection.
-frontend/mame/luaengine.cpp: Removed some deprecated stuff. -itech/itech32.cpp: BloodStorm doesn't have a space in most uses. -shared/mahjong.cpp: Exposed base mahjong matrix panel class to simplify creating devices that are essentially mahjong panels with weird labels. -ui.ui.cpp, ui/menu.cpp: Started untangling some stuff.
-rw-r--r--src/frontend/mame/luaengine.cpp10
-rw-r--r--src/frontend/mame/ui/menu.cpp12
-rw-r--r--src/frontend/mame/ui/menu.h7
-rw-r--r--src/frontend/mame/ui/ui.cpp17
-rw-r--r--src/frontend/mame/ui/ui.h4
-rw-r--r--src/mame/dynax/ddenlovr.cpp217
-rw-r--r--src/mame/itech/itech32.cpp14
-rw-r--r--src/mame/shared/mahjong.cpp64
-rw-r--r--src/mame/shared/mahjong.h15
9 files changed, 285 insertions, 75 deletions
diff --git a/src/frontend/mame/luaengine.cpp b/src/frontend/mame/luaengine.cpp
index 3e3e848ecc2..dd54a3f56b7 100644
--- a/src/frontend/mame/luaengine.cpp
+++ b/src/frontend/mame/luaengine.cpp
@@ -811,11 +811,6 @@ void lua_engine::initialize()
* emu.keypost(keys) - post keys to natural keyboard
*
* emu.register_prestart(callback) - register callback before reset
- * emu.register_start(callback) - register callback after reset
- * emu.register_stop(callback) - register callback after stopping
- * emu.register_pause(callback) - register callback at pause
- * emu.register_resume(callback) - register callback at resume
- * emu.register_frame(callback) - register callback at end of frame
* emu.register_frame_done(callback) - register callback after frame is drawn to screen (for overlays)
* emu.register_sound_update(callback) - register callback after sound update has generated new samples
* emu.register_periodic(callback) - register periodic callback while program is running
@@ -933,11 +928,6 @@ void lua_engine::initialize()
machine().resume();
};
emu["register_prestart"] = [this] (sol::function func) { register_function(func, "LUA_ON_PRESTART"); };
- emu["register_start"] = [this] (sol::function func) { osd_printf_warning("[LUA] emu.register_start is deprecated - please use emu.add_machine_reset_notifier\n"); register_function(func, "LUA_ON_START"); };
- emu["register_stop"] = [this] (sol::function func) { osd_printf_warning("[LUA] emu.register_stop is deprecated - please use emu.add_machine_stop_notifier\n"); register_function(func, "LUA_ON_STOP"); };
- emu["register_pause"] = [this] (sol::function func) { osd_printf_warning("[LUA] emu.register_pause is deprecated - please use emu.add_machine_pause_notifier\n"); register_function(func, "LUA_ON_PAUSE"); };
- emu["register_resume"] = [this] (sol::function func) { osd_printf_warning("[LUA] emu.register_resume is deprecated - please use emu.add_machine_resume_notifier\n"); register_function(func, "LUA_ON_RESUME"); };
- emu["register_frame"] = [this] (sol::function func) { osd_printf_warning("[LUA] emu.register_frame is deprecated - please use emu.add_machine_frame_notifier\n"); register_function(func, "LUA_ON_FRAME"); };
emu["register_frame_done"] = [this] (sol::function func) { register_function(func, "LUA_ON_FRAME_DONE"); };
emu["register_sound_update"] = [this] (sol::function func) { register_function(func, "LUA_ON_SOUND_UPDATE"); };
emu["register_periodic"] = [this] (sol::function func) { register_function(func, "LUA_ON_PERIODIC"); };
diff --git a/src/frontend/mame/ui/menu.cpp b/src/frontend/mame/ui/menu.cpp
index 241b0ab52d1..3037e9a4872 100644
--- a/src/frontend/mame/ui/menu.cpp
+++ b/src/frontend/mame/ui/menu.cpp
@@ -12,8 +12,6 @@
#include "ui/menu.h"
#include "ui/ui.h"
-#include "ui/mainmenu.h"
-#include "ui/miscmenu.h"
#include "cheat.h"
#include "mame.h"
@@ -217,12 +215,8 @@ bool menu::global_state::stack_has_special_main_menu() const
}
-uint32_t menu::global_state::ui_handler(render_container &container)
+uint32_t menu::global_state::ui_handler()
{
- // if we have no menus stacked up, start with the main menu
- if (!m_stack)
- stack_push(std::make_unique<menu_main>(m_ui, container));
-
while (true)
{
// ensure topmost menu is active - need a loop because it could push another menu
@@ -2097,10 +2091,10 @@ bool menu::do_handle()
// and calls the menu handler
//-------------------------------------------------
-delegate<uint32_t (render_container &)> menu::get_ui_handler(mame_ui_manager &mui)
+delegate<uint32_t ()> menu::get_ui_handler(mame_ui_manager &mui)
{
global_state &state(get_global_state(mui));
- return delegate<uint32_t (render_container &)>(&global_state::ui_handler, &state);
+ return delegate<uint32_t ()>(&global_state::ui_handler, &state);
}
/***************************************************************************
diff --git a/src/frontend/mame/ui/menu.h b/src/frontend/mame/ui/menu.h
index 56340280237..4a975098354 100644
--- a/src/frontend/mame/ui/menu.h
+++ b/src/frontend/mame/ui/menu.h
@@ -106,11 +106,14 @@ public:
// pop a menu from the stack
static void stack_pop(mame_ui_manager &ui) { get_global_state(ui).stack_pop(); }
+ // test whether there are any menus in the stack
+ static bool stack_empty(mame_ui_manager &ui) { return !get_global_state(ui).topmost_menu<menu>(); }
+
// test if one of the menus in the stack requires hide disable
static bool stack_has_special_main_menu(mame_ui_manager &ui) { return get_global_state(ui).stack_has_special_main_menu(); }
// master handler
- static delegate<uint32_t (render_container &)> get_ui_handler(mame_ui_manager &mui);
+ static delegate<uint32_t ()> get_ui_handler(mame_ui_manager &mui);
// Used by sliders
void validate_selection(int scandir);
@@ -440,7 +443,7 @@ private:
void hide_menu() { m_hide = true; }
- uint32_t ui_handler(render_container &container);
+ uint32_t ui_handler();
bool have_pointer() const noexcept
{
diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp
index 892e4501315..bfcc5e465e9 100644
--- a/src/frontend/mame/ui/ui.cpp
+++ b/src/frontend/mame/ui/ui.cpp
@@ -302,7 +302,7 @@ void mame_ui_manager::init()
set_handler(
ui_callback_type::NOINPUT,
handler_callback_func(
- [this] (render_container &container) -> uint32_t
+ [this, &container = machine().render().ui_container()] () -> uint32_t
{
draw_text_box(container, messagebox_text, ui::text_layout::text_justify::LEFT, 0.5f, 0.5f, colors().background_color());
return 0;
@@ -652,7 +652,7 @@ void mame_ui_manager::display_startup_screens(bool first_time)
rgb_t warning_color;
bool config_menu = false;
auto handler_messagebox_anykey =
- [this, &poller, &warning_text, &warning_color, &config_menu] (render_container &container) -> uint32_t
+ [this, &poller, &warning_text, &warning_color, &config_menu, &container = machine().render().ui_container()] () -> uint32_t
{
// draw a standard message window
draw_text_box(container, warning_text, ui::text_layout::text_justify::LEFT, 0.5f, 0.5f, warning_color);
@@ -862,6 +862,7 @@ void mame_ui_manager::display_startup_screens(bool first_time)
}
else if (config_menu)
{
+ ui::menu::stack_push<ui::menu_main>(*this, machine().render().ui_container());
show_menu();
// loop while we have a handler
@@ -929,7 +930,7 @@ bool mame_ui_manager::update_and_render(render_container &container)
// call the current UI handler
machine().ui_input().check_ui_inputs();
- uint32_t const handler_result = m_handler_callback(container);
+ uint32_t const handler_result = m_handler_callback();
// display any popup messages
if (osd_ticks() < m_popup_text_end)
@@ -1538,7 +1539,7 @@ void mame_ui_manager::image_handler_ingame()
// of the standard keypresses
//-------------------------------------------------
-uint32_t mame_ui_manager::handler_ingame(render_container &container)
+uint32_t mame_ui_manager::handler_ingame()
{
// let the OSD do its thing first
machine().osd().check_osd_inputs();
@@ -1547,7 +1548,7 @@ uint32_t mame_ui_manager::handler_ingame(render_container &container)
// draw the profiler if visible
if (show_profiler())
- draw_profiler(container);
+ draw_profiler(machine().render().ui_container());
// if we're single-stepping, pause now
if (single_step())
@@ -1625,6 +1626,8 @@ uint32_t mame_ui_manager::handler_ingame(render_container &container)
// turn on menus if requested
if (machine().ui_input().pressed(IPT_UI_MENU))
{
+ if (ui::menu::stack_empty(*this))
+ ui::menu::stack_push<ui::menu_main>(*this, machine().render().ui_container());
show_menu();
return 0;
}
@@ -1658,7 +1661,7 @@ uint32_t mame_ui_manager::handler_ingame(render_container &container)
set_handler(
ui_callback_type::MENU,
handler_callback_func(
- [this, is_paused] (render_container &container) -> uint32_t
+ [this, is_paused, &container = machine().render().ui_container()] () -> uint32_t
{
return ui_gfx_ui_handler(container, *this, is_paused);
}));
@@ -2704,7 +2707,7 @@ bool mame_ui_manager::set_ui_event_handler(std::function<bool ()> &&handler)
set_handler(
ui_callback_type::CUSTOM,
handler_callback_func(
- [cb = std::move(handler)] (render_container &container) -> uint32_t
+ [cb = std::move(handler)] () -> uint32_t
{
return !cb() ? HANDLER_CANCEL : 0;
}));
diff --git a/src/frontend/mame/ui/ui.h b/src/frontend/mame/ui/ui.h
index cb856f9139c..fd877437558 100644
--- a/src/frontend/mame/ui/ui.h
+++ b/src/frontend/mame/ui/ui.h
@@ -284,7 +284,7 @@ private:
struct active_pointer;
class pointer_options;
- using handler_callback_func = delegate<uint32_t (render_container &)>;
+ using handler_callback_func = delegate<uint32_t ()>;
using device_feature_set = std::set<std::pair<std::string, std::string> >;
using session_data_map = std::unordered_map<std::type_index, std::any>;
using active_pointer_vector = std::vector<active_pointer>;
@@ -332,7 +332,7 @@ private:
static std::vector<ui::menu_item> slider_list;
// UI handlers
- uint32_t handler_ingame(render_container &container);
+ uint32_t handler_ingame();
// private methods
void set_handler(ui_callback_type callback_type, handler_callback_func &&callback);
diff --git a/src/mame/dynax/ddenlovr.cpp b/src/mame/dynax/ddenlovr.cpp
index e91bcbf5dca..b8c94a3bbc7 100644
--- a/src/mame/dynax/ddenlovr.cpp
+++ b/src/mame/dynax/ddenlovr.cpp
@@ -127,7 +127,7 @@ TODO:
- daichukaa: setting of time to next inspection doesn't stick, even without resetting, so the game is always
stuck with the 'inspection needed' message
-- rselect: needs correct inputs and DIP definitions
+- rselect: seems to sometimes get stuck in a state where the roulette won't stop, needs control panel lamps and proper hopper
Notes:
@@ -174,6 +174,7 @@ Notes:
DECLARE_DEVICE_TYPE(HGOKOU_JOYSTICK, device_mahjong_panel_interface)
+DECLARE_DEVICE_TYPE(RSELECT_PANEL, device_mahjong_panel_interface)
namespace {
@@ -187,6 +188,47 @@ INPUT_PORTS_START(hgokou_joystick)
INPUT_PORTS_END
+INPUT_PORTS_START(rselect_panel)
+ PORT_START("KEY0")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_A) PORT_PLAYER(1) PORT_NAME("%p Seven")
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_E) PORT_PLAYER(1) PORT_NAME("%p Apple")
+ PORT_BIT(0x0c, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP) PORT_PLAYER(1)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
+
+ PORT_START("KEY1")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_B) PORT_PLAYER(1) PORT_NAME("%p Bell")
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_F) PORT_PLAYER(1) PORT_NAME("%p Plum")
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_START) PORT_PLAYER(1)
+ PORT_BIT(0x38, IP_ACTIVE_LOW, IPT_UNUSED)
+
+ PORT_START("KEY2")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_C) PORT_PLAYER(1) PORT_NAME("%p Watermelon")
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_G) PORT_PLAYER(1) PORT_NAME("%p Orange")
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL) PORT_PLAYER(1)
+ PORT_BIT(0x30, IP_ACTIVE_LOW, IPT_UNUSED)
+
+ PORT_START("KEY3")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_D) PORT_PLAYER(1) PORT_NAME("%p Pineapple")
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_H) PORT_PLAYER(1) PORT_NAME("%p Cherry")
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_MAHJONG_BIG) PORT_PLAYER(1)
+ PORT_BIT(0x30, IP_ACTIVE_LOW, IPT_UNUSED)
+
+ PORT_START("KEY4")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE) PORT_PLAYER(1)
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(1)
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_PLAYER(1)
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP) PORT_PLAYER(1)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON3) PORT_PLAYER(1)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_BUTTON4) PORT_PLAYER(1)
+
+ PORT_START("KEY5")
+ PORT_BIT(0x3f, IP_ACTIVE_LOW, IPT_UNUSED)
+INPUT_PORTS_END
+
+
class hgokou_joystick_device : public device_t, public device_mahjong_panel_interface
{
public:
@@ -216,6 +258,26 @@ private:
};
+class rselect_panel_device : public mahjong_panel_device_base
+{
+public:
+ rselect_panel_device(
+ machine_config const &mconfig,
+ char const *tag,
+ device_t *owner,
+ u32 clock) :
+ mahjong_panel_device_base(mconfig, RSELECT_PANEL, tag, owner, clock)
+ {
+ }
+
+protected:
+ ioport_constructor device_input_ports() const override ATTR_COLD
+ {
+ return INPUT_PORTS_NAME(rselect_panel);
+ }
+};
+
+
/***************************************************************************
@@ -270,6 +332,12 @@ void hgokou_panels(device_slot_interface &device)
device.option_add("joy", HGOKOU_JOYSTICK);
}
+void rselect_panels(device_slot_interface &device)
+{
+ device.option_add("mj", MAHJONG_MEDAL_PANEL);
+ device.option_add("rs", RSELECT_PANEL);
+}
+
class ddenlovr_state : public driver_device
{
@@ -7605,7 +7673,7 @@ static INPUT_PORTS_START( hgokou )
PORT_DIPSETTING( 0x04, "4" ) //    4
PORT_DIPSETTING( 0x05, "3" ) //    3
PORT_DIPSETTING( 0x06, "2" ) //    2
- PORT_DIPSETTING( 0x07, "1 (high)" ) // 低い 1
+ PORT_DIPSETTING( 0x07, "1 (high)" ) // 高い 1
PORT_DIPNAME( 0x08, 0x00, "Payout Variation" ) PORT_DIPLOCATION("SW1:4") // 配当の波
PORT_DIPSETTING( 0x00, "Small" ) // 小さい
PORT_DIPSETTING( 0x08, "Large" ) // 大きい
@@ -8197,6 +8265,145 @@ static INPUT_PORTS_START( hparadis )
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
+static INPUT_PORTS_START( rselect )
+ // The manual provides two sets of standard settings:
+ // 標準設定コインプールタイプ 標準設定メダルタイプ
+ // SW 1 OFF ON OFF OFF ON ON OFF ON OFF OFF OFF OFF OFF OFF ON OFF OFF OFF OFF OFF
+ // SW 2 ON ON ON ON ON ON ON ON OFF OFF ON ON ON ON ON ON ON ON OFF OFF
+ // SW 3 OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF
+ // SW 4 OFF ON ON ON OFF OFF OFF OFF OFF OFF ON ON ON ON OFF OFF OFF OFF OFF OFF
+
+ PORT_START("SYSTEM")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR(Test))
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // analyzer
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // data clear
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START("DSW1")
+ PORT_DIPNAME( 0x07, 0x05, "Payout Rate" ) PORT_DIPLOCATION("DIP-SW1:1,2,3") // PAY OUT RATE 配当率
+ PORT_DIPSETTING( 0x00, "8 (low)" ) // 低 (8)
+ PORT_DIPSETTING( 0x01, "7" ) //   (7)
+ PORT_DIPSETTING( 0x02, "6" ) //   (6)
+ PORT_DIPSETTING( 0x03, "5" ) //   (5)
+ PORT_DIPSETTING( 0x04, "4" ) //   (4)
+ PORT_DIPSETTING( 0x05, "3" ) //   (3)
+ PORT_DIPSETTING( 0x06, "2" ) //   (2)
+ PORT_DIPSETTING( 0x07, "1 (high)" ) // 高 (1)
+ PORT_DIPNAME( 0x18, 0x08, "Maximum Bet (per symbol)" ) PORT_DIPLOCATION("DIP-SW1:4,5") // BET MAX (各アイテムに毎に)
+ PORT_DIPSETTING( 0x18, "1" )
+ PORT_DIPSETTING( 0x10, "5" )
+ PORT_DIPSETTING( 0x08, "10" )
+ PORT_DIPSETTING( 0x00, "20" )
+ PORT_DIPNAME( 0xe0, 0x40, DEF_STR(Coinage) ) PORT_DIPLOCATION("DIP-SW1:6,7,8") // COIN RATE
+ PORT_DIPSETTING( 0xe0, DEF_STR(1C_1C) ) // 1コイン 1クレジット
+ PORT_DIPSETTING( 0xc0, DEF_STR(1C_2C) ) // 1コイン 2クレジット
+ PORT_DIPSETTING( 0xa0, DEF_STR(1C_4C) ) // 1コイン 4クレジット
+ PORT_DIPSETTING( 0x80, DEF_STR(1C_5C) ) // 1コイン 5クレジット
+ PORT_DIPSETTING( 0x60, DEF_STR(1C_8C) ) // 1コイン 8クレジット
+ PORT_DIPSETTING( 0x40, DEF_STR(1C_10C) ) // 1コイン10クレジット
+ PORT_DIPSETTING( 0x20, DEF_STR(1C_20C) ) // 1コイン20クレジット
+ PORT_DIPSETTING( 0x00, DEF_STR(1C_50C) ) // 1コイン50クレジット
+
+ PORT_START("DSW2")
+ PORT_DIPNAME( 0x07, 0x00, "Coin Limit" ) PORT_DIPLOCATION("DIP-SW2:1,2,3") // COIN LIMIT
+ PORT_DIPSETTING( 0x07, "150" ) // 150
+ PORT_DIPSETTING( 0x06, "300" ) // 300
+ PORT_DIPSETTING( 0x05, "500" ) // 500
+ PORT_DIPSETTING( 0x04, "1,000" ) // 1000
+ PORT_DIPSETTING( 0x03, "1,500" ) // 1500
+ PORT_DIPSETTING( 0x02, "2,000" ) // 2000
+ PORT_DIPSETTING( 0x01, "5,000" ) // 5000
+ PORT_DIPSETTING( 0x00, "Unlimited" ) // FREE
+ PORT_DIPNAME( 0x18, 0x00, "Note Limit" ) PORT_DIPLOCATION("DIP-SW2:4,5") // NOTE LIMIT
+ PORT_DIPSETTING( 0x18, "300" ) // 300
+ PORT_DIPSETTING( 0x10, "1,000" ) // 1000
+ PORT_DIPSETTING( 0x08, "3,000" ) // 3000
+ PORT_DIPSETTING( 0x00, "Unlimited" ) // FREE
+ PORT_DIPNAME( 0xe0, 0x00, "Credit Limit" ) PORT_DIPLOCATION("DIP-SW2:6,7,8") // CREDIT LIMIT
+ PORT_DIPSETTING( 0xe0, "500" ) // 500
+ PORT_DIPSETTING( 0xc0, "1,000" ) // 1000
+ PORT_DIPSETTING( 0xa0, "2,000" ) // 2000
+ PORT_DIPSETTING( 0x80, "3,000" ) // 3000
+ PORT_DIPSETTING( 0x60, "5,000" ) // 5000
+ PORT_DIPSETTING( 0x40, "10,000" ) // 10000
+ PORT_DIPSETTING( 0x20, "20,000" ) // 20000
+ PORT_DIPSETTING( 0x00, "Unlimited" ) // FREE
+
+ PORT_START("DSW3")
+ PORT_DIPNAME( 0x01, 0x01, "Game Type" ) PORT_DIPLOCATION("DIP-SW3:1") // ゲーム・タイプ
+ PORT_DIPSETTING( 0x01, "Credit Type" ) // クレジット式
+ PORT_DIPSETTING( 0x00, "Hopper Type" ) // ホッパー式
+ PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "DIP-SW3:2" ) // OFF固定
+ PORT_DIPNAME( 0x04, 0x04, "Hopper Polarity" ) PORT_DIPLOCATION("DIP-SW3:3") // ホッパーアクティブ
+ PORT_DIPSETTING( 0x04, DEF_STR(Normal) ) // 通常
+ PORT_DIPSETTING( 0x00, "Inverted" ) // 反転
+ PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "DIP-SW3:4" ) // OFF固定
+ PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "DIP-SW3:5" ) // OFF固定
+ PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "DIP-SW3:6" ) // OFF固定
+ PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "DIP-SW3:7" ) // OFF固定
+ PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP-SW3:8" ) // OFF固定
+
+ PORT_START("DSW4")
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("DIP-SW4:1") // デモサ・ウンド
+ PORT_DIPSETTING( 0x01, DEF_STR(Off) ) // 無
+ PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有
+ PORT_DIPNAME( 0x02, 0x00, "In-Game Music" ) PORT_DIPLOCATION("DIP-SW4:2") // ゲーム・サウンド
+ PORT_DIPSETTING( 0x02, DEF_STR(Off) ) // 無
+ PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有
+ PORT_DIPNAME( 0x04, 0x00, "Double Up Game" ) PORT_DIPLOCATION("DIP-SW4:3") // W-UP
+ PORT_DIPSETTING( 0x04, DEF_STR(Off) ) // 無
+ PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有
+ PORT_DIPNAME( 0x08, 0x00, "Quiz/Coin Toss" ) PORT_DIPLOCATION("DIP-SW4:4") // クイズとコイントス
+ PORT_DIPSETTING( 0x08, "Quiz" ) // クイズ
+ PORT_DIPSETTING( 0x00, "Coin Toss" ) // コイントス
+ PORT_DIPNAME( 0x10, 0x00, "Panel Lamps" ) PORT_DIPLOCATION("DIP-SW4:5") // パネルランプ
+ PORT_DIPSETTING( 0x10, DEF_STR(Off) ) // 不使用
+ PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 使用
+ PORT_DIPNAME( 0x20, 0x20, "Clock Set" ) PORT_DIPLOCATION("DIP-SW4:6") // 時計セット
+ PORT_DIPSETTING( 0x20, DEF_STR(Off) ) // 通常
+ PORT_DIPSETTING( 0x00, DEF_STR(On) ) // セット
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR(Service_Mode) ) PORT_DIPLOCATION("DIP-SW4:7") // ハードテスト
+ PORT_DIPSETTING( 0x40, DEF_STR(Off) ) // 通常
+ PORT_DIPSETTING( 0x00, DEF_STR(On) ) // ハードテスト
+ PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP-SW4:8" ) // OFF固定
+
+ PORT_START("DSW5")
+ PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "DIP-SW4:9" ) // OFF固定
+ PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "DIP-SW4:10" ) // OFF固定
+ PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "DIP-SW3:9" ) // OFF固定
+ PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "DIP-SW3:10" ) // OFF固定
+ PORT_DIPNAME( 0x10, 0x10, "Bonus Game Difficulty" ) PORT_DIPLOCATION("DIP-SW2:9") // ボーナスゲームの難易度
+ PORT_DIPSETTING( 0x00, DEF_STR(Easy) ) // やや易しい
+ PORT_DIPSETTING( 0x10, DEF_STR(Normal) ) // 普通
+ PORT_DIPNAME( 0x20, 0x20, "Fever Odds" ) PORT_DIPLOCATION("DIP-SW2:10") // フィーバーに当たる率
+ PORT_DIPSETTING( 0x00, DEF_STR(Low) ) // やや低しい
+ PORT_DIPSETTING( 0x20, DEF_STR(Normal) ) // 普通
+ PORT_DIPNAME( 0x40, 0x40, "Credits Per Note" ) PORT_DIPLOCATION("DIP-SW1:9") // NOTE RATE、COIN RATE
+ PORT_DIPSETTING( 0x00, "5" ) PORT_CONDITION("DSW1", 0xe0, EQUALS, 0xe0) // 5倍
+ PORT_DIPSETTING( 0x00, "10" ) PORT_CONDITION("DSW1", 0xe0, EQUALS, 0xc0)
+ PORT_DIPSETTING( 0x00, "20" ) PORT_CONDITION("DSW1", 0xe0, EQUALS, 0xa0)
+ PORT_DIPSETTING( 0x00, "25" ) PORT_CONDITION("DSW1", 0xe0, EQUALS, 0x80)
+ PORT_DIPSETTING( 0x00, "40" ) PORT_CONDITION("DSW1", 0xe0, EQUALS, 0x60)
+ PORT_DIPSETTING( 0x00, "50" ) PORT_CONDITION("DSW1", 0xe0, EQUALS, 0x40)
+ PORT_DIPSETTING( 0x00, "100" ) PORT_CONDITION("DSW1", 0xe0, EQUALS, 0x20)
+ PORT_DIPSETTING( 0x00, "250" ) PORT_CONDITION("DSW1", 0xe0, EQUALS, 0x00)
+ PORT_DIPSETTING( 0x40, "10" ) PORT_CONDITION("DSW1", 0xe0, EQUALS, 0xe0) // 10倍
+ PORT_DIPSETTING( 0x40, "20" ) PORT_CONDITION("DSW1", 0xe0, EQUALS, 0xc0)
+ PORT_DIPSETTING( 0x40, "40" ) PORT_CONDITION("DSW1", 0xe0, EQUALS, 0xa0)
+ PORT_DIPSETTING( 0x40, "50" ) PORT_CONDITION("DSW1", 0xe0, EQUALS, 0x80)
+ PORT_DIPSETTING( 0x40, "80" ) PORT_CONDITION("DSW1", 0xe0, EQUALS, 0x60)
+ PORT_DIPSETTING( 0x40, "100" ) PORT_CONDITION("DSW1", 0xe0, EQUALS, 0x40)
+ PORT_DIPSETTING( 0x40, "200" ) PORT_CONDITION("DSW1", 0xe0, EQUALS, 0x20)
+ PORT_DIPSETTING( 0x40, "500" ) PORT_CONDITION("DSW1", 0xe0, EQUALS, 0x00)
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR(Flip_Screen) ) PORT_DIPLOCATION("DIP-SW1:10") // モニター画面反転
+ PORT_DIPSETTING( 0x80, DEF_STR(Off) ) // 通常
+ PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 反転
+INPUT_PORTS_END
+
static INPUT_PORTS_START( sryudens )
PORT_START("SYSTEM")
@@ -10111,6 +10318,9 @@ void ddenlovr_state::rselect(machine_config &config)
subdevice<tmpz84c015_device>("maincpu")->set_addrmap(AS_PROGRAM, &ddenlovr_state::rselect_map);
subdevice<tmpz84c015_device>("maincpu")->out_pb_callback().set(FUNC(ddenlovr_state::hginga_rombank_w<0x0f>));
+ m_key_matrix[0]->set_options(rselect_panels, "rs", false);
+ m_key_matrix[1]->set_options(rselect_panels, "rs", false);
+
MCFG_MACHINE_START_OVERRIDE(ddenlovr_state,mjflove)
}
@@ -13378,6 +13588,7 @@ ROM_END
} // anonymous namespace
DEFINE_DEVICE_TYPE_PRIVATE(HGOKOU_JOYSTICK, device_mahjong_panel_interface, hgokou_joystick_device, "hgokou_joystick", "Hanafuda Hana Gokou joystick")
+DEFINE_DEVICE_TYPE_PRIVATE(RSELECT_PANEL, device_mahjong_panel_interface, rselect_panel_device, "rselect_panel", "Royal Selection panel")
GAME( 1992, htengoku, 0, htengoku, htengoku, htengoku_state, empty_init, ROT180, "Dynax", "Hanafuda Hana Tengoku (Japan)", 0 )
@@ -13418,7 +13629,7 @@ GAME( 1994, rongrongg, rongrong, rongrong, rongrong, ddenlovr_state, init_r
GAME( 1994, hparadis, 0, hparadis, hparadis, ddenlovr_state, empty_init, ROT0, "Dynax", "Super Hana Paradise (Japan)", MACHINE_NO_COCKTAIL )
-GAME( 1994, rselect, 0, rselect, hgokou, ddenlovr_state, empty_init, ROT0, "Dynax", "Royal Selection (Japan, ver. 1.01)", MACHINE_NO_COCKTAIL | MACHINE_NOT_WORKING ) // needs correct inputs and DIP definitions
+GAME( 1994, rselect, 0, rselect, rselect, ddenlovr_state, empty_init, ROT0, "Dynax", "Royal Selection (Japan, ver. 1.01)", MACHINE_NO_COCKTAIL | MACHINE_NOT_WORKING )
GAME( 1995, hgokou, 0, hgokou, hgokou, ddenlovr_state, empty_init, ROT0, "Dynax (Alba license)", "Hanafuda Hana Gokou (Japan, ver. B)", MACHINE_NO_COCKTAIL | MACHINE_NOT_WORKING )
GAME( 1995, hgokoua, hgokou, hgokbang, hgokou, ddenlovr_state, empty_init, ROT0, "Dynax (Alba license)", "Hanafuda Hana Gokou (Japan, ver. A)", MACHINE_NO_COCKTAIL | MACHINE_NOT_WORKING )
diff --git a/src/mame/itech/itech32.cpp b/src/mame/itech/itech32.cpp
index a790f3e7033..afdf26415ab 100644
--- a/src/mame/itech/itech32.cpp
+++ b/src/mame/itech/itech32.cpp
@@ -5206,13 +5206,13 @@ GAME( 1993, hardyard, 0, bloodstm, hardyard, itech32_state, init_har
GAME( 1993, hardyard11, hardyard, bloodstm, hardyard, itech32_state, init_hardyard, ROT0, "Strata / Incredible Technologies", "Hard Yardage (v1.10)", MACHINE_SUPPORTS_SAVE )
GAME( 1993, hardyard10, hardyard, bloodstm, hardyard, itech32_state, init_hardyard, ROT0, "Strata / Incredible Technologies", "Hard Yardage (v1.00)", MACHINE_SUPPORTS_SAVE )
-GAME( 1994, bloodstm, 0, bloodstm, bloodstm, itech32_state, init_bloodstm, ROT0, "Strata / Incredible Technologies", "Blood Storm (v2.22)", MACHINE_SUPPORTS_SAVE )
-GAME( 1994, bloodstm221, bloodstm, bloodstm, bloodstm, itech32_state, init_bloodstm, ROT0, "Strata / Incredible Technologies", "Blood Storm (v2.21)", MACHINE_SUPPORTS_SAVE )
-GAME( 1994, bloodstm220, bloodstm, bloodstm, bloodstm, itech32_state, init_bloodstm, ROT0, "Strata / Incredible Technologies", "Blood Storm (v2.20)", MACHINE_SUPPORTS_SAVE )
-GAME( 1994, bloodstm216, bloodstm, bloodstm, bloodstm, itech32_state, init_bloodstm, ROT0, "Strata / Incredible Technologies", "Blood Storm (v2.16)", MACHINE_SUPPORTS_SAVE )
-GAME( 1994, bloodstm210, bloodstm, bloodstm, bloodstm, itech32_state, init_bloodstm, ROT0, "Strata / Incredible Technologies", "Blood Storm (v2.10)", MACHINE_SUPPORTS_SAVE )
-GAME( 1994, bloodstm110, bloodstm, bloodstm, bloodstm, itech32_state, init_bloodstm, ROT0, "Strata / Incredible Technologies", "Blood Storm (v1.10)", MACHINE_SUPPORTS_SAVE )
-GAME( 1994, bloodstm104, bloodstm, bloodstm, bloodstm, itech32_state, init_bloodstm, ROT0, "Strata / Incredible Technologies", "Blood Storm (v1.04)", MACHINE_SUPPORTS_SAVE )
+GAME( 1994, bloodstm, 0, bloodstm, bloodstm, itech32_state, init_bloodstm, ROT0, "Strata / Incredible Technologies", "BloodStorm (v2.22)", MACHINE_SUPPORTS_SAVE )
+GAME( 1994, bloodstm221, bloodstm, bloodstm, bloodstm, itech32_state, init_bloodstm, ROT0, "Strata / Incredible Technologies", "BloodStorm (v2.21)", MACHINE_SUPPORTS_SAVE )
+GAME( 1994, bloodstm220, bloodstm, bloodstm, bloodstm, itech32_state, init_bloodstm, ROT0, "Strata / Incredible Technologies", "BloodStorm (v2.20)", MACHINE_SUPPORTS_SAVE )
+GAME( 1994, bloodstm216, bloodstm, bloodstm, bloodstm, itech32_state, init_bloodstm, ROT0, "Strata / Incredible Technologies", "BloodStorm (v2.16)", MACHINE_SUPPORTS_SAVE )
+GAME( 1994, bloodstm210, bloodstm, bloodstm, bloodstm, itech32_state, init_bloodstm, ROT0, "Strata / Incredible Technologies", "BloodStorm (v2.10)", MACHINE_SUPPORTS_SAVE )
+GAME( 1994, bloodstm110, bloodstm, bloodstm, bloodstm, itech32_state, init_bloodstm, ROT0, "Strata / Incredible Technologies", "BloodStorm (v1.10)", MACHINE_SUPPORTS_SAVE )
+GAME( 1994, bloodstm104, bloodstm, bloodstm, bloodstm, itech32_state, init_bloodstm, ROT0, "Strata / Incredible Technologies", "BloodStorm (v1.04)", MACHINE_SUPPORTS_SAVE )
GAME( 1994, pairs, 0, bloodstm, pairs, itech32_state, init_bloodstm, ROT0, "Strata / Incredible Technologies", "Pairs (V1.2, 09/30/94)", MACHINE_SUPPORTS_SAVE )
GAME( 1994, pairsa, pairs, bloodstm, pairs, itech32_state, init_bloodstm, ROT0, "Strata / Incredible Technologies", "Pairs (V1, 09/07/94)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/shared/mahjong.cpp b/src/mame/shared/mahjong.cpp
index f90dbf7543e..35b2a4aae00 100644
--- a/src/mame/shared/mahjong.cpp
+++ b/src/mame/shared/mahjong.cpp
@@ -110,7 +110,7 @@ INPUT_PORTS_START(hanafuda_matrix_bet)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_E) PORT_PLAYER(1)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_HANAFUDA_YES) PORT_PLAYER(1)
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNKNOWN)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_START) PORT_PLAYER(1)
PORT_START("KEY1")
@@ -197,40 +197,6 @@ INPUT_PORTS_END
-class mahjong_panel_device_base : public device_t, public device_mahjong_panel_interface
-{
-public:
- virtual u8 read(u8 select) override
- {
- u8 result = 0x3f;
- for (unsigned i = 0; m_keys.size() > i; ++i)
- {
- if (!BIT(select, i))
- result &= m_keys[i]->read();
- }
- return result;
- }
-
-protected:
- mahjong_panel_device_base(
- machine_config const &mconfig,
- device_type type,
- char const *tag,
- device_t *owner,
- u32 clock) :
- device_t(mconfig, type, tag, owner, clock),
- device_mahjong_panel_interface(mconfig, *this),
- m_keys(*this, "KEY%u", 0U)
- {
- }
-
- virtual void device_start() override ATTR_COLD { }
-
-private:
- required_ioport_array<6> m_keys;
-};
-
-
class mahjong_panel_device : public mahjong_panel_device_base
{
public:
@@ -408,6 +374,34 @@ void mahjong_panel_connector_device::amusement_panels(device_slot_interface &dev
}
+mahjong_panel_device_base::mahjong_panel_device_base(
+ machine_config const &mconfig,
+ device_type type,
+ char const *tag,
+ device_t *owner,
+ u32 clock) :
+ device_t(mconfig, type, tag, owner, clock),
+ device_mahjong_panel_interface(mconfig, *this),
+ m_keys(*this, "KEY%u", 0U)
+{
+}
+
+u8 mahjong_panel_device_base::read(u8 select)
+{
+ u8 result = 0x3f;
+ for (unsigned i = 0; m_keys.size() > i; ++i)
+ {
+ if (!BIT(select, i))
+ result &= m_keys[i]->read();
+ }
+ return result;
+}
+
+void mahjong_panel_device_base::device_start()
+{
+}
+
+
INPUT_PORTS_START(mahjong_matrix_1p)
PORT_START("KEY0")
diff --git a/src/mame/shared/mahjong.h b/src/mame/shared/mahjong.h
index a8e553ed6a8..a9517d4c820 100644
--- a/src/mame/shared/mahjong.h
+++ b/src/mame/shared/mahjong.h
@@ -52,6 +52,21 @@ private:
};
+class mahjong_panel_device_base : public device_t, public device_mahjong_panel_interface
+{
+public:
+ virtual u8 read(u8 select) override;
+
+protected:
+ mahjong_panel_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock);
+
+ virtual void device_start() override ATTR_COLD;
+
+private:
+ required_ioport_array<6> m_keys;
+};
+
+
DECLARE_DEVICE_TYPE(MAHJONG_PANEL_CONNECTOR, mahjong_panel_connector_device)
DECLARE_DEVICE_TYPE(MAHJONG_PANEL, device_mahjong_panel_interface)