diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2019-12-10 23:46:32 -0500 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2019-12-10 23:46:32 -0500 |
commit | 6db7b26dbf8afee3f6249005b42de261e5ecb935 (patch) | |
tree | 94987d7693d3deef89b77a68ba9bc52e80265e40 | |
parent | 9bf93a9b0c354131c74d5d23d8aa8c9413488b19 (diff) |
am9517a, i8257: Modernize struct member save registration (nw)
-rw-r--r-- | src/devices/machine/am9517a.cpp | 13 | ||||
-rw-r--r-- | src/devices/machine/i8257.cpp | 15 |
2 files changed, 8 insertions, 20 deletions
diff --git a/src/devices/machine/am9517a.cpp b/src/devices/machine/am9517a.cpp index 5fda6ed486c..f277f9ffed1 100644 --- a/src/devices/machine/am9517a.cpp +++ b/src/devices/machine/am9517a.cpp @@ -501,14 +501,11 @@ void am9517a_device::device_start() save_item(NAME(m_temp)); save_item(NAME(m_request)); - for (int i = 0; i < 4; i++) - { - save_item(NAME(m_channel[i].m_address), i); - save_item(NAME(m_channel[i].m_count), i); - save_item(NAME(m_channel[i].m_base_address), i); - save_item(NAME(m_channel[i].m_base_count), i); - save_item(NAME(m_channel[i].m_mode), i); - } + save_item(STRUCT_MEMBER(m_channel, m_address)); + save_item(STRUCT_MEMBER(m_channel, m_count)); + save_item(STRUCT_MEMBER(m_channel, m_base_address)); + save_item(STRUCT_MEMBER(m_channel, m_base_count)); + save_item(STRUCT_MEMBER(m_channel, m_mode)); m_address_mask = 0xffff; diff --git a/src/devices/machine/i8257.cpp b/src/devices/machine/i8257.cpp index c51de689087..a1230ba2145 100644 --- a/src/devices/machine/i8257.cpp +++ b/src/devices/machine/i8257.cpp @@ -313,18 +313,9 @@ void i8257_device::device_start() save_item(NAME(m_status)); save_item(NAME(m_request)); - save_item(NAME(m_channel[0].m_address)); - save_item(NAME(m_channel[0].m_count)); - save_item(NAME(m_channel[0].m_mode)); - save_item(NAME(m_channel[1].m_address)); - save_item(NAME(m_channel[1].m_count)); - save_item(NAME(m_channel[1].m_mode)); - save_item(NAME(m_channel[2].m_address)); - save_item(NAME(m_channel[2].m_count)); - save_item(NAME(m_channel[2].m_mode)); - save_item(NAME(m_channel[3].m_address)); - save_item(NAME(m_channel[3].m_count)); - save_item(NAME(m_channel[3].m_mode)); + save_item(STRUCT_MEMBER(m_channel, m_address)); + save_item(STRUCT_MEMBER(m_channel, m_count)); + save_item(STRUCT_MEMBER(m_channel, m_mode)); } |