mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-27 06:35:04 +00:00
Corrects word access order of MOVEM.l.
This commit is contained in:
parent
2cac4b0d74
commit
ef33b004f9
@ -71,20 +71,20 @@ class QL: public CPU::MC68000::BusHandler {
|
|||||||
|
|
||||||
case Microcycle::SelectWord | Microcycle::Read:
|
case Microcycle::SelectWord | Microcycle::Read:
|
||||||
cycle.value->full = is_peripheral ? peripheral_result : base[word_address];
|
cycle.value->full = is_peripheral ? peripheral_result : base[word_address];
|
||||||
if(!(cycle.operation & Microcycle::IsProgram)) printf("[word r %08x -> %04x]\n ", *cycle.address, cycle.value->full);
|
if(!(cycle.operation & Microcycle::IsProgram)) printf("\n[word r %08x -> %04x]\t", *cycle.address, cycle.value->full);
|
||||||
break;
|
break;
|
||||||
case Microcycle::SelectByte | Microcycle::Read:
|
case Microcycle::SelectByte | Microcycle::Read:
|
||||||
cycle.value->halves.low = (is_peripheral ? peripheral_result : base[word_address]) >> cycle.byte_shift();
|
cycle.value->halves.low = (is_peripheral ? peripheral_result : base[word_address]) >> cycle.byte_shift();
|
||||||
if(!(cycle.operation & Microcycle::IsProgram)) printf("[byte r %08x -> %02x]\n", *cycle.address, cycle.value->halves.low);
|
if(!(cycle.operation & Microcycle::IsProgram)) printf("\n[byte r %08x -> %02x]\t", *cycle.address, cycle.value->halves.low);
|
||||||
break;
|
break;
|
||||||
case Microcycle::SelectWord:
|
case Microcycle::SelectWord:
|
||||||
assert(!(is_rom && !is_peripheral));
|
assert(!(is_rom && !is_peripheral));
|
||||||
if(!(cycle.operation & Microcycle::IsProgram)) printf("[word w %04x -> %08x]\n", cycle.value->full, *cycle.address);
|
if(!(cycle.operation & Microcycle::IsProgram)) printf("\n{word w %04x -> %08x}\t", cycle.value->full, *cycle.address);
|
||||||
if(!is_peripheral) base[word_address] = cycle.value->full;
|
if(!is_peripheral) base[word_address] = cycle.value->full;
|
||||||
break;
|
break;
|
||||||
case Microcycle::SelectByte:
|
case Microcycle::SelectByte:
|
||||||
assert(!(is_rom && !is_peripheral));
|
assert(!(is_rom && !is_peripheral));
|
||||||
if(!(cycle.operation & Microcycle::IsProgram)) printf("[byte w %02x -> %08x]\n", cycle.value->halves.low, *cycle.address);
|
if(!(cycle.operation & Microcycle::IsProgram)) printf("\n{byte w %02x -> %08x}\t", cycle.value->halves.low, *cycle.address);
|
||||||
if(!is_peripheral) base[word_address] = (cycle.value->halves.low << cycle.byte_shift()) | (base[word_address] & (0xffff ^ cycle.byte_mask()));
|
if(!is_peripheral) base[word_address] = (cycle.value->halves.low << cycle.byte_shift()) | (base[word_address] & (0xffff ^ cycle.byte_mask()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -580,8 +580,8 @@ template <class T, bool dtack_is_implicit> void Processor<T, dtack_is_implicit>:
|
|||||||
step[2].microcycle.address = step[3].microcycle.address = address_storage + 1; \
|
step[2].microcycle.address = step[3].microcycle.address = address_storage + 1; \
|
||||||
\
|
\
|
||||||
const auto target = (offset > 7) ? &address_[offset&7] : &data_[offset]; \
|
const auto target = (offset > 7) ? &address_[offset&7] : &data_[offset]; \
|
||||||
step[(l^2)].microcycle.value = step[(l^2)+1].microcycle.value = &target->halves.high; \
|
step[l].microcycle.value = step[l+1].microcycle.value = &target->halves.high; \
|
||||||
step[l].microcycle.value = step[l+1].microcycle.value = &target->halves.low; \
|
step[(l^2)].microcycle.value = step[(l^2)+1].microcycle.value = &target->halves.low; \
|
||||||
\
|
\
|
||||||
address_storage += 2; \
|
address_storage += 2; \
|
||||||
step += 4; \
|
step += 4; \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user