mirror of
https://github.com/holub/mame
synced 2025-04-24 09:20:02 +03:00
(nw) output finder for llc1 and ut88mini
This commit is contained in:
parent
6e9cf05474
commit
707764f7d6
@ -30,6 +30,7 @@ public:
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_ram(*this, RAM_TAG)
|
||||
, m_p_chargen(*this, "chargen")
|
||||
, m_digits(*this, "digit%u", 0U)
|
||||
{ }
|
||||
|
||||
DECLARE_WRITE8_MEMBER(llc2_rom_disable_w);
|
||||
@ -68,6 +69,7 @@ private:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_device<ram_device> m_ram;
|
||||
required_region_ptr<u8> m_p_chargen;
|
||||
output_finder<8> m_digits;
|
||||
};
|
||||
|
||||
#endif // MAME_INCLUDES_LLC_H
|
||||
|
@ -26,26 +26,28 @@ public:
|
||||
};
|
||||
|
||||
ut88_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_cassette(*this, "cassette"),
|
||||
m_ppi(*this, "ppi8255"),
|
||||
m_dac(*this, "dac"),
|
||||
m_p_videoram(*this, "videoram"),
|
||||
m_region_maincpu(*this, "maincpu"),
|
||||
m_region_proms(*this, "proms"),
|
||||
m_bank1(*this, "bank1"),
|
||||
m_io_line0(*this, "LINE0"),
|
||||
m_io_line1(*this, "LINE1"),
|
||||
m_io_line2(*this, "LINE2"),
|
||||
m_io_line3(*this, "LINE3"),
|
||||
m_io_line4(*this, "LINE4"),
|
||||
m_io_line5(*this, "LINE5"),
|
||||
m_io_line6(*this, "LINE6"),
|
||||
m_io_line7(*this, "LINE7"),
|
||||
m_io_line8(*this, "LINE8") ,
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_palette(*this, "palette") { }
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_cassette(*this, "cassette")
|
||||
, m_ppi(*this, "ppi8255")
|
||||
, m_dac(*this, "dac")
|
||||
, m_p_videoram(*this, "videoram")
|
||||
, m_region_maincpu(*this, "maincpu")
|
||||
, m_region_proms(*this, "proms")
|
||||
, m_bank1(*this, "bank1")
|
||||
, m_io_line0(*this, "LINE0")
|
||||
, m_io_line1(*this, "LINE1")
|
||||
, m_io_line2(*this, "LINE2")
|
||||
, m_io_line3(*this, "LINE3")
|
||||
, m_io_line4(*this, "LINE4")
|
||||
, m_io_line5(*this, "LINE5")
|
||||
, m_io_line6(*this, "LINE6")
|
||||
, m_io_line7(*this, "LINE7")
|
||||
, m_io_line8(*this, "LINE8")
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_gfxdecode(*this, "gfxdecode")
|
||||
, m_palette(*this, "palette")
|
||||
, m_digits(*this, "digit%u", 0U)
|
||||
{ }
|
||||
|
||||
DECLARE_READ8_MEMBER(ut88_keyboard_r);
|
||||
DECLARE_WRITE8_MEMBER(ut88_keyboard_w);
|
||||
@ -92,6 +94,7 @@ private:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_device<gfxdecode_device> m_gfxdecode;
|
||||
optional_device<palette_device> m_palette;
|
||||
output_finder<6> m_digits;
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
|
||||
};
|
||||
|
||||
|
@ -82,7 +82,10 @@ WRITE8_MEMBER(llc_state::llc1_port1_b_w)
|
||||
count++;
|
||||
|
||||
if (count == 1)
|
||||
output().set_digit_value(digit, data & 0x7f);
|
||||
{
|
||||
if (digit < 8)
|
||||
m_digits[digit] = data & 0x7f;
|
||||
}
|
||||
else
|
||||
if (count == 3)
|
||||
{
|
||||
@ -103,6 +106,7 @@ MACHINE_RESET_MEMBER(llc_state,llc1)
|
||||
|
||||
MACHINE_START_MEMBER(llc_state,llc1)
|
||||
{
|
||||
m_digits.resolve();
|
||||
}
|
||||
|
||||
/* Driver initialization */
|
||||
|
@ -44,7 +44,7 @@ void ut88_state::device_timer(emu_timer &timer, device_timer_id id, int param, v
|
||||
break;
|
||||
case TIMER_UPDATE_DISPLAY:
|
||||
for (int i=0;i<6;i++)
|
||||
output().set_digit_value(i, hex_to_7seg[m_lcd_digit[i]]);
|
||||
m_digits[i] = hex_to_7seg[m_lcd_digit[i]];
|
||||
timer_set(attotime::from_hz(60), TIMER_UPDATE_DISPLAY);
|
||||
break;
|
||||
default:
|
||||
@ -167,6 +167,7 @@ DRIVER_INIT_MEMBER(ut88_state,ut88mini)
|
||||
|
||||
MACHINE_START_MEMBER(ut88_state,ut88mini)
|
||||
{
|
||||
m_digits.resolve();
|
||||
timer_set(attotime::from_hz(60), TIMER_UPDATE_DISPLAY);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user