mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-19 08:31:11 +00:00
Applies indirect page zero emulation mode addressing constraint to ix addressing.
Lorenz's LDA tests now pass in emulation mode.
This commit is contained in:
parent
92e72959c3
commit
290598429a
@ -256,6 +256,11 @@ class WolfgangLorenzTests: XCTestCase, CSTestMachineTrapHandler {
|
||||
machine.setValue(0x0801, for: .programCounter)
|
||||
machine.setValue(0xfd, for: .stackPointer)
|
||||
machine.setValue(0x04, for: .flags)
|
||||
|
||||
// For consistency when debugging; otherwise immaterial.
|
||||
machine.setValue(0x00, for: .A)
|
||||
machine.setValue(0x00, for: .X)
|
||||
machine.setValue(0x00, for: .Y)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -249,7 +249,10 @@ template <typename BusHandler> void Processor<BusHandler>::run_for(const Cycles
|
||||
continue;
|
||||
|
||||
case OperationConstructDirectIndexedIndirect:
|
||||
data_address_ = data_bank_ + (direct_ + x() + instruction_buffer_.value) & 0xffff;
|
||||
data_address_ = data_bank_ + (
|
||||
((direct_ + x() + instruction_buffer_.value) & e_masks_[1]) +
|
||||
(direct_ & e_masks_[0])
|
||||
) & 0xffff;
|
||||
if(!(direct_&0xff)) {
|
||||
++next_op_;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user