mirror of
https://github.com/holub/mame
synced 2025-04-25 17:56:43 +03:00
caswin: output_finder
This commit is contained in:
parent
cf828c6c5f
commit
8b92654900
@ -83,7 +83,8 @@ public:
|
||||
m_sc0_vram(*this, "sc0_vram"),
|
||||
m_sc0_attr(*this, "sc0_attr"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_gfxdecode(*this, "gfxdecode")
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_lamps(*this, "lamp%u", 0U)
|
||||
{ }
|
||||
|
||||
void vvillage(machine_config &config);
|
||||
@ -110,6 +111,7 @@ private:
|
||||
tilemap_t *m_sc0_tilemap;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
output_finder<5> m_lamps;
|
||||
};
|
||||
|
||||
|
||||
@ -127,6 +129,7 @@ TILE_GET_INFO_MEMBER(caswin_state::get_sc0_tile_info)
|
||||
|
||||
void caswin_state::video_start()
|
||||
{
|
||||
m_lamps.resolve();
|
||||
m_sc0_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(caswin_state::get_sc0_tile_info),this),TILEMAP_SCAN_ROWS,8,8,32,32);
|
||||
}
|
||||
|
||||
@ -190,11 +193,9 @@ WRITE8_MEMBER(caswin_state::vvillage_lamps_w)
|
||||
---- --x- lamp button 2
|
||||
---- ---x lamp button 1
|
||||
*/
|
||||
output().set_led_value(0, data & 0x01);
|
||||
output().set_led_value(1, data & 0x02);
|
||||
output().set_led_value(2, data & 0x04);
|
||||
output().set_led_value(3, data & 0x08);
|
||||
output().set_led_value(4, data & 0x10);
|
||||
|
||||
for (unsigned i = 0; i < 5; i++)
|
||||
m_lamps[i] = BIT(data, i);
|
||||
}
|
||||
|
||||
void caswin_state::vvillage_mem(address_map &map)
|
||||
|
Loading…
Reference in New Issue
Block a user