Update CPX and CPY arg length for long addressing
This commit is contained in:
@@ -202,7 +202,7 @@ void CPU::COP() {
|
|||||||
SetDecimalFlag(false);
|
SetDecimalFlag(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPU::CPX(uint16_t value, bool isImmediate) {
|
void CPU::CPX(uint32_t value, bool isImmediate) {
|
||||||
if (GetIndexSize()) { // 8-bit
|
if (GetIndexSize()) { // 8-bit
|
||||||
uint8_t memory_value = isImmediate ? value : memory.ReadByte(value);
|
uint8_t memory_value = isImmediate ? value : memory.ReadByte(value);
|
||||||
compare(X, memory_value);
|
compare(X, memory_value);
|
||||||
@@ -212,7 +212,7 @@ void CPU::CPX(uint16_t value, bool isImmediate) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPU::CPY(uint16_t value, bool isImmediate) {
|
void CPU::CPY(uint32_t value, bool isImmediate) {
|
||||||
if (GetIndexSize()) { // 8-bit
|
if (GetIndexSize()) { // 8-bit
|
||||||
uint8_t memory_value = isImmediate ? value : memory.ReadByte(value);
|
uint8_t memory_value = isImmediate ? value : memory.ReadByte(value);
|
||||||
compare(Y, memory_value);
|
compare(Y, memory_value);
|
||||||
|
|||||||
Reference in New Issue
Block a user