mirror of
https://github.com/holub/mame
synced 2025-10-04 08:28:39 +03:00
src/devices: Replace output().set_value with output finders (nw)
This commit is contained in:
parent
470c416cc3
commit
ea8913e128
@ -107,6 +107,7 @@ a1200_kbd_device::a1200_kbd_device(machine_config const &mconfig, char const *ta
|
|||||||
, device_amiga_keyboard_interface(mconfig, *this)
|
, device_amiga_keyboard_interface(mconfig, *this)
|
||||||
, m_rows(*this, "ROW%u", 0)
|
, m_rows(*this, "ROW%u", 0)
|
||||||
, m_mpu(*this, "mpu")
|
, m_mpu(*this, "mpu")
|
||||||
|
, m_led_kbd_caps(*this, "led_kbd_caps")
|
||||||
, m_row_drive(0xffff)
|
, m_row_drive(0xffff)
|
||||||
, m_host_kdat(true)
|
, m_host_kdat(true)
|
||||||
, m_mpu_kdat(true)
|
, m_mpu_kdat(true)
|
||||||
@ -163,7 +164,7 @@ WRITE8_MEMBER(a1200_kbd_device::mpu_portb_w)
|
|||||||
WRITE8_MEMBER(a1200_kbd_device::mpu_portc_w)
|
WRITE8_MEMBER(a1200_kbd_device::mpu_portc_w)
|
||||||
{
|
{
|
||||||
m_row_drive = (m_row_drive & 0x80ff) | (u16(u8(data | ~mem_mask) & 0x7f) << 8);
|
m_row_drive = (m_row_drive & 0x80ff) | (u16(u8(data | ~mem_mask) & 0x7f) << 8);
|
||||||
machine().output().set_value("led_kbd_caps", BIT(~data, 7));
|
m_led_kbd_caps = BIT(~data, 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE_LINE_MEMBER(a1200_kbd_device::mpu_tcmp)
|
WRITE_LINE_MEMBER(a1200_kbd_device::mpu_tcmp)
|
||||||
@ -194,6 +195,8 @@ ioport_constructor a1200_kbd_device::device_input_ports() const
|
|||||||
|
|
||||||
void a1200_kbd_device::device_start()
|
void a1200_kbd_device::device_start()
|
||||||
{
|
{
|
||||||
|
m_led_kbd_caps.resolve();
|
||||||
|
|
||||||
save_item(NAME(m_row_drive));
|
save_item(NAME(m_row_drive));
|
||||||
save_item(NAME(m_host_kdat));
|
save_item(NAME(m_host_kdat));
|
||||||
save_item(NAME(m_mpu_kdat));
|
save_item(NAME(m_mpu_kdat));
|
||||||
|
@ -49,6 +49,7 @@ protected:
|
|||||||
private:
|
private:
|
||||||
required_ioport_array<15> m_rows;
|
required_ioport_array<15> m_rows;
|
||||||
required_device<cpu_device> m_mpu;
|
required_device<cpu_device> m_mpu;
|
||||||
|
output_finder<> m_led_kbd_caps;
|
||||||
|
|
||||||
u16 m_row_drive;
|
u16 m_row_drive;
|
||||||
bool m_host_kdat, m_mpu_kdat;
|
bool m_host_kdat, m_mpu_kdat;
|
||||||
|
@ -496,6 +496,7 @@ a2000_kbd_g80_device::a2000_kbd_g80_device(machine_config const &mconfig, device
|
|||||||
, device_amiga_keyboard_interface(mconfig, *this)
|
, device_amiga_keyboard_interface(mconfig, *this)
|
||||||
, m_rows(*this, "ROW%u", 0U)
|
, m_rows(*this, "ROW%u", 0U)
|
||||||
, m_mcu(*this, "u1")
|
, m_mcu(*this, "u1")
|
||||||
|
, m_led_kbd_caps(*this, "led_kbd_caps")
|
||||||
, m_row_drive(0U)
|
, m_row_drive(0U)
|
||||||
, m_host_kdat(true)
|
, m_host_kdat(true)
|
||||||
, m_mcu_kdat(true)
|
, m_mcu_kdat(true)
|
||||||
@ -536,7 +537,7 @@ WRITE8_MEMBER(a2000_kbd_g80_device::mcu_p2_w)
|
|||||||
{
|
{
|
||||||
m_row_drive = (m_row_drive & 0x00ffU) | (uint16_t(data & 0x1fU) << 8);
|
m_row_drive = (m_row_drive & 0x00ffU) | (uint16_t(data & 0x1fU) << 8);
|
||||||
|
|
||||||
machine().output().set_value("led_kbd_caps", BIT(~data, 5));
|
m_led_kbd_caps = BIT(~data, 5);
|
||||||
|
|
||||||
if (bool(BIT(data, 6) != m_mcu_kdat))
|
if (bool(BIT(data, 6) != m_mcu_kdat))
|
||||||
{
|
{
|
||||||
@ -574,6 +575,8 @@ void a2000_kbd_g80_device::device_add_mconfig(machine_config &config)
|
|||||||
|
|
||||||
void a2000_kbd_g80_device::device_start()
|
void a2000_kbd_g80_device::device_start()
|
||||||
{
|
{
|
||||||
|
m_led_kbd_caps.resolve();
|
||||||
|
|
||||||
save_item(NAME(m_row_drive));
|
save_item(NAME(m_row_drive));
|
||||||
save_item(NAME(m_host_kdat));
|
save_item(NAME(m_host_kdat));
|
||||||
save_item(NAME(m_mcu_kdat));
|
save_item(NAME(m_mcu_kdat));
|
||||||
|
@ -49,6 +49,7 @@ protected:
|
|||||||
private:
|
private:
|
||||||
required_ioport_array<13> m_rows;
|
required_ioport_array<13> m_rows;
|
||||||
required_device<cpu_device> m_mcu;
|
required_device<cpu_device> m_mcu;
|
||||||
|
output_finder<> m_led_kbd_caps;
|
||||||
|
|
||||||
uint16_t m_row_drive;
|
uint16_t m_row_drive;
|
||||||
bool m_host_kdat, m_mcu_kdat, m_mcu_kclk;
|
bool m_host_kdat, m_mcu_kdat, m_mcu_kclk;
|
||||||
|
@ -92,7 +92,7 @@ void epson_lx800_device::device_add_mconfig(machine_config &config)
|
|||||||
|
|
||||||
/* gate array */
|
/* gate array */
|
||||||
e05a03_device &ic3b(E05A03(config, "ic3b", 0));
|
e05a03_device &ic3b(E05A03(config, "ic3b", 0));
|
||||||
ic3b.pe_lp_wr_callback().set(FUNC(epson_lx800_device::paperempty_led_w));
|
ic3b.pe_lp_wr_callback().set_output("paperout_led");
|
||||||
ic3b.reso_wr_callback().set(FUNC(epson_lx800_device::reset_w));
|
ic3b.reso_wr_callback().set(FUNC(epson_lx800_device::reset_w));
|
||||||
ic3b.pe_wr_callback().set(FUNC(epson_lx800_device::centronics_pe_w));
|
ic3b.pe_wr_callback().set(FUNC(epson_lx800_device::centronics_pe_w));
|
||||||
ic3b.data_rd_callback().set(FUNC(epson_lx800_device::centronics_data_r));
|
ic3b.data_rd_callback().set(FUNC(epson_lx800_device::centronics_data_r));
|
||||||
@ -193,7 +193,8 @@ epson_lx800_device::epson_lx800_device(const machine_config &mconfig, device_typ
|
|||||||
device_t(mconfig, type, tag, owner, clock),
|
device_t(mconfig, type, tag, owner, clock),
|
||||||
device_centronics_peripheral_interface(mconfig, *this),
|
device_centronics_peripheral_interface(mconfig, *this),
|
||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
m_beep(*this, "beeper")
|
m_beep(*this, "beeper"),
|
||||||
|
m_online_led(*this, "online_led")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,6 +205,7 @@ epson_lx800_device::epson_lx800_device(const machine_config &mconfig, device_typ
|
|||||||
|
|
||||||
void epson_lx800_device::device_start()
|
void epson_lx800_device::device_start()
|
||||||
{
|
{
|
||||||
|
m_online_led.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -276,7 +278,7 @@ WRITE8_MEMBER( epson_lx800_device::portc_w )
|
|||||||
logerror("%s: lx800_portc_w(%02x): %02x\n", machine().describe_context(), offset, data);
|
logerror("%s: lx800_portc_w(%02x): %02x\n", machine().describe_context(), offset, data);
|
||||||
logerror("--> err: %d, ack: %d, fire: %d, buzzer: %d\n", BIT(data, 4), BIT(data, 5), BIT(data, 6), BIT(data, 7));
|
logerror("--> err: %d, ack: %d, fire: %d, buzzer: %d\n", BIT(data, 4), BIT(data, 5), BIT(data, 6), BIT(data, 7));
|
||||||
|
|
||||||
machine().output().set_value("online_led", !BIT(data, 2));
|
m_online_led = !BIT(data, 2);
|
||||||
m_beep->set_state(!BIT(data, 7));
|
m_beep->set_state(!BIT(data, 7));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -326,12 +328,6 @@ WRITE_LINE_MEMBER( epson_lx800_device::centronics_pe_w )
|
|||||||
logerror("centronics: pe = %d\n", state);
|
logerror("centronics: pe = %d\n", state);
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE_LINE_MEMBER( epson_lx800_device::paperempty_led_w )
|
|
||||||
{
|
|
||||||
logerror("setting paperout led: %d\n", state);
|
|
||||||
machine().output().set_value("paperout_led", state);
|
|
||||||
}
|
|
||||||
|
|
||||||
WRITE_LINE_MEMBER( epson_lx800_device::reset_w )
|
WRITE_LINE_MEMBER( epson_lx800_device::reset_w )
|
||||||
{
|
{
|
||||||
logerror("cpu reset");
|
logerror("cpu reset");
|
||||||
|
@ -57,13 +57,13 @@ private:
|
|||||||
|
|
||||||
DECLARE_READ8_MEMBER(centronics_data_r);
|
DECLARE_READ8_MEMBER(centronics_data_r);
|
||||||
DECLARE_WRITE_LINE_MEMBER(centronics_pe_w);
|
DECLARE_WRITE_LINE_MEMBER(centronics_pe_w);
|
||||||
DECLARE_WRITE_LINE_MEMBER(paperempty_led_w);
|
|
||||||
DECLARE_WRITE_LINE_MEMBER(reset_w);
|
DECLARE_WRITE_LINE_MEMBER(reset_w);
|
||||||
|
|
||||||
void lx800_mem(address_map &map);
|
void lx800_mem(address_map &map);
|
||||||
|
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
required_device<beep_device> m_beep;
|
required_device<beep_device> m_beep;
|
||||||
|
output_finder<> m_online_led;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -279,6 +279,7 @@ epson_lx810l_device::epson_lx810l_device(const machine_config &mconfig, device_t
|
|||||||
m_eeprom(*this, "eeprom"),
|
m_eeprom(*this, "eeprom"),
|
||||||
m_e05a30(*this, "e05a30"),
|
m_e05a30(*this, "e05a30"),
|
||||||
m_screen(*this, "screen"),
|
m_screen(*this, "screen"),
|
||||||
|
m_online_led(*this, "online_led"),
|
||||||
m_93c06_clk(0),
|
m_93c06_clk(0),
|
||||||
m_93c06_cs(0),
|
m_93c06_cs(0),
|
||||||
m_printhead(0),
|
m_printhead(0),
|
||||||
@ -299,11 +300,10 @@ epson_ap2000_device::epson_ap2000_device(const machine_config &mconfig, const ch
|
|||||||
// device_start - device-specific startup
|
// device_start - device-specific startup
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void epson_lx810l_device::device_start()
|
void epson_lx810l_device::device_start()
|
||||||
{
|
{
|
||||||
|
m_online_led.resolve();
|
||||||
|
|
||||||
m_cr_timer = timer_alloc(TIMER_CR);
|
m_cr_timer = timer_alloc(TIMER_CR);
|
||||||
|
|
||||||
m_screen->register_screen_bitmap(m_bitmap);
|
m_screen->register_screen_bitmap(m_bitmap);
|
||||||
@ -466,7 +466,7 @@ WRITE8_MEMBER( epson_lx810l_device::portc_w )
|
|||||||
m_eeprom->clk_write(m_93c06_clk ? ASSERT_LINE : CLEAR_LINE);
|
m_eeprom->clk_write(m_93c06_clk ? ASSERT_LINE : CLEAR_LINE);
|
||||||
m_eeprom->cs_write (m_93c06_cs ? ASSERT_LINE : CLEAR_LINE);
|
m_eeprom->cs_write (m_93c06_cs ? ASSERT_LINE : CLEAR_LINE);
|
||||||
|
|
||||||
machine().output().set_value("online_led", !BIT(data, 2));
|
m_online_led = !BIT(data, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -121,6 +121,8 @@ private:
|
|||||||
required_device<e05a30_device> m_e05a30;
|
required_device<e05a30_device> m_e05a30;
|
||||||
required_device<screen_device> m_screen;
|
required_device<screen_device> m_screen;
|
||||||
|
|
||||||
|
output_finder<> m_online_led;
|
||||||
|
|
||||||
int m_93c06_clk;
|
int m_93c06_clk;
|
||||||
int m_93c06_cs;
|
int m_93c06_cs;
|
||||||
uint16_t m_printhead;
|
uint16_t m_printhead;
|
||||||
|
@ -400,6 +400,7 @@ econet_e01_device::econet_e01_device(const machine_config &mconfig, device_type
|
|||||||
, m_floppy(*this, WD2793_TAG":%u", 0U)
|
, m_floppy(*this, WD2793_TAG":%u", 0U)
|
||||||
, m_rom(*this, R65C102_TAG)
|
, m_rom(*this, R65C102_TAG)
|
||||||
, m_centronics(*this, CENTRONICS_TAG)
|
, m_centronics(*this, CENTRONICS_TAG)
|
||||||
|
, m_led(*this, "led_0")
|
||||||
, m_adlc_ie(0)
|
, m_adlc_ie(0)
|
||||||
, m_hdc_ie(0)
|
, m_hdc_ie(0)
|
||||||
, m_rtc_irq(CLEAR_LINE)
|
, m_rtc_irq(CLEAR_LINE)
|
||||||
@ -421,6 +422,8 @@ econet_e01_device::econet_e01_device(const machine_config &mconfig, device_type
|
|||||||
|
|
||||||
void econet_e01_device::device_start()
|
void econet_e01_device::device_start()
|
||||||
{
|
{
|
||||||
|
m_led.resolve();
|
||||||
|
|
||||||
// allocate timers
|
// allocate timers
|
||||||
m_clk_timer = timer_alloc();
|
m_clk_timer = timer_alloc();
|
||||||
|
|
||||||
@ -547,7 +550,7 @@ WRITE8_MEMBER( econet_e01_device::floppy_w )
|
|||||||
// TODO floppy test
|
// TODO floppy test
|
||||||
|
|
||||||
// mode LED
|
// mode LED
|
||||||
machine().output().set_value("led_0", BIT(data, 7));
|
m_led = BIT(data, 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -97,6 +97,8 @@ private:
|
|||||||
required_memory_region m_rom;
|
required_memory_region m_rom;
|
||||||
required_device<centronics_device> m_centronics;
|
required_device<centronics_device> m_centronics;
|
||||||
|
|
||||||
|
output_finder<> m_led;
|
||||||
|
|
||||||
inline void update_interrupts();
|
inline void update_interrupts();
|
||||||
inline void network_irq_enable(int enabled);
|
inline void network_irq_enable(int enabled);
|
||||||
inline void hdc_irq_enable(int enabled);
|
inline void hdc_irq_enable(int enabled);
|
||||||
|
@ -71,6 +71,7 @@ gb_rom_mbc3_device::gb_rom_mbc3_device(const machine_config &mconfig, const char
|
|||||||
|
|
||||||
gb_rom_mbc5_device::gb_rom_mbc5_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
|
gb_rom_mbc5_device::gb_rom_mbc5_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
|
||||||
: gb_rom_mbc_device(mconfig, type, tag, owner, clock)
|
: gb_rom_mbc_device(mconfig, type, tag, owner, clock)
|
||||||
|
, m_rumble(*this, "Rumble")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -581,7 +582,7 @@ void gb_rom_mbc5_device::write_bank(offs_t offset, uint8_t data)
|
|||||||
data &= 0x0f;
|
data &= 0x0f;
|
||||||
if (has_rumble)
|
if (has_rumble)
|
||||||
{
|
{
|
||||||
machine().output().set_value("Rumble", BIT(data, 3));
|
m_rumble = BIT(data, 3);
|
||||||
data &= 0x7;
|
data &= 0x7;
|
||||||
}
|
}
|
||||||
m_ram_bank = data;
|
m_ram_bank = data;
|
||||||
|
@ -122,8 +122,10 @@ protected:
|
|||||||
gb_rom_mbc5_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
gb_rom_mbc5_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
||||||
|
|
||||||
// device-level overrides
|
// device-level overrides
|
||||||
virtual void device_start() override { shared_start(); }
|
virtual void device_start() override { shared_start(); m_rumble.resolve(); }
|
||||||
virtual void device_reset() override { shared_reset(); }
|
virtual void device_reset() override { shared_reset(); }
|
||||||
|
|
||||||
|
output_finder<> m_rumble;
|
||||||
};
|
};
|
||||||
|
|
||||||
// ======================> gb_rom_mbc6_device
|
// ======================> gb_rom_mbc6_device
|
||||||
|
@ -59,11 +59,13 @@ gba_rom_sram_device::gba_rom_sram_device(const machine_config &mconfig, const ch
|
|||||||
|
|
||||||
gba_rom_drilldoz_device::gba_rom_drilldoz_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
gba_rom_drilldoz_device::gba_rom_drilldoz_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||||
: gba_rom_sram_device(mconfig, GBA_ROM_DRILLDOZ, tag, owner, clock)
|
: gba_rom_sram_device(mconfig, GBA_ROM_DRILLDOZ, tag, owner, clock)
|
||||||
|
, m_rumble(*this, "Rumble")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
gba_rom_wariotws_device::gba_rom_wariotws_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
gba_rom_wariotws_device::gba_rom_wariotws_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||||
: gba_rom_sram_device(mconfig, GBA_ROM_WARIOTWS, tag, owner, clock)
|
: gba_rom_sram_device(mconfig, GBA_ROM_WARIOTWS, tag, owner, clock)
|
||||||
|
, m_rumble(*this, "Rumble")
|
||||||
, m_gyro_z(*this, "GYROZ")
|
, m_gyro_z(*this, "GYROZ")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -162,8 +164,16 @@ void gba_rom_device::device_reset()
|
|||||||
m_gpio_dirs = 0;
|
m_gpio_dirs = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void gba_rom_drilldoz_device::device_start()
|
||||||
|
{
|
||||||
|
gba_rom_device::device_start();
|
||||||
|
m_rumble.resolve();
|
||||||
|
}
|
||||||
|
|
||||||
void gba_rom_wariotws_device::device_start()
|
void gba_rom_wariotws_device::device_start()
|
||||||
{
|
{
|
||||||
|
gba_rom_device::device_start();
|
||||||
|
m_rumble.resolve();
|
||||||
save_item(NAME(m_last_val));
|
save_item(NAME(m_last_val));
|
||||||
save_item(NAME(m_counter));
|
save_item(NAME(m_counter));
|
||||||
}
|
}
|
||||||
@ -187,6 +197,8 @@ void gba_rom_flash1m_device::device_reset()
|
|||||||
|
|
||||||
void gba_rom_eeprom_device::device_start()
|
void gba_rom_eeprom_device::device_start()
|
||||||
{
|
{
|
||||||
|
gba_rom_device::device_start();
|
||||||
|
|
||||||
// for the moment we use a custom eeprom implementation, so we alloc/save it as nvram
|
// for the moment we use a custom eeprom implementation, so we alloc/save it as nvram
|
||||||
nvram_alloc(0x200);
|
nvram_alloc(0x200);
|
||||||
m_eeprom = std::make_unique<gba_eeprom_device>(machine(), (uint8_t*)get_nvram_base(), get_nvram_size(), 6);
|
m_eeprom = std::make_unique<gba_eeprom_device>(machine(), (uint8_t*)get_nvram_base(), get_nvram_size(), 6);
|
||||||
@ -232,16 +244,19 @@ void gba_rom_boktai_device::device_reset()
|
|||||||
|
|
||||||
void gba_rom_flash_rtc_device::device_start()
|
void gba_rom_flash_rtc_device::device_start()
|
||||||
{
|
{
|
||||||
|
gba_rom_device::device_start();
|
||||||
m_rtc = std::make_unique<gba_s3511_device>(machine());
|
m_rtc = std::make_unique<gba_s3511_device>(machine());
|
||||||
}
|
}
|
||||||
|
|
||||||
void gba_rom_flash1m_rtc_device::device_start()
|
void gba_rom_flash1m_rtc_device::device_start()
|
||||||
{
|
{
|
||||||
|
gba_rom_device::device_start();
|
||||||
m_rtc = std::make_unique<gba_s3511_device>(machine());
|
m_rtc = std::make_unique<gba_s3511_device>(machine());
|
||||||
}
|
}
|
||||||
|
|
||||||
void gba_rom_3dmatrix_device::device_start()
|
void gba_rom_3dmatrix_device::device_start()
|
||||||
{
|
{
|
||||||
|
gba_rom_device::device_start();
|
||||||
save_item(NAME(m_src));
|
save_item(NAME(m_src));
|
||||||
save_item(NAME(m_dst));
|
save_item(NAME(m_dst));
|
||||||
save_item(NAME(m_nblock));
|
save_item(NAME(m_nblock));
|
||||||
@ -353,7 +368,7 @@ void gba_rom_drilldoz_device::gpio_dev_write(uint16_t data, int gpio_dirs)
|
|||||||
if ((gpio_dirs & 0x08))
|
if ((gpio_dirs & 0x08))
|
||||||
{
|
{
|
||||||
// send impulse to Rumble sensor
|
// send impulse to Rumble sensor
|
||||||
machine().output().set_value("Rumble", BIT(data, 3));
|
m_rumble = BIT(data, 3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -383,7 +398,7 @@ void gba_rom_wariotws_device::gpio_dev_write(uint16_t data, int gpio_dirs)
|
|||||||
if ((gpio_dirs & 0x08))
|
if ((gpio_dirs & 0x08))
|
||||||
{
|
{
|
||||||
// send impulse to Rumble sensor
|
// send impulse to Rumble sensor
|
||||||
machine().output().set_value("Rumble", BIT(data, 3));
|
m_rumble = BIT(data, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gpio_dirs == 0x0b)
|
if (gpio_dirs == 0x0b)
|
||||||
|
@ -137,8 +137,13 @@ public:
|
|||||||
// construction/destruction
|
// construction/destruction
|
||||||
gba_rom_drilldoz_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
gba_rom_drilldoz_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||||
|
|
||||||
|
protected:
|
||||||
// device-level overrides
|
// device-level overrides
|
||||||
|
virtual void device_start() override;
|
||||||
virtual void gpio_dev_write(uint16_t data, int gpio_dirs) override;
|
virtual void gpio_dev_write(uint16_t data, int gpio_dirs) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
output_finder<> m_rumble;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -161,6 +166,8 @@ protected:
|
|||||||
virtual void device_reset() override;
|
virtual void device_reset() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
output_finder<> m_rumble;
|
||||||
|
|
||||||
uint8_t m_last_val;
|
uint8_t m_last_val;
|
||||||
int m_counter;
|
int m_counter;
|
||||||
required_ioport m_gyro_z;
|
required_ioport m_gyro_z;
|
||||||
|
@ -25,6 +25,7 @@ amiga_fdc_device::amiga_fdc_device(const machine_config &mconfig, const char *ta
|
|||||||
m_write_dskblk(*this),
|
m_write_dskblk(*this),
|
||||||
m_write_dsksyn(*this),
|
m_write_dsksyn(*this),
|
||||||
m_leds(*this, "led%u", 1U),
|
m_leds(*this, "led%u", 1U),
|
||||||
|
m_fdc_led(*this, "fdc_led"),
|
||||||
floppy(nullptr), t_gen(nullptr), dsklen(0), pre_dsklen(0), dsksync(0), dskbyt(0), adkcon(0), dmacon(0), dskpt(0), dma_value(0), dma_state(0)
|
floppy(nullptr), t_gen(nullptr), dsklen(0), pre_dsklen(0), dsksync(0), dskbyt(0), adkcon(0), dmacon(0), dskpt(0), dma_value(0), dma_state(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -37,6 +38,7 @@ void amiga_fdc_device::device_start()
|
|||||||
m_write_dskblk.resolve_safe();
|
m_write_dskblk.resolve_safe();
|
||||||
m_write_dsksyn.resolve_safe();
|
m_write_dsksyn.resolve_safe();
|
||||||
m_leds.resolve();
|
m_leds.resolve();
|
||||||
|
m_fdc_led.resolve();
|
||||||
|
|
||||||
static char const *const names[] = { "0", "1", "2", "3" };
|
static char const *const names[] = { "0", "1", "2", "3" };
|
||||||
for(int i=0; i != 4; i++) {
|
for(int i=0; i != 4; i++) {
|
||||||
@ -437,11 +439,6 @@ void amiga_fdc_device::setup_leds()
|
|||||||
floppy == floppy_devices[2] ? 2 :
|
floppy == floppy_devices[2] ? 2 :
|
||||||
3;
|
3;
|
||||||
|
|
||||||
machine().output().set_value("drive_0_led", drive == 0);
|
|
||||||
machine().output().set_value("drive_1_led", drive == 1);
|
|
||||||
machine().output().set_value("drive_2_led", drive == 2);
|
|
||||||
machine().output().set_value("drive_3_led", drive == 3);
|
|
||||||
|
|
||||||
m_leds[0] = drive == 0 ? 1 : 0; // update internal drive led
|
m_leds[0] = drive == 0 ? 1 : 0; // update internal drive led
|
||||||
m_leds[1] = drive == 1 ? 1 : 0; // update external drive led
|
m_leds[1] = drive == 1 ? 1 : 0; // update external drive led
|
||||||
}
|
}
|
||||||
@ -472,11 +469,11 @@ WRITE8_MEMBER( amiga_fdc_device::ciaaprb_w )
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(floppy) {
|
if(floppy) {
|
||||||
floppy->ss_w(!((data >> 2) & 1));
|
floppy->ss_w(!(BIT(data, 2)));
|
||||||
floppy->dir_w((data >> 1) & 1);
|
floppy->dir_w(BIT(data, 1));
|
||||||
floppy->stp_w(data & 1);
|
floppy->stp_w(BIT(data, 0));
|
||||||
floppy->mon_w((data >> 7) & 1);
|
floppy->mon_w(BIT(data, 7));
|
||||||
machine().output().set_value("fdc_led", data & 0x80); // LED directly connected to FDC motor
|
m_fdc_led = BIT(data, 7); // LED directly connected to FDC motor
|
||||||
}
|
}
|
||||||
|
|
||||||
if(floppy) {
|
if(floppy) {
|
||||||
|
@ -93,6 +93,7 @@ private:
|
|||||||
devcb_write_line m_write_dskblk;
|
devcb_write_line m_write_dskblk;
|
||||||
devcb_write_line m_write_dsksyn;
|
devcb_write_line m_write_dsksyn;
|
||||||
output_finder<2> m_leds;
|
output_finder<2> m_leds;
|
||||||
|
output_finder<> m_fdc_led;
|
||||||
|
|
||||||
floppy_image_device *floppy;
|
floppy_image_device *floppy;
|
||||||
floppy_image_device *floppy_devices[4];
|
floppy_image_device *floppy_devices[4];
|
||||||
|
@ -42,6 +42,14 @@ ie15_device::ie15_device(const machine_config &mconfig, device_type type, const
|
|||||||
, m_screen(*this, "screen")
|
, m_screen(*this, "screen")
|
||||||
, m_keyboard(*this, "keyboard")
|
, m_keyboard(*this, "keyboard")
|
||||||
, m_io_keyboard(*this, "io_keyboard")
|
, m_io_keyboard(*this, "io_keyboard")
|
||||||
|
, m_lat_led(*this, "lat_led")
|
||||||
|
, m_nr_led(*this, "nr_led")
|
||||||
|
, m_pch_led(*this, "pch_led")
|
||||||
|
, m_dup_led(*this, "dup_led")
|
||||||
|
, m_lin_led(*this, "lin_led")
|
||||||
|
, m_red_led(*this, "red_led")
|
||||||
|
, m_sdv_led(*this, "sdv_led")
|
||||||
|
, m_prd_led(*this, "prd_led")
|
||||||
, m_rs232_conn_txd_handler(*this)
|
, m_rs232_conn_txd_handler(*this)
|
||||||
, m_rs232_conn_dtr_handler(*this)
|
, m_rs232_conn_dtr_handler(*this)
|
||||||
, m_rs232_conn_rts_handler(*this)
|
, m_rs232_conn_rts_handler(*this)
|
||||||
@ -465,6 +473,15 @@ void ie15_device::device_resolve_objects()
|
|||||||
|
|
||||||
void ie15_device::device_start()
|
void ie15_device::device_start()
|
||||||
{
|
{
|
||||||
|
m_lat_led.resolve();
|
||||||
|
m_nr_led.resolve();
|
||||||
|
m_pch_led.resolve();
|
||||||
|
m_dup_led.resolve();
|
||||||
|
m_lin_led.resolve();
|
||||||
|
m_red_led.resolve();
|
||||||
|
m_sdv_led.resolve();
|
||||||
|
m_prd_led.resolve();
|
||||||
|
|
||||||
m_hblank_timer = timer_alloc(TIMER_HBLANK);
|
m_hblank_timer = timer_alloc(TIMER_HBLANK);
|
||||||
m_hblank_timer->adjust(attotime::never);
|
m_hblank_timer->adjust(attotime::never);
|
||||||
|
|
||||||
@ -574,14 +591,14 @@ void ie15_device::update_leds()
|
|||||||
{
|
{
|
||||||
uint8_t data = m_io_keyboard->read();
|
uint8_t data = m_io_keyboard->read();
|
||||||
|
|
||||||
machine().output().set_value("lat_led", m_kb_ruslat ^ 1);
|
m_lat_led = m_kb_ruslat ^ 1;
|
||||||
machine().output().set_value("nr_led", BIT(m_kb_control, ie15_keyboard_device::IE_KB_NR_BIT) ^ 1);
|
m_nr_led = BIT(m_kb_control, ie15_keyboard_device::IE_KB_NR_BIT) ^ 1;
|
||||||
machine().output().set_value("pch_led", BIT(data, ie15_keyboard_device::IE_KB_PCH_BIT) ^ 1);
|
m_pch_led = BIT(data, ie15_keyboard_device::IE_KB_PCH_BIT) ^ 1;
|
||||||
machine().output().set_value("dup_led", BIT(data, ie15_keyboard_device::IE_KB_DUP_BIT) ^ 1);
|
m_dup_led = BIT(data, ie15_keyboard_device::IE_KB_DUP_BIT) ^ 1;
|
||||||
machine().output().set_value("lin_led", BIT(data, ie15_keyboard_device::IE_KB_LIN_BIT) ^ 1);
|
m_lin_led = BIT(data, ie15_keyboard_device::IE_KB_LIN_BIT) ^ 1;
|
||||||
machine().output().set_value("red_led", BIT(data, ie15_keyboard_device::IE_KB_RED_BIT) ^ 1);
|
m_red_led = BIT(data, ie15_keyboard_device::IE_KB_RED_BIT) ^ 1;
|
||||||
machine().output().set_value("sdv_led", BIT(m_kb_control, ie15_keyboard_device::IE_KB_SDV_BIT) ^ 1);
|
m_sdv_led = BIT(m_kb_control, ie15_keyboard_device::IE_KB_SDV_BIT) ^ 1;
|
||||||
machine().output().set_value("prd_led", 1); // XXX
|
m_prd_led = 1; // XXX
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -139,6 +139,15 @@ private:
|
|||||||
required_device<ie15_keyboard_device> m_keyboard;
|
required_device<ie15_keyboard_device> m_keyboard;
|
||||||
required_ioport m_io_keyboard;
|
required_ioport m_io_keyboard;
|
||||||
|
|
||||||
|
output_finder<> m_lat_led;
|
||||||
|
output_finder<> m_nr_led;
|
||||||
|
output_finder<> m_pch_led;
|
||||||
|
output_finder<> m_dup_led;
|
||||||
|
output_finder<> m_lin_led;
|
||||||
|
output_finder<> m_red_led;
|
||||||
|
output_finder<> m_sdv_led;
|
||||||
|
output_finder<> m_prd_led;
|
||||||
|
|
||||||
devcb_write_line m_rs232_conn_txd_handler;
|
devcb_write_line m_rs232_conn_txd_handler;
|
||||||
devcb_write_line m_rs232_conn_dtr_handler;
|
devcb_write_line m_rs232_conn_dtr_handler;
|
||||||
devcb_write_line m_rs232_conn_rts_handler;
|
devcb_write_line m_rs232_conn_rts_handler;
|
||||||
|
@ -175,6 +175,16 @@ pioneer_pr8210_device::pioneer_pr8210_device(const machine_config &mconfig, cons
|
|||||||
|
|
||||||
pioneer_pr8210_device::pioneer_pr8210_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
|
pioneer_pr8210_device::pioneer_pr8210_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
|
||||||
: laserdisc_device(mconfig, type, tag, owner, clock),
|
: laserdisc_device(mconfig, type, tag, owner, clock),
|
||||||
|
m_audio1(*this, "pr8210_audio1"),
|
||||||
|
m_audio2(*this, "pr8210_audio2"),
|
||||||
|
m_clv(*this, "pr8210_clv"),
|
||||||
|
m_cav(*this, "pr8210_cav"),
|
||||||
|
m_srev(*this, "pr8210_srev"),
|
||||||
|
m_sfwd(*this, "pr8210_sfwd"),
|
||||||
|
m_play(*this, "pr8210_play"),
|
||||||
|
m_step(*this, "pr8210_step"),
|
||||||
|
m_pause(*this, "pr8210_pause"),
|
||||||
|
m_standby(*this, "pr8210_standby"),
|
||||||
m_control(0),
|
m_control(0),
|
||||||
m_lastcommand(0),
|
m_lastcommand(0),
|
||||||
m_accumulator(0),
|
m_accumulator(0),
|
||||||
@ -266,6 +276,18 @@ void pioneer_pr8210_device::control_w(uint8_t data)
|
|||||||
|
|
||||||
void pioneer_pr8210_device::device_start()
|
void pioneer_pr8210_device::device_start()
|
||||||
{
|
{
|
||||||
|
// resolve outputs
|
||||||
|
m_audio1.resolve();
|
||||||
|
m_audio2.resolve();
|
||||||
|
m_clv.resolve();
|
||||||
|
m_cav.resolve();
|
||||||
|
m_srev.resolve();
|
||||||
|
m_sfwd.resolve();
|
||||||
|
m_play.resolve();
|
||||||
|
m_step.resolve();
|
||||||
|
m_pause.resolve();
|
||||||
|
m_standby.resolve();
|
||||||
|
|
||||||
// pass through to the parent
|
// pass through to the parent
|
||||||
laserdisc_device::device_start();
|
laserdisc_device::device_start();
|
||||||
}
|
}
|
||||||
@ -546,18 +568,18 @@ WRITE8_MEMBER( pioneer_pr8210_device::i8049_pia_w )
|
|||||||
case 0x60:
|
case 0x60:
|
||||||
|
|
||||||
// these 4 are direct-connect
|
// these 4 are direct-connect
|
||||||
machine().output().set_value("pr8210_audio1", (data & 0x01) != 0);
|
m_audio1 = BIT(data, 0);
|
||||||
machine().output().set_value("pr8210_audio2", (data & 0x02) != 0);
|
m_audio2 = BIT(data, 1);
|
||||||
machine().output().set_value("pr8210_clv", (data & 0x04) != 0);
|
m_clv = BIT(data, 2);
|
||||||
machine().output().set_value("pr8210_cav", (data & 0x08) != 0);
|
m_cav = BIT(data, 3);
|
||||||
|
|
||||||
// remaining 3 bits select one of 5 LEDs via a mux
|
// remaining 3 bits select one of 5 LEDs via a mux
|
||||||
value = ((data & 0x40) >> 6) | ((data & 0x20) >> 4) | ((data & 0x10) >> 2);
|
value = ((data & 0x40) >> 6) | ((data & 0x20) >> 4) | ((data & 0x10) >> 2);
|
||||||
machine().output().set_value("pr8210_srev", (value == 0));
|
m_srev = (value == 0);
|
||||||
machine().output().set_value("pr8210_sfwd", (value == 1));
|
m_sfwd = (value == 1);
|
||||||
machine().output().set_value("pr8210_play", (value == 2));
|
m_play = (value == 2);
|
||||||
machine().output().set_value("pr8210_step", (value == 3));
|
m_step = (value == 3);
|
||||||
machine().output().set_value("pr8210_pause", (value == 4));
|
m_pause = (value == 4);
|
||||||
|
|
||||||
m_pia.portb = data;
|
m_pia.portb = data;
|
||||||
update_audio_squelch();
|
update_audio_squelch();
|
||||||
@ -700,14 +722,14 @@ WRITE8_MEMBER( pioneer_pr8210_device::i8049_port2_w )
|
|||||||
m_i8049_port2 = data;
|
m_i8049_port2 = data;
|
||||||
|
|
||||||
// on the falling edge of bit 5, start the slow timer
|
// on the falling edge of bit 5, start the slow timer
|
||||||
if (!(data & 0x20) && (prev & 0x20))
|
if (!BIT(data, 5) && BIT(prev, 5))
|
||||||
m_slowtrg = machine().time();
|
m_slowtrg = machine().time();
|
||||||
|
|
||||||
// bit 6 when low triggers an IRQ on the MCU
|
// bit 6 when low triggers an IRQ on the MCU
|
||||||
m_i8049_cpu->set_input_line(MCS48_INPUT_IRQ, (data & 0x40) ? CLEAR_LINE : ASSERT_LINE);
|
m_i8049_cpu->set_input_line(MCS48_INPUT_IRQ, BIT(data, 6) ? CLEAR_LINE : ASSERT_LINE);
|
||||||
|
|
||||||
// standby LED is set accordingl to bit 4
|
// standby LED is set accordingly to bit 4
|
||||||
machine().output().set_value("pr8210_standby", (data & 0x10) != 0);
|
m_standby = BIT(data, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -103,6 +103,18 @@ protected:
|
|||||||
void overlay_erase(bitmap_yuy16 &bitmap, float xstart, float xend);
|
void overlay_erase(bitmap_yuy16 &bitmap, float xstart, float xend);
|
||||||
void overlay_draw_char(bitmap_yuy16 &bitmap, uint8_t ch, float xstart);
|
void overlay_draw_char(bitmap_yuy16 &bitmap, uint8_t ch, float xstart);
|
||||||
|
|
||||||
|
// LED outputs
|
||||||
|
output_finder<> m_audio1;
|
||||||
|
output_finder<> m_audio2;
|
||||||
|
output_finder<> m_clv;
|
||||||
|
output_finder<> m_cav;
|
||||||
|
output_finder<> m_srev;
|
||||||
|
output_finder<> m_sfwd;
|
||||||
|
output_finder<> m_play;
|
||||||
|
output_finder<> m_step;
|
||||||
|
output_finder<> m_pause;
|
||||||
|
output_finder<> m_standby;
|
||||||
|
|
||||||
// internal state
|
// internal state
|
||||||
uint8_t m_control; // control line state
|
uint8_t m_control; // control line state
|
||||||
uint8_t m_lastcommand; // last command seen
|
uint8_t m_lastcommand; // last command seen
|
||||||
|
Loading…
Reference in New Issue
Block a user