mirror of
https://github.com/holub/mame
synced 2025-04-23 17:00:53 +03:00
rename function (nw)
This commit is contained in:
parent
2321ee2b0c
commit
57e1c5cde1
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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));
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
@ -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));
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
@ -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();
|
||||
|
@ -420,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);
|
||||
@ -431,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;
|
||||
@ -443,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)
|
||||
@ -458,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
|
||||
@ -549,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);
|
||||
|
||||
@ -576,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)
|
||||
@ -1058,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);
|
||||
@ -1068,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);
|
||||
}
|
||||
@ -1077,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)
|
||||
@ -1085,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)
|
||||
@ -1093,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)
|
||||
@ -1299,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);
|
||||
@ -1309,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);
|
||||
@ -1319,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)
|
||||
@ -1334,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)
|
||||
@ -1591,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);
|
||||
@ -1602,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);
|
||||
}
|
||||
@ -1612,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)
|
||||
@ -1620,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)
|
||||
@ -1640,7 +1640,7 @@ WRITE_LINE_MEMBER(qkracer_state::write_sk)
|
||||
{
|
||||
// SK: green led
|
||||
m_sk = state;
|
||||
prepare_display();
|
||||
update_display();
|
||||
}
|
||||
|
||||
// config
|
||||
@ -1732,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);
|
||||
@ -1741,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);
|
||||
}
|
||||
@ -1750,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
|
||||
|
@ -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
|
||||
@ -1892,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);
|
||||
|
||||
@ -1932,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);
|
||||
@ -1947,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)
|
||||
@ -1958,7 +1958,7 @@ WRITE16_MEMBER(cdkong_state::grid_w)
|
||||
|
||||
// D4-D14: vfd grid
|
||||
m_grid = data >> 4 & 0x7ff;
|
||||
prepare_display();
|
||||
update_display();
|
||||
}
|
||||
|
||||
// config
|
||||
@ -2049,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);
|
||||
@ -2060,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);
|
||||
@ -2071,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)
|
||||
@ -2083,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)
|
||||
@ -2095,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)
|
||||
@ -2452,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);
|
||||
@ -2461,7 +2461,7 @@ 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);
|
||||
@ -2476,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)
|
||||
@ -2489,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)
|
||||
@ -2603,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);
|
||||
@ -2612,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);
|
||||
@ -2629,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)
|
||||
@ -2637,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)
|
||||
@ -2829,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);
|
||||
|
||||
@ -2857,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);
|
||||
@ -2871,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)
|
||||
@ -2888,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()
|
||||
@ -3028,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);
|
||||
@ -3538,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);
|
||||
@ -3548,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);
|
||||
@ -3559,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)
|
||||
@ -3569,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)
|
||||
@ -3713,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);
|
||||
|
||||
@ -3724,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);
|
||||
@ -3736,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)
|
||||
@ -3757,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()
|
||||
@ -3945,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);
|
||||
|
||||
@ -3956,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);
|
||||
@ -3968,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)
|
||||
@ -3989,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()
|
||||
@ -4071,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);
|
||||
|
||||
@ -4082,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);
|
||||
@ -4094,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)
|
||||
@ -4115,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()
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -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,7 +1806,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 edracula(machine_config &config);
|
||||
@ -1814,7 +1814,7 @@ public:
|
||||
|
||||
// handlers
|
||||
|
||||
void edracula_state::prepare_display()
|
||||
void edracula_state::update_display()
|
||||
{
|
||||
m_display->matrix(m_grid, m_plate);
|
||||
}
|
||||
@ -1824,7 +1824,7 @@ WRITE8_MEMBER(edracula_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(edracula_state::plate_w)
|
||||
@ -1836,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);
|
||||
prepare_display();
|
||||
update_display();
|
||||
}
|
||||
|
||||
// config
|
||||
@ -1999,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);
|
||||
@ -2008,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);
|
||||
@ -2025,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)
|
||||
@ -2033,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)
|
||||
@ -2237,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);
|
||||
@ -2245,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);
|
||||
@ -2261,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)
|
||||
@ -2269,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
|
||||
@ -2521,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);
|
||||
@ -2529,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;
|
||||
@ -2541,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)
|
||||
@ -2553,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
|
||||
@ -2636,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);
|
||||
@ -2644,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);
|
||||
@ -2659,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)
|
||||
@ -2667,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
|
||||
@ -2748,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);
|
||||
@ -2756,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;
|
||||
@ -2768,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)
|
||||
@ -2780,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
|
||||
|
@ -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())
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user