Opcodes up to 0x5F.
This commit is contained in:
parent
61cada6190
commit
bb532aa2d9
|
@ -165,7 +165,6 @@ namespace BizHawk.Emulation.CPUs.CP1610
|
|||
register = (byte)(opcode & 0x3);
|
||||
op1 = opcode & 0x4;
|
||||
return "RLC R" + register + ", " + (op1 + 1);
|
||||
// SLLC
|
||||
case 0x058:
|
||||
case 0x059:
|
||||
case 0x05A:
|
||||
|
@ -174,7 +173,9 @@ namespace BizHawk.Emulation.CPUs.CP1610
|
|||
case 0x05D:
|
||||
case 0x05E:
|
||||
case 0x05F:
|
||||
throw new NotImplementedException();
|
||||
register = (byte)(opcode & 0x3);
|
||||
op1 = opcode & 0x4;
|
||||
return "SLLC R" + register + ", " + (op1 + 1);
|
||||
// SLR
|
||||
case 0x060:
|
||||
case 0x061:
|
||||
|
|
|
@ -337,6 +337,26 @@ namespace BizHawk.Emulation.CPUs.CP1610
|
|||
case 0x05E:
|
||||
case 0x05F:
|
||||
throw new NotImplementedException();
|
||||
register = (byte)(opcode & 0x3);
|
||||
op1 = opcode & 0x4;
|
||||
op2 = Register[register];
|
||||
result = op2 << 1;
|
||||
FlagC = ((op2 & 0x8000) != 0);
|
||||
if (op1 == 0)
|
||||
{
|
||||
// Single shift.
|
||||
PendingCycles -= 6; TotalExecutedCycles += 6;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Double shift.
|
||||
result <<= 1;
|
||||
FlagO = ((op2 & 0x4000) != 0);
|
||||
PendingCycles -= 8; TotalExecutedCycles += 8;
|
||||
}
|
||||
Calc_FlagS(result);
|
||||
Calc_FlagZ(result);
|
||||
Register[register] = (ushort)result;
|
||||
// SLR
|
||||
case 0x060:
|
||||
case 0x061:
|
||||
|
|
Loading…
Reference in New Issue