mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2026-10-24 20:02:21 +00:00
... and some more linux compatibility changes.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
1 parent
a134d935db
commit
ff2f44bbd2
2 files changed
+8
-6
No files matched your search
+1
-1
@@ -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;
|
||||
|
||||
+7
-5
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user