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);
37 if (result > 0x9) result = ((result + 0x6) & 0xf) + 0x10;
38 result = (
A & 0xf0) + (value & 0xf0) + result;
43 (value & 0x80) != (result & 0x80));
46 A = (
A & 0xff00) | (result & 0xff);
48 uint16_t value =
ReadWord(low, high,
true);
52 if (result > 0x9) result = ((result + 0x6) & 0xf) + 0x10;
53 result = (
A & 0xf0) + (value & 0xf0) + result;
54 if (result > 0x9f) result = ((result + 0x60) & 0xff) + 0x100;
55 result = (
A & 0xf00) + (value & 0xf00) + result;
56 if (result > 0x9ff) result = ((result + 0x600) & 0xfff) + 0x1000;
57 result = (
A & 0xf000) + (value & 0xf000) + result;
62 (value & 0x8000) != (result & 0x8000));
73 uint8_t value =
ReadByte(low) ^ 0xff;
78 result = (result - 0x6) & ((result - 0x6 < 0) ? 0xf : 0x1f);
79 result = (
A & 0xf0) + (value & 0xf0) + result;
84 (value & 0x80) != (result & 0x80));
87 A = (
A & 0xff00) | (result & 0xff);
89 uint16_t value =
ReadWord(low, high,
true) ^ 0xffff;
94 result = (result - 0x6) & ((result - 0x6 < 0) ? 0xf : 0x1f);
95 result = (
A & 0xf0) + (value & 0xf0) + result;
97 result = (result - 0x60) & ((result - 0x60 < 0) ? 0xff : 0x1ff);
98 result = (
A & 0xf00) + (value & 0xf00) + result;
100 result = (result - 0x600) & ((result - 0x600 < 0) ? 0xfff : 0x1fff);
101 result = (
A & 0xf000) + (value & 0xf000) + result;
106 (value & 0x8000) != (result & 0x8000));
118 uint8_t value =
ReadByte(low) ^ 0xff;
119 result = (
A & 0xff) + value + 1;
122 uint16_t value =
ReadWord(low, high,
true) ^ 0xffff;
123 result =
A + value + 1;
133 uint8_t value =
ReadByte(low) ^ 0xff;
134 result = (
X & 0xff) + value + 1;
137 uint16_t value =
ReadWord(low, high,
true) ^ 0xffff;
138 result =
X + value + 1;
148 uint8_t value =
ReadByte(low) ^ 0xff;
149 result = (
Y & 0xff) + value + 1;
152 uint16_t value =
ReadWord(low, high,
true) ^ 0xffff;
153 result =
Y + value + 1;
163 uint8_t result = (
A & 0xff) & value;
168 uint16_t value =
ReadWord(low, high,
true);
169 uint16_t result =
A & value;
253 uint16_t value =
ReadWord(low, high,
false);
257 WriteWord(low, high, result,
true,
true);
275 WriteWord(low, high, result,
true,
true);
290 uint16_t value =
ReadWord(low, high,
false);
294 WriteWord(low, high, result,
true,
true);
308 result =
ReadWord(low, high,
false) << 1;
311 WriteWord(low, high, result,
true,
true);
324 result =
ReadWord(low, high,
false) + 1;
326 WriteWord(low, high, result,
true,
true);
339 result =
ReadWord(low, high,
false) - 1;
341 WriteWord(low, high, result,
true,
true);
354 uint16_t value =
ReadWord(low, high,
false);
369 uint16_t value =
ReadWord(low, high,
false);
380 A = (
A & 0xFF00) | ((
A | value) & 0xFF);
384 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)
void Sta(uint32_t low, uint32_t high)
uint8_t ReadByte(uint32_t address)
void Cpy(uint32_t low, uint32_t high)
uint16_t ReadWord(uint32_t address, uint32_t address_high, bool int_check=false)
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)
SNES Emulation and debugging tools.
Main namespace for the application.