summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2021-06-20 17:20:24 +0200
committer hap <happppp@users.noreply.github.com>2021-06-20 17:20:41 +0200
commit6fbe50823696f2b9d770243ecbfa12f6379882be (patch)
tree9585e3607667b9a88cb8bf513c986dda0850fc31 /src
parent75517876f47a769a38053e934b7138b720087a7c (diff)
dl1616: dl1414 does not have ce pin or addr latch
Diffstat (limited to 'src')
-rw-r--r--src/devices/video/dl1416.cpp36
-rw-r--r--src/devices/video/dl1416.h18
-rw-r--r--src/mame/drivers/sitcom.cpp2
3 files changed, 33 insertions, 23 deletions
diff --git a/src/devices/video/dl1416.cpp b/src/devices/video/dl1416.cpp
index 2508bb179fb..4321192e981 100644
--- a/src/devices/video/dl1416.cpp
+++ b/src/devices/video/dl1416.cpp
@@ -185,15 +185,12 @@ dl1414_device::dl1414_device(
device_t *owner,
u32 clock)
: device_t(mconfig, type, tag, owner, clock)
- , m_update_cb(*this)
- , m_digit_ram{ 0x00, 0x00, 0x00, 0x00 }
- , m_cursor_state{ false, false, false, false }
, m_wr_in(true)
- , m_ce_in(true)
- , m_ce_latch(true)
, m_addr_in(0x00)
- , m_addr_latch(0x00)
, m_data_in(0x00)
+ , m_update_cb(*this)
+ , m_digit_ram{ 0x00, 0x00, 0x00, 0x00 }
+ , m_cursor_state{ false, false, false, false }
{
}
@@ -204,7 +201,10 @@ dl1416_device::dl1416_device(
device_t *owner,
u32 clock)
: dl1414_device(mconfig, type, tag, owner, clock)
+ , m_ce_in(true)
+ , m_ce_latch(true)
, m_cu_in(true)
+ , m_addr_latch(0x00)
{
}
@@ -220,18 +220,12 @@ void dl1414_device::device_start()
save_item(NAME(m_digit_ram));
save_item(NAME(m_cursor_state));
save_item(NAME(m_wr_in));
- save_item(NAME(m_ce_in));
- save_item(NAME(m_ce_latch));
save_item(NAME(m_addr_in));
- save_item(NAME(m_addr_latch));
save_item(NAME(m_data_in));
// set initial state for input lines
m_wr_in = true;
- m_ce_in = true;
- m_ce_latch = true;
m_addr_in = 0x00;
- m_addr_latch = 0x00;
m_data_in = 0x00;
// randomise internal RAM
@@ -249,10 +243,16 @@ void dl1416_device::device_start()
dl1414_device::device_start();
// register for state saving
+ save_item(NAME(m_ce_in));
+ save_item(NAME(m_ce_latch));
save_item(NAME(m_cu_in));
+ save_item(NAME(m_addr_latch));
// set initial state for input lines
+ m_ce_in = true;
+ m_ce_latch = true;
m_cu_in = true;
+ m_addr_latch = 0x00;
}
//-------------------------------------------------
@@ -277,6 +277,16 @@ WRITE_LINE_MEMBER( dl1414_device::wr_w )
{
m_wr_in = bool(state);
if (m_wr_in)
+ bus_w(m_addr_in, m_data_in);
+ }
+}
+
+WRITE_LINE_MEMBER( dl1416_device::wr_w )
+{
+ if (bool(state) != m_wr_in)
+ {
+ m_wr_in = bool(state);
+ if (m_wr_in)
{
if (!m_ce_latch)
bus_w(m_addr_latch, m_data_in);
@@ -289,7 +299,7 @@ WRITE_LINE_MEMBER( dl1414_device::wr_w )
}
}
-WRITE_LINE_MEMBER( dl1414_device::ce_w )
+WRITE_LINE_MEMBER( dl1416_device::ce_w )
{
m_ce_in = bool(state);
}
diff --git a/src/devices/video/dl1416.h b/src/devices/video/dl1416.h
index 1f1d4496acb..ce1d61071f4 100644
--- a/src/devices/video/dl1416.h
+++ b/src/devices/video/dl1416.h
@@ -36,8 +36,7 @@ public:
auto update() { return m_update_cb.bind(); }
// signal-level interface
- DECLARE_WRITE_LINE_MEMBER(wr_w); // write strobe (rising edge)
- DECLARE_WRITE_LINE_MEMBER(ce_w); // chip enable (active low)
+ virtual DECLARE_WRITE_LINE_MEMBER(wr_w); // write strobe (rising edge)
void addr_w(u8 state);
void data_w(u8 state);
@@ -59,23 +58,24 @@ protected:
void set_cursor_state(offs_t offset, bool state);
virtual u16 translate(u8 digit, bool cursor) const = 0;
+ // input line state
+ bool m_wr_in;
+ u8 m_addr_in;
+ u8 m_data_in;
+
private:
devcb_write16 m_update_cb;
// internal state
u8 m_digit_ram[4]; // holds the digit code for each position
bool m_cursor_state[4]; // holds the cursor state for each position
-
- // input line state
- bool m_wr_in;
- bool m_ce_in, m_ce_latch;
- u8 m_addr_in, m_addr_latch;
- u8 m_data_in;
};
class dl1416_device : public dl1414_device
{
public:
+ virtual DECLARE_WRITE_LINE_MEMBER(wr_w) override;
+ DECLARE_WRITE_LINE_MEMBER(ce_w); // chip enable (active low)
DECLARE_WRITE_LINE_MEMBER(cu_w); // cursor enable (active low)
protected:
@@ -93,7 +93,9 @@ protected:
private:
// input line state
+ bool m_ce_in, m_ce_latch;
bool m_cu_in;
+ u8 m_addr_latch;
};
#endif // MAME_VIDEO_DL1416_H
diff --git a/src/mame/drivers/sitcom.cpp b/src/mame/drivers/sitcom.cpp
index e1e7a85c03b..be152e87490 100644
--- a/src/mame/drivers/sitcom.cpp
+++ b/src/mame/drivers/sitcom.cpp
@@ -334,8 +334,6 @@ void sitcom_timer_state::machine_start()
void sitcom_timer_state::machine_reset()
{
sitcom_state::machine_reset();
-
- m_ds2->ce_w(0);
}
void sitcom_timer_state::update_dac(uint8_t value)