summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/devices/machine/sensorboard.cpp68
-rw-r--r--src/devices/machine/sensorboard.h36
-rw-r--r--src/mame/drivers/ave_arb.cpp3
-rw-r--r--src/mame/drivers/cking_master.cpp3
-rw-r--r--src/mame/drivers/cxg_ch2001.cpp3
-rw-r--r--src/mame/layout/ave_arb.lay14
-rw-r--r--src/mame/layout/ck_master.lay14
-rw-r--r--src/mame/layout/cxg_ch2001.lay14
8 files changed, 75 insertions, 80 deletions
diff --git a/src/devices/machine/sensorboard.cpp b/src/devices/machine/sensorboard.cpp
index 4c2c2f6702a..19ab7c2848b 100644
--- a/src/devices/machine/sensorboard.cpp
+++ b/src/devices/machine/sensorboard.cpp
@@ -18,7 +18,7 @@ In here, they're used for forcing sensor/piece inputs (a normal click activates
both at the same time).
If you use this device in a slot, or add multiple of them, make sure to override
-the outputs with custom_output() to avoid collisions.
+the outputs with output_cb() to avoid collisions.
TODO:
@@ -51,12 +51,15 @@ sensorboard_device::sensorboard_device(const machine_config &mconfig, const char
m_custom_spawn_cb(*this),
m_custom_output_cb(*this)
{
- m_sensordelay = attotime::from_msec(75);
+ memset(m_inistate, 0, ARRAY_LENGTH(m_inistate));
m_magnets = false;
m_inductive = false;
m_ui_enabled = 3;
- memset(m_inistate, 0, ARRAY_LENGTH(m_inistate));
- memset(m_spawnstate, 0, ARRAY_LENGTH(m_spawnstate));
+
+ // set defaults for most common use case (aka chess)
+ set_size(8, 8);
+ set_spawnpoints(12);
+ m_sensordelay = attotime::from_msec(75);
}
@@ -80,21 +83,18 @@ void sensorboard_device::device_start()
m_out_count.resolve();
}
- for (int i = 0; i < m_maxspawn; i++)
- m_spawnstate[i] = i + 1;
-
// custom init (meant for setting m_inistate)
m_custom_init_cb();
memcpy(m_curstate, m_inistate, m_height * m_width);
memcpy(m_history[0], m_curstate, m_height * m_width);
- // output spawn icons (done only once)
for (int i = 0; i < m_maxspawn; i++)
{
+ // output spawn icons (done only once)
if (m_custom_output_cb.isnull())
- m_out_pui[i + 1] = m_spawnstate[i];
+ m_out_pui[i + 1] = i + 1;
else
- m_custom_output_cb(i + 0x101, m_spawnstate[i]);
+ m_custom_output_cb(i + 0x101, i + 1);
}
m_undotimer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(sensorboard_device::undo_tick),this));
@@ -113,11 +113,6 @@ void sensorboard_device::device_start()
m_usize = ARRAY_LENGTH(m_history);
// register for savestates
- save_item(NAME(m_history));
- save_item(NAME(m_curstate));
- save_item(NAME(m_inistate));
- save_item(NAME(m_spawnstate));
-
save_item(NAME(m_magnets));
save_item(NAME(m_inductive));
save_item(NAME(m_width));
@@ -131,6 +126,11 @@ void sensorboard_device::device_start()
save_item(NAME(m_droppos));
save_item(NAME(m_sensorpos));
save_item(NAME(m_ui_enabled));
+
+ save_item(NAME(m_curstate));
+ save_item(NAME(m_inistate));
+ save_item(NAME(m_history));
+
save_item(NAME(m_uselect));
save_item(NAME(m_upointer));
save_item(NAME(m_ufirst));
@@ -139,13 +139,9 @@ void sensorboard_device::device_start()
save_item(NAME(m_sensordelay));
}
-void sensorboard_device::init_preset(u8 preset)
+int sensorboard_device::preset_chess()
{
- // called at driver machine config
- m_magnets = (preset != CHESS_BUTTONS);
- m_inductive = (preset == CHESS_INDUCTIVE);
- set_size(8, 8);
- set_spawnpoints(12);
+ // set chessboard start position
// 1 = white pawn 7 = black pawn
// 2 = white knight 8 = black knight
@@ -154,7 +150,6 @@ void sensorboard_device::init_preset(u8 preset)
// 5 = white queen 11 = black queen
// 6 = white king 12 = black king
- // initial board state
write_init(0, 0, 4);
write_init(7, 0, 4);
write_init(1, 0, 2);
@@ -171,15 +166,11 @@ void sensorboard_device::init_preset(u8 preset)
write_init(x, 7, read_init(x, 0) + 6);
}
- if (m_inductive)
- {
- set_sensordelay(attotime::never);
- set_max_id(0xff);
- }
+ return 1;
// note that for inductive boards, 2 additional callbacks are needed:
- // custom_init() for reassigning the piece ids for initial board state
- // custom_spawn() for checking if a piece is available and reassigning the piece id
+ // additional init_cb() for reassigning the piece ids for initial board state
+ // spawn_cb() for checking if a piece is available and reassigning the piece id
}
void sensorboard_device::device_reset()
@@ -493,7 +484,7 @@ TIMER_CALLBACK_MEMBER(sensorboard_device::undo_tick)
refresh();
// schedule next timeout
- if (m_inp_ui->read() & 0x78)
+ if (m_inp_ui->read() & 0xf0)
m_undotimer->adjust(attotime::from_msec(500), param);
}
@@ -506,7 +497,7 @@ INPUT_CHANGED_MEMBER(sensorboard_device::ui_undo)
m_uselect = select;
m_undotimer->adjust(attotime::zero, select);
}
- else if ((m_inp_ui->read() & 0x78) == 0 || select == m_uselect)
+ else if ((m_inp_ui->read() & 0xf0) == 0 || select == m_uselect)
m_undotimer->adjust(attotime::never);
}
@@ -677,13 +668,14 @@ static INPUT_PORTS_START( sensorboard )
PORT_START("UI")
PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 1, NOTEQUALS, 0) PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_NAME("Modifier Force Sensor") // hold while clicking to force sensor (ignore piece)
PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 1, NOTEQUALS, 0) PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) PORT_NAME("Modifier Force Piece") // hold while clicking to force piece (ignore sensor)
- PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 2, NOTEQUALS, 0) PORT_CHANGED_MEMBER(DEVICE_SELF, sensorboard_device, ui_hand, 0) PORT_NAME("Remove Piece")
- PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 2, NOTEQUALS, 0) PORT_CHANGED_MEMBER(DEVICE_SELF, sensorboard_device, ui_undo, 0) PORT_NAME("Undo Buffer First")
- PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 2, NOTEQUALS, 0) PORT_CHANGED_MEMBER(DEVICE_SELF, sensorboard_device, ui_undo, 1) PORT_NAME("Undo Buffer Previous")
- PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 2, NOTEQUALS, 0) PORT_CHANGED_MEMBER(DEVICE_SELF, sensorboard_device, ui_undo, 2) PORT_NAME("Undo Buffer Next")
- PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 2, NOTEQUALS, 0) PORT_CHANGED_MEMBER(DEVICE_SELF, sensorboard_device, ui_undo, 3) PORT_NAME("Undo Buffer Last")
- PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 2, NOTEQUALS, 0) PORT_CHANGED_MEMBER(DEVICE_SELF, sensorboard_device, ui_init, 0) PORT_NAME("Board Clear")
- PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 2, NOTEQUALS, 0) PORT_CHANGED_MEMBER(DEVICE_SELF, sensorboard_device, ui_init, 1) PORT_NAME("Board Reset")
+ PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sensorboard_device, check_sensor_busy, nullptr) // check if any sensor is busy / pressed (read-only)
+ PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 2, NOTEQUALS, 0) PORT_CHANGED_MEMBER(DEVICE_SELF, sensorboard_device, ui_hand, 0) PORT_NAME("Remove Piece")
+ PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 2, NOTEQUALS, 0) PORT_CHANGED_MEMBER(DEVICE_SELF, sensorboard_device, ui_undo, 0) PORT_NAME("Undo Buffer First")
+ PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 2, NOTEQUALS, 0) PORT_CHANGED_MEMBER(DEVICE_SELF, sensorboard_device, ui_undo, 1) PORT_NAME("Undo Buffer Previous")
+ PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 2, NOTEQUALS, 0) PORT_CHANGED_MEMBER(DEVICE_SELF, sensorboard_device, ui_undo, 2) PORT_NAME("Undo Buffer Next")
+ PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 2, NOTEQUALS, 0) PORT_CHANGED_MEMBER(DEVICE_SELF, sensorboard_device, ui_undo, 3) PORT_NAME("Undo Buffer Last")
+ PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 2, NOTEQUALS, 0) PORT_CHANGED_MEMBER(DEVICE_SELF, sensorboard_device, ui_init, 0) PORT_NAME("Board Clear")
+ PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 2, NOTEQUALS, 0) PORT_CHANGED_MEMBER(DEVICE_SELF, sensorboard_device, ui_init, 1) PORT_NAME("Board Reset")
PORT_START("BS_CHECK") // board size (internal use)
PORT_BIT( 0xffffffff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sensorboard_device, check_bs_mask, nullptr)
diff --git a/src/devices/machine/sensorboard.h b/src/devices/machine/sensorboard.h
index ae0384f922d..c710d1cdfeb 100644
--- a/src/devices/machine/sensorboard.h
+++ b/src/devices/machine/sensorboard.h
@@ -16,26 +16,28 @@ class sensorboard_device : public device_t
public:
sensorboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
- enum
+ enum sb_type
{
- CHESS_BUTTONS = 0,
- CHESS_MAGNETS,
- CHESS_INDUCTIVE
+ BUTTONS = 0,
+ MAGNETS,
+ INDUCTIVE
};
// configuration helpers
- sensorboard_device &set_preset(u8 preset) { init_preset(preset); return *this; } // device has presets for chess boards
+ sensorboard_device &set_type(sb_type t) { m_magnets = (t == MAGNETS); m_inductive = (t == INDUCTIVE); return *this; } // sensor type
sensorboard_device &set_size(u8 width, u8 height) { m_width = width; m_height = height; return *this; } // board dimensions, max 10 * 10
sensorboard_device &set_spawnpoints(u8 i) { m_maxspawn = i; m_maxid = i; return *this; } // number of piece spawnpoints, max 16
sensorboard_device &set_max_id(u8 i) { m_maxid = i; return *this; } // maximum piece id (if larger than set_spawnpoints)
- sensorboard_device &set_sensordelay(attotime delay) { m_sensordelay = delay; return *this; } // delay when activating a sensor (like PORT_IMPULSE), set to attotime::never to disable
+ sensorboard_device &set_delay(attotime delay) { m_sensordelay = delay; return *this; } // delay when activating a sensor (like PORT_IMPULSE), set to attotime::never to disable
sensorboard_device &set_ui_enable(bool b) { if (!b) m_maxspawn = 0; m_ui_enabled = (b) ? 3 : 0; return *this; } // enable UI inputs
sensorboard_device &set_mod_enable(bool b) { if (b) m_ui_enabled |= 1; else m_ui_enabled &= 2; return *this; } // enable modifier keys
- auto custom_init() { return m_custom_init_cb.bind(); }
- auto custom_sensor() { return m_custom_sensor_cb.bind(); } // x = offset & 0xf, y = offset >> 4 & 0xf
- auto custom_spawn() { return m_custom_spawn_cb.bind(); } // spawnpoint/piece = offset, retval = new piece id
- auto custom_output() { return m_custom_output_cb.bind(); } // pos = offset(A8 for ui/board, A9 for count), id = data
+ auto init_cb() { return m_custom_init_cb.bind(); }
+ auto sensor_cb() { return m_custom_sensor_cb.bind(); } // x = offset & 0xf, y = offset >> 4 & 0xf
+ auto spawn_cb() { return m_custom_spawn_cb.bind(); } // spawnpoint/piece = offset, retval = new piece id
+ auto output_cb() { return m_custom_output_cb.bind(); } // pos = offset(A8 for ui/board, A9 for count), id = data
+
+ int preset_chess(); // init_cb() preset for chessboards
// read sensors
u8 read_sensor(u8 x, u8 y);
@@ -56,13 +58,14 @@ public:
bool drop_piece(u8 x, u8 y);
bool pickup_piece(u8 x, u8 y);
- // internal input handlers
+ // input handlers
DECLARE_INPUT_CHANGED_MEMBER(sensor);
DECLARE_INPUT_CHANGED_MEMBER(ui_spawn);
DECLARE_INPUT_CHANGED_MEMBER(ui_hand);
DECLARE_INPUT_CHANGED_MEMBER(ui_undo);
DECLARE_INPUT_CHANGED_MEMBER(ui_init);
+ DECLARE_CUSTOM_INPUT_MEMBER(check_sensor_busy) { return (m_sensorpos == -1) ? 0 : 1; }
DECLARE_CUSTOM_INPUT_MEMBER(check_bs_mask) { return m_bs_mask; }
DECLARE_CUSTOM_INPUT_MEMBER(check_ss_mask) { return m_ss_mask; }
DECLARE_CUSTOM_INPUT_MEMBER(check_ui_enabled) { return m_ui_enabled; }
@@ -87,11 +90,6 @@ private:
devcb_read8 m_custom_spawn_cb;
devcb_write16 m_custom_output_cb;
- u8 m_history[1000][0x100];
- u8 m_curstate[0x100];
- u8 m_inistate[0x100];
- u8 m_spawnstate[0x20];
-
bool m_magnets;
bool m_inductive;
u8 m_width;
@@ -106,6 +104,10 @@ private:
int m_sensorpos;
u8 m_ui_enabled;
+ u8 m_curstate[0x100];
+ u8 m_inistate[0x100];
+ u8 m_history[1000][0x100];
+
u8 m_uselect;
u32 m_upointer;
u32 m_ufirst;
@@ -119,8 +121,6 @@ private:
emu_timer *m_sensortimer;
void cancel_sensor();
TIMER_CALLBACK_MEMBER(sensor_off) { cancel_sensor(); }
-
- void init_preset(u8 preset);
};
diff --git a/src/mame/drivers/ave_arb.cpp b/src/mame/drivers/ave_arb.cpp
index d09991ade35..0ecc507d56a 100644
--- a/src/mame/drivers/ave_arb.cpp
+++ b/src/mame/drivers/ave_arb.cpp
@@ -276,7 +276,8 @@ void arb_state::v2(machine_config &config)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
- SENSORBOARD(config, m_board).set_preset(sensorboard_device::CHESS_MAGNETS);
+ SENSORBOARD(config, m_board).set_type(sensorboard_device::MAGNETS);
+ m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess));
/* video hardware */
PWM_DISPLAY(config, m_display).set_size(9+1, 12);
diff --git a/src/mame/drivers/cking_master.cpp b/src/mame/drivers/cking_master.cpp
index 5b59f299599..ea18a88d145 100644
--- a/src/mame/drivers/cking_master.cpp
+++ b/src/mame/drivers/cking_master.cpp
@@ -225,7 +225,8 @@ void master_state::master(machine_config &config)
m_irq_on->set_start_delay(irq_period - attotime::from_nsec(22870)); // active for 22.87us
TIMER(config, "irq_off").configure_periodic(FUNC(master_state::irq_off<INPUT_LINE_IRQ0>), irq_period);
- SENSORBOARD(config, m_board).set_preset(sensorboard_device::CHESS_BUTTONS);
+ SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS);
+ m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess));
/* video hardware */
PWM_DISPLAY(config, m_display).set_size(9, 2);
diff --git a/src/mame/drivers/cxg_ch2001.cpp b/src/mame/drivers/cxg_ch2001.cpp
index 26719662095..872d3963115 100644
--- a/src/mame/drivers/cxg_ch2001.cpp
+++ b/src/mame/drivers/cxg_ch2001.cpp
@@ -180,7 +180,8 @@ void ch2001_state::ch2001(machine_config &config)
m_irq_on->set_start_delay(irq_period - attotime::from_nsec(18300)); // active for 18.3us
TIMER(config, "irq_off").configure_periodic(FUNC(ch2001_state::irq_off<INPUT_LINE_IRQ0>), irq_period);
- SENSORBOARD(config, m_board).set_preset(sensorboard_device::CHESS_MAGNETS);
+ SENSORBOARD(config, m_board).set_type(sensorboard_device::MAGNETS);
+ m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess));
/* video hardware */
PWM_DISPLAY(config, m_display).set_size(10, 8);
diff --git a/src/mame/layout/ave_arb.lay b/src/mame/layout/ave_arb.lay
index 7606bef0bdd..123c978890e 100644
--- a/src/mame/layout/ave_arb.lay
+++ b/src/mame/layout/ave_arb.lay
@@ -361,8 +361,8 @@
<bezel element="text_uib2"><bounds x="1.5" y="11.75" width="7" height="2" /></bezel>
<bezel element="text_uib3"><bounds x="1.5" y="15.25" width="7" height="2" /></bezel>
- <bezel element="hlub" inputtag="board:UI" inputmask="0x100"><bounds x="1" y="11.5" width="8" height="2.5" /><color alpha="0.25" /></bezel>
- <bezel element="hlub" inputtag="board:UI" inputmask="0x80"><bounds x="1" y="15" width="8" height="2.5" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x200"><bounds x="1" y="11.5" width="8" height="2.5" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x100"><bounds x="1" y="15" width="8" height="2.5" /><color alpha="0.25" /></bezel>
<!-- spawn -->
<bezel element="text_uis1"><bounds x="0" y="20.5" width="10" height="2" /></bezel>
@@ -402,7 +402,7 @@
<bezel element="cwhite"><bounds x="1" y="60.5" width="8" height="2.5" /></bezel>
<bezel element="text_uih2"><bounds x="1.5" y="60.75" width="7" height="2" /></bezel>
- <bezel element="hlub" inputtag="board:UI" inputmask="0x04"><bounds x="1" y="60.5" width="8" height="2.5" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x08"><bounds x="1" y="60.5" width="8" height="2.5" /><color alpha="0.25" /></bezel>
<!-- undo -->
<bezel element="text_uiu1"><bounds x="0" y="66" width="10" height="2" /></bezel>
@@ -415,10 +415,10 @@
<bezel element="text_uiu2c"><bounds x="5.2" y="69.5" width="1.7" height="4" /></bezel>
<bezel element="text_uiu2d"><bounds x="7.3" y="69.5" width="1.7" height="4" /></bezel>
- <bezel element="hlub" inputtag="board:UI" inputmask="0x08"><bounds x="1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
- <bezel element="hlub" inputtag="board:UI" inputmask="0x10"><bounds x="3.1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
- <bezel element="hlub" inputtag="board:UI" inputmask="0x20"><bounds x="5.2" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
- <bezel element="hlub" inputtag="board:UI" inputmask="0x40"><bounds x="7.3" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x10"><bounds x="1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x20"><bounds x="3.1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x40"><bounds x="5.2" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x80"><bounds x="7.3" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
<bezel name="count_ui0" element="text_uiu3a"><bounds x="0" y="75" width="4" height="2" /></bezel>
<bezel name="count_ui1" element="text_uiu3c"><bounds x="6" y="75" width="4" height="2" /></bezel>
diff --git a/src/mame/layout/ck_master.lay b/src/mame/layout/ck_master.lay
index 04e66d9674b..0d79dfbb5aa 100644
--- a/src/mame/layout/ck_master.lay
+++ b/src/mame/layout/ck_master.lay
@@ -295,8 +295,8 @@
<bezel element="text_uib2"><bounds x="1.5" y="11.75" width="7" height="2" /></bezel>
<bezel element="text_uib3"><bounds x="1.5" y="15.25" width="7" height="2" /></bezel>
- <bezel element="hlub" inputtag="board:UI" inputmask="0x100"><bounds x="1" y="11.5" width="8" height="2.5" /><color alpha="0.25" /></bezel>
- <bezel element="hlub" inputtag="board:UI" inputmask="0x80"><bounds x="1" y="15" width="8" height="2.5" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x200"><bounds x="1" y="11.5" width="8" height="2.5" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x100"><bounds x="1" y="15" width="8" height="2.5" /><color alpha="0.25" /></bezel>
<!-- spawn -->
<bezel element="text_uis1"><bounds x="0" y="20.5" width="10" height="2" /></bezel>
@@ -336,7 +336,7 @@
<bezel element="cwhite"><bounds x="1" y="60.5" width="8" height="2.5" /></bezel>
<bezel element="text_uih2"><bounds x="1.5" y="60.75" width="7" height="2" /></bezel>
- <bezel element="hlub" inputtag="board:UI" inputmask="0x04"><bounds x="1" y="60.5" width="8" height="2.5" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x08"><bounds x="1" y="60.5" width="8" height="2.5" /><color alpha="0.25" /></bezel>
<!-- undo -->
<bezel element="text_uiu1"><bounds x="0" y="66" width="10" height="2" /></bezel>
@@ -349,10 +349,10 @@
<bezel element="text_uiu2c"><bounds x="5.2" y="69.5" width="1.7" height="4" /></bezel>
<bezel element="text_uiu2d"><bounds x="7.3" y="69.5" width="1.7" height="4" /></bezel>
- <bezel element="hlub" inputtag="board:UI" inputmask="0x08"><bounds x="1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
- <bezel element="hlub" inputtag="board:UI" inputmask="0x10"><bounds x="3.1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
- <bezel element="hlub" inputtag="board:UI" inputmask="0x20"><bounds x="5.2" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
- <bezel element="hlub" inputtag="board:UI" inputmask="0x40"><bounds x="7.3" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x10"><bounds x="1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x20"><bounds x="3.1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x40"><bounds x="5.2" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x80"><bounds x="7.3" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
<bezel name="count_ui0" element="text_uiu3a"><bounds x="0" y="75" width="4" height="2" /></bezel>
<bezel name="count_ui1" element="text_uiu3c"><bounds x="6" y="75" width="4" height="2" /></bezel>
diff --git a/src/mame/layout/cxg_ch2001.lay b/src/mame/layout/cxg_ch2001.lay
index 6d7fc358d30..bd65b463708 100644
--- a/src/mame/layout/cxg_ch2001.lay
+++ b/src/mame/layout/cxg_ch2001.lay
@@ -363,8 +363,8 @@
<bezel element="text_uib2"><bounds x="1.5" y="11.75" width="7" height="2" /></bezel>
<bezel element="text_uib3"><bounds x="1.5" y="15.25" width="7" height="2" /></bezel>
- <bezel element="hlub" inputtag="board:UI" inputmask="0x100"><bounds x="1" y="11.5" width="8" height="2.5" /><color alpha="0.25" /></bezel>
- <bezel element="hlub" inputtag="board:UI" inputmask="0x80"><bounds x="1" y="15" width="8" height="2.5" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x200"><bounds x="1" y="11.5" width="8" height="2.5" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x100"><bounds x="1" y="15" width="8" height="2.5" /><color alpha="0.25" /></bezel>
<!-- spawn -->
<bezel element="text_uis1"><bounds x="0" y="20.5" width="10" height="2" /></bezel>
@@ -404,7 +404,7 @@
<bezel element="cwhite"><bounds x="1" y="60.5" width="8" height="2.5" /></bezel>
<bezel element="text_uih2"><bounds x="1.5" y="60.75" width="7" height="2" /></bezel>
- <bezel element="hlub" inputtag="board:UI" inputmask="0x04"><bounds x="1" y="60.5" width="8" height="2.5" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x08"><bounds x="1" y="60.5" width="8" height="2.5" /><color alpha="0.25" /></bezel>
<!-- undo -->
<bezel element="text_uiu1"><bounds x="0" y="66" width="10" height="2" /></bezel>
@@ -417,10 +417,10 @@
<bezel element="text_uiu2c"><bounds x="5.2" y="69.5" width="1.7" height="4" /></bezel>
<bezel element="text_uiu2d"><bounds x="7.3" y="69.5" width="1.7" height="4" /></bezel>
- <bezel element="hlub" inputtag="board:UI" inputmask="0x08"><bounds x="1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
- <bezel element="hlub" inputtag="board:UI" inputmask="0x10"><bounds x="3.1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
- <bezel element="hlub" inputtag="board:UI" inputmask="0x20"><bounds x="5.2" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
- <bezel element="hlub" inputtag="board:UI" inputmask="0x40"><bounds x="7.3" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x10"><bounds x="1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x20"><bounds x="3.1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x40"><bounds x="5.2" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x80"><bounds x="7.3" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
<bezel name="count_ui0" element="text_uiu3a"><bounds x="0" y="75" width="4" height="2" /></bezel>
<bezel name="count_ui1" element="text_uiu3c"><bounds x="6" y="75" width="4" height="2" /></bezel>