summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Robbbert <Robbbert@users.noreply.github.com>2018-04-10 23:11:30 +1000
committer Robbbert <Robbbert@users.noreply.github.com>2018-04-10 23:11:30 +1000
commit2211387bfa3e4b6404cbf519782e5d2cc93c088e (patch)
treec55e3c3263ca403f1f16a2abeceb01cc45c9e147
parentda2a6868b18801db01ed1644fdcdd9897291dc39 (diff)
(nw) wpc_an : output finder (grchamp: removed test code from last commit)
-rw-r--r--src/mame/drivers/grchamp.cpp3
-rw-r--r--src/mame/drivers/wpc_an.cpp19
2 files changed, 11 insertions, 11 deletions
diff --git a/src/mame/drivers/grchamp.cpp b/src/mame/drivers/grchamp.cpp
index 4609246b7df..902cae411cd 100644
--- a/src/mame/drivers/grchamp.cpp
+++ b/src/mame/drivers/grchamp.cpp
@@ -534,9 +534,6 @@ static GFXDECODE_START( grchamp )
GFXDECODE_ENTRY( "gfx3", 0x0000, tile_layout, 0, 2 )
GFXDECODE_ENTRY( "gfx4", 0x0000, tile_layout, 0, 2 )
GFXDECODE_ENTRY( "gfx1", 0x0000, sprite_layout, 0, 8 )
- GFXDECODE_ENTRY( "gfx5", 0x0000, tile_layout, 0, 2 )
- GFXDECODE_ENTRY( "gfx6", 0x0000, tile_layout, 0, 2 )
- GFXDECODE_ENTRY( "gfx7", 0x0000, tile_layout, 0, 2 )
GFXDECODE_END
diff --git a/src/mame/drivers/wpc_an.cpp b/src/mame/drivers/wpc_an.cpp
index dbc33ccfc15..6777e6f8f52 100644
--- a/src/mame/drivers/wpc_an.cpp
+++ b/src/mame/drivers/wpc_an.cpp
@@ -22,12 +22,13 @@ class wpc_an_state : public driver_device
{
public:
wpc_an_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_bg(*this,"bg"),
- m_wpcsnd(*this,"wpcsnd"),
- m_cpubank(*this, "cpubank"),
- m_wpc(*this,"wpc")
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_bg(*this,"bg")
+ , m_wpcsnd(*this,"wpcsnd")
+ , m_cpubank(*this, "cpubank")
+ , m_wpc(*this,"wpc")
+ , m_digits(*this, "digit%u", 0U)
{ }
void wpc_an_dd(machine_config &config);
@@ -42,9 +43,11 @@ protected:
optional_device<wpcsnd_device> m_wpcsnd;
required_memory_bank m_cpubank;
required_device<wpc_device> m_wpc;
+ output_finder<32> m_digits;
// driver_device overrides
virtual void machine_reset() override;
+ virtual void machine_start() override { m_digits.resolve(); }
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
static const device_timer_id TIMER_VBLANK = 0;
static const device_timer_id TIMER_IRQ = 1;
@@ -204,8 +207,8 @@ void wpc_an_state::device_timer(emu_timer &timer, device_timer_id id, int param,
// update LED segments
for(x=0;x<16;x++)
{
- output().set_digit_value(x,bitswap<16>(m_wpc->get_alphanumeric(x), 15, 7, 12, 10, 8, 14, 13, 9, 11, 6, 5, 4, 3, 2, 1, 0));
- output().set_digit_value(x+16,bitswap<16>(m_wpc->get_alphanumeric(20+x), 15, 7, 12, 10, 8, 14, 13, 9, 11, 6, 5, 4, 3, 2, 1, 0));
+ m_digits[x] = bitswap<16>(m_wpc->get_alphanumeric(x), 15, 7, 12, 10, 8, 14, 13, 9, 11, 6, 5, 4, 3, 2, 1, 0);
+ m_digits[x+16] = bitswap<16>(m_wpc->get_alphanumeric(20+x), 15, 7, 12, 10, 8, 14, 13, 9, 11, 6, 5, 4, 3, 2, 1, 0);
}
m_wpc->reset_alphanumeric();
m_vblank_count++;