Simplify Z80 instruction timing a little.

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon
2020-02-23 09:37:03 +00:00
parent 0b6a656a45
commit 99f0712801

View File

@@ -230,6 +230,7 @@ EightBit::register16_t EightBit::Z80::sbc(uint8_t& f, const register16_t operand
MEMPTR() = operand + 1; MEMPTR() = operand + 1;
tick(7);
return result; return result;
} }
@@ -260,6 +261,7 @@ EightBit::register16_t EightBit::Z80::add(uint8_t& f, const register16_t operand
MEMPTR() = operand + 1; MEMPTR() = operand + 1;
tick(7);
return result; return result;
} }
@@ -852,7 +854,6 @@ void EightBit::Z80::executeED(const int x, const int y, const int z, const int p
default: default:
UNREACHABLE; UNREACHABLE;
} }
tick(7);
break; break;
case 3: // Retrieve/store register pair from/to immediate address case 3: // Retrieve/store register pair from/to immediate address
BUS().ADDRESS() = fetchWord(); BUS().ADDRESS() = fetchWord();
@@ -1078,7 +1079,6 @@ void EightBit::Z80::executeOther(const int x, const int y, const int z, const in
break; break;
case 1: // ADD HL,rp case 1: // ADD HL,rp
HL2() = add(F(), HL2(), RP(p)); HL2() = add(F(), HL2(), RP(p));
tick(7);
break; break;
default: default:
UNREACHABLE; UNREACHABLE;