mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-30 04:50:08 +00:00
Implements STZ.
This commit is contained in:
parent
8b50ab2593
commit
aed4c0539e
@ -87,6 +87,10 @@ class KlausDormannTests: XCTestCase {
|
|||||||
case 0x183a: return "STA (zp) acted as JAM"
|
case 0x183a: return "STA (zp) acted as JAM"
|
||||||
case 0x1849: return "LDA/STA (zp) left flags in incorrect state"
|
case 0x1849: return "LDA/STA (zp) left flags in incorrect state"
|
||||||
|
|
||||||
|
case 0x1983: return "STZ didn't store zero"
|
||||||
|
|
||||||
|
case 0x1b03: return "BIT didn't set flags correctly"
|
||||||
|
|
||||||
case 0: return "Didn't find tests"
|
case 0: return "Didn't find tests"
|
||||||
default: return "Unknown error at \(String(format:"%04x", address))"
|
default: return "Unknown error at \(String(format:"%04x", address))"
|
||||||
}
|
}
|
||||||
|
@ -201,6 +201,7 @@ if(number_of_cycles <= Cycles(0)) break;
|
|||||||
case OperationSTA: operand_ = a_; continue;
|
case OperationSTA: operand_ = a_; continue;
|
||||||
case OperationSTX: operand_ = x_; continue;
|
case OperationSTX: operand_ = x_; continue;
|
||||||
case OperationSTY: operand_ = y_; continue;
|
case OperationSTY: operand_ = y_; continue;
|
||||||
|
case OperationSTZ: operand_ = 0; continue;
|
||||||
case OperationSAX: operand_ = a_ & x_; continue;
|
case OperationSAX: operand_ = a_ & x_; continue;
|
||||||
case OperationSHA: operand_ = a_ & x_ & (address_.bytes.high+1); continue;
|
case OperationSHA: operand_ = a_ & x_ & (address_.bytes.high+1); continue;
|
||||||
case OperationSHX: operand_ = x_ & (address_.bytes.high+1); continue;
|
case OperationSHX: operand_ = x_ & (address_.bytes.high+1); continue;
|
||||||
|
@ -286,6 +286,12 @@ ProcessorStorage::ProcessorStorage(Personality personality) {
|
|||||||
Install(0xb2, ZeroIndirectRead(OperationLDA));
|
Install(0xb2, ZeroIndirectRead(OperationLDA));
|
||||||
Install(0xd2, ZeroIndirectRead(OperationCMP));
|
Install(0xd2, ZeroIndirectRead(OperationCMP));
|
||||||
Install(0xd2, ZeroIndirectRead(OperationSBC));
|
Install(0xd2, ZeroIndirectRead(OperationSBC));
|
||||||
|
|
||||||
|
// Add STZ.
|
||||||
|
Install(0x9c, AbsoluteWrite(OperationSTZ));
|
||||||
|
Install(0x9e, AbsoluteXWrite(OperationSTZ));
|
||||||
|
Install(0x64, ZeroWrite(OperationSTZ));
|
||||||
|
Install(0x74, ZeroXWrite(OperationSTZ));
|
||||||
}
|
}
|
||||||
#undef Install
|
#undef Install
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,8 @@ class ProcessorStorage {
|
|||||||
OperationIncrementOperand, OperationORA, OperationAND, OperationEOR,
|
OperationIncrementOperand, OperationORA, OperationAND, OperationEOR,
|
||||||
OperationINS, OperationADC, OperationSBC, OperationLDA,
|
OperationINS, OperationADC, OperationSBC, OperationLDA,
|
||||||
OperationLDX, OperationLDY, OperationLAX, OperationSTA,
|
OperationLDX, OperationLDY, OperationLAX, OperationSTA,
|
||||||
OperationSTX, OperationSTY, OperationSAX, OperationSHA,
|
OperationSTX, OperationSTY, OperationSTZ,
|
||||||
|
OperationSAX, OperationSHA,
|
||||||
OperationSHX, OperationSHY, OperationSHS, OperationCMP,
|
OperationSHX, OperationSHY, OperationSHS, OperationCMP,
|
||||||
OperationCPX, OperationCPY, OperationBIT, OperationASL,
|
OperationCPX, OperationCPY, OperationBIT, OperationASL,
|
||||||
OperationASO, OperationROL, OperationRLA, OperationLSR,
|
OperationASO, OperationROL, OperationRLA, OperationLSR,
|
||||||
|
Loading…
Reference in New Issue
Block a user