summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Felipe CorrĂȘa da Silva Sanches <fsanches@metamaquina.com.br>2016-01-24 00:55:36 -0200
committer Felipe CorrĂȘa da Silva Sanches <fsanches@metamaquina.com.br>2016-01-24 00:55:36 -0200
commita39cd792fd45bd805f79b21989a46fb501fa821f (patch)
treeeb1dddb36dcf06823a97123b29679b98c509aa0d
parent8580ab5cb94127ca068de7dfcfadae9cca482a8d (diff)
[marywu] multiplex 7seg modules
-rw-r--r--src/mame/drivers/marywu.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/mame/drivers/marywu.cpp b/src/mame/drivers/marywu.cpp
index e93639c3928..4bc2ea0711f 100644
--- a/src/mame/drivers/marywu.cpp
+++ b/src/mame/drivers/marywu.cpp
@@ -30,14 +30,22 @@ public:
{ }
DECLARE_WRITE8_MEMBER(display_7seg_data_w);
+ DECLARE_WRITE8_MEMBER(multiplex_7seg_w);
+private:
+ uint8_t m_selected_7seg_module;
};
+WRITE8_MEMBER( marywu_state::multiplex_7seg_w )
+{
+ m_selected_7seg_module = data;
+}
+
WRITE8_MEMBER( marywu_state::display_7seg_data_w )
{
static const UINT8 patterns[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7c, 0x07, 0x7f, 0x67, 0, 0, 0, 0, 0, 0 }; // HEF4511BP (7 seg display driver)
- output_set_digit_value(0, patterns[data & 0x0F]);
- output_set_digit_value(1, patterns[(data >> 4) & 0x0F]);
+ output_set_digit_value(2 * m_selected_7seg_module + 0, patterns[data & 0x0F]);
+ output_set_digit_value(2 * m_selected_7seg_module + 1, patterns[(data >> 4) & 0x0F]);
}
static ADDRESS_MAP_START( program_map, AS_PROGRAM, 8, marywu_state )
@@ -60,7 +68,7 @@ static MACHINE_CONFIG_START( marywu , marywu_state )
/* Keyboard & display interface */
MCFG_DEVICE_ADD("i8279", I8279, XTAL_10_738635MHz) /* should it be perhaps a fraction of the XTAL clock ? */
-// MCFG_I8279_OUT_SL_CB(WRITE8(marywu_state, marywu_scanlines_w)) // scan SL lines
+ MCFG_I8279_OUT_SL_CB(WRITE8(marywu_state, multiplex_7seg_w)) // select block of 7seg modules by multiplexing the SL scan lines
// MCFG_I8279_IN_RL_CB(READ8(marywu_state, marywu_kbd_r)) // kbd RL lines
MCFG_I8279_OUT_DISP_CB(WRITE8(marywu_state, display_7seg_data_w))