summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/gen_latch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/gen_latch.cpp')
-rw-r--r--src/devices/machine/gen_latch.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/devices/machine/gen_latch.cpp b/src/devices/machine/gen_latch.cpp
index 2e3929b108a..e75d2fe8979 100644
--- a/src/devices/machine/gen_latch.cpp
+++ b/src/devices/machine/gen_latch.cpp
@@ -9,7 +9,7 @@
#include "emu.h"
#include "gen_latch.h"
-#define LOG_WARN (1U << 0)
+#define LOG_WARN (1U << 1)
#define VERBOSE (LOG_WARN)
#include "logmacro.h"
@@ -45,7 +45,6 @@ generic_latch_base_device::generic_latch_base_device(const machine_config &mconf
void generic_latch_base_device::device_start()
{
- m_data_pending_cb.resolve_safe();
save_item(NAME(m_latch_written));
// synchronization is needed since other devices may not be initialized yet
@@ -56,7 +55,7 @@ void generic_latch_base_device::device_start()
// init_callback - set initial state
//-------------------------------------------------
-void generic_latch_base_device::init_callback(void *ptr, s32 param)
+void generic_latch_base_device::init_callback(s32 param)
{
m_data_pending_cb(m_latch_written ? 1 : 0);
}
@@ -67,7 +66,7 @@ void generic_latch_base_device::init_callback(void *ptr, s32 param)
void generic_latch_base_device::device_reset()
{
- m_latch_written = false;
+ set_latch_written(false);
}
//-------------------------------------------------
@@ -75,7 +74,7 @@ void generic_latch_base_device::device_reset()
// to be read
//-------------------------------------------------
-READ_LINE_MEMBER(generic_latch_base_device::pending_r)
+int generic_latch_base_device::pending_r()
{
return m_latch_written ? 1 : 0;
}
@@ -138,12 +137,12 @@ void generic_latch_8_device::clear_w(u8 data)
m_latched_value = 0x00;
}
-WRITE_LINE_MEMBER( generic_latch_8_device::preset )
+void generic_latch_8_device::preset(int state)
{
m_latched_value = 0xff;
}
-WRITE_LINE_MEMBER( generic_latch_8_device::clear )
+void generic_latch_8_device::clear(int state)
{
m_latched_value = 0x00;
}
@@ -153,7 +152,7 @@ WRITE_LINE_MEMBER( generic_latch_8_device::clear )
// callback to set a latch value
//-------------------------------------------------
-void generic_latch_8_device::sync_callback(void *ptr, s32 param)
+void generic_latch_8_device::sync_callback(s32 param)
{
u8 value = param;
@@ -209,12 +208,12 @@ void generic_latch_16_device::clear_w(u16 data)
m_latched_value = 0x0000;
}
-WRITE_LINE_MEMBER( generic_latch_16_device::preset )
+void generic_latch_16_device::preset(int state)
{
m_latched_value = 0xffff;
}
-WRITE_LINE_MEMBER( generic_latch_16_device::clear )
+void generic_latch_16_device::clear(int state)
{
m_latched_value = 0x0000;
}
@@ -224,7 +223,7 @@ WRITE_LINE_MEMBER( generic_latch_16_device::clear )
// callback to set a latch value
//-------------------------------------------------
-void generic_latch_16_device::sync_callback(void *ptr, s32 param)
+void generic_latch_16_device::sync_callback(s32 param)
{
u16 value = param;