CPU: Fixed MVN/MVP instructions using the wrong src/dest banks

This commit is contained in:
Sour 2019-02-20 20:00:59 -05:00
parent 011caf951c
commit f75db1b297
2 changed files with 5 additions and 5 deletions

View file

@ -614,8 +614,8 @@ Move operations
****************/
void Cpu::MVN()
{
uint32_t srcBank = (_operand << 16) & 0xFF0000;
uint32_t destBank = (_operand << 8) & 0xFF0000;
uint32_t destBank = (_operand << 16) & 0xFF0000;
uint32_t srcBank = (_operand << 8) & 0xFF0000;
while(_state.A != 0xFFFF) {
uint8_t value = ReadData(srcBank | _state.X);
Write(destBank | _state.Y, value);
@ -628,8 +628,8 @@ void Cpu::MVN()
void Cpu::MVP()
{
uint32_t srcBank = (_operand << 16) & 0xFF0000;
uint32_t destBank = (_operand << 8) & 0xFF0000;
uint32_t destBank = (_operand << 16) & 0xFF0000;
uint32_t srcBank = (_operand << 8) & 0xFF0000;
while(_state.A != 0xFFFF) {
uint8_t value = ReadData(srcBank | _state.X);
Write(destBank | _state.Y, value);

View file

@ -54,7 +54,7 @@ void DisassemblyInfo::GetDisassembly(string &out, uint32_t memoryAddr)
case AddrMode::AbsLng: str.Write(operand); break;
case AddrMode::AbsLngJmp: str.Write(operand); break;
case AddrMode::Acc: break;
case AddrMode::BlkMov: str.Write(operand[0], operand[1], " <- ", operand[2], operand[3]); break; //TODO
case AddrMode::BlkMov: str.Write(operand[1], operand[2], " -> ", operand[3], operand[4]); break;
case AddrMode::DirIdxIndX: str.Write('(', operand, ",X)"); break;
case AddrMode::DirIdxX: str.Write(operand, ",X"); break;
case AddrMode::DirIdxY: str.Write(operand, ",Y"); break;