mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2025-01-11 17:29:57 +00:00
More consistency updates between i8080 and Z80.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
parent
1bf797490b
commit
6a47f710b9
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user