summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/gba/rom.cpp
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2019-10-30 10:08:54 -0400
committer AJR <ajrhacker@users.noreply.github.com>2019-10-30 10:08:54 -0400
commitea8913e128d15aa1d78e5993e1d6201edf450fd2 (patch)
tree4ec8b6f0eab8e58aa10b6723071b83b7b342c1f6 /src/devices/bus/gba/rom.cpp
parent470c416cc3a6f723779e2b6ae923126074ea0dfb (diff)
src/devices: Replace output().set_value with output finders (nw)
Diffstat (limited to 'src/devices/bus/gba/rom.cpp')
-rw-r--r--src/devices/bus/gba/rom.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/devices/bus/gba/rom.cpp b/src/devices/bus/gba/rom.cpp
index aaf58253a35..91fb6648ebf 100644
--- a/src/devices/bus/gba/rom.cpp
+++ b/src/devices/bus/gba/rom.cpp
@@ -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_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_sram_device(mconfig, GBA_ROM_WARIOTWS, tag, owner, clock)
+ , m_rumble(*this, "Rumble")
, m_gyro_z(*this, "GYROZ")
{
}
@@ -162,8 +164,16 @@ void gba_rom_device::device_reset()
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()
{
+ gba_rom_device::device_start();
+ m_rumble.resolve();
save_item(NAME(m_last_val));
save_item(NAME(m_counter));
}
@@ -187,6 +197,8 @@ void gba_rom_flash1m_device::device_reset()
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
nvram_alloc(0x200);
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()
{
+ gba_rom_device::device_start();
m_rtc = std::make_unique<gba_s3511_device>(machine());
}
void gba_rom_flash1m_rtc_device::device_start()
{
+ gba_rom_device::device_start();
m_rtc = std::make_unique<gba_s3511_device>(machine());
}
void gba_rom_3dmatrix_device::device_start()
{
+ gba_rom_device::device_start();
save_item(NAME(m_src));
save_item(NAME(m_dst));
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))
{
// 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))
{
// send impulse to Rumble sensor
- machine().output().set_value("Rumble", BIT(data, 3));
+ m_rumble = BIT(data, 3);
}
if (gpio_dirs == 0x0b)