mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-23 03:32:32 +00:00
Attempts a full implementation of MVN and MVP.
This commit is contained in:
parent
b416aa640f
commit
d8dccf2500
@ -106,6 +106,18 @@ template <typename BusHandler> void Processor<BusHandler>::run_for(const Cycles
|
|||||||
decrement_data_address();
|
decrement_data_address();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case CycleFetchBlockX:
|
||||||
|
read(((instruction_buffer_.value & 0xff00) << 8) | (x_.full & x_masks_[1]), data_buffer_.any_byte());
|
||||||
|
break;
|
||||||
|
|
||||||
|
case CycleFetchBlockY:
|
||||||
|
read(((instruction_buffer_.value & 0xff00) << 8) | (y_.full & x_masks_[1]), &throwaway);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case CycleStoreBlockY:
|
||||||
|
write(((instruction_buffer_.value & 0xff00) << 8) | (y_.full & x_masks_[1]), data_buffer_.any_byte());
|
||||||
|
break;
|
||||||
|
|
||||||
#undef increment_data_address
|
#undef increment_data_address
|
||||||
#undef decrement_data_address
|
#undef decrement_data_address
|
||||||
|
|
||||||
@ -254,9 +266,25 @@ template <typename BusHandler> void Processor<BusHandler>::run_for(const Cycles
|
|||||||
instruction_buffer_.value = old_pc;
|
instruction_buffer_.value = old_pc;
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case JSL: {
|
//
|
||||||
|
// Block moves.
|
||||||
|
//
|
||||||
|
|
||||||
} break;
|
case MVP:
|
||||||
|
data_bank_ = (instruction_buffer_.value & 0xff) << 16;
|
||||||
|
--x_.full;
|
||||||
|
--y_.full;
|
||||||
|
--a_.full;
|
||||||
|
if(a_.full) pc_ -= 3;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MVN:
|
||||||
|
data_bank_ = (instruction_buffer_.value & 0xff) << 16;
|
||||||
|
++x_.full;
|
||||||
|
++y_.full;
|
||||||
|
--a_.full;
|
||||||
|
if(a_.full) pc_ -= 3;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
assert(false);
|
assert(false);
|
||||||
|
@ -253,6 +253,10 @@ struct ProcessorStorage {
|
|||||||
return byte(size);
|
return byte(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint8_t *any_byte() {
|
||||||
|
return reinterpret_cast<uint8_t *>(&value);
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint8_t *byte(int pointer) {
|
uint8_t *byte(int pointer) {
|
||||||
#if TARGET_RT_BIG_ENDIAN
|
#if TARGET_RT_BIG_ENDIAN
|
||||||
|
Loading…
Reference in New Issue
Block a user