More consistency updates between i8080 and Z80.

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon 2017-12-04 23:41:49 +00:00
parent 1bf797490b
commit 6a47f710b9
3 changed files with 10 additions and 2 deletions

View File

@ -36,6 +36,8 @@ namespace EightBit {
virtual register16_t& DE() override;
virtual register16_t& HL() override;
virtual void reset() override;
private:
bool m_interruptEnable = false;
bool m_intLine = false;

View File

@ -25,6 +25,12 @@ EightBit::register16_t& EightBit::Intel8080::HL() {
return hl;
}
void EightBit::Intel8080::reset() {
IntelProcessor::reset();
INT() = false;
di();
}
void EightBit::Intel8080::di() {
m_interruptEnable = false;
}

View File

@ -28,6 +28,7 @@ void EightBit::Z80::reset() {
IntelProcessor::reset();
INT() = NMI() = false;
di();
IM() = 0;
@ -662,9 +663,8 @@ int EightBit::Z80::step() {
if (IFF1()) {
di();
switch (IM()) {
case 0:
case 0: // i8080 equivalent
return execute(BUS().DATA());
break;
case 1:
restart(7 << 3);
addCycles(13);