mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2025-08-05 05:24:45 +00:00
Start adding comparison operations to EightBit classes
This commit is contained in:
@@ -26,10 +26,14 @@ namespace EightBit {
|
||||
Signal<LR35902> ExecutingInstruction;
|
||||
Signal<LR35902> ExecutedInstruction;
|
||||
|
||||
[[nodiscard]] register16_t& AF() noexcept final;
|
||||
[[nodiscard]] register16_t& BC() noexcept final;
|
||||
[[nodiscard]] register16_t& DE() noexcept final;
|
||||
[[nodiscard]] register16_t& HL() noexcept final;
|
||||
[[nodiscard]] const register16_t& AF() const noexcept final;
|
||||
[[nodiscard]] auto& AF() noexcept { return IntelProcessor::AF(); }
|
||||
[[nodiscard]] const register16_t& BC() const noexcept final;
|
||||
[[nodiscard]] auto& BC() noexcept { return IntelProcessor::BC(); }
|
||||
[[nodiscard]] const register16_t& DE() const noexcept final;
|
||||
[[nodiscard]] auto& DE() noexcept { return IntelProcessor::DE(); }
|
||||
[[nodiscard]] const register16_t& HL() const noexcept final;
|
||||
[[nodiscard]] auto& HL() noexcept { return IntelProcessor::HL(); }
|
||||
|
||||
bool& IME() noexcept { return m_ime; }
|
||||
|
||||
|
@@ -13,20 +13,21 @@ EightBit::GameBoy::LR35902::LR35902(Bus& memory)
|
||||
});
|
||||
}
|
||||
|
||||
EightBit::register16_t& EightBit::GameBoy::LR35902::AF() noexcept {
|
||||
af.low = higherNibble(af.low);
|
||||
const EightBit::register16_t& EightBit::GameBoy::LR35902::AF() const noexcept {
|
||||
auto* gb = const_cast<LR35902*>(this);
|
||||
gb->af.low = higherNibble(af.low);
|
||||
return af;
|
||||
}
|
||||
|
||||
EightBit::register16_t& EightBit::GameBoy::LR35902::BC() noexcept {
|
||||
const EightBit::register16_t& EightBit::GameBoy::LR35902::BC() const noexcept {
|
||||
return bc;
|
||||
}
|
||||
|
||||
EightBit::register16_t& EightBit::GameBoy::LR35902::DE() noexcept {
|
||||
const EightBit::register16_t& EightBit::GameBoy::LR35902::DE() const noexcept {
|
||||
return de;
|
||||
}
|
||||
|
||||
EightBit::register16_t& EightBit::GameBoy::LR35902::HL() noexcept {
|
||||
const EightBit::register16_t& EightBit::GameBoy::LR35902::HL() const noexcept {
|
||||
return hl;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user