From 6afc168d5411ab99c20ede39e7b9a9dce6dc3120 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sat, 18 Jun 2022 04:00:14 +1000 Subject: bus/nubus, bus/sbus: Removed a redundant parameter, modernised endian helpers. --- src/mame/drivers/astinvad.cpp | 16 +++++++++------- src/mame/drivers/hp2640.cpp | 42 ++++++++++++++++++++++-------------------- 2 files changed, 31 insertions(+), 27 deletions(-) (limited to 'src/mame/drivers') diff --git a/src/mame/drivers/astinvad.cpp b/src/mame/drivers/astinvad.cpp index b5c18154519..5c70e9eb2aa 100644 --- a/src/mame/drivers/astinvad.cpp +++ b/src/mame/drivers/astinvad.cpp @@ -147,7 +147,6 @@ public: protected: virtual void machine_start() override; virtual void machine_reset() override; - virtual void video_start() override; private: void color_latch_w(uint8_t data); @@ -168,12 +167,6 @@ private: * *************************************/ -void spaceint_state::video_start() -{ - save_item(NAME(m_color_latch)); -} - - void spaceint_state::color_latch_w(uint8_t data) { m_color_latch = data & 0x0f; @@ -287,6 +280,8 @@ TIMER_CALLBACK_MEMBER(kamikaze_state::int_gen) void kamikaze_state::machine_start() { + base_state::machine_start(); + m_int_timer = timer_alloc(FUNC(kamikaze_state::int_gen), this); m_int_timer->adjust(m_screen->time_until_pos(128), 128); m_int_off_timer = timer_alloc(FUNC(kamikaze_state::int_off), this); @@ -298,6 +293,8 @@ void kamikaze_state::machine_start() void kamikaze_state::machine_reset() { + base_state::machine_reset(); + m_screen_flip = 0; m_screen_red = 0; m_sound_state[0] = 0; @@ -307,12 +304,17 @@ void kamikaze_state::machine_reset() void spaceint_state::machine_start() { + base_state::machine_start(); + save_item(NAME(m_screen_flip)); save_item(NAME(m_sound_state)); + save_item(NAME(m_color_latch)); } void spaceint_state::machine_reset() { + base_state::machine_reset(); + m_screen_flip = 0; m_sound_state[0] = 0; m_sound_state[1] = 0; diff --git a/src/mame/drivers/hp2640.cpp b/src/mame/drivers/hp2640.cpp index 85c98f71d43..35438955326 100644 --- a/src/mame/drivers/hp2640.cpp +++ b/src/mame/drivers/hp2640.cpp @@ -120,30 +120,30 @@ #define VERBOSE 0 #include "logmacro.h" -// Bit manipulation namespace { - template constexpr T BIT_MASK(unsigned n) - { - return (T)1U << n; - } - template void BIT_CLR(T& w , unsigned n) - { - w &= ~BIT_MASK(n); - } +// Bit manipulation +template constexpr T BIT_MASK(unsigned n) +{ + return (T)1U << n; +} - template void BIT_SET(T& w , unsigned n) - { - w |= BIT_MASK(n); - } +template void BIT_CLR(T& w , unsigned n) +{ + w &= ~BIT_MASK(n); +} - template void COPY_BIT(bool bit , T& w , unsigned n) - { - if (bit) { - BIT_SET(w , n); - } else { - BIT_CLR(w , n); - } +template void BIT_SET(T& w , unsigned n) +{ + w |= BIT_MASK(n); +} + +template void COPY_BIT(bool bit , T& w , unsigned n) +{ + if (bit) { + BIT_SET(w , n); + } else { + BIT_CLR(w , n); } } @@ -1270,5 +1270,7 @@ ROM_START(hp2645) ROM_LOAD("1816-1425.bin", 0x0000, 0x400, CRC(69a34fef) SHA1(816929cadd53c2fe42b3ca561c029cb1ccd4ca24)) ROM_END +} // anonymous namespace + COMP( 1976, hp2641, 0, 0, hp2641, hp2641 , hp2641_state, empty_init, "Hewlett-Packard", "HP 2641A", 0) COMP( 1976, hp2645, 0, 0, hp2645, hp2640_base, hp2645_state, empty_init, "Hewlett-Packard", "HP 2645A", 0) -- cgit v1.2.3