summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Scott Stone <tafoid@gmail.com>2019-06-17 19:17:19 -0400
committer Scott Stone <tafoid@gmail.com>2019-06-17 19:17:19 -0400
commitb55fbb2999e5f3f338d3c2e17d39a199b76d6d30 (patch)
treeb04d8dac9bffa3a582a1f9449266ec07bbe92e89
parent36b6e1843b89e49fa1a42ae470f0a4384c88811f (diff)
parent8f12f3926be4e7ec05d874bf6e93292571eabce0 (diff)
Merge branch 'master' of https://github.com/mamedev/mame
-rw-r--r--src/devices/video/pwm.cpp4
-rw-r--r--src/devices/video/pwm.h5
-rw-r--r--src/mame/drivers/aci_boris.cpp6
-rw-r--r--src/mame/drivers/aci_ggm.cpp10
-rw-r--r--src/mame/drivers/ave_arb.cpp8
-rw-r--r--src/mame/drivers/fidel_as12.cpp8
-rw-r--r--src/mame/drivers/fidel_card.cpp8
-rw-r--r--src/mame/drivers/fidel_cc1.cpp8
-rw-r--r--src/mame/drivers/fidel_cc10.cpp8
-rw-r--r--src/mame/drivers/fidel_csc.cpp14
-rw-r--r--src/mame/drivers/fidel_dames.cpp8
-rw-r--r--src/mame/drivers/fidel_eag68k.cpp10
-rw-r--r--src/mame/drivers/fidel_elite.cpp10
-rw-r--r--src/mame/drivers/fidel_sc6.cpp8
-rw-r--r--src/mame/drivers/fidel_sc9.cpp8
-rw-r--r--src/mame/drivers/fidel_vcc.cpp8
-rw-r--r--src/mame/drivers/fidel_vsc.cpp10
-rw-r--r--src/mame/drivers/goldstar.cpp41
-rw-r--r--src/mame/drivers/hh_amis2k.cpp8
-rw-r--r--src/mame/drivers/hh_cop400.cpp91
-rw-r--r--src/mame/drivers/hh_hmcs40.cpp130
-rw-r--r--src/mame/drivers/hh_melps4.cpp16
-rw-r--r--src/mame/drivers/hh_pic16.cpp80
-rw-r--r--src/mame/drivers/hh_tms1k.cpp652
-rw-r--r--src/mame/drivers/hh_ucom4.cpp148
-rw-r--r--src/mame/drivers/k28.cpp6
-rw-r--r--src/mame/drivers/mindset.cpp53
-rw-r--r--src/mame/drivers/novag_cforte.cpp10
-rw-r--r--src/mame/drivers/scisys_cp2000.cpp8
-rw-r--r--src/mame/drivers/tispeak.cpp18
-rw-r--r--src/mame/drivers/tispellb.cpp8
-rw-r--r--src/mame/drivers/unkhorse.cpp6
-rw-r--r--src/mame/includes/goldstar.h1
-rw-r--r--src/mame/video/dpb_combiner.cpp142
-rw-r--r--src/mame/video/dpb_combiner.h30
35 files changed, 923 insertions, 666 deletions
diff --git a/src/devices/video/pwm.cpp b/src/devices/video/pwm.cpp
index 2f22b9843af..80f52c7bb86 100644
--- a/src/devices/video/pwm.cpp
+++ b/src/devices/video/pwm.cpp
@@ -141,7 +141,7 @@ pwm_display_device &pwm_display_device::set_bri_levels(double l0, double l1, dou
return *this;
}
-void pwm_display_device::segmask(u64 digits, u64 mask)
+pwm_display_device &pwm_display_device::set_segmask(u64 digits, u64 mask)
{
// set a segment mask per selected digit, but leave unselected ones alone
for (int y = 0; y < m_height; y++)
@@ -150,6 +150,8 @@ void pwm_display_device::segmask(u64 digits, u64 mask)
m_segmask[y] = mask;
digits >>= 1;
}
+
+ return *this;
}
void pwm_display_device::matrix_partial(u8 start, u8 height, u64 rowsel, u64 rowdata, bool upd)
diff --git a/src/devices/video/pwm.h b/src/devices/video/pwm.h
index 8c3eedb3473..6ef59e1f0db 100644
--- a/src/devices/video/pwm.h
+++ b/src/devices/video/pwm.h
@@ -20,7 +20,7 @@ public:
pwm_display_device &set_size(u8 numrows, u8 rowbits) { m_height = numrows; m_width = rowbits; return *this; } // max 64 * 64
pwm_display_device &set_refresh(attotime duration) { m_framerate_set = duration; return *this; } // time between each outputs refresh
pwm_display_device &set_interpolation(double factor) { m_interpolation = factor; return *this; } // frame interpolation (0.0 - 1.0)
- pwm_display_device &set_segmask(u64 digits, u64 mask) { segmask(digits, mask); return *this; } // mask for multi-state outputs, eg. 7seg led
+ pwm_display_device &set_segmask(u64 digits, u64 mask); // mask for multi-state outputs, eg. 7seg led
pwm_display_device &reset_segmask() { std::fill_n(m_segmask, ARRAY_LENGTH(m_segmask), 0); return *this; }
pwm_display_device &set_bri_levels(double l0, double l1 = 1.0, double l2 = 1.0, double l3 = 1.0); // brightness threshold per level (0.0 - 1.0)
pwm_display_device &set_bri_minimum(u8 i) { m_level_min = i; return *this; } // minimum level index for element to be considered "on"
@@ -33,9 +33,8 @@ public:
void reset_bri_levels() { std::fill_n(m_levels, ARRAY_LENGTH(m_levels), 1.0); }
void set_bri_one(u8 i, double level) { m_levels[i] = level; }
-
- void segmask(u64 digits, u64 mask);
void segmask_one(u8 y, u64 mask) { m_segmask[y] = mask; }
+
void matrix_partial(u8 start, u8 height, u64 rowsel, u64 rowdata, bool upd = true);
void matrix(u64 rowsel, u64 rowdata, bool upd = true) { matrix_partial(0, m_height, rowsel, rowdata, upd); }
void update(); // apply changes to m_rowdata
diff --git a/src/mame/drivers/aci_boris.cpp b/src/mame/drivers/aci_boris.cpp
index 8b5cca3278f..0165a7a4382 100644
--- a/src/mame/drivers/aci_boris.cpp
+++ b/src/mame/drivers/aci_boris.cpp
@@ -37,7 +37,7 @@ public:
boris_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
- m_inp_matrix(*this, "IN.%u", 0),
+ m_inputs(*this, "IN.%u", 0),
m_delay_display(*this, "delay_display_%u", 0),
m_out_digit(*this, "digit%u", 0U)
{ }
@@ -53,7 +53,7 @@ protected:
private:
// devices/pointers
required_device<cpu_device> m_maincpu;
- required_ioport_array<4> m_inp_matrix;
+ required_ioport_array<4> m_inputs;
required_device_array<timer_device, 8> m_delay_display;
output_finder<8> m_out_digit;
@@ -154,7 +154,7 @@ READ8_MEMBER(boris_state::input_r)
u8 data = m_io[0];
u8 sel = ~data & 7;
if (sel >= 4)
- data |= m_inp_matrix[sel-4]->read() << 4;
+ data |= m_inputs[sel-4]->read() << 4;
return data;
}
diff --git a/src/mame/drivers/aci_ggm.cpp b/src/mame/drivers/aci_ggm.cpp
index fa9a0707581..6a9964ac385 100644
--- a/src/mame/drivers/aci_ggm.cpp
+++ b/src/mame/drivers/aci_ggm.cpp
@@ -75,7 +75,7 @@ public:
m_cart(*this, "cartslot"),
m_ca1_off(*this, "ca1_off"),
m_delay_update(*this, "delay_update"),
- m_inp_matrix(*this, "IN.%u", 0),
+ m_inputs(*this, "IN.%u", 0),
m_out_digit(*this, "digit%u", 0U)
{ }
@@ -95,7 +95,7 @@ private:
required_device<generic_slot_device> m_cart;
required_device<timer_device> m_ca1_off;
required_device<timer_device> m_delay_update;
- required_ioport_array<6> m_inp_matrix;
+ required_ioport_array<6> m_inputs;
output_finder<8> m_out_digit;
void main_map(address_map &map);
@@ -143,7 +143,7 @@ void ggm_state::machine_start()
void ggm_state::machine_reset()
{
// it determines whether it's a cold boot or warm boot ("MEM" switch), with CA1
- if (~m_inp_matrix[4]->read() & 2)
+ if (~m_inputs[4]->read() & 2)
{
m_via->write_ca1(1);
m_ca1_off->adjust(attotime::from_msec(10));
@@ -244,12 +244,12 @@ READ8_MEMBER(ggm_state::input_r)
// PB1-PB5: multiplexed inputs
for (int i = 0; i < 4; i++)
if (BIT(m_digit_select, i))
- data |= m_inp_matrix[i]->read();
+ data |= m_inputs[i]->read();
data = ~data << 1 & 0x3e;
// PB6: hardware version
- return 0x81 | data | (m_inp_matrix[4]->read() << 6 & 0x40);
+ return 0x81 | data | (m_inputs[4]->read() << 6 & 0x40);
}
diff --git a/src/mame/drivers/ave_arb.cpp b/src/mame/drivers/ave_arb.cpp
index 152d7f69450..6a3742bbe4e 100644
--- a/src/mame/drivers/ave_arb.cpp
+++ b/src/mame/drivers/ave_arb.cpp
@@ -97,7 +97,7 @@ private:
u32 m_cart_mask;
// I/O handlers
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(leds_w);
DECLARE_WRITE8_MEMBER(control_w);
DECLARE_READ8_MEMBER(input_r);
@@ -133,7 +133,7 @@ READ8_MEMBER(arb_state::cartridge_r)
// R6522 ports
-void arb_state::prepare_display()
+void arb_state::update_display()
{
// 12 led column data lines via 3 7475
u16 mask = 0;
@@ -148,7 +148,7 @@ WRITE8_MEMBER(arb_state::leds_w)
{
// PA0-PA7: led latch input
m_led_latch = ~data & 0xff;
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(arb_state::control_w)
@@ -159,7 +159,7 @@ WRITE8_MEMBER(arb_state::control_w)
// PB4,PB5: led group select
m_led_select = data >> 4 & 3;
- prepare_display();
+ update_display();
// PB7: speaker out
m_dac->write(BIT(data, 7));
diff --git a/src/mame/drivers/fidel_as12.cpp b/src/mame/drivers/fidel_as12.cpp
index dc1c6ff940a..6a74dd44c20 100644
--- a/src/mame/drivers/fidel_as12.cpp
+++ b/src/mame/drivers/fidel_as12.cpp
@@ -45,7 +45,7 @@ private:
void main_map(address_map &map);
// I/O handlers
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(control_w);
DECLARE_WRITE8_MEMBER(led_w);
DECLARE_READ8_MEMBER(input_r);
@@ -58,7 +58,7 @@ private:
// TTL/generic
-void as12_state::prepare_display()
+void as12_state::update_display()
{
// 8*8(+1) chessboard leds
display_matrix(8, 9, m_led_data, m_inp_mux);
@@ -70,7 +70,7 @@ WRITE8_MEMBER(as12_state::control_w)
// 74245 Q0-Q8: input mux, led select
u16 sel = 1 << (data & 0xf) & 0x3ff;
m_inp_mux = bitswap<9>(sel,5,8,7,6,4,3,1,0,2);
- prepare_display();
+ update_display();
// 74245 Q9: speaker out
m_dac->write(BIT(sel, 9));
@@ -83,7 +83,7 @@ WRITE8_MEMBER(as12_state::led_w)
{
// a0-a2,d0: led data via NE591N
m_led_data = (data & 1) << offset;
- prepare_display();
+ update_display();
}
READ8_MEMBER(as12_state::input_r)
diff --git a/src/mame/drivers/fidel_card.cpp b/src/mame/drivers/fidel_card.cpp
index 4d2bf14b058..6a9fff06c8d 100644
--- a/src/mame/drivers/fidel_card.cpp
+++ b/src/mame/drivers/fidel_card.cpp
@@ -217,7 +217,7 @@ private:
u32 m_barcode;
// I/O handlers
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(speech_w);
DECLARE_WRITE8_MEMBER(mcu_p1_w);
DECLARE_READ8_MEMBER(mcu_p2_r);
@@ -241,7 +241,7 @@ void card_state::machine_start()
// misc handlers
-void card_state::prepare_display()
+void card_state::update_display()
{
// 14seg led segments, d15(12) is extra led
u16 outdata = bitswap<16>(m_7seg_data,12,13,1,6,5,2,0,7,15,11,10,14,4,3,9,8);
@@ -267,7 +267,7 @@ void card_state::ioexp_port_w(uint8_t data)
{
// P4x-P7x: digit segment data
m_7seg_data = (m_7seg_data & ~(0xf << (4*P))) | ((data & 0xf) << (4*P));
- prepare_display();
+ update_display();
// P71 is tone (not on speech model)
if (P == 3 && m_dac != nullptr)
@@ -281,7 +281,7 @@ WRITE8_MEMBER(card_state::mcu_p1_w)
{
// P10-P17: select digits, input mux
m_inp_mux = m_led_select = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(card_state::mcu_p2_r)
diff --git a/src/mame/drivers/fidel_cc1.cpp b/src/mame/drivers/fidel_cc1.cpp
index f8c6d79a348..16af08d0999 100644
--- a/src/mame/drivers/fidel_cc1.cpp
+++ b/src/mame/drivers/fidel_cc1.cpp
@@ -78,7 +78,7 @@ private:
void main_io(address_map &map);
// I/O handlers
- void prepare_display();
+ void update_display();
DECLARE_READ8_MEMBER(ppi_porta_r);
DECLARE_WRITE8_MEMBER(ppi_portb_w);
DECLARE_WRITE8_MEMBER(ppi_portc_w);
@@ -91,7 +91,7 @@ private:
// misc handlers
-void cc1_state::prepare_display()
+void cc1_state::update_display()
{
// 4 7segs + 2 leds
set_display_segmask(0xf, 0x7f);
@@ -118,7 +118,7 @@ WRITE8_MEMBER(cc1_state::ppi_portb_w)
{
// d0-d6: digit segment data
m_7seg_data = bitswap<7>(data,0,1,2,3,4,5,6);
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(cc1_state::ppi_portc_w)
@@ -130,7 +130,7 @@ WRITE8_MEMBER(cc1_state::ppi_portc_w)
// d0-d3: digit select
// d4: check led, d5: lose led
m_led_select = data;
- prepare_display();
+ update_display();
}
diff --git a/src/mame/drivers/fidel_cc10.cpp b/src/mame/drivers/fidel_cc10.cpp
index d36c52cf8be..ed9553b73c9 100644
--- a/src/mame/drivers/fidel_cc10.cpp
+++ b/src/mame/drivers/fidel_cc10.cpp
@@ -71,7 +71,7 @@ private:
void main_trampoline_w(offs_t offset, u8 data);
// I/O handlers
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(ppi_porta_w);
DECLARE_WRITE8_MEMBER(ppi_portb_w);
DECLARE_READ8_MEMBER(ppi_portc_r);
@@ -85,7 +85,7 @@ private:
// misc handlers
-void ccx_state::prepare_display()
+void ccx_state::update_display()
{
// 4 7segs + 2 leds
set_display_segmask(0xf, 0x7f);
@@ -106,7 +106,7 @@ WRITE8_MEMBER(ccx_state::ppi_porta_w)
// d0-d6: digit segment data
m_7seg_data = bitswap<8>(data,7,0,1,2,3,4,5,6);
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(ccx_state::ppi_portb_w)
@@ -114,7 +114,7 @@ WRITE8_MEMBER(ccx_state::ppi_portb_w)
// d0: lose led, d1: check(win) led
// d2-d5: digit select
m_led_select = bitswap<6>(data,0,1,5,4,3,2);
- prepare_display();
+ update_display();
}
READ8_MEMBER(ccx_state::ppi_portc_r)
diff --git a/src/mame/drivers/fidel_csc.cpp b/src/mame/drivers/fidel_csc.cpp
index 4127a2df34a..9b9e7eff40f 100644
--- a/src/mame/drivers/fidel_csc.cpp
+++ b/src/mame/drivers/fidel_csc.cpp
@@ -233,7 +233,7 @@ protected:
void rsc_map(address_map &map);
// I/O handlers
- void prepare_display();
+ void update_display();
DECLARE_READ8_MEMBER(speech_r);
DECLARE_WRITE8_MEMBER(pia0_pa_w);
DECLARE_WRITE8_MEMBER(pia0_pb_w);
@@ -282,7 +282,7 @@ void su9_state::su9_set_cpu_freq()
// misc handlers
-void csc_state::prepare_display()
+void csc_state::update_display()
{
// 7442 0-8: led select, input mux
m_inp_mux = 1 << m_led_select & 0x3ff;
@@ -313,14 +313,14 @@ WRITE8_MEMBER(csc_state::pia0_pa_w)
{
// d6,d7: 7442 A0,A1
m_led_select = (m_led_select & ~3) | (data >> 6 & 3);
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(csc_state::pia0_pb_w)
{
// d0-d7: led row data
m_led_data = data;
- prepare_display();
+ update_display();
}
READ_LINE_MEMBER(csc_state::pia0_ca1_r)
@@ -339,14 +339,14 @@ WRITE_LINE_MEMBER(csc_state::pia0_cb2_w)
{
// 7442 A2
m_led_select = (m_led_select & ~4) | (state ? 4 : 0);
- prepare_display();
+ update_display();
}
WRITE_LINE_MEMBER(csc_state::pia0_ca2_w)
{
// 7442 A3
m_led_select = (m_led_select & ~8) | (state ? 8 : 0);
- prepare_display();
+ update_display();
}
@@ -359,7 +359,7 @@ WRITE8_MEMBER(csc_state::pia1_pa_w)
// d0-d7: data for the 4 7seg leds, bits are ABFGHCDE (H is extra led)
m_7seg_data = bitswap<8>(data,0,1,5,6,7,2,3,4);
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(csc_state::pia1_pb_w)
diff --git a/src/mame/drivers/fidel_dames.cpp b/src/mame/drivers/fidel_dames.cpp
index c0fe1130d00..822ea58814a 100644
--- a/src/mame/drivers/fidel_dames.cpp
+++ b/src/mame/drivers/fidel_dames.cpp
@@ -45,7 +45,7 @@ private:
void main_map(address_map &map);
// I/O handlers
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(control_w);
DECLARE_WRITE8_MEMBER(select_w);
DECLARE_READ8_MEMBER(input_r);
@@ -58,7 +58,7 @@ private:
// TTL
-void dsc_state::prepare_display()
+void dsc_state::update_display()
{
// 4 7seg leds
set_display_segmask(0xf, 0x7f);
@@ -70,7 +70,7 @@ WRITE8_MEMBER(dsc_state::control_w)
// d0-d7: input mux, 7seg data
m_inp_mux = ~data;
m_7seg_data = data;
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(dsc_state::select_w)
@@ -80,7 +80,7 @@ WRITE8_MEMBER(dsc_state::select_w)
// d0-d3: digit select
m_led_select = data & 0xf;
- prepare_display();
+ update_display();
}
READ8_MEMBER(dsc_state::input_r)
diff --git a/src/mame/drivers/fidel_eag68k.cpp b/src/mame/drivers/fidel_eag68k.cpp
index 4140ca5d287..f81693c304c 100644
--- a/src/mame/drivers/fidel_eag68k.cpp
+++ b/src/mame/drivers/fidel_eag68k.cpp
@@ -201,7 +201,7 @@ protected:
void eagv10_map(address_map &map);
// I/O handlers
- void prepare_display();
+ void update_display();
virtual DECLARE_WRITE8_MEMBER(mux_w);
DECLARE_READ8_MEMBER(input1_r);
DECLARE_READ8_MEMBER(input2_r);
@@ -265,7 +265,7 @@ private:
// TTL/generic
-void eag_state::prepare_display()
+void eag_state::update_display()
{
// Excel 68000: 4*7seg leds, 8*8 chessboard leds
// EAG: 8*7seg leds(2 panels), (8+1)*8 chessboard leds
@@ -286,7 +286,7 @@ WRITE8_MEMBER(eag_state::mux_w)
u16 sel = 1 << (m_led_select & 0xf);
m_dac->write(BIT(sel, 9));
m_inp_mux = sel & 0x1ff;
- prepare_display();
+ update_display();
}
READ8_MEMBER(eag_state::input1_r)
@@ -305,14 +305,14 @@ WRITE8_MEMBER(eag_state::leds_w)
{
// a1-a3,d0: led data
m_led_data = (m_led_data & ~(1 << offset)) | ((data & 1) << offset);
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(eag_state::digit_w)
{
// a1-a3,d0(d8): digit segment data
m_7seg_data = (m_7seg_data & ~(1 << offset)) | ((data & 1) << offset);
- prepare_display();
+ update_display();
}
diff --git a/src/mame/drivers/fidel_elite.cpp b/src/mame/drivers/fidel_elite.cpp
index 458d9e21dfe..c2d8422e4bd 100644
--- a/src/mame/drivers/fidel_elite.cpp
+++ b/src/mame/drivers/fidel_elite.cpp
@@ -92,7 +92,7 @@ private:
void pc_map(address_map &map);
// I/O handlers
- void prepare_display();
+ void update_display();
DECLARE_READ8_MEMBER(speech_r);
DECLARE_WRITE8_MEMBER(segment_w);
DECLARE_WRITE8_MEMBER(led_w);
@@ -114,7 +114,7 @@ void elite_state::init_eag2100()
// TTL/generic
-void elite_state::prepare_display()
+void elite_state::update_display()
{
// 4/8 7seg leds+H, 8*8(+1) chessboard leds
set_display_segmask(0x1ef, 0x7f);
@@ -131,14 +131,14 @@ WRITE8_MEMBER(elite_state::segment_w)
// a0-a2,d7: digit segment
m_7seg_data = (data & 0x80) >> offset;
m_7seg_data = bitswap<8>(m_7seg_data,7,6,4,5,0,2,1,3);
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(elite_state::led_w)
{
// a0-a2,d0: led data
m_led_data = (data & 1) << offset;
- prepare_display();
+ update_display();
}
READ8_MEMBER(elite_state::input_r)
@@ -166,7 +166,7 @@ WRITE8_MEMBER(elite_state::ppi_portc_w)
// 7442 0-8: led select, input mux
m_led_select = 1 << (data & 0xf) & 0x3ff;
m_inp_mux = m_led_select & 0x1ff;
- prepare_display();
+ update_display();
// 7442 9: speaker out
m_dac->write(BIT(m_led_select, 9));
diff --git a/src/mame/drivers/fidel_sc6.cpp b/src/mame/drivers/fidel_sc6.cpp
index 824f08d22c9..b2e96892ace 100644
--- a/src/mame/drivers/fidel_sc6.cpp
+++ b/src/mame/drivers/fidel_sc6.cpp
@@ -56,7 +56,7 @@ private:
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cartridge);
// I/O handlers
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(mux_w);
DECLARE_WRITE8_MEMBER(select_w);
DECLARE_READ8_MEMBER(input_r);
@@ -91,7 +91,7 @@ DEVICE_IMAGE_LOAD_MEMBER(sc6_state, cartridge)
// MCU ports/generic
-void sc6_state::prepare_display()
+void sc6_state::update_display()
{
// 2 7seg leds
set_display_segmask(3, 0x7f);
@@ -106,7 +106,7 @@ WRITE8_MEMBER(sc6_state::mux_w)
// 7442 0-8: input mux, 7seg data
m_inp_mux = sel & 0x1ff;
m_7seg_data = sel & 0x7f;
- prepare_display();
+ update_display();
// 7442 9: speaker out
m_dac->write(BIT(sel, 9));
@@ -116,7 +116,7 @@ WRITE8_MEMBER(sc6_state::select_w)
{
// P16,P17: digit select
m_led_select = ~data >> 6 & 3;
- prepare_display();
+ update_display();
}
READ8_MEMBER(sc6_state::input_r)
diff --git a/src/mame/drivers/fidel_sc9.cpp b/src/mame/drivers/fidel_sc9.cpp
index 4b8261b72f9..c0bb6e2bef0 100644
--- a/src/mame/drivers/fidel_sc9.cpp
+++ b/src/mame/drivers/fidel_sc9.cpp
@@ -58,7 +58,7 @@ protected:
void sc9d_map(address_map &map);
// I/O handlers
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(control_w);
DECLARE_WRITE8_MEMBER(led_w);
DECLARE_READ8_MEMBER(input_r);
@@ -99,7 +99,7 @@ void sc9c_state::sc9c_set_cpu_freq()
// TTL/generic
-void sc9_state::prepare_display()
+void sc9_state::update_display()
{
// 8*8 chessboard leds + 1 corner led
display_matrix(8, 9, m_led_data, m_inp_mux);
@@ -111,7 +111,7 @@ WRITE8_MEMBER(sc9_state::control_w)
// 74245 Q0-Q8: input mux, led select
u16 sel = 1 << (data & 0xf) & 0x3ff;
m_inp_mux = sel & 0x1ff;
- prepare_display();
+ update_display();
// 74245 Q9: speaker out
m_dac->write(BIT(sel, 9));
@@ -124,7 +124,7 @@ WRITE8_MEMBER(sc9_state::led_w)
{
// a0-a2,d0: led data via NE591N
m_led_data = (data & 1) << offset;
- prepare_display();
+ update_display();
}
READ8_MEMBER(sc9_state::input_r)
diff --git a/src/mame/drivers/fidel_vcc.cpp b/src/mame/drivers/fidel_vcc.cpp
index dfdfc2cb44c..6c7e3abe8da 100644
--- a/src/mame/drivers/fidel_vcc.cpp
+++ b/src/mame/drivers/fidel_vcc.cpp
@@ -138,7 +138,7 @@ private:
void main_io(address_map &map);
// I/O handlers
- void prepare_display();
+ void update_display();
DECLARE_READ8_MEMBER(speech_r);
DECLARE_WRITE8_MEMBER(ppi_porta_w);
DECLARE_READ8_MEMBER(ppi_portb_r);
@@ -163,7 +163,7 @@ void vcc_state::machine_start()
// misc handlers
-void vcc_state::prepare_display()
+void vcc_state::update_display()
{
// 4 7seg leds (note: sel d0 for extra leds)
u8 outdata = (m_7seg_data & 0x7f) | (m_led_select << 7 & 0x80);
@@ -183,7 +183,7 @@ WRITE8_MEMBER(vcc_state::ppi_porta_w)
{
// d0-d6: digit segment data, bits are xABCDEFG
m_7seg_data = bitswap<8>(data,7,0,1,2,3,4,5,6);
- prepare_display();
+ update_display();
// d0-d5: TSI C0-C5
// d7: TSI START line
@@ -210,7 +210,7 @@ WRITE8_MEMBER(vcc_state::ppi_portb_w)
// d0,d2-d5: digit/led select
// _d6: enable language switches
m_led_select = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(vcc_state::ppi_portc_r)
diff --git a/src/mame/drivers/fidel_vsc.cpp b/src/mame/drivers/fidel_vsc.cpp
index fab9b75e647..a47c3648ec3 100644
--- a/src/mame/drivers/fidel_vsc.cpp
+++ b/src/mame/drivers/fidel_vsc.cpp
@@ -182,7 +182,7 @@ private:
DECLARE_WRITE8_MEMBER(main_io_trampoline_w);
// I/O handlers
- void prepare_display();
+ void update_display();
DECLARE_READ8_MEMBER(speech_r);
DECLARE_WRITE8_MEMBER(ppi_porta_w);
DECLARE_WRITE8_MEMBER(ppi_portb_w);
@@ -199,7 +199,7 @@ private:
// misc handlers
-void vsc_state::prepare_display()
+void vsc_state::update_display()
{
// 4 7seg leds+H, 8*8 chessboard leds
set_display_segmask(0xf, 0x7f);
@@ -221,14 +221,14 @@ WRITE8_MEMBER(vsc_state::ppi_porta_w)
// d0-d7: data for the 4 7seg leds, bits are HGCBAFED (H is extra led)
m_7seg_data = bitswap<8>(data,7,6,2,1,0,5,4,3);
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(vsc_state::ppi_portb_w)
{
// d0-d7: led row data
m_led_data = data;
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(vsc_state::ppi_portc_w)
@@ -237,7 +237,7 @@ WRITE8_MEMBER(vsc_state::ppi_portc_w)
// d0-d7: select leds, input mux low bits
m_inp_mux = (m_inp_mux & ~0xff) | data;
m_led_select = data;
- prepare_display();
+ update_display();
}
diff --git a/src/mame/drivers/goldstar.cpp b/src/mame/drivers/goldstar.cpp
index 9be1164c8a6..f25318b9d52 100644
--- a/src/mame/drivers/goldstar.cpp
+++ b/src/mame/drivers/goldstar.cpp
@@ -11096,7 +11096,10 @@ ROM_END
// the program roms on these seem scrambled somehow
ROM_START( jkrmast )
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "pid-515.u5", 0x0000, 0x10000, CRC(73caf824) SHA1(b7a7bb6190465f7c3b40f2ef97f4f6beeb89ec41) )
+ ROM_LOAD( "pid-515.u5", 0x4000, 0x4000, CRC(73caf824) SHA1(b7a7bb6190465f7c3b40f2ef97f4f6beeb89ec41) )
+ ROM_CONTINUE(0x0000, 0x4000)
+ ROM_CONTINUE(0xc000, 0x4000)
+ ROM_CONTINUE(0x8000, 0x4000)
ROM_REGION( 0x20000, "gfx1", 0 )
ROM_LOAD( "2000b.u48", 0x00000, 0x20000, CRC(e7b406ec) SHA1(c0a10cf8bf5467ecfe3c90e6897db3ab9aae0127) )
@@ -11113,7 +11116,10 @@ ROM_END
ROM_START( jkrmasta )
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "pid-513.u5", 0x0000, 0x10000, CRC(12fa7ea0) SHA1(71ee141fe01ae2ce9913620b52c54cf445fd0b00) )
+ ROM_LOAD( "pid-513.u5", 0x4000, 0x4000, CRC(12fa7ea0) SHA1(71ee141fe01ae2ce9913620b52c54cf445fd0b00) )
+ ROM_CONTINUE(0x0000, 0x4000)
+ ROM_CONTINUE(0xc000, 0x4000)
+ ROM_CONTINUE(0x8000, 0x4000)
ROM_REGION( 0x20000, "gfx1", 0 )
ROM_LOAD( "2000b.u48", 0x00000, 0x20000, CRC(e7b406ec) SHA1(c0a10cf8bf5467ecfe3c90e6897db3ab9aae0127) )
@@ -15951,6 +15957,33 @@ void goldstar_state::init_goldstar()
}
}
+void goldstar_state::init_jkrmast()
+{
+ uint8_t *ROM = memregion("maincpu")->base();
+
+ for (int A = 0; A < 0x8000; A++)
+ {
+ uint8_t x = ROM[A];
+ x = bitswap<8>(x ^ 0x0a, 5, 6, 1, 4, 7, 2, 3, 0);
+ ROM[A] = x;
+ }
+
+ uint8_t buf[0x8000];
+ memcpy(buf, ROM, 0x8000);
+
+ for (int i = 0; i < 0x8000; i++)
+ {
+ if ((i & 0x60) == 0x00)
+ ROM[i] = buf[i^0x08];
+ else if ((i & 0x60) == 0x60)
+ ROM[i] = buf[i^0x10];
+ else if ((i & 0x60) == 0x40)
+ ROM[i] = buf[i^0x18];
+ else if ((i & 0x60) == 0x20)
+ ROM[i] = buf[i];
+ }
+}
+
// this block swapping is the same for chry10, chrygld and cb3
// the underlying bitswaps / xors are different however
void cb3_state::do_blockswaps(uint8_t* ROM)
@@ -16749,8 +16782,8 @@ GAMEL( 1991, cmasterh, cmaster, cm, cmasterb, cmaster_state, init_cmv4,
GAMEL( 199?, super7, cmaster, cm, cmaster, cmaster_state, init_super7, ROT0, "bootleg", "Super Seven", MACHINE_NOT_WORKING, layout_cmasterb )
GAMEL( 1991, tonypok, 0, cm, tonypok, cmaster_state, init_tonypok, ROT0, "Corsica", "Poker Master (Tony-Poker V3.A, hack?)", 0 , layout_tonypok )
-GAME( 199?, jkrmast, 0, pkrmast, pkrmast, goldstar_state, empty_init, ROT0, "<unknown>", "Joker Master (V515)", MACHINE_NOT_WORKING ) // encrypted
-GAME( 199?, jkrmasta, jkrmast, pkrmast, pkrmast, goldstar_state, empty_init, ROT0, "<unknown>", "Joker Master (V512)", MACHINE_NOT_WORKING ) // encrypted
+GAME( 1999, jkrmast, 0, pkrmast, pkrmast, goldstar_state, init_jkrmast, ROT0, "Pick-A-Party USA", "Joker Master (V515)", MACHINE_NOT_WORKING ) // encryption broken, needs GFX and controls
+GAME( 1999, jkrmasta, jkrmast, pkrmast, pkrmast, goldstar_state, init_jkrmast, ROT0, "Pick-A-Party USA", "Joker Master (V512)", MACHINE_NOT_WORKING ) // encryption broken, needs GFX and controls
GAME( 199?, pkrmast, jkrmast, pkrmast, pkrmast, goldstar_state, empty_init, ROT0, "<unknown>", "Poker Master (ED-1993 set 1)", MACHINE_NOT_WORKING ) // incomplete dump + encrypted?
GAME( 1993, pkrmasta, jkrmast, pkrmast, pkrmast, goldstar_state, empty_init, ROT0, "<unknown>", "Poker Master (ED-1993 set 2)", MACHINE_NOT_WORKING ) // incomplete dump + encrypted?
diff --git a/src/mame/drivers/hh_amis2k.cpp b/src/mame/drivers/hh_amis2k.cpp
index 2218f92a791..697214f2b8b 100644
--- a/src/mame/drivers/hh_amis2k.cpp
+++ b/src/mame/drivers/hh_amis2k.cpp
@@ -145,7 +145,7 @@ public:
hh_amis2k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(write_d);
DECLARE_WRITE16_MEMBER(write_a);
DECLARE_WRITE_LINE_MEMBER(write_f);
@@ -185,7 +185,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(wildfire_state::speaker_decay_sim)
m_speaker_volume /= 1.0025;
}
-void wildfire_state::prepare_display()
+void wildfire_state::update_display()
{
m_display->matrix(~m_a, m_d);
}
@@ -194,7 +194,7 @@ WRITE8_MEMBER(wildfire_state::write_d)
{
// D0-D7: led/7seg data
m_d = bitswap<8>(data,7,0,1,2,3,4,5,6);
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(wildfire_state::write_a)
@@ -202,7 +202,7 @@ WRITE16_MEMBER(wildfire_state::write_a)
// A0-A2: digit select
// A3-A11: led select
m_a = data;
- prepare_display();
+ update_display();
// A12: speaker on
speaker_update();
diff --git a/src/mame/drivers/hh_cop400.cpp b/src/mame/drivers/hh_cop400.cpp
index 7ad308e8e02..f63b67bb5d0 100644
--- a/src/mame/drivers/hh_cop400.cpp
+++ b/src/mame/drivers/hh_cop400.cpp
@@ -294,8 +294,6 @@ WRITE8_MEMBER(h2hbaskbc_state::write_l)
u16 sel = (m_g | m_d << 4 | m_g << 8 | m_d << 12) & mask;
// D2+G0,G1 are 7segs
- m_display->segmask(3, 0x7f);
-
// L0-L6: digit segments A-G, L0-L4: led data
m_display->matrix(sel, data);
}
@@ -370,6 +368,7 @@ void h2hbaskbc_state::h2hbaskbc(machine_config &config)
/* video hardware */
PWM_DISPLAY(config, m_display).set_size(16, 7);
+ m_display->set_segmask(3, 0x7f);
config.set_default_layout(layout_h2hbaskbc);
/* sound hardware */
@@ -421,7 +420,7 @@ public:
hh_cop400_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(write_d);
DECLARE_WRITE8_MEMBER(write_g);
DECLARE_WRITE_LINE_MEMBER(write_sk);
@@ -432,7 +431,7 @@ public:
// handlers
-void einvaderc_state::prepare_display()
+void einvaderc_state::update_display()
{
u8 l = bitswap<8>(m_l,7,6,0,1,2,3,4,5);
u16 grid = (m_d | m_g << 4 | m_sk << 8 | m_so << 9) ^ 0x0ff;
@@ -444,14 +443,14 @@ WRITE8_MEMBER(einvaderc_state::write_d)
{
// D: led grid 0-3 (D0-D2 are 7segs)
m_d = data;
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(einvaderc_state::write_g)
{
// G: led grid 4-7
m_g = data;
- prepare_display();
+ update_display();
}
WRITE_LINE_MEMBER(einvaderc_state::write_sk)
@@ -459,21 +458,21 @@ WRITE_LINE_MEMBER(einvaderc_state::write_sk)
// SK: speaker out + led grid 8
m_speaker->level_w(state);
m_sk = state;
- prepare_display();
+ update_display();
}
WRITE_LINE_MEMBER(einvaderc_state::write_so)
{
// SO: led grid 9
m_so = state;
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(einvaderc_state::write_l)
{
// L: led state/segment
m_l = data;
- prepare_display();
+ update_display();
}
// config
@@ -550,19 +549,19 @@ public:
hh_cop400_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(write_g);
DECLARE_WRITE8_MEMBER(write_d);
DECLARE_WRITE8_MEMBER(write_l);
DECLARE_READ8_MEMBER(read_l);
- DECLARE_INPUT_CHANGED_MEMBER(position_changed) { prepare_display(); }
+ DECLARE_INPUT_CHANGED_MEMBER(position_changed) { update_display(); }
void unkeinv(machine_config &config);
};
// handlers
-void unkeinv_state::prepare_display()
+void unkeinv_state::update_display()
{
m_display->matrix(m_l, m_g << 4 | m_d, false);
@@ -577,21 +576,21 @@ WRITE8_MEMBER(unkeinv_state::write_g)
// G0-G3: led select part
// G2,G3: input mux
m_g = ~data & 0xf;
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(unkeinv_state::write_d)
{
// D0-D3: led select part
m_d = ~data & 0xf;
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(unkeinv_state::write_l)
{
// L0-L7: led data
m_l = ~data & 0xff;
- prepare_display();
+ update_display();
}
READ8_MEMBER(unkeinv_state::read_l)
@@ -835,6 +834,7 @@ public:
hh_cop400_state(mconfig, type, tag)
{ }
+ void update_display();
DECLARE_WRITE8_MEMBER(write_d);
DECLARE_WRITE8_MEMBER(write_l);
DECLARE_WRITE8_MEMBER(write_g);
@@ -845,19 +845,24 @@ public:
// handlers
+void funjacks_state::update_display()
+{
+ m_display->matrix(m_d, m_l);
+}
+
WRITE8_MEMBER(funjacks_state::write_d)
{
// D: led grid + input mux
m_inp_mux = data;
m_d = ~data & 0xf;
- m_display->matrix(m_d, m_l);
+ update_display();
}
WRITE8_MEMBER(funjacks_state::write_l)
{
// L0,L1: led state
m_l = data & 3;
- m_display->matrix(m_d, m_l);
+ update_display();
}
WRITE8_MEMBER(funjacks_state::write_g)
@@ -954,6 +959,7 @@ public:
hh_cop400_state(mconfig, type, tag)
{ }
+ void update_display();
DECLARE_WRITE8_MEMBER(write_d);
DECLARE_WRITE8_MEMBER(write_l);
DECLARE_WRITE8_MEMBER(write_g);
@@ -962,11 +968,16 @@ public:
// handlers
+void funrlgl_state::update_display()
+{
+ m_display->matrix(m_d, m_l);
+}
+
WRITE8_MEMBER(funrlgl_state::write_d)
{
// D: led grid
m_d = ~data & 0xf;
- m_display->matrix(m_d, m_l);
+ update_display();
}
WRITE8_MEMBER(funrlgl_state::write_l)
@@ -974,7 +985,7 @@ WRITE8_MEMBER(funrlgl_state::write_l)
// L0-L3: led state
// L4-L7: N/C
m_l = ~data & 0xf;
- m_display->matrix(m_d, m_l);
+ update_display();
}
WRITE8_MEMBER(funrlgl_state::write_g)
@@ -1047,7 +1058,7 @@ public:
hh_cop400_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(write_l);
DECLARE_WRITE8_MEMBER(write_d);
DECLARE_WRITE8_MEMBER(write_g);
@@ -1057,7 +1068,7 @@ public:
// handlers
-void mdallas_state::prepare_display()
+void mdallas_state::update_display()
{
m_display->matrix(~(m_d << 4 | m_g), m_l);
}
@@ -1066,7 +1077,7 @@ WRITE8_MEMBER(mdallas_state::write_l)
{
// L: digit segment data
m_l = data;
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(mdallas_state::write_d)
@@ -1074,7 +1085,7 @@ WRITE8_MEMBER(mdallas_state::write_d)
// D: select digit, input mux high
m_inp_mux = (m_inp_mux & 0xf) | (data << 4 & 3);
m_d = data & 0xf;
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(mdallas_state::write_g)
@@ -1082,7 +1093,7 @@ WRITE8_MEMBER(mdallas_state::write_g)
// G: select digit, input mux low
m_inp_mux = (m_inp_mux & 0x30) | (data & 0xf);
m_g = data & 0xf;
- prepare_display();
+ update_display();
}
READ8_MEMBER(mdallas_state::read_in)
@@ -1288,7 +1299,7 @@ public:
hh_cop400_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE_LINE_MEMBER(write_so);
DECLARE_WRITE8_MEMBER(write_d);
DECLARE_WRITE8_MEMBER(write_l);
@@ -1298,7 +1309,7 @@ public:
// handlers
-void lightfgt_state::prepare_display()
+void lightfgt_state::update_display()
{
u8 grid = (m_so | m_d << 1) ^ 0x1f;
m_display->matrix(grid, m_l);
@@ -1308,14 +1319,14 @@ WRITE_LINE_MEMBER(lightfgt_state::write_so)
{
// SO: led grid 0 (and input mux)
m_so = state;
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(lightfgt_state::write_d)
{
// D: led grid 1-4 (and input mux)
m_d = data;
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(lightfgt_state::write_l)
@@ -1323,7 +1334,7 @@ WRITE8_MEMBER(lightfgt_state::write_l)
// L0-L4: led state
// L5-L7: N/C
m_l = data & 0x1f;
- prepare_display();
+ update_display();
}
READ8_MEMBER(lightfgt_state::read_g)
@@ -1580,7 +1591,7 @@ public:
hh_cop400_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(write_d);
DECLARE_WRITE8_MEMBER(write_g);
DECLARE_WRITE8_MEMBER(write_l);
@@ -1591,7 +1602,7 @@ public:
// handlers
-void qkracer_state::prepare_display()
+void qkracer_state::update_display()
{
m_display->matrix(~(m_d | m_g << 4 | m_sk << 8), m_l);
}
@@ -1601,7 +1612,7 @@ WRITE8_MEMBER(qkracer_state::write_d)
// D: select digit, D3: input mux high bit
m_inp_mux = (m_inp_mux & 0xf) | (data << 1 & 0x10);
m_d = data & 0xf;
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(qkracer_state::write_g)
@@ -1609,14 +1620,14 @@ WRITE8_MEMBER(qkracer_state::write_g)
// G: select digit, input mux
m_inp_mux = (m_inp_mux & 0x10) | (data & 0xf);
m_g = data & 0xf;
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(qkracer_state::write_l)
{
// L0-L6: digit segment data
m_l = data & 0x7f;
- prepare_display();
+ update_display();
}
READ8_MEMBER(qkracer_state::read_in)
@@ -1629,7 +1640,7 @@ WRITE_LINE_MEMBER(qkracer_state::write_sk)
{
// SK: green led
m_sk = state;
- prepare_display();
+ update_display();
}
// config
@@ -1721,7 +1732,7 @@ public:
hh_cop400_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(write_d);
DECLARE_WRITE8_MEMBER(write_l);
DECLARE_WRITE_LINE_MEMBER(write_sk);
@@ -1730,7 +1741,7 @@ public:
// handlers
-void vidchal_state::prepare_display()
+void vidchal_state::update_display()
{
m_display->matrix(m_d | m_sk << 6, m_l);
}
@@ -1739,21 +1750,21 @@ WRITE8_MEMBER(vidchal_state::write_d)
{
// D: CD4028BE to digit select
m_d = 1 << data & 0x3f;
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(vidchal_state::write_l)
{
// L: digit segment data
m_l = bitswap<8>(data,0,3,1,5,4,7,2,6);
- prepare_display();
+ update_display();
}
WRITE_LINE_MEMBER(vidchal_state::write_sk)
{
// SK: hit led
m_sk = state;
- prepare_display();
+ update_display();
}
// config
diff --git a/src/mame/drivers/hh_hmcs40.cpp b/src/mame/drivers/hh_hmcs40.cpp
index 73069a313b6..78180cfefef 100644
--- a/src/mame/drivers/hh_hmcs40.cpp
+++ b/src/mame/drivers/hh_hmcs40.cpp
@@ -371,7 +371,7 @@ public:
hh_hmcs40_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(plate_w);
DECLARE_WRITE16_MEMBER(grid_w);
DECLARE_READ8_MEMBER(input_r);
@@ -380,7 +380,7 @@ public:
// handlers
-void bmboxing_state::prepare_display()
+void bmboxing_state::update_display()
{
u16 grid = bitswap<16>(m_grid,15,14,13,12,11,10,9,0,1,2,3,4,5,6,7,8);
u32 plate = bitswap<16>(m_plate,15,14,13,12,1,2,0,3,11,4,10,7,5,6,9,8);
@@ -392,7 +392,7 @@ WRITE8_MEMBER(bmboxing_state::plate_w)
// R1x-R3x: vfd plate
int shift = (offset - 1) * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(bmboxing_state::grid_w)
@@ -405,7 +405,7 @@ WRITE16_MEMBER(bmboxing_state::grid_w)
// D4-D12: vfd grid
m_grid = data >> 4 & 0x1ff;
- prepare_display();
+ update_display();
}
READ8_MEMBER(bmboxing_state::input_r)
@@ -518,7 +518,7 @@ public:
hh_hmcs40_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(plate_w);
DECLARE_WRITE16_MEMBER(grid_w);
@@ -529,7 +529,7 @@ public:
// handlers
-void bfriskyt_state::prepare_display()
+void bfriskyt_state::update_display()
{
u16 grid = bitswap<16>(m_grid,15,14,13,12,11,10,9,8,0,1,2,3,4,5,6,7);
u32 plate = bitswap<24>(m_plate,23,22,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21);
@@ -541,7 +541,7 @@ WRITE8_MEMBER(bfriskyt_state::plate_w)
// R0x-R3x: vfd plate
int shift = offset * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(bfriskyt_state::grid_w)
@@ -562,7 +562,7 @@ WRITE16_MEMBER(bfriskyt_state::grid_w)
// D0-D5: more plates
m_plate = (m_plate & 0x00ffff) | (data << 16 & 0x3f0000);
- prepare_display();
+ update_display();
}
void bfriskyt_state::update_int1()
@@ -1019,7 +1019,7 @@ public:
hh_hmcs40_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(plate_w);
DECLARE_WRITE16_MEMBER(grid_w);
@@ -1030,7 +1030,7 @@ public:
// handlers
-void bpengo_state::prepare_display()
+void bpengo_state::update_display()
{
u8 grid = bitswap<8>(m_grid,0,1,2,3,4,5,6,7);
u32 plate = bitswap<32>(m_plate,31,30,29,28,23,22,21,16,17,18,19,20,27,26,25,24,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0);
@@ -1042,7 +1042,7 @@ WRITE8_MEMBER(bpengo_state::plate_w)
// R0x-R6x: vfd plate
int shift = offset * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(bpengo_state::grid_w)
@@ -1060,7 +1060,7 @@ WRITE16_MEMBER(bpengo_state::grid_w)
// D0-D7: vfd grid
m_grid = data & 0xff;
- prepare_display();
+ update_display();
}
void bpengo_state::update_int0()
@@ -1152,7 +1152,7 @@ public:
hh_hmcs40_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(plate_w);
DECLARE_WRITE16_MEMBER(grid_w);
@@ -1163,7 +1163,7 @@ public:
// handlers
-void bbtime_state::prepare_display()
+void bbtime_state::update_display()
{
u8 grid = bitswap<8>(m_grid,7,6,0,1,2,3,4,5);
u32 plate = bitswap<32>(m_plate,31,30,29,28,25,24,26,27,22,23,15,14,12,11,10,8,7,6,4,1,5,9,13,3,2,16,17,18,19,20,0,21) | 0x1;
@@ -1175,7 +1175,7 @@ WRITE8_MEMBER(bbtime_state::plate_w)
// R0x-R6x: vfd plate
int shift = offset * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(bbtime_state::grid_w)
@@ -1193,7 +1193,7 @@ WRITE16_MEMBER(bbtime_state::grid_w)
// D4-D9: vfd grid
m_grid = data >> 4 & 0x3f;
- prepare_display();
+ update_display();
}
void bbtime_state::update_int0()
@@ -1491,7 +1491,7 @@ public:
hh_hmcs40_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(plate_w);
DECLARE_WRITE16_MEMBER(grid_w);
void machiman(machine_config &config);
@@ -1499,7 +1499,7 @@ public:
// handlers
-void machiman_state::prepare_display()
+void machiman_state::update_display()
{
u32 plate = bitswap<24>(m_plate,23,22,21,20,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18);
m_display->matrix(m_grid, plate);
@@ -1510,7 +1510,7 @@ WRITE8_MEMBER(machiman_state::plate_w)
// R0x-R3x,R6012: vfd plate
int shift = (offset == 6) ? 16 : offset * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(machiman_state::grid_w)
@@ -1520,7 +1520,7 @@ WRITE16_MEMBER(machiman_state::grid_w)
// D0-D4: vfd grid
m_grid = data & 0x1f;
- prepare_display();
+ update_display();
}
// config
@@ -1601,6 +1601,7 @@ public:
required_device<hmcs40_cpu_device> m_audiocpu;
required_device_array<generic_latch_8_device, 2> m_soundlatch;
+ void update_display();
DECLARE_WRITE8_MEMBER(plate_w);
DECLARE_WRITE16_MEMBER(grid_w);
DECLARE_READ8_MEMBER(input_r);
@@ -1613,12 +1614,17 @@ public:
// handlers: maincpu side
+void pairmtch_state::update_display()
+{
+ m_display->matrix(m_grid, m_plate);
+}
+
WRITE8_MEMBER(pairmtch_state::plate_w)
{
// R2x,R3x,R6x: vfd plate
int shift = (offset == 6) ? 8 : (offset-2) * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
- m_display->matrix(m_grid, m_plate);
+ update_display();
}
WRITE16_MEMBER(pairmtch_state::grid_w)
@@ -1634,7 +1640,7 @@ WRITE16_MEMBER(pairmtch_state::grid_w)
// D0-D5: vfd grid
m_grid = data & 0x3f;
- m_display->matrix(m_grid, m_plate);
+ update_display();
}
READ8_MEMBER(pairmtch_state::input_r)
@@ -1886,7 +1892,7 @@ public:
hh_hmcs40_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(plate_w);
DECLARE_WRITE16_MEMBER(grid_w);
@@ -1926,7 +1932,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(cdkong_state::speaker_decay_sim)
m_speaker_volume /= 1.02;
}
-void cdkong_state::prepare_display()
+void cdkong_state::update_display()
{
u32 plate = bitswap<32>(m_plate,31,30,29,24,0,16,8,1,23,17,9,2,18,10,25,27,26,3,15,27,11,11,14,22,6,13,21,5,19,12,20,4) | 0x800800;
m_display->matrix(m_grid, plate);
@@ -1941,7 +1947,7 @@ WRITE8_MEMBER(cdkong_state::plate_w)
// R0x-R6x: vfd plate
int shift = offset * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(cdkong_state::grid_w)
@@ -1952,7 +1958,7 @@ WRITE16_MEMBER(cdkong_state::grid_w)
// D4-D14: vfd grid
m_grid = data >> 4 & 0x7ff;
- prepare_display();
+ update_display();
}
// config
@@ -2043,7 +2049,7 @@ public:
hh_hmcs40_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(grid_w);
DECLARE_WRITE16_MEMBER(plate_w);
DECLARE_READ8_MEMBER(input_r);
@@ -2054,7 +2060,7 @@ public:
// handlers
-void cgalaxn_state::prepare_display()
+void cgalaxn_state::update_display()
{
u16 grid = bitswap<16>(m_grid,15,14,13,12,1,2,0,11,10,9,8,7,6,5,4,3);
u16 plate = bitswap<16>(m_plate,15,14,6,5,4,3,2,1,7,8,9,10,11,0,12,13);
@@ -2065,7 +2071,7 @@ INPUT_CHANGED_MEMBER(cgalaxn_state::player_switch)
{
// 2-player switch directly enables plate 14
m_plate = (m_plate & 0x3fff) | (newval ? 0 : 0x4000);
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(cgalaxn_state::grid_w)
@@ -2077,7 +2083,7 @@ WRITE8_MEMBER(cgalaxn_state::grid_w)
// R1x-R3x: vfd grid
int shift = (offset - 1) * 4;
m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(cgalaxn_state::plate_w)
@@ -2089,7 +2095,7 @@ WRITE16_MEMBER(cgalaxn_state::plate_w)
// D2-D15: vfd plate
m_plate = (m_plate & 0x4000) | (data >> 2 & 0x3fff);
- prepare_display();
+ update_display();
}
READ8_MEMBER(cgalaxn_state::input_r)
@@ -2446,7 +2452,7 @@ public:
hh_hmcs40_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(plate_w);
DECLARE_WRITE16_MEMBER(grid_w);
DECLARE_READ16_MEMBER(input_r);
@@ -2455,13 +2461,12 @@ public:
// handlers
-void sag_state::prepare_display()
+void sag_state::update_display()
{
// grid 0-7 are the 'pixels'
m_display->matrix_partial(0, 8, m_grid, m_plate, false);
// grid 8-11 are 7segs
- m_display->segmask(0xf00, 0x7f);
u8 seg = bitswap<8>(m_plate,3,4,5,6,7,8,9,10);
m_display->matrix_partial(8, 4, m_grid >> 8, seg);
}
@@ -2471,7 +2476,7 @@ WRITE8_MEMBER(sag_state::plate_w)
// R0x-R3x: vfd plate
int shift = offset * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(sag_state::grid_w)
@@ -2484,7 +2489,7 @@ WRITE16_MEMBER(sag_state::grid_w)
// D1-D12: vfd grid
m_grid = data >> 1 & 0xfff;
- prepare_display();
+ update_display();
}
READ16_MEMBER(sag_state::input_r)
@@ -2550,6 +2555,7 @@ void sag_state::sag(machine_config &config)
/* video hardware */
PWM_DISPLAY(config, m_display).set_size(8+4, 14);
+ m_display->set_segmask(0xf00, 0x7f);
config.set_default_layout(layout_sag);
/* sound hardware */
@@ -2597,7 +2603,7 @@ public:
hh_hmcs40_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(plate_w);
DECLARE_WRITE16_MEMBER(grid_w);
DECLARE_READ8_MEMBER(input_r);
@@ -2606,7 +2612,7 @@ public:
// handlers
-void egalaxn2_state::prepare_display()
+void egalaxn2_state::update_display()
{
u16 grid = bitswap<16>(m_grid,15,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14);
u32 plate = bitswap<24>(m_plate,23,22,21,20,15,14,13,12,7,6,5,4,3,2,1,0,19,18,17,16,11,10,9,8);
@@ -2623,7 +2629,7 @@ WRITE16_MEMBER(egalaxn2_state::grid_w)
// D1-D15: vfd grid
m_grid = data >> 1 & 0x7fff;
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(egalaxn2_state::plate_w)
@@ -2631,7 +2637,7 @@ WRITE8_MEMBER(egalaxn2_state::plate_w)
// R1x-R6x: vfd plate
int shift = (offset - 1) * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
READ8_MEMBER(egalaxn2_state::input_r)
@@ -2823,7 +2829,7 @@ public:
required_device<cop411_cpu_device> m_audiocpu;
- virtual void prepare_display();
+ virtual void update_display();
DECLARE_WRITE8_MEMBER(plate_w);
DECLARE_WRITE16_MEMBER(grid_w);
@@ -2851,7 +2857,7 @@ void eturtles_state::machine_start()
// handlers: maincpu side
-void eturtles_state::prepare_display()
+void eturtles_state::update_display()
{
u16 grid = bitswap<16>(m_grid,15,1,14,13,12,11,10,9,8,7,6,5,4,3,2,0);
u32 plate = bitswap<32>(m_plate,31,30,11,12,18,19,16,17,22,15,20,21,27,26,23,25,24,2,3,1,0,6,4,5,10,9,2,8,7,14,1,13);
@@ -2865,7 +2871,7 @@ WRITE8_MEMBER(eturtles_state::plate_w)
// R0x-R6x: vfd plate
int shift = offset * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(eturtles_state::grid_w)
@@ -2882,7 +2888,7 @@ WRITE16_MEMBER(eturtles_state::grid_w)
// D1-D15: vfd grid
m_grid = data >> 1 & 0x7fff;
- prepare_display();
+ update_display();
}
void eturtles_state::update_int()
@@ -3022,14 +3028,14 @@ public:
eturtles_state(mconfig, type, tag)
{ }
- virtual void prepare_display() override;
+ virtual void update_display() override;
DECLARE_READ8_MEMBER(cop_data_r);
void estargte(machine_config &config);
};
// handlers (most of it is in eturtles_state above)
-void estargte_state::prepare_display()
+void estargte_state::update_display()
{
u16 grid = bitswap<16>(m_grid,15,0,14,13,12,11,10,9,8,7,6,5,4,3,2,1);
u32 plate = bitswap<32>(m_plate,31,30,29,15,17,19,21,23,25,27,26,24,3,22,20,18,16,14,12,10,8,6,4,2,0,1,3,5,7,9,11,13);
@@ -3532,7 +3538,7 @@ public:
hh_hmcs40_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(plate_w);
DECLARE_WRITE16_MEMBER(grid_w);
DECLARE_WRITE8_MEMBER(speaker_w);
@@ -3542,7 +3548,7 @@ public:
// handlers
-void mwcbaseb_state::prepare_display()
+void mwcbaseb_state::update_display()
{
u8 grid = bitswap<8>(m_grid,0,1,2,3,4,5,6,7);
m_display->matrix(grid, m_plate);
@@ -3553,7 +3559,7 @@ WRITE8_MEMBER(mwcbaseb_state::plate_w)
// R1x-R3x,R6x: vfd plate
int shift = (offset == 6) ? 12 : (offset - 1) * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(mwcbaseb_state::grid_w)
@@ -3563,7 +3569,7 @@ WRITE16_MEMBER(mwcbaseb_state::grid_w)
// D0-D7: vfd grid
m_grid = data & 0xff;
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(mwcbaseb_state::speaker_w)
@@ -3707,7 +3713,7 @@ public:
hh_hmcs40_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(plate_w);
DECLARE_WRITE16_MEMBER(grid_w);
@@ -3718,7 +3724,7 @@ public:
// handlers
-void msthawk_state::prepare_display()
+void msthawk_state::update_display()
{
u16 grid = bitswap<16>(m_grid,15,14,13,12,11,10,0,1,2,3,4,5,6,7,8,9);
u32 plate = bitswap<24>(m_plate,23,22,21,19,20,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0);
@@ -3730,7 +3736,7 @@ WRITE8_MEMBER(msthawk_state::plate_w)
// R0x-R3x: vfd plate
int shift = offset * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(msthawk_state::grid_w)
@@ -3751,7 +3757,7 @@ WRITE16_MEMBER(msthawk_state::grid_w)
// D0-D4: more plates
m_plate = (m_plate & 0x00ffff) | (data << 16 & 0x1f0000);
- prepare_display();
+ update_display();
}
void msthawk_state::update_int0()
@@ -3939,7 +3945,7 @@ public:
hh_hmcs40_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(plate_w);
DECLARE_WRITE16_MEMBER(grid_w);
@@ -3950,7 +3956,7 @@ public:
// handlers
-void kingman_state::prepare_display()
+void kingman_state::update_display()
{
u16 grid = bitswap<16>(m_grid,15,14,13,12,11,10,9,0,1,2,3,4,5,6,7,8);
u32 plate = bitswap<24>(m_plate,23,6,7,5,4,3,2,1,0,13,12,20,19,18,17,16,10,11,9,8,14,15,13,12);
@@ -3962,7 +3968,7 @@ WRITE8_MEMBER(kingman_state::plate_w)
// R0x-R3x: vfd plate
int shift = offset * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(kingman_state::grid_w)
@@ -3983,7 +3989,7 @@ WRITE16_MEMBER(kingman_state::grid_w)
// D0-D4: more plates
m_plate = (m_plate & 0x00ffff) | (data << 16 & 0x1f0000);
- prepare_display();
+ update_display();
}
void kingman_state::update_int0()
@@ -4065,7 +4071,7 @@ public:
hh_hmcs40_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(plate_w);
DECLARE_WRITE16_MEMBER(grid_w);
@@ -4076,7 +4082,7 @@ public:
// handlers
-void tmtron_state::prepare_display()
+void tmtron_state::update_display()
{
u16 grid = bitswap<16>(m_grid,15,14,13,12,11,10,1,2,3,4,5,6,7,8,9,0);
u32 plate = bitswap<24>(m_plate,23,5,2,21,1,6,7,9,10,11,21,0,19,3,4,8,3,18,17,16,12,13,14,15);
@@ -4088,7 +4094,7 @@ WRITE8_MEMBER(tmtron_state::plate_w)
// R0x-R3x: vfd plate
int shift = offset * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(tmtron_state::grid_w)
@@ -4109,7 +4115,7 @@ WRITE16_MEMBER(tmtron_state::grid_w)
// D0-D3,D5: more plates
m_plate = (m_plate & 0x00ffff) | (data << 16 & 0x2f0000);
- prepare_display();
+ update_display();
}
void tmtron_state::update_int1()
diff --git a/src/mame/drivers/hh_melps4.cpp b/src/mame/drivers/hh_melps4.cpp
index 724443e481b..5ca12fe7851 100644
--- a/src/mame/drivers/hh_melps4.cpp
+++ b/src/mame/drivers/hh_melps4.cpp
@@ -124,7 +124,7 @@ public:
hh_melps4_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(plate_w);
DECLARE_WRITE16_MEMBER(grid_w);
DECLARE_WRITE_LINE_MEMBER(speaker_w);
@@ -134,7 +134,7 @@ public:
// handlers
-void cfrogger_state::prepare_display()
+void cfrogger_state::update_display()
{
u16 grid = bitswap<16>(m_grid,15,14,13,12,0,1,2,3,4,5,6,7,8,9,10,11);
u16 plate = bitswap<16>(m_plate,12,4,13,5,14,6,15,7,3,11,2,10,1,9,0,8);
@@ -151,14 +151,14 @@ WRITE8_MEMBER(cfrogger_state::plate_w)
int mask = (offset == MELPS4_PORTS) ? 0xff : 0xf; // port S is 8-bit
int shift = (offset == MELPS4_PORTS) ? 0 : (offset + 1) * 4;
m_plate = (m_plate & ~(mask << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(cfrogger_state::grid_w)
{
// D0-D11: vfd grid
m_grid = data;
- prepare_display();
+ update_display();
}
WRITE_LINE_MEMBER(cfrogger_state::speaker_w)
@@ -249,7 +249,7 @@ public:
hh_melps4_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(plate_w);
DECLARE_WRITE16_MEMBER(grid_w);
DECLARE_WRITE_LINE_MEMBER(speaker_w);
@@ -259,7 +259,7 @@ public:
// handlers
-void gjungler_state::prepare_display()
+void gjungler_state::update_display()
{
u16 grid = bitswap<16>(m_grid,15,14,13,12,11,10,9,8,7,6,5,4,3,2,0,1);
u32 plate = bitswap<24>(m_plate,23,22,21,20,19,18,8,9,10,11,13,16,15,14,13,12,7,0,6,1,5,2,4,3) | 0x2000;
@@ -276,14 +276,14 @@ WRITE8_MEMBER(gjungler_state::plate_w)
int mask = (offset == MELPS4_PORTS) ? 0xff : 0xf; // port S is 8-bit
int shift = (offset == MELPS4_PORTS) ? 0 : (offset + 1) * 4;
m_plate = (m_plate & ~(mask << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(gjungler_state::grid_w)
{
// D0-D11: vfd grid
m_grid = data;
- prepare_display();
+ update_display();
}
WRITE_LINE_MEMBER(gjungler_state::speaker_w)
diff --git a/src/mame/drivers/hh_pic16.cpp b/src/mame/drivers/hh_pic16.cpp
index 5a2197efb90..a98180c0d88 100644
--- a/src/mame/drivers/hh_pic16.cpp
+++ b/src/mame/drivers/hh_pic16.cpp
@@ -200,7 +200,7 @@ public:
hh_pic16_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
void update_speaker();
DECLARE_READ8_MEMBER(read_a);
DECLARE_WRITE8_MEMBER(write_b);
@@ -210,7 +210,7 @@ public:
// handlers
-void touchme_state::prepare_display()
+void touchme_state::update_display()
{
m_display->matrix(~m_b & 0x7b, m_c);
}
@@ -234,7 +234,7 @@ WRITE8_MEMBER(touchme_state::write_b)
// B0,B1: digit select
// B3-B6: leds
m_b = data;
- prepare_display();
+ update_display();
// B7: speaker lead 1
update_speaker();
@@ -244,7 +244,7 @@ WRITE8_MEMBER(touchme_state::write_c)
{
// C0-C6: digit segments
m_c = data;
- prepare_display();
+ update_display();
// C7: speaker lead 2
update_speaker();
@@ -325,7 +325,7 @@ public:
hh_pic16_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(write_b);
DECLARE_WRITE8_MEMBER(write_c);
void pabball(machine_config &config);
@@ -333,7 +333,7 @@ public:
// handlers
-void pabball_state::prepare_display()
+void pabball_state::update_display()
{
// CD4028 BCD to decimal decoder
// CD4028 0-8: led select, 9: 7seg
@@ -348,7 +348,7 @@ WRITE8_MEMBER(pabball_state::write_b)
{
// B: led data
m_b = ~data;
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(pabball_state::write_c)
@@ -361,7 +361,7 @@ WRITE8_MEMBER(pabball_state::write_c)
// C0-C3: CD4028 A-D
m_c = data;
- prepare_display();
+ update_display();
}
// config
@@ -558,7 +558,7 @@ public:
hh_pic16_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
void update_speaker();
DECLARE_WRITE8_MEMBER(write_b);
DECLARE_WRITE8_MEMBER(write_c);
@@ -567,7 +567,7 @@ public:
// handlers
-void maniac_state::prepare_display()
+void maniac_state::update_display()
{
m_display->write_row(0, ~m_b & 0x7f);
m_display->write_row(1, ~m_c & 0x7f);
@@ -583,7 +583,7 @@ WRITE8_MEMBER(maniac_state::write_b)
{
// B0-B6: left 7seg
m_b = data;
- prepare_display();
+ update_display();
// B7: speaker lead 1
update_speaker();
@@ -593,7 +593,7 @@ WRITE8_MEMBER(maniac_state::write_c)
{
// C0-C6: right 7seg
m_c = data;
- prepare_display();
+ update_display();
// C7: speaker lead 2
update_speaker();
@@ -978,7 +978,7 @@ public:
hh_pic16_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_READ8_MEMBER(read_a);
DECLARE_WRITE8_MEMBER(write_b);
DECLARE_WRITE8_MEMBER(write_c);
@@ -987,7 +987,7 @@ public:
// handlers
-void tbaskb_state::prepare_display()
+void tbaskb_state::update_display()
{
m_display->matrix(m_b, m_c);
}
@@ -1009,7 +1009,7 @@ WRITE8_MEMBER(tbaskb_state::write_b)
// B0-B3: led select
// B4,B5: digit select
m_b = data;
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(tbaskb_state::write_c)
@@ -1019,7 +1019,7 @@ WRITE8_MEMBER(tbaskb_state::write_c)
// C0-C6: led data
m_c = ~data;
- prepare_display();
+ update_display();
}
// config
@@ -1098,7 +1098,7 @@ public:
hh_pic16_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(write_a);
DECLARE_WRITE8_MEMBER(write_b);
DECLARE_WRITE8_MEMBER(write_c);
@@ -1108,7 +1108,7 @@ public:
// handlers
-void rockpin_state::prepare_display()
+void rockpin_state::update_display()
{
// 3 7seg leds from ports A and B
m_display->matrix_partial(0, 3, m_a, m_b, false);
@@ -1124,28 +1124,28 @@ WRITE8_MEMBER(rockpin_state::write_a)
// A0-A2: select digit
m_a = ~data & 7;
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(rockpin_state::write_b)
{
// B0-B6: digit segments
m_b = data & 0x7f;
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(rockpin_state::write_c)
{
// C0-C7: led data
m_c = ~data;
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(rockpin_state::write_d)
{
// D0-D5: led select
m_d = ~data;
- prepare_display();
+ update_display();
}
// config
@@ -1218,7 +1218,7 @@ public:
hh_pic16_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_READ8_MEMBER(read_a);
DECLARE_WRITE8_MEMBER(write_b);
DECLARE_WRITE8_MEMBER(write_c);
@@ -1227,7 +1227,7 @@ public:
// handlers
-void hccbaskb_state::prepare_display()
+void hccbaskb_state::update_display()
{
m_display->matrix(m_b, m_c);
}
@@ -1252,14 +1252,14 @@ WRITE8_MEMBER(hccbaskb_state::write_b)
// B0-B4: led select
// B5,B6: digit select
m_b = data;
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(hccbaskb_state::write_c)
{
// C0-C6: led data
m_c = ~data;
- prepare_display();
+ update_display();
}
// config
@@ -1340,7 +1340,7 @@ public:
hh_pic16_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_READ8_MEMBER(read_a);
DECLARE_WRITE8_MEMBER(write_b);
DECLARE_WRITE8_MEMBER(write_c);
@@ -1349,7 +1349,7 @@ public:
// handlers
-void ttfball_state::prepare_display()
+void ttfball_state::update_display()
{
// C0-C2: led data
// C0-C3: 4511 A-D, C4: digit segment DP
@@ -1376,7 +1376,7 @@ WRITE8_MEMBER(ttfball_state::write_b)
// B0-B7: led select (see above)
m_b = data;
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(ttfball_state::write_c)
@@ -1389,7 +1389,7 @@ WRITE8_MEMBER(ttfball_state::write_c)
// C0-C7: led data/select (see above)
m_c = data;
- prepare_display();
+ update_display();
}
// config
@@ -1500,7 +1500,7 @@ public:
hh_pic16_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(write_a);
DECLARE_WRITE8_MEMBER(write_b);
DECLARE_WRITE8_MEMBER(write_c);
@@ -1510,7 +1510,7 @@ public:
// handlers
-void uspbball_state::prepare_display()
+void uspbball_state::update_display()
{
m_display->matrix(m_d, m_c << 8 | m_b);
}
@@ -1525,14 +1525,14 @@ WRITE8_MEMBER(uspbball_state::write_b)
{
// B: digit segment data
m_b = bitswap<8>(data,0,1,2,3,4,5,6,7);
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(uspbball_state::write_c)
{
// C: led data
m_c = ~data;
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(uspbball_state::write_d)
@@ -1540,7 +1540,7 @@ WRITE8_MEMBER(uspbball_state::write_d)
// D0-D2: digit select
// D3-D5: led select
m_d = ~data;
- prepare_display();
+ update_display();
}
// config
@@ -1618,7 +1618,7 @@ public:
hh_pic16_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_READ8_MEMBER(read_a);
DECLARE_WRITE8_MEMBER(write_a);
DECLARE_WRITE8_MEMBER(write_b);
@@ -1629,7 +1629,7 @@ public:
// handlers
-void us2pfball_state::prepare_display()
+void us2pfball_state::update_display()
{
m_display->matrix(m_d | (m_a << 6 & 0x300), m_c);
}
@@ -1644,7 +1644,7 @@ WRITE8_MEMBER(us2pfball_state::write_a)
{
// A2,A3: leds
m_a = data;
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(us2pfball_state::write_b)
@@ -1660,14 +1660,14 @@ WRITE8_MEMBER(us2pfball_state::write_c)
// C0-C6: digit segments
m_c = data;
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(us2pfball_state::write_d)
{
// D0-D7: digit select
m_d = ~data;
- prepare_display();
+ update_display();
}
// config
diff --git a/src/mame/drivers/hh_tms1k.cpp b/src/mame/drivers/hh_tms1k.cpp
index 4d85389fdd5..57e57e23c47 100644
--- a/src/mame/drivers/hh_tms1k.cpp
+++ b/src/mame/drivers/hh_tms1k.cpp
@@ -392,7 +392,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -401,10 +401,9 @@ public:
// handlers
-void matchnum_state::prepare_display()
+void matchnum_state::update_display()
{
- set_display_segmask(0xf, 0x7f);
- display_matrix(8, 4, m_o, m_r);
+ m_display->matrix(m_r, m_o);
}
WRITE16_MEMBER(matchnum_state::write_r)
@@ -417,7 +416,7 @@ WRITE16_MEMBER(matchnum_state::write_r)
// R0-R3: digit/led select
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(matchnum_state::write_o)
@@ -425,7 +424,7 @@ WRITE16_MEMBER(matchnum_state::write_o)
// O0-O6: digit segments A-G
// O7: led data
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(matchnum_state::read_k)
@@ -485,6 +484,9 @@ void matchnum_state::matchnum(machine_config &config)
m_maincpu->r().set(FUNC(matchnum_state::write_r));
m_maincpu->o().set(FUNC(matchnum_state::write_o));
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(4, 8);
+ m_display->set_segmask(0xf, 0x7f);
config.set_default_layout(layout_matchnum);
/* sound hardware */
@@ -532,7 +534,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -541,11 +543,9 @@ public:
// handlers
-void arrball_state::prepare_display()
+void arrball_state::update_display()
{
- set_display_segmask(0x10, 0x7f);
- set_display_segmask(0x20, 0x06); // left digit only segments B and C
- display_matrix(7, 7, m_o, m_r);
+ m_display->matrix(m_r, m_o);
}
WRITE16_MEMBER(arrball_state::write_r)
@@ -558,14 +558,14 @@ WRITE16_MEMBER(arrball_state::write_r)
// R0-R6: digit/led select
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(arrball_state::write_o)
{
// O0-O6: digit segments/led data
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(arrball_state::read_k)
@@ -596,6 +596,10 @@ void arrball_state::arrball(machine_config &config)
m_maincpu->r().set(FUNC(arrball_state::write_r));
m_maincpu->o().set(FUNC(arrball_state::write_o));
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(7, 7);
+ m_display->set_segmask(0x10, 0x7f);
+ m_display->set_segmask(0x20, 0x06); // left digit only segments B and C
config.set_default_layout(layout_arrball);
/* sound hardware */
@@ -651,7 +655,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -660,10 +664,9 @@ public:
// handlers
-void mathmagi_state::prepare_display()
+void mathmagi_state::update_display()
{
- set_display_segmask(0xff, 0x7f);
- display_matrix(7, 11, m_o, m_r);
+ m_display->matrix(m_r, m_o);
}
WRITE16_MEMBER(mathmagi_state::write_r)
@@ -676,7 +679,7 @@ WRITE16_MEMBER(mathmagi_state::write_r)
// R9: custom equals digit
// R10: misc lamps
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(mathmagi_state::write_o)
@@ -684,7 +687,7 @@ WRITE16_MEMBER(mathmagi_state::write_o)
// O1-O7: led/digit segment data
// O0: N/C
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(mathmagi_state::read_k)
@@ -760,6 +763,9 @@ void mathmagi_state::mathmagi(machine_config &config)
m_maincpu->r().set(FUNC(mathmagi_state::write_r));
m_maincpu->o().set(FUNC(mathmagi_state::write_o));
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(11, 7);
+ m_display->set_segmask(0xff, 0x7f);
config.set_default_layout(layout_mathmagi);
/* no sound! */
@@ -916,7 +922,7 @@ public:
void cmulti8(machine_config &config);
private:
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_READ8_MEMBER(read_k);
@@ -924,31 +930,29 @@ private:
// handlers
-void cmulti8_state::prepare_display()
+void cmulti8_state::update_display()
{
- set_display_segmask(0xfffff, 0xff);
-
// M-digit is on in memory mode, upper row is off in single mode
u32 m = (m_inputs[10]->read() & 0x10) ? 0x100000 : 0;
u32 mask = (m_inputs[10]->read() & 0x20) ? 0xfffff : 0xffc00;
// R10 selects display row
u32 sel = (m_r & 0x400) ? (m_r & 0x3ff) : (m_r << 10 & 0xffc00);
- display_matrix(8, 21, m_o, (sel & mask) | m);
+ m_display->matrix((sel & mask) | m, m_o);
}
WRITE16_MEMBER(cmulti8_state::write_r)
{
// R0-R10: input mux, select digit
m_r = m_inp_mux = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(cmulti8_state::write_o)
{
// O0-O7: digit segments
m_o = bitswap<8>(data,0,4,5,6,7,1,2,3);
- prepare_display();
+ update_display();
}
READ8_MEMBER(cmulti8_state::read_k)
@@ -1040,6 +1044,9 @@ void cmulti8_state::cmulti8(machine_config &config)
m_maincpu->o().set(FUNC(cmulti8_state::write_o));
m_maincpu->r().set(FUNC(cmulti8_state::write_r));
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(21, 8);
+ m_display->set_segmask(0xfffff, 0xff);
config.set_default_layout(layout_cmulti8);
/* no sound! */
@@ -1080,7 +1087,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -1089,10 +1096,9 @@ public:
// handlers
-void amaztron_state::prepare_display()
+void amaztron_state::update_display()
{
- set_display_segmask(0xc, 0x7f);
- display_matrix(7, 4, m_o, m_r);
+ m_display->matrix(m_r, m_o);
}
WRITE16_MEMBER(amaztron_state::write_r)
@@ -1106,7 +1112,7 @@ WRITE16_MEMBER(amaztron_state::write_r)
// R6,R7: leds
// R8,R9: select digit
m_r = data >> 6 & 0xf;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(amaztron_state::write_o)
@@ -1114,7 +1120,7 @@ WRITE16_MEMBER(amaztron_state::write_o)
// O0-O6: digit segments A-G
// O7: N/C
m_o = data & 0x7f;
- prepare_display();
+ update_display();
}
READ8_MEMBER(amaztron_state::read_k)
@@ -1179,6 +1185,9 @@ void amaztron_state::amaztron(machine_config &config)
m_maincpu->r().set(FUNC(amaztron_state::write_r));
m_maincpu->o().set(FUNC(amaztron_state::write_o));
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(4, 7);
+ m_display->set_segmask(0xc, 0x7f);
config.set_default_layout(layout_amaztron);
/* sound hardware */
@@ -1221,7 +1230,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -1230,10 +1239,9 @@ public:
// handlers
-void zodiac_state::prepare_display()
+void zodiac_state::update_display()
{
- set_display_segmask(0xff, 0x7f);
- display_matrix(8, 10, m_o, m_r);
+ m_display->matrix(m_r, m_o);
}
WRITE16_MEMBER(zodiac_state::write_r)
@@ -1247,14 +1255,14 @@ WRITE16_MEMBER(zodiac_state::write_r)
// R0-R7: digit select
// R8,R9: led select
m_r = data & 0x3ff;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(zodiac_state::write_o)
{
// O0-O7: digit segment/led data
m_o = bitswap<8>(data,0,7,6,5,4,3,2,1);
- prepare_display();
+ update_display();
}
READ8_MEMBER(zodiac_state::read_k)
@@ -1338,6 +1346,9 @@ void zodiac_state::zodiac(machine_config &config)
m_maincpu->r().set(FUNC(zodiac_state::write_r));
m_maincpu->o().set(FUNC(zodiac_state::write_o));
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(10, 8);
+ m_display->set_segmask(0xff, 0x7f);
config.set_default_layout(layout_zodiac);
/* sound hardware */
@@ -1379,12 +1390,9 @@ class cqback_state : public hh_tms1k_state
public:
cqback_state(const machine_config &mconfig, device_type type, const char *tag) :
hh_tms1k_state(mconfig, type, tag)
- {
- // offsense blips are brighter
- set_display_levels(0.005, 0.03);
- }
+ { }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -1393,15 +1401,14 @@ public:
// handlers
-void cqback_state::prepare_display()
+void cqback_state::update_display()
{
// R9 selects between segments B/C or A'/D'
u16 seg = m_o;
if (m_r & 0x200)
seg = (m_o << 7 & 0x300) | (m_o & 0xf9);
- set_display_segmask(0x1ff, 0xff);
- display_matrix(11, 9, seg, m_r & 0x1ff);
+ m_display->matrix(m_r & 0x1ff, seg);
}
WRITE16_MEMBER(cqback_state::write_r)
@@ -1414,14 +1421,14 @@ WRITE16_MEMBER(cqback_state::write_r)
// R0-R9: select digit/segment
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(cqback_state::write_o)
{
// O0-O7: digit segments
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(cqback_state::read_k)
@@ -1467,6 +1474,10 @@ void cqback_state::cqback(machine_config &config)
m_maincpu->r().set(FUNC(cqback_state::write_r));
m_maincpu->o().set(FUNC(cqback_state::write_o));
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(9, 11);
+ m_display->set_segmask(0x1ff, 0xff);
+ m_display->set_bri_levels(0.005, 0.03); // offense leds are brighter
config.set_default_layout(layout_cqback);
/* sound hardware */
@@ -1511,12 +1522,9 @@ class h2hfootb_state : public hh_tms1k_state
public:
h2hfootb_state(const machine_config &mconfig, device_type type, const char *tag) :
hh_tms1k_state(mconfig, type, tag)
- {
- // offsense blips are brighter
- set_display_levels(0.005, 0.03);
- }
+ { }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -1525,10 +1533,9 @@ public:
// handlers
-void h2hfootb_state::prepare_display()
+void h2hfootb_state::update_display()
{
- set_display_segmask(0x1ff, 0x7f);
- display_matrix(9, 9, m_o | (m_r >> 1 & 0x100), m_r & 0x1ff);
+ m_display->matrix(m_r & 0x1ff, m_o | (m_r >> 1 & 0x100));
}
WRITE16_MEMBER(h2hfootb_state::write_r)
@@ -1542,14 +1549,14 @@ WRITE16_MEMBER(h2hfootb_state::write_r)
// R0-R8: select led
// R9: led between digits
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(h2hfootb_state::write_o)
{
// O0-O7: digit segments A-G,A'
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(h2hfootb_state::read_k)
@@ -1599,6 +1606,10 @@ void h2hfootb_state::h2hfootb(machine_config &config)
m_maincpu->r().set(FUNC(h2hfootb_state::write_r));
m_maincpu->o().set(FUNC(h2hfootb_state::write_o));
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(9, 9);
+ m_display->set_segmask(0x1ff, 0x7f);
+ m_display->set_bri_levels(0.005, 0.03); // offense leds are brighter
config.set_default_layout(layout_h2hfootb);
/* sound hardware */
@@ -1651,7 +1662,7 @@ public:
bool m_cap_state;
attotime m_cap_charge;
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -1682,15 +1693,14 @@ TIMER_DEVICE_CALLBACK_MEMBER(h2hbaskb_state::cap_empty_callback)
m_cap_state = false;
}
-void h2hbaskb_state::prepare_display()
+void h2hbaskb_state::update_display()
{
// R6,R7 are commons for R0-R5
u16 sel = 0;
if (m_r & 0x40) sel |= (m_r & 0x3f);
if (m_r & 0x80) sel |= (m_r & 0x3f) << 6;
- set_display_segmask(0xc0, 0x7f);
- display_matrix(7, 6+6, m_o, sel);
+ m_display->matrix(sel, m_o);
}
WRITE16_MEMBER(h2hbaskb_state::write_r)
@@ -1723,14 +1733,14 @@ WRITE16_MEMBER(h2hbaskb_state::write_r)
// R0-R7: led select
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(h2hbaskb_state::write_o)
{
// O1-O7: led data
m_o = data >> 1 & 0x7f;
- prepare_display();
+ update_display();
}
READ8_MEMBER(h2hbaskb_state::read_k)
@@ -1785,6 +1795,9 @@ void h2hbaskb_state::h2hbaskb(machine_config &config)
TIMER(config, "cap_empty").configure_generic(FUNC(h2hbaskb_state::cap_empty_callback));
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(6+6, 7);
+ m_display->set_segmask(0xc0, 0x7f);
config.set_default_layout(layout_h2hbaskb);
/* sound hardware */
@@ -1845,7 +1858,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -1873,10 +1886,9 @@ void h2hbaseb_state::set_clock()
m_maincpu->set_unscaled_clock((m_inputs[5]->read() & 1) ? 400000 : 350000);
}
-void h2hbaseb_state::prepare_display()
+void h2hbaseb_state::update_display()
{
- set_display_segmask(0x1ff, 0x7f);
- display_matrix(9, 9, (m_r & 0x100) | m_o, (m_r & 0xff) | (m_r >> 1 & 0x100));
+ m_display->matrix((m_r & 0xff) | (m_r >> 1 & 0x100), (m_r & 0x100) | m_o);
}
WRITE16_MEMBER(h2hbaseb_state::write_r)
@@ -1890,7 +1902,7 @@ WRITE16_MEMBER(h2hbaseb_state::write_r)
// R0-R7,R9: select vfd digit/led
// R8: led state
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(h2hbaseb_state::write_o)
@@ -1898,7 +1910,7 @@ WRITE16_MEMBER(h2hbaseb_state::write_o)
// O0-O6: digit segments A-G
// O7: N/C
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(h2hbaseb_state::read_k)
@@ -1946,6 +1958,9 @@ void h2hbaseb_state::h2hbaseb(machine_config &config)
m_maincpu->r().set(FUNC(h2hbaseb_state::write_r));
m_maincpu->o().set(FUNC(h2hbaseb_state::write_o));
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(9, 9);
+ m_display->set_segmask(0x1ff, 0x7f);
config.set_default_layout(layout_h2hbaseb);
/* sound hardware */
@@ -1987,7 +2002,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -1996,10 +2011,9 @@ public:
// handlers
-void h2hboxing_state::prepare_display()
+void h2hboxing_state::update_display()
{
- set_display_segmask(0x600, 0x7f);
- display_matrix(8, 11, m_o, m_r);
+ m_display->matrix(m_r, m_o);
}
WRITE16_MEMBER(h2hboxing_state::write_r)
@@ -2013,14 +2027,14 @@ WRITE16_MEMBER(h2hboxing_state::write_r)
// R0-R7: select led
// R9,R10: select digit
m_r = data & ~0x100;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(h2hboxing_state::write_o)
{
// O0-O7: digit segments/led data
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(h2hboxing_state::read_k)
@@ -2069,6 +2083,9 @@ void h2hboxing_state::h2hboxing(machine_config &config)
m_maincpu->r().set(FUNC(h2hboxing_state::write_r));
m_maincpu->o().set(FUNC(h2hboxing_state::write_o));
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(11, 8);
+ m_display->set_segmask(0x600, 0x7f);
config.set_default_layout(layout_h2hboxing);
/* sound hardware */
@@ -2129,7 +2146,7 @@ public:
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cartridge);
u16 m_pinout; // cartridge R pins
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -2165,13 +2182,10 @@ DEVICE_IMAGE_LOAD_MEMBER(quizwizc_state, cartridge)
return image_init_result::PASS;
}
-void quizwizc_state::prepare_display()
+void quizwizc_state::update_display()
{
- // R6-R9 are 7segs
- set_display_segmask(0x3c0, 0x7f);
-
// note: O7 is on VSS
- display_matrix(8, 11, m_o, m_r | 0x400);
+ m_display->matrix(m_r | 0x400, m_o);
}
WRITE16_MEMBER(quizwizc_state::write_r)
@@ -2186,14 +2200,14 @@ WRITE16_MEMBER(quizwizc_state::write_r)
// R0-R3: led select
// R6-R9: digit select
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(quizwizc_state::write_o)
{
// O0-O7: led/digit segment data
m_o = bitswap<8>(data,7,0,1,2,3,4,5,6);
- prepare_display();
+ update_display();
}
READ8_MEMBER(quizwizc_state::read_k)
@@ -2251,6 +2265,9 @@ void quizwizc_state::quizwizc(machine_config &config)
m_maincpu->r().set(FUNC(quizwizc_state::write_r));
m_maincpu->o().set(FUNC(quizwizc_state::write_o));
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(10+1, 8);
+ m_display->set_segmask(0x3c0, 0x7f);
config.set_default_layout(layout_quizwizc);
/* sound hardware */
@@ -2317,7 +2334,7 @@ public:
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cartridge);
u8 m_pinout; // cartridge K pins
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -2352,13 +2369,10 @@ DEVICE_IMAGE_LOAD_MEMBER(tc4_state, cartridge)
return image_init_result::PASS;
}
-void tc4_state::prepare_display()
+void tc4_state::update_display()
{
- // R5,R7-R9 are 7segs
- set_display_segmask(0x3a0, 0x7f);
-
// note: R6 is an extra column
- display_matrix(9, 10, (m_o | (m_r << 2 & 0x100)), m_r);
+ m_display->matrix(m_r, (m_o | (m_r << 2 & 0x100)));
}
WRITE16_MEMBER(tc4_state::write_r)
@@ -2374,14 +2388,14 @@ WRITE16_MEMBER(tc4_state::write_r)
// R6: led 8 state
// R5,R7-R9: select digit
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(tc4_state::write_o)
{
// O0-O7: led state
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(tc4_state::read_k)
@@ -2438,6 +2452,9 @@ void tc4_state::tc4(machine_config &config)
m_maincpu->r().set(FUNC(tc4_state::write_r));
m_maincpu->o().set(FUNC(tc4_state::write_o));
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(10, 9);
+ m_display->set_segmask(0x3a0, 0x7f);
config.set_default_layout(layout_tc4);
/* sound hardware */
@@ -2492,7 +2509,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -2501,11 +2518,9 @@ public:
// handlers
-void cnbaskb_state::prepare_display()
+void cnbaskb_state::update_display()
{
- // R7,R8 are 7segs
- set_display_segmask(0x180, 0x7f);
- display_matrix(7, 9, m_o, m_r & 0x1fc);
+ m_display->matrix(m_r & 0x1fc, m_o);
}
WRITE16_MEMBER(cnbaskb_state::write_r)
@@ -2517,9 +2532,10 @@ WRITE16_MEMBER(cnbaskb_state::write_r)
// R10 is also tied to K1 (locks up at boot if it's not handled)
m_inp_mux = (data >> 8 & 4) | (data & 3);
- // R2-R8: led select
+ // R2-R6: led select
+ // R7,R8: digit select
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(cnbaskb_state::write_o)
@@ -2527,7 +2543,7 @@ WRITE16_MEMBER(cnbaskb_state::write_o)
// O0-O6: led/digit segment data
// O7: N/C
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(cnbaskb_state::read_k)
@@ -2565,6 +2581,9 @@ void cnbaskb_state::cnbaskb(machine_config &config)
m_maincpu->r().set(FUNC(cnbaskb_state::write_r));
m_maincpu->o().set(FUNC(cnbaskb_state::write_o));
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(9, 7);
+ m_display->set_segmask(0x180, 0x7f);
config.set_default_layout(layout_cnbaskb);
/* sound hardware */
@@ -2614,7 +2633,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -2623,11 +2642,9 @@ public:
// handlers
-void cmsport_state::prepare_display()
+void cmsport_state::update_display()
{
- // R5,R6 are 7segs
- set_display_segmask(0x60, 0x7f);
- display_matrix(8, 9, m_o, m_r & ~0x80);
+ m_display->matrix(m_r & ~0x80, m_o);
}
WRITE16_MEMBER(cmsport_state::write_r)
@@ -2638,16 +2655,17 @@ WRITE16_MEMBER(cmsport_state::write_r)
// R0,R9,R10: input mux
m_inp_mux = (data & 1) | (data >> 8 & 6);
- // R0-R6,R8: led select
+ // R0-R4,R8: led select
+ // R5,R6: digit select
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(cmsport_state::write_o)
{
// O0-O7: led/digit segment data
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(cmsport_state::read_k)
@@ -2689,6 +2707,9 @@ void cmsport_state::cmsport(machine_config &config)
m_maincpu->r().set(FUNC(cmsport_state::write_r));
m_maincpu->o().set(FUNC(cmsport_state::write_o));
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(9, 8);
+ m_display->set_segmask(0x60, 0x7f);
config.set_default_layout(layout_cmsport);
/* sound hardware */
@@ -2740,7 +2761,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -2749,13 +2770,9 @@ public:
// handlers
-void cnfball_state::prepare_display()
+void cnfball_state::update_display()
{
- // declare 7segs, middle ones have DP
- set_display_segmask(0xc3, 0x7f);
- set_display_segmask(0x38, 0xff);
-
- display_matrix(8+3, 10, m_o | (m_r << 6 & 0x700), m_grid);
+ m_display->matrix(m_grid, m_o | (m_r << 6 & 0x700));
}
WRITE16_MEMBER(cnfball_state::write_r)
@@ -2778,14 +2795,14 @@ WRITE16_MEMBER(cnfball_state::write_r)
// R2-R4: led data
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(cnfball_state::write_o)
{
// O0-O7: digit segments
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(cnfball_state::read_k)
@@ -2826,6 +2843,10 @@ void cnfball_state::cnfball(machine_config &config)
m_maincpu->r().set(FUNC(cnfball_state::write_r));
m_maincpu->o().set(FUNC(cnfball_state::write_o));
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(10, 8+3);
+ m_display->set_segmask(0xc3, 0x7f);
+ m_display->set_segmask(0x38, 0xff); // only the middle 3 7segs have DP
config.set_default_layout(layout_cnfball);
/* sound hardware */
@@ -2872,7 +2893,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -2881,15 +2902,14 @@ public:
// handlers
-void cnfball2_state::prepare_display()
+void cnfball2_state::update_display()
{
// R1 selects between segments B/C or A'/D'
u16 seg = m_o;
if (~m_r & 2)
seg = (m_o << 7 & 0x300) | (m_o & 0xf9);
- set_display_segmask(0x1ff, 0xff);
- display_matrix(11, 9, seg, m_r >> 1 & 0x1ff);
+ m_display->matrix(m_r >> 1 & 0x1ff, seg);
}
WRITE16_MEMBER(cnfball2_state::write_r)
@@ -2902,14 +2922,14 @@ WRITE16_MEMBER(cnfball2_state::write_r)
// R1-R10: select digit/segment
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(cnfball2_state::write_o)
{
// O0-O7: digit segments
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(cnfball2_state::read_k)
@@ -2964,6 +2984,9 @@ void cnfball2_state::cnfball2(machine_config &config)
m_maincpu->r().set(FUNC(cnfball2_state::write_r));
m_maincpu->o().set(FUNC(cnfball2_state::write_o));
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(9, 11);
+ m_display->set_segmask(0x1ff, 0xff);
config.set_default_layout(layout_cnfball2);
/* sound hardware */
@@ -3011,7 +3034,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -3020,11 +3043,9 @@ public:
// handlers
-void eleciq_state::prepare_display()
+void eleciq_state::update_display()
{
- // R7,R8 are 7segs
- set_display_segmask(0x180, 0x7f);
- display_matrix(7, 9, m_o, m_r & ~1);
+ m_display->matrix(m_r & ~1, m_o);
}
WRITE16_MEMBER(eleciq_state::write_r)
@@ -3035,9 +3056,10 @@ WRITE16_MEMBER(eleciq_state::write_r)
// R1-R6,R9: input mux
m_inp_mux = (data >> 1 & 0x3f) | (data >> 3 & 0x40);
- // R1-R8: led select
+ // R1-R6: led select
+ // R7,R8: digit select
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(eleciq_state::write_o)
@@ -3045,7 +3067,7 @@ WRITE16_MEMBER(eleciq_state::write_o)
// O0-O6: led/digit segment data
// O7: N/C
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(eleciq_state::read_k)
@@ -3108,6 +3130,9 @@ void eleciq_state::eleciq(machine_config &config)
m_maincpu->r().set(FUNC(eleciq_state::write_r));
m_maincpu->o().set(FUNC(eleciq_state::write_o));
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(9, 7);
+ m_display->set_segmask(0x180, 0x7f);
config.set_default_layout(layout_eleciq);
/* sound hardware */
@@ -3151,7 +3176,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -3160,11 +3185,9 @@ public:
// handlers
-void esoccer_state::prepare_display()
+void esoccer_state::update_display()
{
- // R8,R9 are 7segs
- set_display_segmask(0x300, 0x7f);
- display_matrix(7, 10, m_o, m_r);
+ m_display->matrix(m_r, m_o);
}
WRITE16_MEMBER(esoccer_state::write_r)
@@ -3175,16 +3198,17 @@ WRITE16_MEMBER(esoccer_state::write_r)
// R10: speaker out
m_speaker->level_w(data >> 10 & 1);
- // R0-R9: led select
+ // R0-R7: led select
+ // R8,R9: digit select
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(esoccer_state::write_o)
{
// O0-O6: led state
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(esoccer_state::read_k)
@@ -3224,6 +3248,9 @@ void esoccer_state::esoccer(machine_config &config)
m_maincpu->r().set(FUNC(esoccer_state::write_r));
m_maincpu->o().set(FUNC(esoccer_state::write_o));
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(10, 7);
+ m_display->set_segmask(0x300, 0x7f);
config.set_default_layout(layout_esoccer);
/* sound hardware */
@@ -3286,7 +3313,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -3295,11 +3322,9 @@ public:
// handlers
-void ebball_state::prepare_display()
+void ebball_state::update_display()
{
- // R8 is a 7seg
- set_display_segmask(0x100, 0x7f);
- display_matrix(7, 9, ~m_o, m_r);
+ m_display->matrix(m_r, ~m_o);
}
WRITE16_MEMBER(ebball_state::write_r)
@@ -3310,9 +3335,10 @@ WRITE16_MEMBER(ebball_state::write_r)
// R9: speaker out
m_speaker->level_w(data >> 9 & 1);
- // R0-R8: led select
+ // R0-R7: led select
+ // R8: digit select
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(ebball_state::write_o)
@@ -3320,7 +3346,7 @@ WRITE16_MEMBER(ebball_state::write_o)
// O0-O6: led state
// O7: N/C
m_o = data & 0x7f;
- prepare_display();
+ update_display();
}
READ8_MEMBER(ebball_state::read_k)
@@ -3369,6 +3395,9 @@ void ebball_state::ebball(machine_config &config)
m_maincpu->r().set(FUNC(ebball_state::write_r));
m_maincpu->o().set(FUNC(ebball_state::write_o));
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(9, 7);
+ m_display->set_segmask(0x100, 0x7f);
config.set_default_layout(layout_ebball);
/* sound hardware */
@@ -3427,7 +3456,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -3436,11 +3465,9 @@ public:
// handlers
-void ebball2_state::prepare_display()
+void ebball2_state::update_display()
{
- // R0-R2 are 7segs
- set_display_segmask(7, 0x7f);
- display_matrix(8, 10, ~m_o, m_r ^ 0x7f);
+ m_display->matrix(m_r ^ 0x7f, ~m_o);
}
WRITE16_MEMBER(ebball2_state::write_r)
@@ -3451,16 +3478,17 @@ WRITE16_MEMBER(ebball2_state::write_r)
// R10: speaker out
m_speaker->level_w(data >> 10 & 1);
- // R0-R9: led select
+ // R0-R2: digit select
+ // R3-R9: led select
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(ebball2_state::write_o)
{
// O0-O7: led state
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(ebball2_state::read_k)
@@ -3503,6 +3531,9 @@ void ebball2_state::ebball2(machine_config &config)
m_maincpu->r().set(FUNC(ebball2_state::write_r));
m_maincpu->o().set(FUNC(ebball2_state::write_o));
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(10, 8);
+ m_display->set_segmask(7, 0x7f);
config.set_default_layout(layout_ebball2);
/* sound hardware */
@@ -3566,7 +3597,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -3595,22 +3626,15 @@ void ebball3_state::set_clock()
m_maincpu->set_unscaled_clock((m_inputs[3]->read() & 1) ? 440000 : 340000);
}
-void ebball3_state::prepare_display()
+void ebball3_state::update_display()
{
- // update current state
- for (int y = 0; y < 10; y++)
- m_display_state[y] = (m_r >> y & 1) ? m_o : 0;
+ m_display->matrix_partial(0, 10, m_r, m_o, false);
// R0,R1 are normal 7segs
- set_display_segmask(3, 0x7f);
-
// R4,R7 contain segments(only F and B) for the two other digits
- m_display_state[10] = (m_display_state[4] & 0x20) | (m_display_state[7] & 0x02);
- m_display_state[11] = ((m_display_state[4] & 0x10) | (m_display_state[7] & 0x01)) << 1;
- m_display_segmask[10] = m_display_segmask[11] = 0x22;
-
- set_display_size(7, 10+2);
- display_update();
+ m_display->write_row(10, (m_display->read_row(4) & 0x20) | (m_display->read_row(7) & 0x02));
+ m_display->write_row(11, ((m_display->read_row(4) & 0x10) | (m_display->read_row(7) & 0x01)) << 1);
+ m_display->update();
}
WRITE16_MEMBER(ebball3_state::write_r)
@@ -3621,9 +3645,10 @@ WRITE16_MEMBER(ebball3_state::write_r)
// R10: speaker out
m_speaker->level_w(data >> 10 & 1);
- // R0-R9: led select
+ // R0,R1, digit select
+ // R2-R9: led select
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(ebball3_state::write_o)
@@ -3631,7 +3656,7 @@ WRITE16_MEMBER(ebball3_state::write_o)
// O0-O6: led state
// O7: N/C
m_o = data & 0x7f;
- prepare_display();
+ update_display();
}
READ8_MEMBER(ebball3_state::read_k)
@@ -3689,6 +3714,10 @@ void ebball3_state::ebball3(machine_config &config)
m_maincpu->r().set(FUNC(ebball3_state::write_r));
m_maincpu->o().set(FUNC(ebball3_state::write_o));
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(10+2, 7);
+ m_display->set_segmask(3, 0x7f);
+ m_display->set_segmask(0xc00, 0x22);
config.set_default_layout(layout_ebball3);
/* sound hardware */
@@ -3743,7 +3772,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -3752,11 +3781,9 @@ public:
// handlers
-void esbattle_state::prepare_display()
+void esbattle_state::update_display()
{
- // R8,R9 are 7segs
- set_display_segmask(0x300, 0x7f);
- display_matrix(8, 10, m_o, m_r);
+ m_display->matrix(m_r, m_o);
}
WRITE16_MEMBER(esbattle_state::write_r)
@@ -3767,16 +3794,17 @@ WRITE16_MEMBER(esbattle_state::write_r)
// R10: speaker out
m_speaker->level_w(data >> 10 & 1);
- // R0-R9: led select
+ // R0-R7: led select
+ // R8,R9: digit select
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(esbattle_state::write_o)
{
// O0-O7: led state
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(esbattle_state::read_k)
@@ -3811,6 +3839,9 @@ void esbattle_state::esbattle(machine_config &config)
m_maincpu->r().set(FUNC(esbattle_state::write_r));
m_maincpu->o().set(FUNC(esbattle_state::write_o));
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(10, 8);
+ m_display->set_segmask(0x300, 0x7f);
config.set_default_layout(layout_esbattle);
/* sound hardware */
@@ -3854,7 +3885,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
@@ -3882,11 +3913,9 @@ void einvader_state::set_clock()
m_maincpu->set_unscaled_clock((m_inputs[0]->read() & 8) ? 400000 : 320000);
}
-void einvader_state::prepare_display()
+void einvader_state::update_display()
{
- // R7-R9 are 7segs
- set_display_segmask(0x380, 0x7f);
- display_matrix(8, 10, m_o, m_r);
+ m_display->matrix(m_r, m_o);
}
WRITE16_MEMBER(einvader_state::write_r)
@@ -3894,16 +3923,17 @@ WRITE16_MEMBER(einvader_state::write_r)
// R10: speaker out
m_speaker->level_w(data >> 10 & 1);
- // R0-R9: led select
+ // R0-R6: led select
+ // R7-R9: digit select
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(einvader_state::write_o)
{
// O0-O7: led state
m_o = data;
- prepare_display();
+ update_display();
}
// config
@@ -3932,6 +3962,8 @@ void einvader_state::einvader(machine_config &config)
screen.set_size(939, 1080);
screen.set_visarea_full();
+ PWM_DISPLAY(config, m_display).set_size(10, 8);
+ m_display->set_segmask(0x380, 0x7f);
config.set_default_layout(layout_einvader);
/* sound hardware */
@@ -3974,7 +4006,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -3983,11 +4015,9 @@ public:
// handlers
-void efootb4_state::prepare_display()
+void efootb4_state::update_display()
{
- // R10-R15 are 7segs
- set_display_segmask(0xfc00, 0x7f);
- display_matrix(7, 16, m_o, m_r);
+ m_display->matrix(m_r, m_o);
}
WRITE16_MEMBER(efootb4_state::write_r)
@@ -3996,8 +4026,9 @@ WRITE16_MEMBER(efootb4_state::write_r)
m_inp_mux = data & 0x1f;
// R0-R9: led select
+ // R10-R15: digit select
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(efootb4_state::write_o)
@@ -4007,7 +4038,7 @@ WRITE16_MEMBER(efootb4_state::write_o)
// O0-O6: led state
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(efootb4_state::read_k)
@@ -4061,6 +4092,9 @@ void efootb4_state::efootb4(machine_config &config)
m_maincpu->r().set(FUNC(efootb4_state::write_r));
m_maincpu->o().set(FUNC(efootb4_state::write_o));
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(16, 7);
+ m_display->set_segmask(0xfc00, 0x7f);
config.set_default_layout(layout_efootb4);
/* sound hardware */
@@ -4112,7 +4146,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -4121,11 +4155,9 @@ public:
// handlers
-void ebaskb2_state::prepare_display()
+void ebaskb2_state::update_display()
{
- // R0-R3 are 7segs
- set_display_segmask(0xf, 0x7f);
- display_matrix(7, 10, m_o, m_r);
+ m_display->matrix(m_r, m_o);
}
WRITE16_MEMBER(ebaskb2_state::write_r)
@@ -4136,9 +4168,10 @@ WRITE16_MEMBER(ebaskb2_state::write_r)
// R6-R9: input mux
m_inp_mux = data >> 6 & 0xf;
- // R0-R9: led select
+ // R0-R3: digit select
+ // R4-R9: led select
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(ebaskb2_state::write_o)
@@ -4146,7 +4179,7 @@ WRITE16_MEMBER(ebaskb2_state::write_o)
// O0-O6: led state
// O7: N/C
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(ebaskb2_state::read_k)
@@ -4193,6 +4226,9 @@ void ebaskb2_state::ebaskb2(machine_config &config)
m_maincpu->r().set(FUNC(ebaskb2_state::write_r));
m_maincpu->o().set(FUNC(ebaskb2_state::write_o));
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(10, 7);
+ m_display->set_segmask(0xf, 0x7f);
config.set_default_layout(layout_ebaskb2);
/* sound hardware */
@@ -4247,7 +4283,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -4279,11 +4315,9 @@ void raisedvl_state::set_clock()
m_maincpu->set_unscaled_clock((inp & 0x20) ? 465000 : ((inp & 0x10) ? 425000 : 350000));
}
-void raisedvl_state::prepare_display()
+void raisedvl_state::update_display()
{
- // R0-R2 are 7segs
- set_display_segmask(7, 0x7f);
- display_matrix(7, 10, m_o, m_r);
+ m_display->matrix(m_r, m_o);
}
WRITE16_MEMBER(raisedvl_state::write_r)
@@ -4294,9 +4328,10 @@ WRITE16_MEMBER(raisedvl_state::write_r)
// R0,R1: input mux
m_inp_mux = data & 3;
- // R0-R9: led select
+ // R0-R2: digit select
+ // R3-R9: led select
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(raisedvl_state::write_o)
@@ -4304,7 +4339,7 @@ WRITE16_MEMBER(raisedvl_state::write_o)
// O0-O6: led state
// O7: N/C
m_o = data & 0x7f;
- prepare_display();
+ update_display();
}
READ8_MEMBER(raisedvl_state::read_k)
@@ -4338,6 +4373,9 @@ void raisedvl_state::raisedvl(machine_config &config)
m_maincpu->r().set(FUNC(raisedvl_state::write_r));
m_maincpu->o().set(FUNC(raisedvl_state::write_o));
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(10, 7);
+ m_display->set_segmask(7, 0x7f);
config.set_default_layout(layout_raisedvl);
/* sound hardware */
@@ -4395,7 +4433,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -4404,7 +4442,7 @@ public:
// handlers
-void f2pbball_state::prepare_display()
+void f2pbball_state::update_display()
{
// R5-R8 are 7segs
set_display_segmask(0x1e0, 0x7f);
@@ -4421,14 +4459,14 @@ WRITE16_MEMBER(f2pbball_state::write_r)
// R0-R8: led select
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(f2pbball_state::write_o)
{
// O0-O7: led state
m_o = bitswap<8>(data,0,7,6,5,4,3,2,1);
- prepare_display();
+ update_display();
}
READ8_MEMBER(f2pbball_state::read_k)
@@ -4515,7 +4553,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -4542,7 +4580,7 @@ void f3in1_state::set_clock()
m_maincpu->set_unscaled_clock((m_inputs[4]->read() & 1) ? 400000 : 300000);
}
-void f3in1_state::prepare_display()
+void f3in1_state::update_display()
{
// R6-R9 are 7segs
set_display_segmask(0x3c0, 0x7f);
@@ -4559,14 +4597,14 @@ WRITE16_MEMBER(f3in1_state::write_r)
// R0-R4,R6-R9: led select
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(f3in1_state::write_o)
{
// O0-O7: led state
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(f3in1_state::read_k)
@@ -4662,7 +4700,7 @@ public:
required_device<beep_device> m_beeper;
- void prepare_display();
+ void update_display();
virtual DECLARE_WRITE16_MEMBER(write_r);
virtual DECLARE_WRITE16_MEMBER(write_o);
virtual DECLARE_READ8_MEMBER(read_k);
@@ -4680,7 +4718,7 @@ void gpoker_state::machine_reset()
// handlers
-void gpoker_state::prepare_display()
+void gpoker_state::update_display()
{
set_display_segmask(0x7ff, 0x20ff); // 7seg + bottom-right diagonal
u16 segs = bitswap<16>(m_o, 15,14,7,12,11,10,9,8,6,6,5,4,3,2,1,0) & 0x20ff;
@@ -4698,14 +4736,14 @@ WRITE16_MEMBER(gpoker_state::write_r)
// R0-R10: select digit
// R11-R14: card symbols
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(gpoker_state::write_o)
{
// O0-O7: digit segments A-G,H
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(gpoker_state::read_k)
@@ -4948,7 +4986,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
virtual DECLARE_WRITE16_MEMBER(write_r);
virtual DECLARE_WRITE16_MEMBER(write_o);
virtual DECLARE_READ8_MEMBER(read_k);
@@ -4957,7 +4995,7 @@ public:
// handlers
-void ginv_state::prepare_display()
+void ginv_state::update_display()
{
display_matrix(12, 9, m_plate, m_grid);
}
@@ -4974,14 +5012,14 @@ WRITE16_MEMBER(ginv_state::write_r)
// R11-R14: VFD plate
m_grid = data & 0x1ff;
m_plate = (m_plate & 0xff) | (data >> 3 & 0xf00);
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(ginv_state::write_o)
{
// O0-O7: VFD plate
m_plate = (m_plate & ~0xff) | data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(ginv_state::read_k)
@@ -5070,7 +5108,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
virtual DECLARE_WRITE16_MEMBER(write_r);
virtual DECLARE_WRITE16_MEMBER(write_o);
virtual DECLARE_READ8_MEMBER(read_k);
@@ -5079,7 +5117,7 @@ public:
// handlers
-void ginv1000_state::prepare_display()
+void ginv1000_state::update_display()
{
u16 grid = bitswap<16>(m_grid,15,14,13,12,11,10,0,1,2,3,4,5,6,9,8,7);
u16 plate = bitswap<16>(m_plate,15,14,13,12,3,4,7,8,9,10,11,2,6,5,1,0);
@@ -5098,14 +5136,14 @@ WRITE16_MEMBER(ginv1000_state::write_r)
// R11-R14: VFD plate
m_grid = data >> 1 & 0x3ff;
m_plate = (m_plate & 0xff) | (data >> 3 & 0xf00);
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(ginv1000_state::write_o)
{
// O0-O7: VFD plate
m_plate = (m_plate & ~0xff) | data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(ginv1000_state::read_k)
@@ -5197,7 +5235,7 @@ public:
required_device<tms1024_device> m_expander;
DECLARE_WRITE8_MEMBER(expander_w);
- void prepare_display();
+ void update_display();
virtual DECLARE_WRITE16_MEMBER(write_r);
virtual DECLARE_WRITE16_MEMBER(write_o);
virtual DECLARE_READ8_MEMBER(read_k);
@@ -5215,7 +5253,7 @@ void ginv2000_state::machine_reset()
// handlers
-void ginv2000_state::prepare_display()
+void ginv2000_state::update_display()
{
display_matrix(16, 10, m_plate, m_grid);
}
@@ -5225,7 +5263,7 @@ WRITE8_MEMBER(ginv2000_state::expander_w)
// TMS1024 port 4-7: VFD plate
int shift = (offset - tms1024_device::PORT4) * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(ginv2000_state::write_r)
@@ -5243,7 +5281,7 @@ WRITE16_MEMBER(ginv2000_state::write_r)
// R1-R10: VFD grid
m_grid = data >> 1 & 0x3ff;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(ginv2000_state::write_o)
@@ -5346,7 +5384,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -5355,7 +5393,7 @@ public:
// handlers
-void fxmcr165_state::prepare_display()
+void fxmcr165_state::update_display()
{
// 7seg digit from O0-O6
m_display_segmask[0] = 0x7f;
@@ -5377,7 +5415,7 @@ WRITE16_MEMBER(fxmcr165_state::write_r)
// R4-R10: led data (direct)
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(fxmcr165_state::write_o)
@@ -5387,7 +5425,7 @@ WRITE16_MEMBER(fxmcr165_state::write_o)
// O0-O6: digit segments (direct)
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(fxmcr165_state::read_k)
@@ -5634,7 +5672,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -5643,7 +5681,7 @@ public:
// handlers
-void starwbc_state::prepare_display()
+void starwbc_state::update_display()
{
// R6,R8 are 7segs
set_display_segmask(0x140, 0x7f);
@@ -5660,14 +5698,14 @@ WRITE16_MEMBER(starwbc_state::write_r)
// R0,R2,R4,R6,R8: led select
m_r = data & 0x155;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(starwbc_state::write_o)
{
// O0-O7: led state
m_o = (data << 4 & 0xf0) | (data >> 4 & 0x0f);
- prepare_display();
+ update_display();
}
READ8_MEMBER(starwbc_state::read_k)
@@ -5780,7 +5818,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -5789,7 +5827,7 @@ public:
// handlers
-void astro_state::prepare_display()
+void astro_state::update_display()
{
set_display_segmask(0x3ff, 0xff);
display_matrix(8, 10, m_o, m_r);
@@ -5802,14 +5840,14 @@ WRITE16_MEMBER(astro_state::write_r)
// R0-R9: led select
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(astro_state::write_o)
{
// O0-O7: led state
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(astro_state::read_k)
@@ -5930,7 +5968,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -5939,7 +5977,7 @@ public:
// handlers
-void elecbowl_state::prepare_display()
+void elecbowl_state::update_display()
{
// standard 7segs
for (int y = 0; y < 4; y++)
@@ -5977,7 +6015,7 @@ WRITE16_MEMBER(elecbowl_state::write_r)
// R0,R2: lamp mux1,2 _enable
// R1: lamp muxes state
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(elecbowl_state::write_o)
@@ -5988,7 +6026,7 @@ WRITE16_MEMBER(elecbowl_state::write_o)
// O0-O6: digit segments A-G
// O7: N/C
m_o = data & 0x7f;
- prepare_display();
+ update_display();
}
READ8_MEMBER(elecbowl_state::read_k)
@@ -7340,7 +7378,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
bool sensor_led_on() { return display_element_on(0, 0); }
int m_motor_pos;
@@ -7424,7 +7462,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(mbdtower_state::motor_sim_tick)
}
-void mbdtower_state::prepare_display()
+void mbdtower_state::update_display()
{
// declare display matrix size and the 2 7segs
set_display_size(7, 3);
@@ -7463,7 +7501,7 @@ WRITE16_MEMBER(mbdtower_state::write_r)
// R5-R7: tower lamps
// R8: rotation sensor led
m_r = data;
- prepare_display();
+ update_display();
// R10: speaker out
m_speaker->level_w(~data >> 4 & data >> 10 & 1);
@@ -7474,7 +7512,7 @@ WRITE16_MEMBER(mbdtower_state::write_o)
// O0-O6: led segments A-G
// O7: digit select
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(mbdtower_state::read_k)
@@ -8184,7 +8222,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -8193,7 +8231,7 @@ public:
// handlers
-void bankshot_state::prepare_display()
+void bankshot_state::update_display()
{
display_matrix(8, 11, m_o, m_r & ~3);
}
@@ -8208,14 +8246,14 @@ WRITE16_MEMBER(bankshot_state::write_r)
// R2-R10: led select
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(bankshot_state::write_o)
{
// O0-O7: led state
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(bankshot_state::read_k)
@@ -8323,7 +8361,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -8332,7 +8370,7 @@ public:
// handlers
-void splitsec_state::prepare_display()
+void splitsec_state::update_display()
{
display_matrix(7, 8, m_o, m_r);
}
@@ -8347,7 +8385,7 @@ WRITE16_MEMBER(splitsec_state::write_r)
// R0-R7: led select
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(splitsec_state::write_o)
@@ -8355,7 +8393,7 @@ WRITE16_MEMBER(splitsec_state::write_o)
// O0-O6: led state
// O7: N/C
m_o = data & 0x7f;
- prepare_display();
+ update_display();
}
READ8_MEMBER(splitsec_state::read_k)
@@ -8700,7 +8738,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
virtual DECLARE_WRITE16_MEMBER(write_r);
virtual DECLARE_WRITE16_MEMBER(write_o);
virtual DECLARE_READ8_MEMBER(read_k);
@@ -8709,7 +8747,7 @@ public:
// handlers
-void tcfball_state::prepare_display()
+void tcfball_state::update_display()
{
// R8 enables leds, R9 enables digits
u16 mask = ((m_r >> 9 & 1) * 0x7f) | ((m_r >> 8 & 1) * 0x780);
@@ -8731,14 +8769,14 @@ WRITE16_MEMBER(tcfball_state::write_r)
// R8+R0-R3: select led
// R9+R0-R6: select digit
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(tcfball_state::write_o)
{
// O0-O7: digit segments/led data
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(tcfball_state::read_k)
@@ -8912,7 +8950,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -8921,7 +8959,7 @@ public:
// handlers
-void tandy12_state::prepare_display()
+void tandy12_state::update_display()
{
// O0-O7: button lamps 1-8, R0-R3: button lamps 9-12
display_matrix(13, 1, (m_o << 1 & 0x1fe) | (m_r << 9 & 0x1e00), 1);
@@ -8937,13 +8975,13 @@ WRITE16_MEMBER(tandy12_state::write_r)
// other bits:
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(tandy12_state::write_o)
{
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(tandy12_state::read_k)
@@ -9195,7 +9233,7 @@ public:
required_device<s14001a_device> m_speech;
- void prepare_display();
+ void update_display();
virtual DECLARE_WRITE16_MEMBER(write_r);
virtual DECLARE_WRITE16_MEMBER(write_o);
virtual DECLARE_READ8_MEMBER(read_k);
@@ -9204,7 +9242,7 @@ public:
// handlers
-void speechp_state::prepare_display()
+void speechp_state::update_display()
{
set_display_segmask(0x1ff, 0xff);
display_matrix(8, 9, m_o, m_r);
@@ -9223,14 +9261,14 @@ WRITE16_MEMBER(speechp_state::write_r)
// R0-R8: select digit
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(speechp_state::write_o)
{
// O0-O7: digit segments
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(speechp_state::read_k)
@@ -9354,7 +9392,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_READ8_MEMBER(read_k);
@@ -9363,7 +9401,7 @@ public:
// handlers
-void tisr16_state::prepare_display()
+void tisr16_state::update_display()
{
// update leds state
set_display_segmask(0xfff, 0xff);
@@ -9379,14 +9417,14 @@ WRITE16_MEMBER(tisr16_state::write_r)
{
// R0-R10: input mux, select digit
m_r = m_inp_mux = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(tisr16_state::write_o)
{
// O0-O7: digit segments
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(tisr16_state::read_k)
@@ -9785,7 +9823,7 @@ public:
void ti25503(machine_config &config);
private:
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_READ8_MEMBER(read_k);
@@ -9793,7 +9831,7 @@ private:
// handlers
-void ti25503_state::prepare_display()
+void ti25503_state::update_display()
{
set_display_segmask(0x1ff, 0xff);
display_matrix(8, 9, m_o, m_r);
@@ -9804,14 +9842,14 @@ WRITE16_MEMBER(ti25503_state::write_r)
// R0-R6: input mux
// R0-R8: select digit
m_r = m_inp_mux = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(ti25503_state::write_o)
{
// O0-O7: digit segments
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(ti25503_state::read_k)
@@ -10665,7 +10703,7 @@ public:
void dataman(machine_config &config);
- virtual void prepare_display();
+ virtual void update_display();
virtual DECLARE_WRITE16_MEMBER(write_o);
virtual DECLARE_WRITE16_MEMBER(write_r);
virtual DECLARE_READ8_MEMBER(read_k);
@@ -10673,7 +10711,7 @@ public:
// handlers
-void dataman_state::prepare_display()
+void dataman_state::update_display()
{
// note the extra segment on R9
set_display_segmask(0x1ff, 0x7f);
@@ -10686,14 +10724,14 @@ WRITE16_MEMBER(dataman_state::write_r)
// R0-R8: select digit
// R9: =(equals sign) segment
m_r = m_inp_mux = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(dataman_state::write_o)
{
// O0-O6: digit segments A-G
m_o = bitswap<8>(data,7,1,6,5,4,3,2,0) & 0x7f;
- prepare_display();
+ update_display();
}
READ8_MEMBER(dataman_state::read_k)
@@ -11417,7 +11455,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -11426,7 +11464,7 @@ public:
// handlers
-void ss7in1_state::prepare_display()
+void ss7in1_state::update_display()
{
// R0-R3 are 7segs
set_display_segmask(0xf, 0x7f);
@@ -11443,14 +11481,14 @@ WRITE16_MEMBER(ss7in1_state::write_r)
// R0-R9: digit/led select
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(ss7in1_state::write_o)
{
// O0-O7: led data
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(ss7in1_state::read_k)
@@ -11567,7 +11605,7 @@ public:
u8 m_exp_port[7];
DECLARE_WRITE8_MEMBER(expander_w);
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -11605,7 +11643,7 @@ void tbreakup_state::set_clock()
m_maincpu->set_unscaled_clock((m_inputs[3]->read() & 1) ? 500000 : 325000);
}
-void tbreakup_state::prepare_display()
+void tbreakup_state::update_display()
{
// 7seg leds from R0,R1 and O0-O6
for (int y = 0; y < 2; y++)
@@ -11643,7 +11681,7 @@ WRITE16_MEMBER(tbreakup_state::write_r)
// R0,R1: select digit
m_r = ~data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(tbreakup_state::write_o)
@@ -11657,7 +11695,7 @@ WRITE16_MEMBER(tbreakup_state::write_o)
// O0-O7: led state
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(tbreakup_state::read_k)
@@ -11764,18 +11802,18 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
- DECLARE_INPUT_CHANGED_MEMBER(flipper_button) { prepare_display(); }
+ DECLARE_INPUT_CHANGED_MEMBER(flipper_button) { update_display(); }
void phpball(machine_config &config);
};
// handlers
-void phpball_state::prepare_display()
+void phpball_state::update_display()
{
// rectangular LEDs under LEDs D,F and E,G are directly connected
// to the left and right flipper buttons - output them to 10.a and 9.a
@@ -11796,7 +11834,7 @@ WRITE16_MEMBER(phpball_state::write_r)
// R0-R2: digit select
// R0-R8: led select
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(phpball_state::write_o)
@@ -11804,7 +11842,7 @@ WRITE16_MEMBER(phpball_state::write_o)
// O0-O6: digit segment/led data
// O7: N/C
m_o = data & 0x7f;
- prepare_display();
+ update_display();
}
READ8_MEMBER(phpball_state::read_k)
@@ -11878,7 +11916,7 @@ public:
hh_tms1k_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -11887,7 +11925,7 @@ public:
// handlers
-void ssports4_state::prepare_display()
+void ssports4_state::update_display()
{
// R0,R1 and R8,R9 are 7segs
set_display_segmask(0x303, 0x7f);
@@ -11903,14 +11941,14 @@ WRITE16_MEMBER(ssports4_state::write_r)
// R0-R9: led select/data
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(ssports4_state::write_o)
{
// O0-O7: led data
m_o = data;
- prepare_display();
+ update_display();
}
READ8_MEMBER(ssports4_state::read_k)
@@ -12026,7 +12064,7 @@ public:
void update_halt();
DECLARE_INPUT_CHANGED_MEMBER(k4_button) { update_halt(); }
- void prepare_display();
+ void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
@@ -12051,7 +12089,7 @@ void xl25_state::update_halt()
m_maincpu->set_input_line(INPUT_LINE_HALT, halt ? ASSERT_LINE : CLEAR_LINE);
}
-void xl25_state::prepare_display()
+void xl25_state::update_display()
{
display_matrix(3, 10, m_o >> 1, m_r);
}
@@ -12061,14 +12099,14 @@ WRITE16_MEMBER(xl25_state::write_r)
// R0-R9: input mux, led select
m_inp_mux = data;
m_r = data;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(xl25_state::write_o)
{
// O1-O3: led data
m_o = data;
- prepare_display();
+ update_display();
// O6: speaker out
m_speaker->level_w(data >> 6 & 1);
diff --git a/src/mame/drivers/hh_ucom4.cpp b/src/mame/drivers/hh_ucom4.cpp
index bea6dd616ef..bc30cbc6baf 100644
--- a/src/mame/drivers/hh_ucom4.cpp
+++ b/src/mame/drivers/hh_ucom4.cpp
@@ -243,7 +243,7 @@ public:
hh_ucom4_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(grid_w);
DECLARE_WRITE8_MEMBER(plate_w);
DECLARE_WRITE8_MEMBER(speaker_w);
@@ -252,7 +252,7 @@ public:
// handlers
-void ufombs_state::prepare_display()
+void ufombs_state::update_display()
{
u16 grid = bitswap<16>(m_grid,15,14,13,12,11,10,9,3,2,1,0,4,5,6,7,8);
u16 plate = bitswap<16>(m_plate,15,14,13,12,11,7,10,6,9,5,8,4,0,1,2,3);
@@ -264,7 +264,7 @@ WRITE8_MEMBER(ufombs_state::grid_w)
// F,G,H0: vfd grid
int shift = (offset - PORTF) * 4;
m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(ufombs_state::plate_w)
@@ -272,7 +272,7 @@ WRITE8_MEMBER(ufombs_state::plate_w)
// C,D012,I: vfd plate
int shift = (offset == PORTI) ? 8 : (offset - PORTC) * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(ufombs_state::speaker_w)
@@ -366,7 +366,7 @@ public:
hh_ucom4_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(grid_w);
DECLARE_WRITE8_MEMBER(plate_w);
DECLARE_READ8_MEMBER(input_b_r);
@@ -375,7 +375,7 @@ public:
// handlers
-void ssfball_state::prepare_display()
+void ssfball_state::update_display()
{
u32 plate = bitswap<24>(m_plate,23,22,21,20,19,11,7,3,12,17,13,18,16,14,15,10,9,8,0,1,2,4,5,6);
m_display->matrix(m_grid, plate);
@@ -386,7 +386,7 @@ WRITE8_MEMBER(ssfball_state::grid_w)
// C,D(,E3): vfd grid 0-7(,8)
int shift = (offset - PORTC) * 4;
m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(ssfball_state::plate_w)
@@ -405,7 +405,7 @@ WRITE8_MEMBER(ssfball_state::plate_w)
if (offset == PORTE)
grid_w(space, offset, data >> 3 & 1);
else
- prepare_display();
+ update_display();
}
READ8_MEMBER(ssfball_state::input_b_r)
@@ -528,7 +528,7 @@ public:
hh_ucom4_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(grid_w);
DECLARE_WRITE8_MEMBER(plate_w);
DECLARE_READ8_MEMBER(input_a_r);
@@ -537,7 +537,7 @@ public:
// handlers
-void bmsoccer_state::prepare_display()
+void bmsoccer_state::update_display()
{
u32 plate = bitswap<24>(m_plate,23,22,21,20,19,11,7,3,12,17,13,18,16,14,15,8,4,0,9,5,1,10,6,2);
m_display->matrix(m_grid, plate);
@@ -552,7 +552,7 @@ WRITE8_MEMBER(bmsoccer_state::grid_w)
// C,D(,E3): vfd grid
int shift = (offset - PORTC) * 4;
m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(bmsoccer_state::plate_w)
@@ -569,7 +569,7 @@ WRITE8_MEMBER(bmsoccer_state::plate_w)
if (offset == PORTE)
grid_w(space, offset, data >> 3 & 1);
else
- prepare_display();
+ update_display();
}
READ8_MEMBER(bmsoccer_state::input_a_r)
@@ -661,7 +661,7 @@ public:
hh_ucom4_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(grid_w);
DECLARE_WRITE8_MEMBER(plate_w);
DECLARE_WRITE8_MEMBER(speaker_w);
@@ -670,7 +670,7 @@ public:
// handlers
-void bmsafari_state::prepare_display()
+void bmsafari_state::update_display()
{
u16 grid = bitswap<16>(m_grid,15,14,13,12,11,10,9,0,1,2,3,4,5,6,7,8);
u16 plate = bitswap<16>(m_plate,15,14,13,12,11,7,10,2,9,5,8,4,0,1,6,3);
@@ -682,7 +682,7 @@ WRITE8_MEMBER(bmsafari_state::grid_w)
// C,D(,E3): vfd grid
int shift = (offset - PORTC) * 4;
m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(bmsafari_state::plate_w)
@@ -695,7 +695,7 @@ WRITE8_MEMBER(bmsafari_state::plate_w)
if (offset == PORTE)
grid_w(space, offset, data >> 3 & 1);
else
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(bmsafari_state::speaker_w)
@@ -781,7 +781,7 @@ public:
hh_ucom4_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(grid_w);
DECLARE_WRITE8_MEMBER(plate_w);
DECLARE_READ8_MEMBER(input_b_r);
@@ -790,7 +790,7 @@ public:
// handlers
-void splasfgt_state::prepare_display()
+void splasfgt_state::update_display()
{
u32 plate = bitswap<24>(m_plate,23,22,21,20,19,18,17,13,1,0,8,6,0,10,11,14,15,16,9,5,7,4,2,3);
m_display->matrix(m_grid, plate);
@@ -809,7 +809,7 @@ WRITE8_MEMBER(splasfgt_state::grid_w)
if (offset == PORTI)
plate_w(space, 4 + PORTC, data >> 2 & 1);
else
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(splasfgt_state::plate_w)
@@ -821,7 +821,7 @@ WRITE8_MEMBER(splasfgt_state::plate_w)
// C,D,E,F23(,I2): vfd plate
int shift = (offset - PORTC) * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
READ8_MEMBER(splasfgt_state::input_b_r)
@@ -944,7 +944,7 @@ public:
hh_ucom4_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(grid_w);
DECLARE_WRITE8_MEMBER(plate_w);
void bcclimbr(machine_config &config);
@@ -952,7 +952,7 @@ public:
// handlers
-void bcclimbr_state::prepare_display()
+void bcclimbr_state::update_display()
{
u8 grid = bitswap<8>(m_grid,7,6,0,1,2,3,4,5);
u32 plate = bitswap<24>(m_plate,23,22,21,20,16,17,18,19,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0);
@@ -968,7 +968,7 @@ WRITE8_MEMBER(bcclimbr_state::grid_w)
// H,I01: vfd grid
int shift = (offset - PORTH) * 4;
m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(bcclimbr_state::plate_w)
@@ -976,7 +976,7 @@ WRITE8_MEMBER(bcclimbr_state::plate_w)
// C,D,E,F: vfd plate
int shift = (offset - PORTC) * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
// config
@@ -1181,7 +1181,7 @@ public:
// start button powers unit back on
DECLARE_INPUT_CHANGED_MEMBER(start_button) { m_maincpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(_7seg_w);
DECLARE_WRITE8_MEMBER(speaker_w);
DECLARE_WRITE8_MEMBER(input_w);
@@ -1191,7 +1191,7 @@ public:
// handlers
-void ctntune_state::prepare_display()
+void ctntune_state::update_display()
{
u8 sel = m_port[PORTD] >> 3 & 1; // turn off display when power is off
u8 lamps = m_port[PORTD] & 3;
@@ -1204,7 +1204,7 @@ WRITE8_MEMBER(ctntune_state::_7seg_w)
{
// E,F012: 7seg data, F3: N/C
m_port[offset] = data;
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(ctntune_state::speaker_w)
@@ -1223,7 +1223,7 @@ WRITE8_MEMBER(ctntune_state::input_w)
// D0,D1: yellow, red lamp
m_port[offset] = data;
m_inp_mux = (m_port[PORTD] << 2 & 0x30) | m_port[PORTC];
- prepare_display();
+ update_display();
}
READ8_MEMBER(ctntune_state::input_r)
@@ -1321,7 +1321,7 @@ public:
hh_ucom4_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(grid_w);
DECLARE_WRITE8_MEMBER(plate_w);
void invspace(machine_config &config);
@@ -1329,7 +1329,7 @@ public:
// handlers
-void invspace_state::prepare_display()
+void invspace_state::update_display()
{
u16 grid = bitswap<16>(m_grid,15,14,13,12,11,10,8,9,7,6,5,4,3,2,1,0);
u32 plate = bitswap<24>(m_plate,23,22,21,20,19,9,14,13,8,15,11,10,7,11,3,2,6,10,1,5,9,0,4,8);
@@ -1345,7 +1345,7 @@ WRITE8_MEMBER(invspace_state::grid_w)
// C,D,I1: vfd grid
int shift = (offset == PORTI) ? 8 : (offset - PORTC) * 4;
m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(invspace_state::plate_w)
@@ -1353,7 +1353,7 @@ WRITE8_MEMBER(invspace_state::plate_w)
// E,F,G,H123: vfd plate
int shift = (offset - PORTE) * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
// config
@@ -1433,7 +1433,7 @@ public:
hh_ucom4_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(grid_w);
DECLARE_WRITE8_MEMBER(plate_w);
void efball(machine_config &config);
@@ -1441,7 +1441,7 @@ public:
// handlers
-void efball_state::prepare_display()
+void efball_state::update_display()
{
u16 plate = bitswap<16>(m_plate,15,14,13,12,11,4,3,0,2,1,6,10,9,5,8,7);
m_display->matrix(m_grid, plate);
@@ -1456,7 +1456,7 @@ WRITE8_MEMBER(efball_state::grid_w)
// F,G,H01: vfd grid
int shift = (offset - PORTF) * 4;
m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(efball_state::plate_w)
@@ -1464,7 +1464,7 @@ WRITE8_MEMBER(efball_state::plate_w)
// D,E,I: vfd plate
int shift = (offset == PORTI) ? 8 : (offset - PORTD) * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
// config
@@ -1554,7 +1554,7 @@ public:
hh_ucom4_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(grid_w);
DECLARE_WRITE8_MEMBER(plate_w);
void galaxy2b(machine_config &config);
@@ -1563,7 +1563,7 @@ public:
// handlers
-void galaxy2_state::prepare_display()
+void galaxy2_state::update_display()
{
u16 grid = bitswap<16>(m_grid,15,14,13,12,11,10,0,1,2,3,4,5,6,7,8,9);
u16 plate = bitswap<16>(m_plate,15,3,2,6,1,5,4,0,11,10,7,12,14,13,8,9);
@@ -1579,7 +1579,7 @@ WRITE8_MEMBER(galaxy2_state::grid_w)
// C,D,E01: vfd grid
int shift = (offset - PORTC) * 4;
m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(galaxy2_state::plate_w)
@@ -1587,7 +1587,7 @@ WRITE8_MEMBER(galaxy2_state::plate_w)
// F,G,H,I: vfd plate
int shift = (offset - PORTF) * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
// config
@@ -1686,7 +1686,7 @@ public:
hh_ucom4_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(grid_w);
DECLARE_WRITE8_MEMBER(plate_w);
void astrocmd(machine_config &config);
@@ -1694,7 +1694,7 @@ public:
// handlers
-void astrocmd_state::prepare_display()
+void astrocmd_state::update_display()
{
u16 grid = bitswap<16>(m_grid,15,14,13,12,11,10,9,8,4,5,6,7,0,1,2,3);
u32 plate = bitswap<24>(m_plate,23,22,21,20,19,3,2,12,13,14,15,16,17,18,0,1,4,8,5,9,7,11,6,10);
@@ -1706,7 +1706,7 @@ WRITE8_MEMBER(astrocmd_state::grid_w)
// C,D(,E3): vfd grid
int shift = (offset - PORTC) * 4;
m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(astrocmd_state::plate_w)
@@ -1724,7 +1724,7 @@ WRITE8_MEMBER(astrocmd_state::plate_w)
grid_w(space, offset, data >> 3 & 1);
}
else
- prepare_display();
+ update_display();
}
// config
@@ -1806,6 +1806,7 @@ public:
hh_ucom4_state(mconfig, type, tag)
{ }
+ void update_display();
DECLARE_WRITE8_MEMBER(grid_w);
DECLARE_WRITE8_MEMBER(plate_w);
void edracula(machine_config &config);
@@ -1813,12 +1814,17 @@ public:
// handlers
+void edracula_state::update_display()
+{
+ m_display->matrix(m_grid, m_plate);
+}
+
WRITE8_MEMBER(edracula_state::grid_w)
{
// C,D: vfd grid
int shift = (offset - PORTC) * 4;
m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
- m_display->matrix(m_grid, m_plate);
+ update_display();
}
WRITE8_MEMBER(edracula_state::plate_w)
@@ -1830,7 +1836,7 @@ WRITE8_MEMBER(edracula_state::plate_w)
// E,F,G,H,I01: vfd plate
int shift = (offset - PORTE) * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
- m_display->matrix(m_grid, m_plate);
+ update_display();
}
// config
@@ -1993,7 +1999,7 @@ public:
hh_ucom4_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(grid_w);
DECLARE_WRITE8_MEMBER(plate_w);
DECLARE_WRITE8_MEMBER(speaker_w);
@@ -2002,7 +2008,7 @@ public:
// handlers
-void mvbfree_state::prepare_display()
+void mvbfree_state::update_display()
{
u16 grid = bitswap<16>(m_grid,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15);
u16 plate = bitswap<16>(m_plate,15,14,13,12,11,10,0,1,2,3,4,5,6,7,8,9);
@@ -2019,7 +2025,7 @@ WRITE8_MEMBER(mvbfree_state::grid_w)
if (offset == PORTE)
plate_w(space, 2 + PORTC, data & 3);
else
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(mvbfree_state::plate_w)
@@ -2027,7 +2033,7 @@ WRITE8_MEMBER(mvbfree_state::plate_w)
// C,D(,E01): vfd plate
int shift = (offset - PORTC) * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(mvbfree_state::speaker_w)
@@ -2231,7 +2237,7 @@ public:
hh_ucom4_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(grid_w);
DECLARE_WRITE8_MEMBER(plate_w);
void tccombat(machine_config &config);
@@ -2239,7 +2245,7 @@ public:
// handlers
-void tccombat_state::prepare_display()
+void tccombat_state::update_display()
{
u16 grid = bitswap<16>(m_grid,15,14,13,12,11,10,9,8,3,2,1,0,7,6,5,4);
u32 plate = bitswap<24>(m_plate,23,22,21,20,11,15,3,10,14,2,9,13,1,0,12,8,15,1,5,0,3,7,2,6);
@@ -2255,7 +2261,7 @@ WRITE8_MEMBER(tccombat_state::grid_w)
// C,D,I0: vfd grid
int shift = (offset == PORTI) ? 8 : (offset - PORTC) * 4;
m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(tccombat_state::plate_w)
@@ -2263,7 +2269,7 @@ WRITE8_MEMBER(tccombat_state::plate_w)
// E,F123,G,H: vfd plate
int shift = (offset - PORTE) * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
// config
@@ -2341,6 +2347,7 @@ public:
hh_ucom4_state(mconfig, type, tag)
{ }
+ void update_display();
DECLARE_WRITE8_MEMBER(grid_w);
DECLARE_WRITE8_MEMBER(plate_w);
DECLARE_WRITE8_MEMBER(port_e_w);
@@ -2370,12 +2377,17 @@ void tmtennis_state::set_clock()
m_maincpu->set_unscaled_clock((m_inputs[1]->read() & 0x100) ? 260000 : 360000);
}
+void tmtennis_state::update_display()
+{
+ m_display->matrix(m_grid, m_plate);
+}
+
WRITE8_MEMBER(tmtennis_state::grid_w)
{
// G,H,I: vfd grid
int shift = (offset - PORTG) * 4;
m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
- m_display->matrix(m_grid, m_plate);
+ update_display();
}
WRITE8_MEMBER(tmtennis_state::plate_w)
@@ -2383,7 +2395,7 @@ WRITE8_MEMBER(tmtennis_state::plate_w)
// C,D,F: vfd plate
int shift = (offset == PORTF) ? 8 : (offset - PORTC) * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
- m_display->matrix(m_grid, m_plate);
+ update_display();
}
WRITE8_MEMBER(tmtennis_state::port_e_w)
@@ -2509,7 +2521,7 @@ public:
hh_ucom4_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(grid_w);
DECLARE_WRITE8_MEMBER(plate_w);
void tmpacman(machine_config &config);
@@ -2517,7 +2529,7 @@ public:
// handlers
-void tmpacman_state::prepare_display()
+void tmpacman_state::update_display()
{
u8 grid = bitswap<8>(m_grid,0,1,2,3,4,5,6,7);
u32 plate = bitswap<24>(m_plate,23,22,21,20,19,16,17,18,11,10,9,8,0,2,3,1,4,5,6,7,12,13,14,15) | 0x100;
@@ -2529,7 +2541,7 @@ WRITE8_MEMBER(tmpacman_state::grid_w)
// C,D: vfd grid
int shift = (offset - PORTC) * 4;
m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(tmpacman_state::plate_w)
@@ -2541,7 +2553,7 @@ WRITE8_MEMBER(tmpacman_state::plate_w)
// E023,F,G,H,I: vfd plate
int shift = (offset - PORTE) * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
// config
@@ -2624,7 +2636,7 @@ public:
hh_ucom4_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(grid_w);
DECLARE_WRITE8_MEMBER(plate_w);
void tmscramb(machine_config &config);
@@ -2632,7 +2644,7 @@ public:
// handlers
-void tmscramb_state::prepare_display()
+void tmscramb_state::update_display()
{
u32 plate = bitswap<24>(m_plate,23,22,21,20,19,18,17,3,15,2,14,1,13,16,0,12,8,4,9,5,10,6,11,7) | 0x400;
m_display->matrix(m_grid, plate);
@@ -2647,7 +2659,7 @@ WRITE8_MEMBER(tmscramb_state::grid_w)
// C,D,I01: vfd grid
int shift = (offset == PORTI) ? 8 : (offset - PORTC) * 4;
m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(tmscramb_state::plate_w)
@@ -2655,7 +2667,7 @@ WRITE8_MEMBER(tmscramb_state::plate_w)
// E,F,G,H: vfd plate
int shift = (offset - PORTE) * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
// config
@@ -2736,7 +2748,7 @@ public:
hh_ucom4_state(mconfig, type, tag)
{ }
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(grid_w);
DECLARE_WRITE8_MEMBER(plate_w);
void tcaveman(machine_config &config);
@@ -2744,7 +2756,7 @@ public:
// handlers
-void tcaveman_state::prepare_display()
+void tcaveman_state::update_display()
{
u8 grid = bitswap<8>(m_grid,0,1,2,3,4,5,6,7);
u32 plate = bitswap<24>(m_plate,23,22,21,20,19,10,11,5,6,7,8,0,9,2,18,17,16,3,15,14,13,12,4,1) | 0x40;
@@ -2756,7 +2768,7 @@ WRITE8_MEMBER(tcaveman_state::grid_w)
// C,D: vfd grid
int shift = (offset - PORTC) * 4;
m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(tcaveman_state::plate_w)
@@ -2768,7 +2780,7 @@ WRITE8_MEMBER(tcaveman_state::plate_w)
// E012,F,G,H,I: vfd plate
int shift = (offset - PORTE) * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
- prepare_display();
+ update_display();
}
// config
diff --git a/src/mame/drivers/k28.cpp b/src/mame/drivers/k28.cpp
index 53d8834541b..927ef036d27 100644
--- a/src/mame/drivers/k28.cpp
+++ b/src/mame/drivers/k28.cpp
@@ -43,7 +43,7 @@ public:
m_vfd(*this, "vfd"),
m_vfd_delay(*this, "led_delay_%u", 0),
m_onbutton_timer(*this, "on_button"),
- m_inp_matrix(*this, "IN.%u", 0),
+ m_inputs(*this, "IN.%u", 0),
m_out_x(*this, "%u.%u", 0U, 0U),
m_out_digit(*this, "digit%u", 0U)
{ }
@@ -64,7 +64,7 @@ private:
required_device<mm5445_device> m_vfd;
required_device_array<timer_device, 9> m_vfd_delay;
required_device<timer_device> m_onbutton_timer;
- required_ioport_array<7> m_inp_matrix;
+ required_ioport_array<7> m_inputs;
output_finder<9, 16> m_out_x;
output_finder<9> m_out_digit;
@@ -215,7 +215,7 @@ READ8_MEMBER(k28_state::mcu_p1_r)
for (int i = 0; i < 7; i++)
if (m_inp_mux >> i & 1)
{
- data |= m_inp_matrix[i]->read();
+ data |= m_inputs[i]->read();
// force press on-button at boot
if (i == 5 && m_onbutton_timer->enabled())
diff --git a/src/mame/drivers/mindset.cpp b/src/mame/drivers/mindset.cpp
index baf728a21d5..bb97bbbe3bb 100644
--- a/src/mame/drivers/mindset.cpp
+++ b/src/mame/drivers/mindset.cpp
@@ -259,6 +259,34 @@ u32 mindset_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, co
break;
case 1: // IBM-compatible graphics mode
+ if(large_pixels) {
+ if(!interleave) {
+ switch(pixels_per_byte_order) {
+ case 1: {
+ static int palind[4] = { 0, 1, 4, 5 };
+ for(u32 yy=0; yy<2; yy++) {
+ const u16 *src = m_vram + 4096*yy;
+ for(u32 y=yy; y<200; y+=2) {
+ u32 *dest = &bitmap.pix32(y);
+ for(u32 x=0; x<320; x+=8) {
+ u16 sv = *src++;
+ *dest++ = m_palette[palind[(sv >> 6) & 3]];
+ *dest++ = m_palette[palind[(sv >> 4) & 3]];
+ *dest++ = m_palette[palind[(sv >> 2) & 3]];
+ *dest++ = m_palette[palind[(sv >> 0) & 3]];
+ *dest++ = m_palette[palind[(sv >> 14) & 3]];
+ *dest++ = m_palette[palind[(sv >> 12) & 3]];
+ *dest++ = m_palette[palind[(sv >> 10) & 3]];
+ *dest++ = m_palette[palind[(sv >> 8) & 3]];
+ }
+ }
+ }
+ return 0;
+ }
+ }
+ }
+ }
+
logerror("Unimplemented ibm-compatible graphics mode (%dx%d, ppb=%d)\n", large_pixels ? 320 : 640, interleave ? 400 : 200, 2 << pixels_per_byte_order);
break;
@@ -382,17 +410,7 @@ void mindset_state::blit(u16 packet_seg, u16 packet_adr)
// i/f = increment source / don't (unimplemented, compare with p?, used by blt_copy_word)
if(mode & 0x200) {
- u32 nw = width >> 4;
- u16 src = m_gcos->read_word((src_seg << 4) + src_adr);
-
- for(u32 y=0; y<height; y++) {
- u16 dst_cadr = dst_adr;
- for(u32 w = 0; w != nw; w++) {
- m_gcos->write_word((dst_seg << 4) + dst_cadr, src);
- dst_cadr += 2;
- }
- dst_adr += dy;
- }
+ // Weird, does one with target bbe8:0000 which blows everything up
} else {
auto blend = gco_blend[(mode >> 2) & 7];
@@ -422,7 +440,8 @@ void mindset_state::blit(u16 packet_seg, u16 packet_adr)
u16 cmask = swmask;
u16 nw1 = nw;
u32 srcs = sw(m_gcos->read_word((src_seg << 4) + src_cadr));
- src_cadr += 2;
+ if(mode & 0x100)
+ src_cadr += 2;
do {
srcs = (srcs << 16) | sw(m_gcos->read_word((src_seg << 4) + src_cadr));
u16 src = (srcs >> (src_sft + 1)) & rmask;
@@ -455,10 +474,11 @@ void mindset_state::blit(u16 packet_seg, u16 packet_adr)
res = (dst & ~cmask) | (res & cmask);
- logerror("GCO: %04x * %04x = %04x @ %04x\n", src, dst, res, cmask);
+ // logerror("GCO: %04x * %04x = %04x @ %04x\n", src, dst, res, cmask);
m_gcos->write_word((dst_seg << 4) + dst_cadr, sw(res));
- src_cadr += 2;
+ if(mode & 0x100)
+ src_cadr += 2;
dst_cadr += 2;
nw1 --;
@@ -466,7 +486,8 @@ void mindset_state::blit(u16 packet_seg, u16 packet_adr)
cmask = nw1 == 1 ? ewmask : mwmask;
} while(nw1);
- src_adr += sy;
+ if(mode & 0x100)
+ src_adr += sy;
dst_adr += dy;
}
}
@@ -481,8 +502,8 @@ void mindset_state::gco_w(u16)
logerror("GCO: start %04x:%04x mode %04x (%05x)\n", packet_seg, packet_adr, global_mode, m_maincpu->pc());
switch(global_mode) {
- case 0x0101:
case 0x0005:
+ case 0x0101:
blit(packet_seg, packet_adr);
break;
}
diff --git a/src/mame/drivers/novag_cforte.cpp b/src/mame/drivers/novag_cforte.cpp
index e0fdde92318..de1d488efcc 100644
--- a/src/mame/drivers/novag_cforte.cpp
+++ b/src/mame/drivers/novag_cforte.cpp
@@ -53,7 +53,7 @@ private:
void main_map(address_map &map);
// I/O handlers
- void prepare_display();
+ void update_display();
DECLARE_WRITE64_MEMBER(lcd_output_w);
DECLARE_WRITE8_MEMBER(mux_w);
DECLARE_WRITE8_MEMBER(control_w);
@@ -68,7 +68,7 @@ private:
// TTL/generic
-void cforte_state::prepare_display()
+void cforte_state::update_display()
{
// 3 led rows
display_matrix(8, 3, m_led_data, m_led_select, false);
@@ -96,14 +96,14 @@ WRITE64_MEMBER(cforte_state::lcd_output_w)
m_display_state[dig+3] = bitswap<8>(m_display_state[dig+3],7,2,0,4,6,5,3,1);
}
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(cforte_state::mux_w)
{
// d0-d7: input mux, led data
m_inp_mux = m_led_data = data;
- prepare_display();
+ update_display();
}
WRITE8_MEMBER(cforte_state::control_w)
@@ -119,7 +119,7 @@ WRITE8_MEMBER(cforte_state::control_w)
// d4-d6: select led row
m_led_select = data >> 4 & 7;
- prepare_display();
+ update_display();
// d7: enable beeper
m_beeper->set_state(data >> 7 & 1);
diff --git a/src/mame/drivers/scisys_cp2000.cpp b/src/mame/drivers/scisys_cp2000.cpp
index 59b7075386e..62b27ffc05b 100644
--- a/src/mame/drivers/scisys_cp2000.cpp
+++ b/src/mame/drivers/scisys_cp2000.cpp
@@ -54,7 +54,7 @@ private:
void main_io(address_map &map);
// I/O handlers
- void prepare_display();
+ void update_display();
DECLARE_WRITE8_MEMBER(control_w);
DECLARE_WRITE8_MEMBER(digit_w);
DECLARE_READ8_MEMBER(input_r);
@@ -88,7 +88,7 @@ void cp2000_state::machine_start()
// CPU I/O ports
-void cp2000_state::prepare_display()
+void cp2000_state::update_display()
{
m_display->matrix(m_select, m_7seg_data);
}
@@ -97,7 +97,7 @@ WRITE8_MEMBER(cp2000_state::control_w)
{
// d0-d3: digit select
m_select = ~data;
- prepare_display();
+ update_display();
// d4: keypad/chessboard select
@@ -148,7 +148,7 @@ WRITE8_MEMBER(cp2000_state::digit_w)
// also digit segment data
m_7seg_data = bitswap<8>(data,0,2,1,3,4,5,6,7);
- prepare_display();
+ update_display();
}
diff --git a/src/mame/drivers/tispeak.cpp b/src/mame/drivers/tispeak.cpp
index 76b093c1a53..6e05a7a841b 100644
--- a/src/mame/drivers/tispeak.cpp
+++ b/src/mame/drivers/tispeak.cpp
@@ -464,7 +464,7 @@ public:
private:
virtual void power_off() override;
- void prepare_display();
+ void update_display();
DECLARE_READ8_MEMBER(snspell_read_k);
DECLARE_WRITE16_MEMBER(snmath_write_o);
@@ -477,7 +477,7 @@ private:
DECLARE_WRITE16_MEMBER(snspellc_write_r);
DECLARE_READ8_MEMBER(tntell_read_k);
- void k28_prepare_display(u8 old, u8 data);
+ void k28_update_display(u8 old, u8 data);
DECLARE_READ8_MEMBER(k28_read_k);
DECLARE_WRITE16_MEMBER(k28_write_o);
DECLARE_WRITE16_MEMBER(k28_write_r);
@@ -586,7 +586,7 @@ void tispeak_state::power_off()
m_tms5100->reset();
}
-void tispeak_state::prepare_display()
+void tispeak_state::update_display()
{
u16 gridmask = m_display->row_on(15) ? 0xffff : 0x8000;
m_display->matrix(m_grid & gridmask, m_plate);
@@ -603,7 +603,7 @@ WRITE16_MEMBER(tispeak_state::snspell_write_r)
// other bits: MCU internal use
m_r = m_inp_mux = data;
m_grid = data & 0x81ff;
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(tispeak_state::snspell_write_o)
@@ -612,7 +612,7 @@ WRITE16_MEMBER(tispeak_state::snspell_write_o)
// note: lantutor and snread VFD has an accent triangle instead of DP, and no AP
// E,D,C,G,B,A,I,M,L,K,N,J,[AP],H,F,[DP] (sidenote: TI KLMN = MAME MLNK)
m_plate = bitswap<16>(data,12,15,10,7,8,9,11,6,13,3,14,0,1,2,4,5);
- prepare_display();
+ update_display();
}
READ8_MEMBER(tispeak_state::snspell_read_k)
@@ -629,7 +629,7 @@ WRITE16_MEMBER(tispeak_state::snmath_write_o)
// reorder opla to led14seg, plus DP as d14 and CT as d15:
// [DP],D,C,H,F,B,I,M,L,K,N,J,[CT],E,G,A (sidenote: TI KLMN = MAME MLNK)
m_plate = bitswap<16>(data,12,0,10,7,8,9,11,6,3,14,4,13,1,2,5,15);
- prepare_display();
+ update_display();
}
@@ -640,7 +640,7 @@ WRITE16_MEMBER(tispeak_state::lantutor_write_r)
// same as default, except R13 is used for an extra digit
m_r = m_inp_mux = data;
m_grid = data & 0xa1ff;
- prepare_display();
+ update_display();
}
@@ -728,7 +728,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(tispeak_state::tntell_get_overlay)
// k28 specific
-void tispeak_state::k28_prepare_display(u8 old, u8 data)
+void tispeak_state::k28_update_display(u8 old, u8 data)
{
// ?
}
@@ -750,7 +750,7 @@ WRITE16_MEMBER(tispeak_state::k28_write_r)
power_off();
// R7-R10: LCD data
- k28_prepare_display(m_r >> 7 & 0xf, data >> 7 & 0xf);
+ k28_update_display(m_r >> 7 & 0xf, data >> 7 & 0xf);
m_r = r;
}
diff --git a/src/mame/drivers/tispellb.cpp b/src/mame/drivers/tispellb.cpp
index f6a15966a42..c5cac48d6c9 100644
--- a/src/mame/drivers/tispellb.cpp
+++ b/src/mame/drivers/tispellb.cpp
@@ -92,7 +92,7 @@ private:
virtual void power_off() override;
void power_subcpu();
- void prepare_display();
+ void update_display();
DECLARE_READ8_MEMBER(main_read_k);
DECLARE_WRITE16_MEMBER(main_write_o);
@@ -147,7 +147,7 @@ void tispellb_state::power_off()
power_subcpu();
}
-void tispellb_state::prepare_display()
+void tispellb_state::update_display()
{
// almost same as snspell
u16 gridmask = m_display->row_on(15) ? 0xffff : 0x8000;
@@ -158,7 +158,7 @@ WRITE16_MEMBER(tispellb_state::main_write_o)
{
// reorder opla to led14seg, plus DP as d14 and AP as d15, same as snspell
m_plate = bitswap<16>(data,12,15,10,7,8,9,11,6,13,3,14,0,1,2,4,5);
- prepare_display();
+ update_display();
}
WRITE16_MEMBER(tispellb_state::main_write_r)
@@ -173,7 +173,7 @@ WRITE16_MEMBER(tispellb_state::main_write_r)
m_r = data;
m_inp_mux = data & 0x7f;
m_grid = data & 0x80ff;
- prepare_display();
+ update_display();
}
READ8_MEMBER(tispellb_state::main_read_k)
diff --git a/src/mame/drivers/unkhorse.cpp b/src/mame/drivers/unkhorse.cpp
index ff964588507..5d66f583be4 100644
--- a/src/mame/drivers/unkhorse.cpp
+++ b/src/mame/drivers/unkhorse.cpp
@@ -35,7 +35,7 @@ public:
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_speaker(*this, "speaker"),
- m_inp_matrix(*this, "IN.%u", 0),
+ m_inputs(*this, "IN.%u", 0),
m_vram(*this, "vram")
{ }
@@ -44,7 +44,7 @@ public:
private:
required_device<cpu_device> m_maincpu;
required_device<speaker_sound_device> m_speaker;
- required_ioport_array<4> m_inp_matrix;
+ required_ioport_array<4> m_inputs;
required_shared_ptr<uint8_t> m_vram;
std::unique_ptr<uint8_t[]> m_colorram;
@@ -117,7 +117,7 @@ void horse_state::horse_io_map(address_map &map)
READ8_MEMBER(horse_state::input_r)
{
- return m_inp_matrix[m_output >> 6 & 3]->read();
+ return m_inputs[m_output >> 6 & 3]->read();
}
WRITE8_MEMBER(horse_state::output_w)
diff --git a/src/mame/includes/goldstar.h b/src/mame/includes/goldstar.h
index cb4641d0052..659daaa2616 100644
--- a/src/mame/includes/goldstar.h
+++ b/src/mame/includes/goldstar.h
@@ -48,6 +48,7 @@ public:
DECLARE_WRITE8_MEMBER(ay8910_outputa_w);
DECLARE_WRITE8_MEMBER(ay8910_outputb_w);
void init_goldstar();
+ void init_jkrmast();
void init_cmast91();
void init_wcherry();
void init_super9();
diff --git a/src/mame/video/dpb_combiner.cpp b/src/mame/video/dpb_combiner.cpp
index 295e7d11dea..65e11d0da53 100644
--- a/src/mame/video/dpb_combiner.cpp
+++ b/src/mame/video/dpb_combiner.cpp
@@ -27,18 +27,24 @@ DEFINE_DEVICE_TYPE(DPB7000_COMBINER, dpb7000_combiner_card_device, "dpb_combiner
dpb7000_combiner_card_device::dpb7000_combiner_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, DPB7000_COMBINER, tag, owner, clock)
+ , m_latched_lum_sum(0)
+ , m_latched_chr_sum(0)
+ , m_lum_out(0)
+ , m_chr_out(0)
, m_chr_i_in(false)
, m_chr_i(false)
, m_palette_l(false)
, m_cursor_enb(false)
, m_cursor_col(false)
- , m_cursor_luma(0)
+ , m_fsck(false)
+ , m_cursor_y(0)
, m_cursor_u(0)
, m_cursor_v(0)
, m_invert_mask(0)
, m_lum(*this)
, m_chr(*this)
- , m_fsck(nullptr)
+ , m_fsck_timer(nullptr)
+ , m_screen(*this, "screen")
, m_mult_ge(*this, "mult_ge") // Lum I
, m_mult_gd(*this, "mult_gd") // Lum II
, m_mult_gc(*this, "mult_gc") // Chroma I
@@ -51,18 +57,21 @@ void dpb7000_combiner_card_device::device_start()
{
save_item(NAME(m_lum_in));
save_item(NAME(m_latched_lum));
+ save_item(NAME(m_selected_lum));
save_item(NAME(m_chr_in));
save_item(NAME(m_latched_chr));
+ save_item(NAME(m_selected_chr));
save_item(NAME(m_ext_in));
- save_item(NAME(m_blank_lum));
+ save_item(NAME(m_blank));
save_item(NAME(m_chr_i_in));
save_item(NAME(m_chr_i));
save_item(NAME(m_palette_l));
save_item(NAME(m_cursor_enb));
save_item(NAME(m_cursor_col));
+ save_item(NAME(m_fsck));
- save_item(NAME(m_cursor_luma));
+ save_item(NAME(m_cursor_y));
save_item(NAME(m_cursor_u));
save_item(NAME(m_cursor_v));
save_item(NAME(m_invert_mask));
@@ -72,26 +81,44 @@ void dpb7000_combiner_card_device::device_start()
save_item(NAME(m_matte_u));
save_item(NAME(m_matte_v));
+ save_item(NAME(m_blank_or_suppress));
+ save_item(NAME(m_output_matte_y));
+ save_item(NAME(m_output_matte_u));
+ save_item(NAME(m_output_matte_v));
+ save_item(NAME(m_output_matte_ext));
+
m_lum.resolve_safe();
m_chr.resolve_safe();
+
+ m_fsck_timer = timer_alloc(FSCK_TIMER);
+ m_fsck_timer->adjust(attotime::never);
}
void dpb7000_combiner_card_device::device_reset()
{
memset(m_lum_in, 0, 2);
memset(m_latched_lum, 0, 2);
+ memset(m_selected_lum, 0, 2);
memset(m_chr_in, 0, 2);
memset(m_latched_chr, 0, 2);
+ memset(m_selected_lum, 0, 2);
memset(m_ext_in, 0, 2);
- memset(m_blank_lum, 0, 2);
+ memset(m_blank, 0, 2);
m_chr_i_in = false;
m_chr_i = false;
m_palette_l = false;
m_cursor_enb = false;
m_cursor_col = false;
+ m_fsck = false;
- m_cursor_luma = 0;
+ memset(m_blank_or_suppress, 0, 2);
+ memset(m_output_matte_y, 0, 2);
+ memset(m_output_matte_u, 0, 2);
+ memset(m_output_matte_v, 0, 2);
+ memset(m_output_matte_ext, 0, 2);
+
+ m_cursor_y = 0;
m_cursor_u = 0;
m_cursor_v = 0;
m_invert_mask = 0;
@@ -100,6 +127,8 @@ void dpb7000_combiner_card_device::device_reset()
memset(m_matte_y, 0, 2);
memset(m_matte_u, 0, 2);
memset(m_matte_v, 0, 2);
+
+ m_fsck_timer->adjust(attotime::from_hz(clock()), 0, attotime::from_hz(clock()));
}
void dpb7000_combiner_card_device::device_add_mconfig(machine_config &config)
@@ -109,18 +138,84 @@ void dpb7000_combiner_card_device::device_add_mconfig(machine_config &config)
TMC28KU(config, m_mult_gc);
TMC28KU(config, m_mult_gb);
TMC28KU(config, m_mult_ga);
+
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(clock(), 910, 0, 640, 525, 0, 480);
+ m_screen->set_screen_update(FUNC(dpb7000_combiner_card_device::screen_update));
}
void dpb7000_combiner_card_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
if (id == FSCK_TIMER)
{
- fsck_tick();
+ m_fsck = !m_fsck;
+ if (m_fsck)
+ {
+ fsck_tick();
+ }
}
}
void dpb7000_combiner_card_device::fsck_tick()
{
+ for (int i = 0; i < 2; i++)
+ {
+ m_latched_lum[i] = m_lum_in[i];
+ m_latched_chr[i] = m_chr_in[i];
+ m_selected_lum[i] = m_output_matte_y[i] ? m_matte_y[i] : m_latched_lum[i];
+ m_selected_chr[i] = m_output_matte_u[i] ? m_matte_u[i] : (m_output_matte_v[i] ? m_matte_v[i] : m_latched_chr[i]);
+ m_selected_ext[i] = m_output_matte_ext[i] ? m_matte_ext[i] : m_ext_in[i];
+ }
+
+ // MPY-8HUJ GA
+ const uint8_t ext_product = m_palette_l ? (((uint16_t)m_selected_ext[0] * (uint16_t)m_selected_ext[1] + 0x80) >> 8) : 0xff;
+
+ // 74LS175 FF and 74S157 FG
+ const bool y1 = (bool)(m_palette_l ? BIT(m_invert_mask, 3) : BIT(m_invert_mask, 4));
+ const bool y2 = !y1;
+
+ // 74S86 EE/EF/FD/FE
+ const uint8_t a = ext_product ^ (y1 ? 0xff : 0x00);
+ const uint8_t b = ext_product ^ (y2 ? 0xff : 0x00);
+
+ // MPY-8HUJ GE
+ const uint8_t lum1_product = ((uint16_t)m_selected_lum[0] * (uint16_t)a + 0x80) >> 8;
+
+ // MPY-8HUJ GD
+ const uint8_t lum2_product = ((uint16_t)m_selected_lum[1] * (uint16_t)b + 0x80) >> 8;
+
+ // MPY-8HUJ GC
+ const uint8_t chr1_product = ((uint16_t)m_selected_chr[0] * (uint16_t)a + 0x80) >> 8;
+
+ // MPY-8HUJ GB
+ const uint8_t chr2_product = ((uint16_t)m_selected_chr[1] * (uint16_t)b + 0x80) >> 8;
+
+ // 74S283 FC/ED, 74S374 DD
+ m_latched_lum_sum = lum1_product + lum2_product;
+
+ // 74S283 FB/EC, 74S374 DC
+ m_latched_chr_sum = chr1_product + chr2_product;
+
+ m_lum_out = m_cursor_enb ? (m_cursor_col ? (m_chr_i ? m_cursor_u : m_cursor_v) : 0x7f) : m_latched_lum_sum;
+ m_chr_out = m_cursor_enb ? (m_cursor_col ? m_cursor_y : 0x7f) : m_latched_chr_sum;
+
+ m_lum(m_lum_out);
+ m_chr(m_chr_out);
+
+ m_screen->update_now();
+}
+
+uint32_t dpb7000_combiner_card_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
+{
+ for (int y = cliprect.min_y; y <= cliprect.max_y; y++)
+ {
+ uint32_t *dest = &bitmap.pix32(y, cliprect.min_x);
+ for (int x = cliprect.min_x; x <= cliprect.max_x && x < 256; x++)
+ {
+ *dest++ = 0xff000000 | (m_lum_out << 16) | (m_lum_out << 8) | m_lum_out;
+ }
+ }
+ return 0;
}
void dpb7000_combiner_card_device::reg_w(uint16_t data)
@@ -130,7 +225,7 @@ void dpb7000_combiner_card_device::reg_w(uint16_t data)
switch ((data >> 10) & 0xf)
{
case 1: // CY
- m_cursor_luma = (uint8_t)data;
+ m_cursor_y = (uint8_t)data;
break;
case 2: // CU
m_cursor_u = (uint8_t)data;
@@ -140,6 +235,7 @@ void dpb7000_combiner_card_device::reg_w(uint16_t data)
break;
case 4: // ES
m_invert_mask = (uint8_t)data;
+ update_matte_selects();
break;
case 5: // EI
m_matte_ext[0] = (uint8_t)data;
@@ -149,6 +245,7 @@ void dpb7000_combiner_card_device::reg_w(uint16_t data)
break;
case 8: // IS
m_select_matte[0] = BIT(data, 0);
+ update_matte_selects();
break;
case 9: // IY
m_matte_y[0] = (uint8_t)data;
@@ -161,6 +258,7 @@ void dpb7000_combiner_card_device::reg_w(uint16_t data)
break;
case 12: // IIS
m_select_matte[1] = BIT(data, 0);
+ update_matte_selects();
break;
case 13: // IIY
m_matte_y[1] = (uint8_t)data;
@@ -184,14 +282,16 @@ void dpb7000_combiner_card_device::lum2_w(uint8_t data)
m_lum_in[1] = data;
}
-void dpb7000_combiner_card_device::blank_lum1(int state)
+void dpb7000_combiner_card_device::blank1(int state)
{
- m_blank_lum[0] = (bool)state;
+ m_blank[0] = (bool)state;
+ update_matte_selects();
}
-void dpb7000_combiner_card_device::blank_lum2(int state)
+void dpb7000_combiner_card_device::blank2(int state)
{
- m_blank_lum[1] = (bool)state;
+ m_blank[1] = (bool)state;
+ update_matte_selects();
}
void dpb7000_combiner_card_device::chr1_w(uint8_t data)
@@ -207,21 +307,23 @@ void dpb7000_combiner_card_device::chr2_w(uint8_t data)
void dpb7000_combiner_card_device::chr_flag_w(int state)
{
m_chr_i_in = (bool)state;
+ update_matte_selects();
}
void dpb7000_combiner_card_device::ext1_w(uint8_t data)
{
- m_ext_in[0] = data;
+ m_ext_in[0] = BIT(m_invert_mask, 4) ? (data ^ 0xff) : data;
}
void dpb7000_combiner_card_device::ext2_w(uint8_t data)
{
- m_ext_in[1] = data;
+ m_ext_in[1] = BIT(m_invert_mask, 4) ? (data ^ 0xff) : data;
}
void dpb7000_combiner_card_device::palette_l_w(int state)
{
m_palette_l = (bool)state;
+ update_matte_selects();
}
void dpb7000_combiner_card_device::cursor_enb_w(int state)
@@ -233,3 +335,15 @@ void dpb7000_combiner_card_device::cursor_col_w(int state)
{
m_cursor_col = (bool)state;
}
+
+void dpb7000_combiner_card_device::update_matte_selects()
+{
+ for (int i = 0; i < 2; i++)
+ {
+ m_blank_or_suppress[i] = m_select_matte[i] || m_blank[i];
+ m_output_matte_y[i] = m_blank_or_suppress[i] && m_palette_l;
+ m_output_matte_u[i] = m_output_matte_y[i] && m_chr_i;
+ m_output_matte_v[i] = m_output_matte_y[i] && !m_chr_i;
+ m_output_matte_ext[i] = !BIT(m_invert_mask, i) && m_blank[i];
+ }
+}
diff --git a/src/mame/video/dpb_combiner.h b/src/mame/video/dpb_combiner.h
index e6d7a358a98..61bdc79156c 100644
--- a/src/mame/video/dpb_combiner.h
+++ b/src/mame/video/dpb_combiner.h
@@ -16,6 +16,7 @@
#pragma once
#include "machine/tmc208k.h"
+#include "screen.h"
//**************************************************************************
@@ -33,8 +34,8 @@ public:
void reg_w(uint16_t data);
void lum1_w(uint8_t data);
void lum2_w(uint8_t data);
- void blank_lum1(int state);
- void blank_lum2(int state);
+ void blank1(int state);
+ void blank2(int state);
void chr1_w(uint8_t data);
void chr2_w(uint8_t data);
void chr_flag_w(int state);
@@ -58,20 +59,32 @@ protected:
void fsck_tick();
+ uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+
+ void update_matte_selects();
+
uint8_t m_lum_in[2];
uint8_t m_latched_lum[2];
+ uint8_t m_selected_lum[2];
uint8_t m_chr_in[2];
uint8_t m_latched_chr[2];
+ uint8_t m_selected_chr[2];
uint8_t m_ext_in[2];
+ uint8_t m_selected_ext[2];
+ uint8_t m_latched_lum_sum;
+ uint8_t m_latched_chr_sum;
+ uint8_t m_lum_out;
+ uint8_t m_chr_out;
- bool m_blank_lum[2];
+ bool m_blank[2];
bool m_chr_i_in;
bool m_chr_i;
bool m_palette_l;
bool m_cursor_enb;
bool m_cursor_col;
+ bool m_fsck;
- uint8_t m_cursor_luma;
+ uint8_t m_cursor_y;
uint8_t m_cursor_u;
uint8_t m_cursor_v;
uint8_t m_invert_mask;
@@ -81,11 +94,18 @@ protected:
uint8_t m_matte_u[2];
uint8_t m_matte_v[2];
+ bool m_blank_or_suppress[2]; // FH
+ bool m_output_matte_y[2]; // EB
+ bool m_output_matte_u[2]; // EG
+ bool m_output_matte_v[2]; // EG
+ bool m_output_matte_ext[2]; // FA
+
devcb_write8 m_lum;
devcb_write8 m_chr;
- emu_timer *m_fsck;
+ emu_timer *m_fsck_timer;
+ required_device<screen_device> m_screen;
required_device<tmc28ku_device> m_mult_ge;
required_device<tmc28ku_device> m_mult_gd;
required_device<tmc28ku_device> m_mult_gc;