bsnes/higan/processor/z80/z80.cpp

38 lines
580 B
C++

#include <processor/processor.hpp>
#include "z80.hpp"
namespace Processor {
#include "instruction.cpp"
#include "instructions.cpp"
#include "disassembler.cpp"
auto Z80::power() -> void {
}
auto Z80::reset() -> void {
r.af = 0x0000;
r.bc = 0x0000;
r.de = 0x0000;
r.hl = 0x0000;
r.ix = 0x0000;
r.iy = 0x0000;
r.sp = 0x0000;
r.pc = 0x0000;
r.i = 0x00;
r.r = 0x00;
r.di = false;
r.ei = false;
r.im = 0;
}
auto Z80::parity(uint8_t value) const -> bool {
value ^= value >> 4;
value ^= value >> 2;
value ^= value >> 1;
return !(value & 1);
}
}