6void Cpu::And(uint32_t low, uint32_t high) {
10 A = (
A & 0xff00) | ((
A & value) & 0xff);
12 uint16_t value =
ReadWord(low, high,
true);
22 A = (
A & 0xff00) | ((
A ^ value) & 0xff);
24 uint16_t value =
ReadWord(low, high,
true);
38 result = ((result + 0x6) & 0xf) + 0x10;
39 result = (
A & 0xf0) + (value & 0xf0) + result;
44 (value & 0x80) != (result & 0x80));
48 A = (
A & 0xff00) | (result & 0xff);
50 uint16_t value =
ReadWord(low, high,
true);
55 result = ((result + 0x6) & 0xf) + 0x10;
56 result = (
A & 0xf0) + (value & 0xf0) + result;
58 result = ((result + 0x60) & 0xff) + 0x100;
59 result = (
A & 0xf00) + (value & 0xf00) + result;
61 result = ((result + 0x600) & 0xfff) + 0x1000;
62 result = (
A & 0xf000) + (value & 0xf000) + result;
67 (value & 0x8000) != (result & 0x8000));
79 uint8_t value =
ReadByte(low) ^ 0xff;
84 result = (result - 0x6) & ((result - 0x6 < 0) ? 0xf : 0x1f);
85 result = (
A & 0xf0) + (value & 0xf0) + result;
90 (value & 0x80) != (result & 0x80));
94 A = (
A & 0xff00) | (result & 0xff);
96 uint16_t value =
ReadWord(low, high,
true) ^ 0xffff;
101 result = (result - 0x6) & ((result - 0x6 < 0) ? 0xf : 0x1f);
102 result = (
A & 0xf0) + (value & 0xf0) + result;
104 result = (result - 0x60) & ((result - 0x60 < 0) ? 0xff : 0x1ff);
105 result = (
A & 0xf00) + (value & 0xf00) + result;
107 result = (result - 0x600) & ((result - 0x600 < 0) ? 0xfff : 0x1fff);
108 result = (
A & 0xf000) + (value & 0xf000) + result;
113 (value & 0x8000) != (result & 0x8000));
126 uint8_t value =
ReadByte(low) ^ 0xff;
127 result = (
A & 0xff) + value + 1;
130 uint16_t value =
ReadWord(low, high,
true) ^ 0xffff;
131 result =
A + value + 1;
141 uint8_t value =
ReadByte(low) ^ 0xff;
142 result = (
X & 0xff) + value + 1;
145 uint16_t value =
ReadWord(low, high,
true) ^ 0xffff;
146 result =
X + value + 1;
156 uint8_t value =
ReadByte(low) ^ 0xff;
157 result = (
Y & 0xff) + value + 1;
160 uint16_t value =
ReadWord(low, high,
true) ^ 0xffff;
161 result =
Y + value + 1;
171 uint8_t result = (
A & 0xff) & value;
176 uint16_t value =
ReadWord(low, high,
true);
177 uint16_t result =
A & value;
261 uint16_t value =
ReadWord(low, high,
false);
265 WriteWord(low, high, result,
true,
true);
283 WriteWord(low, high, result,
true,
true);
298 uint16_t value =
ReadWord(low, high,
false);
302 WriteWord(low, high, result,
true,
true);
316 result =
ReadWord(low, high,
false) << 1;
319 WriteWord(low, high, result,
true,
true);
332 result =
ReadWord(low, high,
false) + 1;
334 WriteWord(low, high, result,
true,
true);
347 result =
ReadWord(low, high,
false) - 1;
349 WriteWord(low, high, result,
true,
true);
362 uint16_t value =
ReadWord(low, high,
false);
377 uint16_t value =
ReadWord(low, high,
false);
388 A = (
A & 0xFF00) | ((
A | value) & 0xFF);
392 uint16_t value =
ReadWord(low, high,
true);
void Stx(uint32_t low, uint32_t high)
void WriteWord(uint32_t address, uint32_t address_high, uint16_t value, bool reversed=false, bool int_check=false)
void Asl(uint32_t low, uint32_t high)
void Inc(uint32_t low, uint32_t high)
void SetZN(uint16_t value, bool byte)
void Ldy(uint32_t low, uint32_t high)
uint16_t ReadWord(uint32_t address)
void Sta(uint32_t low, uint32_t high)
uint8_t ReadByte(uint32_t address)
void Cpy(uint32_t low, uint32_t high)
void Bit(uint32_t low, uint32_t high)
void And(uint32_t low, uint32_t high)
void SetZeroFlag(bool set)
void WriteByte(uint32_t address, uint8_t value)
void ORA(uint32_t low, uint32_t high)
void Sbc(uint32_t low, uint32_t high)
void Trb(uint32_t low, uint32_t high)
void Lda(uint32_t low, uint32_t high)
void Cpx(uint32_t low, uint32_t high)
void Rol(uint32_t low, uint32_t high)
void Tsb(uint32_t low, uint32_t high)
void Dec(uint32_t low, uint32_t high)
void Ldx(uint32_t low, uint32_t high)
int GetAccumulatorSize() const
void SetOverflowFlag(bool set)
void SetCarryFlag(bool set)
bool GetCarryFlag() const
void Eor(uint32_t low, uint32_t high)
void Stz(uint32_t low, uint32_t high)
bool GetDecimalFlag() const
void Cmp(uint32_t low, uint32_t high)
void Ror(uint32_t low, uint32_t high)
void SetNegativeFlag(bool set)
void Sty(uint32_t low, uint32_t high)
void Lsr(uint32_t low, uint32_t high)
void Adc(uint32_t low, uint32_t high)
std::function< void(bool waiting)> idle