summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2019-12-13 11:12:35 +0100
committer hap <happppp@users.noreply.github.com>2019-12-13 11:12:50 +0100
commite238b72de14f3a7f864ead9569af0bd25ba77b5b (patch)
treedbd9ff1c937bdbaeac33797a0a62d70a3d257b9e
parent6f5d2ad3268b28eab6f1984b03a914f9312ca9c4 (diff)
remove some post_load workarounds for outputs (nw)
-rw-r--r--src/devices/video/hd61603.cpp7
-rw-r--r--src/devices/video/hd61603.h3
-rw-r--r--src/devices/video/lc7582.h1
-rw-r--r--src/mame/drivers/cardline.cpp29
4 files changed, 11 insertions, 29 deletions
diff --git a/src/devices/video/hd61603.cpp b/src/devices/video/hd61603.cpp
index 42fd0cbe8c1..92bdd006e5a 100644
--- a/src/devices/video/hd61603.cpp
+++ b/src/devices/video/hd61603.cpp
@@ -51,11 +51,6 @@ void hd61603_device::device_start()
// handlers
//-------------------------------------------------
-void hd61603_device::refresh_output()
-{
- m_write_segs(0, m_blank ? 0 : m_ram);
-}
-
void hd61603_device::data_w(u8 data)
{
// 1-byte nop command
@@ -96,6 +91,6 @@ void hd61603_device::data_w(u8 data)
break;
}
- refresh_output();
+ m_write_segs(0, m_blank ? 0 : m_ram);
}
}
diff --git a/src/devices/video/hd61603.h b/src/devices/video/hd61603.h
index 81bfcfa7913..9fcdae37600 100644
--- a/src/devices/video/hd61603.h
+++ b/src/devices/video/hd61603.h
@@ -47,11 +47,8 @@ public:
protected:
// device-level overrides
virtual void device_start() override;
- virtual void device_post_load() override { refresh_output(); }
private:
- void refresh_output();
-
u8 m_count = 0;
u16 m_data = 0;
u64 m_ram = 0;
diff --git a/src/devices/video/lc7582.h b/src/devices/video/lc7582.h
index 72f37371a68..aee438e5ef6 100644
--- a/src/devices/video/lc7582.h
+++ b/src/devices/video/lc7582.h
@@ -47,7 +47,6 @@ public:
protected:
// device-level overrides
virtual void device_start() override;
- virtual void device_post_load() override { refresh_output(); }
private:
void refresh_output();
diff --git a/src/mame/drivers/cardline.cpp b/src/mame/drivers/cardline.cpp
index bad735186f5..6de2c436f5f 100644
--- a/src/mame/drivers/cardline.cpp
+++ b/src/mame/drivers/cardline.cpp
@@ -17,7 +17,6 @@
TODO:
Really understand ASIC chip
- Remove device_post_load once outputs support savestates
***********************************/
@@ -52,7 +51,6 @@ public:
protected:
virtual void machine_start() override;
- virtual void device_post_load() override;
private:
DECLARE_WRITE8_MEMBER(vram_w);
@@ -80,7 +78,6 @@ private:
uint8_t m_video;
uint8_t m_hsync_q;
- uint8_t m_lamps_cache[8];
required_device<i80c32_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
@@ -94,18 +91,12 @@ void cardline_state::machine_start()
m_lamps.resolve();
m_video = 0;
m_hsync_q = 1;
- memset(m_lamps_cache, 0, sizeof(m_lamps_cache));
+
for (int i = 0; i < 0x2000; i++)
m_maincpu.target()->space(AS_IO).write_byte(i, 0x73);
+
save_item(NAME(m_video));
save_item(NAME(m_hsync_q));
- save_item(NAME(m_lamps_cache));
-}
-
-void cardline_state::device_post_load()
-{
- for (int i = 0; i < 8; i++)
- m_lamps[i] = m_lamps_cache[i];
}
MC6845_BEGIN_UPDATE( cardline_state::crtc_begin_update )
@@ -217,14 +208,14 @@ READ8_MEMBER(cardline_state::hsync_r)
WRITE8_MEMBER(cardline_state::lamps_w)
{
/* button lamps 1-8 (collect, card 1-5, bet, start) */
- m_lamps_cache[5] = m_lamps[5] = BIT(data, 0);
- m_lamps_cache[0] = m_lamps[0] = BIT(data, 1);
- m_lamps_cache[1] = m_lamps[1] = BIT(data, 2);
- m_lamps_cache[2] = m_lamps[2] = BIT(data, 3);
- m_lamps_cache[3] = m_lamps[3] = BIT(data, 4);
- m_lamps_cache[4] = m_lamps[4] = BIT(data, 5);
- m_lamps_cache[6] = m_lamps[6] = BIT(data, 6);
- m_lamps_cache[7] = m_lamps[7] = BIT(data, 7);
+ m_lamps[5] = BIT(data, 0);
+ m_lamps[0] = BIT(data, 1);
+ m_lamps[1] = BIT(data, 2);
+ m_lamps[2] = BIT(data, 3);
+ m_lamps[3] = BIT(data, 4);
+ m_lamps[4] = BIT(data, 5);
+ m_lamps[6] = BIT(data, 6);
+ m_lamps[7] = BIT(data, 7);
}
void cardline_state::mem_prg(address_map &map)