diff --git a/inc/BigEndianProcessor.h b/inc/BigEndianProcessor.h index ddb917c..eff8188 100644 --- a/inc/BigEndianProcessor.h +++ b/inc/BigEndianProcessor.h @@ -14,6 +14,8 @@ namespace EightBit { void pokeWord(register16_t address, register16_t value) noexcept final; protected: + using base = BigEndianProcessor; + BigEndianProcessor(Bus& memory) noexcept; [[nodiscard]] register16_t getWord() override; diff --git a/inc/Chip.h b/inc/Chip.h index 7b84562..c9096b5 100644 --- a/inc/Chip.h +++ b/inc/Chip.h @@ -70,6 +70,8 @@ namespace EightBit { : Device(rhs) {} protected: + using base = Chip; + Chip() noexcept = default; }; } diff --git a/inc/ClockedChip.h b/inc/ClockedChip.h index a58fde1..9ac6bf3 100644 --- a/inc/ClockedChip.h +++ b/inc/ClockedChip.h @@ -22,6 +22,8 @@ namespace EightBit { } protected: + using base = ClockedChip; + ClockedChip() noexcept = default; constexpr void resetCycles() noexcept { m_cycles = 0; } diff --git a/inc/Device.h b/inc/Device.h index 62ec1a5..4c3f689 100644 --- a/inc/Device.h +++ b/inc/Device.h @@ -114,6 +114,8 @@ namespace EightBit { [[nodiscard]] constexpr bool powered() const noexcept { return raised(POWER()); } protected: + using base = Device; + Device() noexcept {}; }; } diff --git a/inc/IntelProcessor.h b/inc/IntelProcessor.h index d01d7a5..69979f3 100644 --- a/inc/IntelProcessor.h +++ b/inc/IntelProcessor.h @@ -80,6 +80,8 @@ namespace EightBit { DECLARE_PIN_OUTPUT(HALT) protected: + using base = IntelProcessor; + IntelProcessor(Bus& bus); template [[nodiscard]] static constexpr uint8_t adjustSign(uint8_t f, const uint8_t value) noexcept { diff --git a/inc/LittleEndianProcessor.h b/inc/LittleEndianProcessor.h index bc68936..5c97118 100644 --- a/inc/LittleEndianProcessor.h +++ b/inc/LittleEndianProcessor.h @@ -14,6 +14,8 @@ namespace EightBit { void pokeWord(register16_t address, register16_t value) noexcept final; protected: + using base = LittleEndianProcessor; + LittleEndianProcessor(Bus& memory) noexcept; [[nodiscard]] register16_t getWord() override; diff --git a/inc/Processor.h b/inc/Processor.h index 6e79b38..2ffb74d 100644 --- a/inc/Processor.h +++ b/inc/Processor.h @@ -39,6 +39,8 @@ namespace EightBit { DECLARE_PIN_INPUT(INT) protected: + using base = Processor; + Processor(Bus& memory) noexcept; [[nodiscard]] constexpr auto& opcode() noexcept { return m_opcode; } diff --git a/inc/co_generator_t.h b/inc/co_generator_t.h index e35fd5c..9b6b3fc 100644 --- a/inc/co_generator_t.h +++ b/inc/co_generator_t.h @@ -15,6 +15,7 @@ public: private: using handle_t = std::coroutine_handle; +public: class promise_type final { private: T value_; @@ -42,6 +43,7 @@ private: [[nodiscard]] constexpr auto& exception() noexcept { return exception_; }; }; +private: handle_t h_; private: