mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2025-01-08 11:29:26 +00:00
... and some more linux compatibility changes.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
parent
a134d935db
commit
ff2f44bbd2
@ -21,8 +21,8 @@ namespace EightBit {
|
||||
private:
|
||||
std::array<uint64_t, 0x100> m_instructions;
|
||||
std::array<uint64_t, 0x10000> m_addresses;
|
||||
Disassembler& m_disassembler;
|
||||
Z80& m_cpu;
|
||||
Disassembler& m_disassembler;
|
||||
|
||||
void dumpInstructionProfiles() const;
|
||||
void dumpAddressProfiles() const;
|
||||
|
@ -327,16 +327,18 @@ void EightBit::Z80::compare(uint8_t& f, uint8_t check, uint8_t value) {
|
||||
|
||||
uint8_t EightBit::Z80::rlc(uint8_t& f, uint8_t operand) {
|
||||
clearFlag(f, NF | HC);
|
||||
setFlag(f, CF, operand & Bit7);
|
||||
operand = _rotl8(operand, 1);
|
||||
const auto carry = operand & Bit7;
|
||||
operand = (operand << 1) | (carry >> 7);
|
||||
setFlag(f, CF, carry);
|
||||
adjustXY<Z80>(f, operand);
|
||||
return operand;
|
||||
}
|
||||
|
||||
uint8_t EightBit::Z80::rrc(uint8_t& f, uint8_t operand) {
|
||||
clearFlag(f, NF | HC);
|
||||
setFlag(f, CF, operand & Bit0);
|
||||
operand = _rotr8(operand, 1);
|
||||
const auto carry = operand & Bit0;
|
||||
operand = (operand >> 1) | (carry << 7);
|
||||
setFlag(f, CF, carry);
|
||||
adjustXY<Z80>(f, operand);
|
||||
return operand;
|
||||
}
|
||||
@ -372,7 +374,7 @@ uint8_t EightBit::Z80::sla(uint8_t& f, uint8_t operand) {
|
||||
uint8_t EightBit::Z80::sra(uint8_t& f, uint8_t operand) {
|
||||
clearFlag(f, NF | HC);
|
||||
setFlag(f, CF, operand & Bit0);
|
||||
operand = (operand >> 1) | operand & Bit7;
|
||||
operand = (operand >> 1) | (operand & Bit7);
|
||||
adjustXY<Z80>(f, operand);
|
||||
return operand;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user