mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-06-03 05:29:43 +00:00
Start using "base" as means to access base-class.
This commit is contained in:
parent
f19e67875e
commit
1c2b116a42
|
@ -14,6 +14,8 @@ namespace EightBit {
|
||||||
void pokeWord(register16_t address, register16_t value) noexcept final;
|
void pokeWord(register16_t address, register16_t value) noexcept final;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
using base = BigEndianProcessor;
|
||||||
|
|
||||||
BigEndianProcessor(Bus& memory) noexcept;
|
BigEndianProcessor(Bus& memory) noexcept;
|
||||||
|
|
||||||
[[nodiscard]] register16_t getWord() override;
|
[[nodiscard]] register16_t getWord() override;
|
||||||
|
|
|
@ -70,6 +70,8 @@ namespace EightBit {
|
||||||
: Device(rhs) {}
|
: Device(rhs) {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
using base = Chip;
|
||||||
|
|
||||||
Chip() noexcept = default;
|
Chip() noexcept = default;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,8 @@ namespace EightBit {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
using base = ClockedChip;
|
||||||
|
|
||||||
ClockedChip() noexcept = default;
|
ClockedChip() noexcept = default;
|
||||||
|
|
||||||
constexpr void resetCycles() noexcept { m_cycles = 0; }
|
constexpr void resetCycles() noexcept { m_cycles = 0; }
|
||||||
|
|
|
@ -114,6 +114,8 @@ namespace EightBit {
|
||||||
[[nodiscard]] constexpr bool powered() const noexcept { return raised(POWER()); }
|
[[nodiscard]] constexpr bool powered() const noexcept { return raised(POWER()); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
using base = Device;
|
||||||
|
|
||||||
Device() noexcept {};
|
Device() noexcept {};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,6 +80,8 @@ namespace EightBit {
|
||||||
DECLARE_PIN_OUTPUT(HALT)
|
DECLARE_PIN_OUTPUT(HALT)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
using base = IntelProcessor;
|
||||||
|
|
||||||
IntelProcessor(Bus& bus);
|
IntelProcessor(Bus& bus);
|
||||||
|
|
||||||
template<class T> [[nodiscard]] static constexpr uint8_t adjustSign(uint8_t f, const uint8_t value) noexcept {
|
template<class T> [[nodiscard]] static constexpr uint8_t adjustSign(uint8_t f, const uint8_t value) noexcept {
|
||||||
|
|
|
@ -14,6 +14,8 @@ namespace EightBit {
|
||||||
void pokeWord(register16_t address, register16_t value) noexcept final;
|
void pokeWord(register16_t address, register16_t value) noexcept final;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
using base = LittleEndianProcessor;
|
||||||
|
|
||||||
LittleEndianProcessor(Bus& memory) noexcept;
|
LittleEndianProcessor(Bus& memory) noexcept;
|
||||||
|
|
||||||
[[nodiscard]] register16_t getWord() override;
|
[[nodiscard]] register16_t getWord() override;
|
||||||
|
|
|
@ -39,6 +39,8 @@ namespace EightBit {
|
||||||
DECLARE_PIN_INPUT(INT)
|
DECLARE_PIN_INPUT(INT)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
using base = Processor;
|
||||||
|
|
||||||
Processor(Bus& memory) noexcept;
|
Processor(Bus& memory) noexcept;
|
||||||
|
|
||||||
[[nodiscard]] constexpr auto& opcode() noexcept { return m_opcode; }
|
[[nodiscard]] constexpr auto& opcode() noexcept { return m_opcode; }
|
||||||
|
|
|
@ -15,6 +15,7 @@ public:
|
||||||
private:
|
private:
|
||||||
using handle_t = std::coroutine_handle<promise_type>;
|
using handle_t = std::coroutine_handle<promise_type>;
|
||||||
|
|
||||||
|
public:
|
||||||
class promise_type final {
|
class promise_type final {
|
||||||
private:
|
private:
|
||||||
T value_;
|
T value_;
|
||||||
|
@ -42,6 +43,7 @@ private:
|
||||||
[[nodiscard]] constexpr auto& exception() noexcept { return exception_; };
|
[[nodiscard]] constexpr auto& exception() noexcept { return exception_; };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private:
|
||||||
handle_t h_;
|
handle_t h_;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user