mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2026-03-14 10:16:21 +00:00
Lot's of small niggles corrected across the EightBit libraries
This commit is contained in:
@@ -18,14 +18,14 @@ void EightBit::BigEndianProcessor::setWord(const register16_t value) {
|
||||
}
|
||||
|
||||
EightBit::register16_t EightBit::BigEndianProcessor::getWordPaged() {
|
||||
const auto high = getBytePaged();
|
||||
const auto high = memoryRead();
|
||||
++BUS().ADDRESS().low;
|
||||
const auto low = memoryRead();
|
||||
return { low, high };
|
||||
}
|
||||
|
||||
void EightBit::BigEndianProcessor::setWordPaged(const register16_t value) {
|
||||
setBytePaged(value.high);
|
||||
memoryWrite(value.high);
|
||||
++BUS().ADDRESS().low;
|
||||
memoryWrite(value.low);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,6 @@ EightBit::ClockedChip::ClockedChip(const ClockedChip& rhs) noexcept
|
||||
|
||||
bool EightBit::ClockedChip::operator==(const EightBit::ClockedChip& rhs) const noexcept {
|
||||
return
|
||||
Device::operator==(rhs)
|
||||
Chip::operator==(rhs)
|
||||
&& cycles() == rhs.cycles();
|
||||
}
|
||||
|
||||
@@ -96,13 +96,13 @@ int EightBit::IntelProcessor::jrConditional(const int condition) {
|
||||
}
|
||||
|
||||
void EightBit::IntelProcessor::ret() {
|
||||
Processor::ret();
|
||||
LittleEndianProcessor::ret();
|
||||
MEMPTR() = PC();
|
||||
}
|
||||
|
||||
bool EightBit::IntelProcessor::operator==(const EightBit::IntelProcessor& rhs) const noexcept {
|
||||
return
|
||||
Processor::operator==(rhs)
|
||||
LittleEndianProcessor::operator==(rhs)
|
||||
&& HALT() == rhs.HALT()
|
||||
&& MEMPTR() == rhs.MEMPTR()
|
||||
&& SP() == rhs.SP()
|
||||
|
||||
@@ -21,14 +21,14 @@ void EightBit::LittleEndianProcessor::setWord(const register16_t value) {
|
||||
}
|
||||
|
||||
EightBit::register16_t EightBit::LittleEndianProcessor::getWordPaged() {
|
||||
const auto low = getBytePaged();
|
||||
const auto low = memoryRead();
|
||||
++BUS().ADDRESS().low;
|
||||
const auto high = memoryRead();
|
||||
return { low, high };
|
||||
}
|
||||
|
||||
void EightBit::LittleEndianProcessor::setWordPaged(register16_t value) {
|
||||
setBytePaged(value.low);
|
||||
memoryWrite(value.low);
|
||||
++BUS().ADDRESS().low;
|
||||
memoryWrite(value.high);
|
||||
}
|
||||
|
||||
@@ -60,14 +60,6 @@ uint8_t EightBit::Processor::busRead() {
|
||||
return BUS().read();
|
||||
}
|
||||
|
||||
uint8_t EightBit::Processor::getBytePaged(const uint8_t page, const uint8_t offset) {
|
||||
return memoryRead(register16_t(offset, page));
|
||||
}
|
||||
|
||||
void EightBit::Processor::setBytePaged(const uint8_t page, const uint8_t offset, const uint8_t value) {
|
||||
memoryWrite(register16_t(offset, page), value);
|
||||
}
|
||||
|
||||
EightBit::register16_t EightBit::Processor::getWordPaged(register16_t address) {
|
||||
BUS().ADDRESS() = address;
|
||||
return getWordPaged();
|
||||
|
||||
Reference in New Issue
Block a user