19 A = (
A & 0xff00) | ((
A & value) & 0xff);
21 uint16_t value =
ReadWord(low, high,
true);
31 A = (
A & 0xff00) | ((
A ^ value) & 0xff);
33 uint16_t value =
ReadWord(low, high,
true);
46 if (result > 0x9) result = ((result + 0x6) & 0xf) + 0x10;
47 result = (
A & 0xf0) + (value & 0xf0) + result;
52 (value & 0x80) != (result & 0x80));
55 A = (
A & 0xff00) | (result & 0xff);
57 uint16_t value =
ReadWord(low, high,
true);
61 if (result > 0x9) result = ((result + 0x6) & 0xf) + 0x10;
62 result = (
A & 0xf0) + (value & 0xf0) + result;
63 if (result > 0x9f) result = ((result + 0x60) & 0xff) + 0x100;
64 result = (
A & 0xf00) + (value & 0xf00) + result;
65 if (result > 0x9ff) result = ((result + 0x600) & 0xfff) + 0x1000;
66 result = (
A & 0xf000) + (value & 0xf000) + result;
71 (value & 0x8000) != (result & 0x8000));
82 uint8_t value =
ReadByte(low) ^ 0xff;
87 result = (result - 0x6) & ((result - 0x6 < 0) ? 0xf : 0x1f);
88 result = (
A & 0xf0) + (value & 0xf0) + result;
93 (value & 0x80) != (result & 0x80));
96 A = (
A & 0xff00) | (result & 0xff);
98 uint16_t value =
ReadWord(low, high,
true) ^ 0xffff;
103 result = (result - 0x6) & ((result - 0x6 < 0) ? 0xf : 0x1f);
104 result = (
A & 0xf0) + (value & 0xf0) + result;
106 result = (result - 0x60) & ((result - 0x60 < 0) ? 0xff : 0x1ff);
107 result = (
A & 0xf00) + (value & 0xf00) + result;
109 result = (result - 0x600) & ((result - 0x600 < 0) ? 0xfff : 0x1fff);
110 result = (
A & 0xf000) + (value & 0xf000) + result;
115 (value & 0x8000) != (result & 0x8000));
127 uint8_t value =
ReadByte(low) ^ 0xff;
128 result = (
A & 0xff) + value + 1;
131 uint16_t value =
ReadWord(low, high,
true) ^ 0xffff;
132 result =
A + value + 1;
142 uint8_t value =
ReadByte(low) ^ 0xff;
143 result = (
X & 0xff) + value + 1;
146 uint16_t value =
ReadWord(low, high,
true) ^ 0xffff;
147 result =
X + value + 1;
157 uint8_t value =
ReadByte(low) ^ 0xff;
158 result = (
Y & 0xff) + value + 1;
161 uint16_t value =
ReadWord(low, high,
true) ^ 0xffff;
162 result =
Y + value + 1;
172 uint8_t result = (
A & 0xff) & value;
177 uint16_t value =
ReadWord(low, high,
true);
178 uint16_t result =
A & value;
262 uint16_t value =
ReadWord(low, high,
false);
266 WriteWord(low, high, result,
true,
true);
284 WriteWord(low, high, result,
true,
true);
299 uint16_t value =
ReadWord(low, high,
false);
303 WriteWord(low, high, result,
true,
true);
317 result =
ReadWord(low, high,
false) << 1;
320 WriteWord(low, high, result,
true,
true);
333 result =
ReadWord(low, high,
false) + 1;
335 WriteWord(low, high, result,
true,
true);
348 result =
ReadWord(low, high,
false) - 1;
350 WriteWord(low, high, result,
true,
true);
363 uint16_t value =
ReadWord(low, high,
false);
378 uint16_t value =
ReadWord(low, high,
false);
389 A = (
A & 0xFF00) | ((
A | value) & 0xFF);
393 uint16_t value =
ReadWord(low, high,
true);
void SetZeroFlag(bool set)
void Lsr(uint32_t low, uint32_t high)
void Dec(uint32_t low, uint32_t high)
void Adc(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 SetZN(uint16_t value, bool byte)
void SetCarryFlag(bool set)
uint16_t ReadWord(uint32_t address, uint32_t address_high, bool int_check=false)
void Sbc(uint32_t low, uint32_t high)
void Ror(uint32_t low, uint32_t high)
void Bit(uint32_t low, uint32_t high)
int GetAccumulatorSize() const
memory::CpuCallbacks callbacks_
void Cpy(uint32_t low, uint32_t high)
bool GetDecimalFlag() const
void ORA(uint32_t low, uint32_t high)
void Inc(uint32_t low, uint32_t high)
uint8_t ReadByte(uint32_t address)
void Asl(uint32_t low, uint32_t high)
void Tsb(uint32_t low, uint32_t high)
void Cpx(uint32_t low, uint32_t high)
void SetOverflowFlag(bool set)
bool GetCarryFlag() const
void And(uint32_t low, uint32_t high)
void Sty(uint32_t low, uint32_t high)
void Ldy(uint32_t low, uint32_t high)
void Cmp(uint32_t low, uint32_t high)
void Sta(uint32_t low, uint32_t high)
void WriteByte(uint32_t address, uint8_t value)
void Ldx(uint32_t low, uint32_t high)
void Trb(uint32_t low, uint32_t high)
void Stz(uint32_t low, uint32_t high)
void Lda(uint32_t low, uint32_t high)
void Eor(uint32_t low, uint32_t high)
void Rol(uint32_t low, uint32_t high)
void SetNegativeFlag(bool set)
void Stx(uint32_t low, uint32_t high)
std::function< void(bool waiting)> idle