summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/mame/drivers/cxgz80.cpp35
-rw-r--r--src/mame/drivers/fidelz80.cpp29
-rw-r--r--src/mame/drivers/hh_sm510.cpp2
-rw-r--r--src/mame/drivers/novag6502.cpp29
-rw-r--r--src/mame/includes/fidelbase.h6
-rw-r--r--src/mame/includes/novagbase.h6
6 files changed, 55 insertions, 52 deletions
diff --git a/src/mame/drivers/cxgz80.cpp b/src/mame/drivers/cxgz80.cpp
index cda23c4283d..f968762f8be 100644
--- a/src/mame/drivers/cxgz80.cpp
+++ b/src/mame/drivers/cxgz80.cpp
@@ -42,6 +42,9 @@ public:
m_dac(*this, "dac"),
m_speaker_off_timer(*this, "speaker_off"),
m_inp_matrix(*this, "IN.%u", 0),
+ m_out_x(*this, "%u.%u", 0U, 0U),
+ m_out_a(*this, "%u.a", 0U),
+ m_out_digit(*this, "digit%u", 0U),
m_display_wait(33),
m_display_maxy(1),
m_display_maxx(0)
@@ -52,6 +55,9 @@ public:
required_device<dac_bit_interface> m_dac;
required_device<timer_device> m_speaker_off_timer;
optional_ioport_array<10> m_inp_matrix; // max 10
+ output_finder<0x20, 0x20> m_out_x;
+ output_finder<0x20> m_out_a;
+ output_finder<0x20> m_out_digit;
TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE); }
TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE); }
@@ -94,6 +100,11 @@ protected:
void cxgz80_state::machine_start()
{
+ // resolve handlers
+ m_out_x.resolve();
+ m_out_a.resolve();
+ m_out_digit.resolve();
+
// zerofill
memset(m_display_state, 0, sizeof(m_display_state));
memset(m_display_cache, ~0, sizeof(m_display_cache));
@@ -158,29 +169,19 @@ void cxgz80_state::display_update()
for (int y = 0; y < m_display_maxy; y++)
if (m_display_cache[y] != active_state[y])
{
+ // output to digity
if (m_display_segmask[y] != 0)
- output().set_digit_value(y, active_state[y] & m_display_segmask[y]);
+ m_out_digit[y] = active_state[y] & m_display_segmask[y];
- const int mul = (m_display_maxx <= 10) ? 10 : 100;
for (int x = 0; x <= m_display_maxx; x++)
{
int state = active_state[y] >> x & 1;
- char buf1[0x10]; // lampyx
- char buf2[0x10]; // y.x
-
- if (x == m_display_maxx)
- {
- // always-on if selected
- sprintf(buf1, "lamp%da", y);
- sprintf(buf2, "%d.a", y);
- }
+
+ // output to y.x, or y.a when always-on
+ if (x != m_display_maxx)
+ m_out_x[y][x] = state;
else
- {
- sprintf(buf1, "lamp%d", y * mul + x);
- sprintf(buf2, "%d.%d", y, x);
- }
- output().set_value(buf1, state);
- output().set_value(buf2, state);
+ m_out_a[y] = state;
}
}
diff --git a/src/mame/drivers/fidelz80.cpp b/src/mame/drivers/fidelz80.cpp
index b84231b9373..808d9f3bd40 100644
--- a/src/mame/drivers/fidelz80.cpp
+++ b/src/mame/drivers/fidelz80.cpp
@@ -588,6 +588,11 @@ public:
void fidelbase_state::machine_start()
{
+ // resolve handlers
+ m_out_x.resolve();
+ m_out_a.resolve();
+ m_out_digit.resolve();
+
// zerofill
memset(m_display_state, 0, sizeof(m_display_state));
memset(m_display_cache, ~0, sizeof(m_display_cache));
@@ -658,29 +663,19 @@ void fidelbase_state::display_update()
for (int y = 0; y < m_display_maxy; y++)
if (m_display_cache[y] != active_state[y])
{
+ // output to digity
if (m_display_segmask[y] != 0)
- output().set_digit_value(y, active_state[y] & m_display_segmask[y]);
+ m_out_digit[y] = active_state[y] & m_display_segmask[y];
- const int mul = (m_display_maxx <= 10) ? 10 : 100;
for (int x = 0; x <= m_display_maxx; x++)
{
int state = active_state[y] >> x & 1;
- char buf1[0x10]; // lampyx
- char buf2[0x10]; // y.x
-
- if (x == m_display_maxx)
- {
- // always-on if selected
- sprintf(buf1, "lamp%da", y);
- sprintf(buf2, "%d.a", y);
- }
+
+ // output to y.x, or y.a when always-on
+ if (x != m_display_maxx)
+ m_out_x[y][x] = state;
else
- {
- sprintf(buf1, "lamp%d", y * mul + x);
- sprintf(buf2, "%d.%d", y, x);
- }
- output().set_value(buf1, state);
- output().set_value(buf2, state);
+ m_out_a[y] = state;
}
}
diff --git a/src/mame/drivers/hh_sm510.cpp b/src/mame/drivers/hh_sm510.cpp
index a82470a3d54..2e3caeff4f2 100644
--- a/src/mame/drivers/hh_sm510.cpp
+++ b/src/mame/drivers/hh_sm510.cpp
@@ -88,7 +88,7 @@ protected:
void hh_sm510_state::machine_start()
{
- // resolve output handlers
+ // resolve handlers
m_out_x.resolve();
// zerofill
diff --git a/src/mame/drivers/novag6502.cpp b/src/mame/drivers/novag6502.cpp
index ac8b53a1163..e941d8076f3 100644
--- a/src/mame/drivers/novag6502.cpp
+++ b/src/mame/drivers/novag6502.cpp
@@ -121,6 +121,11 @@ public:
void novagbase_state::machine_start()
{
+ // resolve handlers
+ m_out_x.resolve();
+ m_out_a.resolve();
+ m_out_digit.resolve();
+
// zerofill
memset(m_display_state, 0, sizeof(m_display_state));
memset(m_display_cache, ~0, sizeof(m_display_cache));
@@ -187,29 +192,19 @@ void novagbase_state::display_update()
for (int y = 0; y < m_display_maxy; y++)
if (m_display_cache[y] != active_state[y])
{
+ // output to digity
if (m_display_segmask[y] != 0)
- output().set_digit_value(y, active_state[y] & m_display_segmask[y]);
+ m_out_digit[y] = active_state[y] & m_display_segmask[y];
- const int mul = (m_display_maxx <= 10) ? 10 : 100;
for (int x = 0; x <= m_display_maxx; x++)
{
int state = active_state[y] >> x & 1;
- char buf1[0x10]; // lampyx
- char buf2[0x10]; // y.x
-
- if (x == m_display_maxx)
- {
- // always-on if selected
- sprintf(buf1, "lamp%da", y);
- sprintf(buf2, "%d.a", y);
- }
+
+ // output to y.x, or y.a when always-on
+ if (x != m_display_maxx)
+ m_out_x[y][x] = state;
else
- {
- sprintf(buf1, "lamp%d", y * mul + x);
- sprintf(buf2, "%d.%d", y, x);
- }
- output().set_value(buf1, state);
- output().set_value(buf2, state);
+ m_out_a[y] = state;
}
}
diff --git a/src/mame/includes/fidelbase.h b/src/mame/includes/fidelbase.h
index 7294035a010..f9d19348a30 100644
--- a/src/mame/includes/fidelbase.h
+++ b/src/mame/includes/fidelbase.h
@@ -25,6 +25,9 @@ public:
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_inp_matrix(*this, "IN.%u", 0),
+ m_out_x(*this, "%u.%u", 0U, 0U),
+ m_out_a(*this, "%u.a", 0U),
+ m_out_digit(*this, "digit%u", 0U),
m_speech(*this, "speech"),
m_speech_rom(*this, "speech"),
m_dac(*this, "dac"),
@@ -37,6 +40,9 @@ public:
// devices/pointers
required_device<cpu_device> m_maincpu;
optional_ioport_array<11> m_inp_matrix; // max 11
+ output_finder<0x20, 0x20> m_out_x;
+ output_finder<0x20> m_out_a;
+ output_finder<0x20> m_out_digit;
optional_device<s14001a_device> m_speech;
optional_region_ptr<u8> m_speech_rom;
optional_device<dac_bit_interface> m_dac;
diff --git a/src/mame/includes/novagbase.h b/src/mame/includes/novagbase.h
index 728066a9b96..43d051f4399 100644
--- a/src/mame/includes/novagbase.h
+++ b/src/mame/includes/novagbase.h
@@ -26,6 +26,9 @@ public:
m_beeper(*this, "beeper"),
m_lcd(*this, "hd44780"),
m_inp_matrix(*this, "IN.%u", 0),
+ m_out_x(*this, "%u.%u", 0U, 0U),
+ m_out_a(*this, "%u.a", 0U),
+ m_out_digit(*this, "digit%u", 0U),
m_display_wait(33),
m_display_maxy(1),
m_display_maxx(0)
@@ -37,6 +40,9 @@ public:
optional_device<beep_device> m_beeper;
optional_device<hd44780_device> m_lcd;
optional_ioport_array<9> m_inp_matrix; // max 9
+ output_finder<0x20, 0x20> m_out_x;
+ output_finder<0x20> m_out_a;
+ output_finder<0x20> m_out_digit;
// misc common
u16 m_inp_mux; // multiplexed keypad mask