Addressing mode simplifications

This commit is contained in:
Adrian Conlon committed 2024-03-14 14:54:52 +00:00
1 parent 33a0889fe1
commit b22d7e47e5
14 files changed
+108 -124

No files matched your search

+1 -1
View File
@@ -47,7 +47,7 @@ namespace EightBit {
void tickMachine() { tick(4); MachineTicked.fire(); }
protected:
int execute() noexcept final;
void execute() noexcept final;
int step() noexcept final;
void handleRESET() noexcept final;
+2 -5
View File
@@ -466,11 +466,12 @@ int EightBit::GameBoy::LR35902::step() noexcept {
}
}
ExecutedInstruction.fire(*this);
assert(cycles() > 0);
assert(cycles() % 4 == 0);
return cycles();
}
int EightBit::GameBoy::LR35902::execute() noexcept {
void EightBit::GameBoy::LR35902::execute() noexcept {
const auto& decoded = getDecodedOpcode(opcode());
@@ -485,10 +486,6 @@ int EightBit::GameBoy::LR35902::execute() noexcept {
executeOther(x, y, z, p, q);
else
executeCB(x, y, z, p, q);
assert(cycles() > 0);
return cycles();
}
void EightBit::GameBoy::LR35902::executeCB(const int x, const int y, const int z, int, int) {