mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-21 20:29:06 +00:00
This should bring me up to absolute, y.
i.e. next is datasheet program 7.
This commit is contained in:
parent
8a83024962
commit
4ebf594b3b
@ -79,6 +79,12 @@ template <typename BusHandler> void Processor<BusHandler>::run_for(const Cycles
|
|||||||
bus_operation = MOS6502Esque::Read;
|
bus_operation = MOS6502Esque::Read;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case CycleFetchIncorrectDataAddress:
|
||||||
|
bus_address = incorrect_data_address_;
|
||||||
|
bus_value = &throwaway;
|
||||||
|
bus_operation = MOS6502Esque::Read;
|
||||||
|
break;
|
||||||
|
|
||||||
case CycleFetchIncrementData:
|
case CycleFetchIncrementData:
|
||||||
bus_address = data_address_;
|
bus_address = data_address_;
|
||||||
bus_value = data_buffer_.next_input();
|
bus_value = data_buffer_.next_input();
|
||||||
@ -163,6 +169,21 @@ template <typename BusHandler> void Processor<BusHandler>::run_for(const Cycles
|
|||||||
data_address_ = (instruction_buffer_.value + (x_.full & x_masks_[1])) & 0xffff;
|
data_address_ = (instruction_buffer_.value + (x_.full & x_masks_[1])) & 0xffff;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case OperationConstructAbsoluteLongX:
|
||||||
|
data_address_ = instruction_buffer_.value + (x_.full & x_masks_[1]);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case OperationConstructAbsoluteXRead:
|
||||||
|
case OperationConstructAbsoluteX:
|
||||||
|
data_address_ = ((instruction_buffer_.value + (x_.full & x_masks_[1])) & 0xffff) | data_bank_;
|
||||||
|
incorrect_data_address_ = (data_address_ & 0xff) | (instruction_buffer_.value & 0xff00) | data_bank_;
|
||||||
|
|
||||||
|
// If the incorrect address isn't actually incorrect, skip its usage.
|
||||||
|
if(operation == OperationConstructAbsoluteXRead && data_address_ == incorrect_data_address_) {
|
||||||
|
++next_op_;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Performance.
|
// Performance.
|
||||||
//
|
//
|
||||||
|
@ -264,6 +264,7 @@ struct ProcessorStorage {
|
|||||||
};
|
};
|
||||||
Buffer instruction_buffer_, data_buffer_;
|
Buffer instruction_buffer_, data_buffer_;
|
||||||
uint32_t data_address_;
|
uint32_t data_address_;
|
||||||
|
uint32_t incorrect_data_address_;
|
||||||
|
|
||||||
std::vector<MicroOp> micro_ops_;
|
std::vector<MicroOp> micro_ops_;
|
||||||
MicroOp *next_op_ = nullptr;
|
MicroOp *next_op_ = nullptr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user